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
Methods inherited from V7_0
#add_column, #add_index, #change_column, #change_column_null, #disable_extension, #rename_table
Instance Method Details
#add_timestamps(table_name, **options) ⇒ Object
337
338
339
340
|
# File 'activerecord/lib/active_record/migration/compatibility.rb', line 337
def add_timestamps(table_name, **options)
options[:precision] ||= nil
super
end
|
#change_table(table_name, **options) ⇒ Object
321
322
323
324
325
326
327
|
# File 'activerecord/lib/active_record/migration/compatibility.rb', line 321
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
329
330
331
332
333
334
335
|
# File 'activerecord/lib/active_record/migration/compatibility.rb', line 329
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
313
314
315
316
317
318
319
|
# File 'activerecord/lib/active_record/migration/compatibility.rb', line 313
def create_table(table_name, **options)
if block_given?
super { |t| yield compatible_table_definition(t) }
else
super
end
end
|