class ActiveRecord::Migration::Compatibility::V6_1

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

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

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

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

def compatible_table_definition(t)

def compatible_table_definition(t)
  class << t
    prepend TableDefinition
  end
  super
end