123456789_123456789_123456789_123456789_123456789_

Class: ActiveRecord::ConnectionAdapters::PostgreSQL::CompatibilityBehavior::V6_1

Do not use. This class is for internal use only.
Relationships & Source Files
Namespace Children
Modules:
Extension / Inclusion / Inheritance Descendants
Subclasses:
Super Chains via Extension / Inclusion / Inheritance
Class Chain:
Instance Chain:
Inherits: ActiveRecord::ConnectionAdapters::PostgreSQL::CompatibilityBehavior::V7_0
Defined in: activerecord/lib/active_record/connection_adapters/postgresql/compatibility_behavior.rb

Overview

For Rails <= 6.1, :datetime was aliased to :timestamp on PostgreSQL; from ::Rails 7 onwards it resolves to whatever PostgreSQLAdapter.datetime_type is set to.

Class Method Summary

Instance Attribute Summary

Instance Method Summary

Constructor Details

This class inherits a constructor from ActiveRecord::Migration::CompatibilityBehavior

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class ActiveRecord::Migration::CompatibilityBehavior

Instance Method Details

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

[ GitHub ]

  
# File 'activerecord/lib/active_record/connection_adapters/postgresql/compatibility_behavior.rb', line 27

def add_column(table_name, column_name, type, **options)
  type = :timestamp if type.to_sym == :datetime
  super
end

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

[ GitHub ]

  
# File 'activerecord/lib/active_record/connection_adapters/postgresql/compatibility_behavior.rb', line 32

def change_column(table_name, column_name, type, **options)
  type = :timestamp if type.to_sym == :datetime
  super
end