Class: ActiveRecord::Migration::Compatibility::V6_1
- Defined in:
- lib/active_record/migration/compatibility.rb
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
Instance Method Details
#add_column(table_name, column_name, type, **options) ⇒ Object
179 180 181 182 183 184 185 186 |
# File 'lib/active_record/migration/compatibility.rb', line 179 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
188 189 190 191 192 193 194 195 |
# File 'lib/active_record/migration/compatibility.rb', line 188 def change_column(table_name, column_name, type, **) if type == :datetime [:precision] ||= nil end type = PostgreSQLCompat.(type, connection) super end |