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 compatible_table_definition(t)

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

def create_table(table_name, **options)

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