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.
14 lines
363 B
Ruby
14 lines
363 B
Ruby
class CreateTopics < ActiveRecord::Migration[4.2]
|
|
def change
|
|
create_table :topics do |t|
|
|
t.string :title, null: false
|
|
t.text :description
|
|
t.integer :author_id
|
|
t.integer "comments_count", default: 0
|
|
t.references :community, index: true
|
|
t.datetime :hidden_at, index: true
|
|
t.timestamps null: false
|
|
end
|
|
end
|
|
end
|