discourse/db/migrate/20200911031738_add_index_to...

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

17 lines
398 B
Ruby
Raw Normal View History

# frozen_string_literal: true
class AddIndexToUploadsVerificationStatus < ActiveRecord::Migration[6.0]
disable_ddl_transaction!
def up
execute <<~SQL
CREATE INDEX CONCURRENTLY IF NOT EXISTS
idx_uploads_on_verification_status ON uploads USING btree (verification_status)
SQL
end
def down
execute "DROP INDEX IF EXISTS idx_uploads_on_verification_status"
end
end