Class: ActiveRecord::Migration::Compatibility::V5_2

Inherits:
V6_0
  • Object
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

Instance Method Details

#add_timestamps(table_name, **options) ⇒ Object



69
70
71
72
# File 'activerecord/lib/active_record/migration/compatibility.rb', line 69

def add_timestamps(table_name, **options)
  options[:precision] ||= nil
  super
end

#change_table(table_name, **options) ⇒ Object



53
54
55
56
57
58
59
# File 'activerecord/lib/active_record/migration/compatibility.rb', line 53

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



61
62
63
64
65
66
67
# File 'activerecord/lib/active_record/migration/compatibility.rb', line 61

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



45
46
47
48
49
50
51
# File 'activerecord/lib/active_record/migration/compatibility.rb', line 45

def create_table(table_name, **options)
  if block_given?
    super { |t| yield compatible_table_definition(t) }
  else
    super
  end
end