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.
12 lines
303 B
Ruby
12 lines
303 B
Ruby
class CreateLocks < ActiveRecord::Migration[4.2]
|
|
def change
|
|
create_table :locks do |t|
|
|
t.references :user, index: true, foreign_key: true
|
|
t.integer :tries, default: 0
|
|
t.datetime :locked_until, null: false, default: Time.zone.now
|
|
|
|
t.timestamps null: false
|
|
end
|
|
end
|
|
end
|