123456789_123456789_123456789_123456789_123456789_

Class: ActiveRecord::Migration::Compatibility::V6_1

Do not use. This class is for internal use only.

Instance Method Summary

Instance Method Details

#add_column(table_name, column_name, type, **options)

[ GitHub ]

  
# File 'activerecord/lib/active_record/migration/compatibility.rb', line 204

def add_column(table_name, column_name, type, **options)
  if type == :datetime
    options[:precision] ||= nil
  end

  type = PostgreSQLCompat.compatible_timestamp_type(type, connection)
  super
end

#change_column(table_name, column_name, type, **options)

[ GitHub ]

  
# File 'activerecord/lib/active_record/migration/compatibility.rb', line 213

def change_column(table_name, column_name, type, **options)
  if type == :datetime
    options[:precision] ||= nil
  end

  type = PostgreSQLCompat.compatible_timestamp_type(type, connection)
  super
end

#compatible_table_definition(t) (private)

[ GitHub ]

  
# File 'activerecord/lib/active_record/migration/compatibility.rb', line 244

def compatible_table_definition(t)
  t.singleton_class.prepend(TableDefinition)
  super
end