We forgot to do so in commitfc757428e, when we upgraded rubocop-rails. In this upgrade, this rule was changed to include the `change_column` method. Just like we did in commitdf959b74f, I'm raising an `ActiveRecord::IrreversibleMigration` exception in migrations done before version 1.0.0, since making all of them reversible would be too much work for little benefit.
10 lines
239 B
Ruby
10 lines
239 B
Ruby
class DefaultPasswordChangedAt < ActiveRecord::Migration[4.2]
|
|
def up
|
|
change_column :users, :password_changed_at, :datetime, null: false, default: Time.zone.now
|
|
end
|
|
|
|
def down
|
|
fail ActiveRecord::IrreversibleMigration
|
|
end
|
|
end
|