debian-mirror-gitlab/db/migrate/20220109133006_remove_ci_pipelines_lock_version_index.rb
2022-03-02 08:16:31 +05:30

17 lines
443 B
Ruby

# frozen_string_literal: true
class RemoveCiPipelinesLockVersionIndex < Gitlab::Database::Migration[1.0]
TABLE = :ci_pipelines
INDEX_NAME = 'tmp_index_ci_pipelines_lock_version'
COLUMN = :id
disable_ddl_transaction!
def up
remove_concurrent_index TABLE, COLUMN, where: "lock_version IS NULL", name: INDEX_NAME
end
def down
add_concurrent_index TABLE, COLUMN, where: "lock_version IS NULL", name: INDEX_NAME
end
end