Commit 87d75c6d authored by dfrazao-gitlab's avatar dfrazao-gitlab

Inconsistent schema - Index

- Remove tmp_index_ci_pipelines_lock_version index (if exists)

Changelog: fixed

Relates to https://gitlab.com/gitlab-org/gitlab/-/issues/349549
parent 82253cc6
# 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
192fc0b934c7d52e431a0ce7524a51beb24fa004a940e6b0675e36b0da143891
\ No newline at end of file
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment