Class: ActiveRecord::Migration::Compatibility::V5_2
- Inherits:
-
V6_0
show all
- Defined in:
- activerecord/lib/active_record/migration/compatibility.rb
Direct Known Subclasses
V5_1
Defined Under Namespace
Modules: CommandRecorder, TableDefinition
Instance Method Summary
collapse
Methods inherited from V6_0
#add_reference
Methods inherited from V6_1
#add_column
Instance Method Details
#add_timestamps(table_name, **options) ⇒ Object
254
255
256
257
|
# File 'activerecord/lib/active_record/migration/compatibility.rb', line 254
def add_timestamps(table_name, **options)
options[:precision] ||= nil
super
end
|
#change_table(table_name, **options) ⇒ Object
238
239
240
241
242
243
244
|
# File 'activerecord/lib/active_record/migration/compatibility.rb', line 238
def change_table(table_name, **options)
if block_given?
super { |t| yield compatible_table_definition(t) }
else
super
end
end
|
#create_join_table(table_1, table_2, **options) ⇒ Object
246
247
248
249
250
251
252
|
# File 'activerecord/lib/active_record/migration/compatibility.rb', line 246
def create_join_table(table_1, table_2, **options)
if block_given?
super { |t| yield compatible_table_definition(t) }
else
super
end
end
|
#create_table(table_name, **options) ⇒ Object
230
231
232
233
234
235
236
|
# File 'activerecord/lib/active_record/migration/compatibility.rb', line 230
def create_table(table_name, **options)
if block_given?
super { |t| yield compatible_table_definition(t) }
else
super
end
end
|