about summary refs log tree commit diff
path: root/db/migrate/20200110072034_add_index_to_tsv.rb
blob: d6b66c2d67d6a0cf1acb736ad8a8d8d293e73d12 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
class AddIndexToTsv < ActiveRecord::Migration[5.2]
  disable_ddl_transaction!

  def up
    safety_assured do
      execute 'CREATE INDEX CONCURRENTLY statuses_text_vector_idx ON statuses USING GIN(tsv)'
    end
  end

  def down
    safety_assured do
      execute 'DROP INDEX statuses_text_vector_idx ON statuses'
    end
  end
end