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
244 B
Ruby
12 lines
244 B
Ruby
class AddTsvectorToDebates < ActiveRecord::Migration[4.2]
|
|
def up
|
|
add_column :debates, :tsv, :tsvector
|
|
add_index :debates, :tsv, using: "gin"
|
|
end
|
|
|
|
def down
|
|
remove_index :debates, :tsv
|
|
remove_column :debates, :tsv
|
|
end
|
|
end
|