diff options
author | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2016-01-06 03:21:14 -0200 |
---|---|---|
committer | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2016-01-06 03:21:14 -0200 |
commit | 059820c09afaf18e2d29da61db0e0a3215989b89 (patch) | |
tree | 54f344f1c36ef5d9e91e5a35b14c919ffd7b211e /activerecord/lib | |
parent | ced9612b59d1a8fdd38ac1669cf1e6bd43220a24 (diff) | |
parent | 4d4239f980a42d78d3a11b78401c211f0420040d (diff) | |
download | rails-059820c09afaf18e2d29da61db0e0a3215989b89.tar.gz rails-059820c09afaf18e2d29da61db0e0a3215989b89.tar.bz2 rails-059820c09afaf18e2d29da61db0e0a3215989b89.zip |
Merge pull request #21688 from kamipo/add_text_and_blob_shorthand_methods
Add short-hand methods for text and blob types in MySQL
Diffstat (limited to 'activerecord/lib')
-rw-r--r-- | activerecord/lib/active_record/connection_adapters/mysql/schema_definitions.rb | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/activerecord/lib/active_record/connection_adapters/mysql/schema_definitions.rb b/activerecord/lib/active_record/connection_adapters/mysql/schema_definitions.rb index ca7dfda80d..157e75dbf7 100644 --- a/activerecord/lib/active_record/connection_adapters/mysql/schema_definitions.rb +++ b/activerecord/lib/active_record/connection_adapters/mysql/schema_definitions.rb @@ -11,6 +11,30 @@ module ActiveRecord args.each { |name| column(name, :blob, options) } end + def tinyblob(*args, **options) + args.each { |name| column(name, :tinyblob, options) } + end + + def mediumblob(*args, **options) + args.each { |name| column(name, :mediumblob, options) } + end + + def longblob(*args, **options) + args.each { |name| column(name, :longblob, options) } + end + + def tinytext(*args, **options) + args.each { |name| column(name, :tinytext, options) } + end + + def mediumtext(*args, **options) + args.each { |name| column(name, :mediumtext, options) } + end + + def longtext(*args, **options) + args.each { |name| column(name, :longtext, options) } + end + def json(*args, **options) args.each { |name| column(name, :json, options) } end |