Files
grecia/db/migrate/20170914154743_fix_password_changed_at_default.rb
Javi Martín 55addaa58a Apply rubocop rules to migration files
There are some rules which only affect migration files, and we cannot
enable them if we're excluding those files from being inspected.

We're also changing migrations related to the Rails/TimeZone rule
slightly because these fields were already changed afterwards, so we
aren't changing the schema.
2019-10-24 20:35:13 +02:00

10 lines
265 B
Ruby

class FixPasswordChangedAtDefault < ActiveRecord::Migration[4.2]
def up
change_column_default :users, :password_changed_at, Time.zone.local(2015, 1, 1, 1, 1, 1)
end
def down
change_column_default :users, :password_changed_at, Time.zone.now
end
end