Module: ActiveRecord::ConnectionAdapters::MySQL::ColumnMethods
- Included in:
- Table, TableDefinition
- Defined in:
- lib/active_record/connection_adapters/mysql/schema_definitions.rb
Instance Method Summary collapse
- #blob(*args, **options) ⇒ Object
- #json(*args, **options) ⇒ Object
- #longblob(*args, **options) ⇒ Object
- #longtext(*args, **options) ⇒ Object
- #mediumblob(*args, **options) ⇒ Object
- #mediumtext(*args, **options) ⇒ Object
- #primary_key(name, type = :primary_key, **options) ⇒ Object
- #tinyblob(*args, **options) ⇒ Object
- #tinytext(*args, **options) ⇒ Object
- #unsigned_bigint(*args, **options) ⇒ Object
- #unsigned_decimal(*args, **options) ⇒ Object
- #unsigned_float(*args, **options) ⇒ Object
- #unsigned_integer(*args, **options) ⇒ Object
Instance Method Details
#blob(*args, **options) ⇒ Object
10 11 12 |
# File 'lib/active_record/connection_adapters/mysql/schema_definitions.rb', line 10 def blob(*args, **) args.each { |name| column(name, :blob, ) } end |
#json(*args, **options) ⇒ Object
38 39 40 |
# File 'lib/active_record/connection_adapters/mysql/schema_definitions.rb', line 38 def json(*args, **) args.each { |name| column(name, :json, ) } end |
#longblob(*args, **options) ⇒ Object
22 23 24 |
# File 'lib/active_record/connection_adapters/mysql/schema_definitions.rb', line 22 def longblob(*args, **) args.each { |name| column(name, :longblob, ) } end |
#longtext(*args, **options) ⇒ Object
34 35 36 |
# File 'lib/active_record/connection_adapters/mysql/schema_definitions.rb', line 34 def longtext(*args, **) args.each { |name| column(name, :longtext, ) } end |
#mediumblob(*args, **options) ⇒ Object
18 19 20 |
# File 'lib/active_record/connection_adapters/mysql/schema_definitions.rb', line 18 def mediumblob(*args, **) args.each { |name| column(name, :mediumblob, ) } end |
#mediumtext(*args, **options) ⇒ Object
30 31 32 |
# File 'lib/active_record/connection_adapters/mysql/schema_definitions.rb', line 30 def mediumtext(*args, **) args.each { |name| column(name, :mediumtext, ) } end |
#primary_key(name, type = :primary_key, **options) ⇒ Object
5 6 7 8 |
# File 'lib/active_record/connection_adapters/mysql/schema_definitions.rb', line 5 def primary_key(name, type = :primary_key, **) [:auto_increment] = true if [:integer, :bigint].include?(type) && !.key?(:default) super end |
#tinyblob(*args, **options) ⇒ Object
14 15 16 |
# File 'lib/active_record/connection_adapters/mysql/schema_definitions.rb', line 14 def tinyblob(*args, **) args.each { |name| column(name, :tinyblob, ) } end |
#tinytext(*args, **options) ⇒ Object
26 27 28 |
# File 'lib/active_record/connection_adapters/mysql/schema_definitions.rb', line 26 def tinytext(*args, **) args.each { |name| column(name, :tinytext, ) } end |
#unsigned_bigint(*args, **options) ⇒ Object
46 47 48 |
# File 'lib/active_record/connection_adapters/mysql/schema_definitions.rb', line 46 def unsigned_bigint(*args, **) args.each { |name| column(name, :unsigned_bigint, ) } end |
#unsigned_decimal(*args, **options) ⇒ Object
54 55 56 |
# File 'lib/active_record/connection_adapters/mysql/schema_definitions.rb', line 54 def unsigned_decimal(*args, **) args.each { |name| column(name, :unsigned_decimal, ) } end |
#unsigned_float(*args, **options) ⇒ Object
50 51 52 |
# File 'lib/active_record/connection_adapters/mysql/schema_definitions.rb', line 50 def unsigned_float(*args, **) args.each { |name| column(name, :unsigned_float, ) } end |
#unsigned_integer(*args, **options) ⇒ Object
42 43 44 |
# File 'lib/active_record/connection_adapters/mysql/schema_definitions.rb', line 42 def unsigned_integer(*args, **) args.each { |name| column(name, :unsigned_integer, ) } end |