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.
10 lines
255 B
Ruby
10 lines
255 B
Ruby
class AddsResilientLockedUntilDefault < ActiveRecord::Migration[4.2]
|
|
def up
|
|
change_column_default :locks, :locked_until, Time.zone.local(2000, 1, 1, 1, 1, 1)
|
|
end
|
|
|
|
def down
|
|
change_column_default :locks, :locked_until, Time.zone.now
|
|
end
|
|
end
|