debian-mirror-gitlab/db/migrate/20220124200927_add_index_to_issues.rb
2022-05-07 20:08:51 +05:30

17 lines
345 B
Ruby

# frozen_string_literal: true
class AddIndexToIssues < Gitlab::Database::Migration[1.0]
DOWNTIME = false
disable_ddl_transaction!
INDEX_NAME = 'index_issues_on_id_and_weight'
def up
add_concurrent_index :issues, [:id, :weight], name: INDEX_NAME
end
def down
remove_concurrent_index_by_name :issues, INDEX_NAME
end
end