diff options
Diffstat (limited to 'db/migrate/20220109133006_remove_ci_pipelines_lock_version_index.rb')
-rw-r--r-- | db/migrate/20220109133006_remove_ci_pipelines_lock_version_index.rb | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/db/migrate/20220109133006_remove_ci_pipelines_lock_version_index.rb b/db/migrate/20220109133006_remove_ci_pipelines_lock_version_index.rb new file mode 100644 index 00000000000..abbd54ff19b --- /dev/null +++ b/db/migrate/20220109133006_remove_ci_pipelines_lock_version_index.rb @@ -0,0 +1,17 @@ +# 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 |