diff options
Diffstat (limited to 'db/post_migrate/20220719081542_drop_queued_at_index_from_ci_builds.rb')
-rw-r--r-- | db/post_migrate/20220719081542_drop_queued_at_index_from_ci_builds.rb | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/db/post_migrate/20220719081542_drop_queued_at_index_from_ci_builds.rb b/db/post_migrate/20220719081542_drop_queued_at_index_from_ci_builds.rb new file mode 100644 index 00000000000..4a16d022c70 --- /dev/null +++ b/db/post_migrate/20220719081542_drop_queued_at_index_from_ci_builds.rb @@ -0,0 +1,17 @@ +# frozen_string_literal: true + +class DropQueuedAtIndexFromCiBuilds < Gitlab::Database::Migration[2.0] + disable_ddl_transaction! + + INDEX_NAME = 'index_ci_builds_on_queued_at' + + def up + remove_concurrent_index_by_name :ci_builds, INDEX_NAME + end + + # rubocop:disable Migration/PreventIndexCreation + def down + add_concurrent_index :ci_builds, :queued_at, name: INDEX_NAME + end + # rubocop:enable Migration/PreventIndexCreation +end |