Class: ActiveRecord::Migration::Compatibility::V6_1
Direct Known Subclasses
Defined Under Namespace
Modules: TableDefinition Classes: PostgreSQLCompat
Instance Method Summary collapse
- #add_column(table_name, column_name, type, **options) ⇒ Object
- #change_column(table_name, column_name, type, **options) ⇒ Object
Methods inherited from V7_0
#add_foreign_key, #add_index, #add_reference, #change_column_null, #create_table, #disable_extension, #rename_table
Methods included from ActiveRecord::Migration::Compatibility::V8_0::RemoveForeignKeyColumnMatch
Instance Method Details
#add_column(table_name, column_name, type, **options) ⇒ Object
204 205 206 207 208 209 210 211 |
# File 'activerecord/lib/active_record/migration/compatibility.rb', line 204 def add_column(table_name, column_name, type, **) if type == :datetime [:precision] ||= nil end type = PostgreSQLCompat.(type, connection) super end |
#change_column(table_name, column_name, type, **options) ⇒ Object
213 214 215 216 217 218 219 220 |
# File 'activerecord/lib/active_record/migration/compatibility.rb', line 213 def change_column(table_name, column_name, type, **) if type == :datetime [:precision] ||= nil end type = PostgreSQLCompat.(type, connection) super end |