diff options
Diffstat (limited to 'db/migrate/20220406121831_add_index_on_status_for_batched_background_migrations.rb')
-rw-r--r-- | db/migrate/20220406121831_add_index_on_status_for_batched_background_migrations.rb | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/db/migrate/20220406121831_add_index_on_status_for_batched_background_migrations.rb b/db/migrate/20220406121831_add_index_on_status_for_batched_background_migrations.rb new file mode 100644 index 00000000000..bc3b9125b4b --- /dev/null +++ b/db/migrate/20220406121831_add_index_on_status_for_batched_background_migrations.rb @@ -0,0 +1,13 @@ +# frozen_string_literal: true + +class AddIndexOnStatusForBatchedBackgroundMigrations < Gitlab::Database::Migration[1.0] + disable_ddl_transaction! + + def up + add_concurrent_index :batched_background_migrations, :status + end + + def down + remove_concurrent_index_by_name :batched_background_migrations, :index_batched_background_migrations_on_status + end +end |