debian-mirror-gitlab/db/migrate/20211204010826_add_index_snippets_on_project_id_and_title.rb
2022-01-26 12:08:38 +05:30

16 lines
370 B
Ruby

# frozen_string_literal: true
class AddIndexSnippetsOnProjectIdAndTitle < Gitlab::Database::Migration[1.0]
disable_ddl_transaction!
INDEX_NAME = 'index_snippets_on_project_id_and_title'
def up
add_concurrent_index :snippets, [:project_id, :title], name: INDEX_NAME
end
def down
remove_concurrent_index_by_name :snippets, name: INDEX_NAME
end
end