diff options
Diffstat (limited to 'db/migrate/20201106135608_remove_redundant_pipelines_index.rb')
-rw-r--r-- | db/migrate/20201106135608_remove_redundant_pipelines_index.rb | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/db/migrate/20201106135608_remove_redundant_pipelines_index.rb b/db/migrate/20201106135608_remove_redundant_pipelines_index.rb new file mode 100644 index 00000000000..03e757c0ec1 --- /dev/null +++ b/db/migrate/20201106135608_remove_redundant_pipelines_index.rb @@ -0,0 +1,17 @@ +# frozen_string_literal: true + +class RemoveRedundantPipelinesIndex < ActiveRecord::Migration[6.0] + include Gitlab::Database::MigrationHelpers + + DOWNTIME = false + + disable_ddl_transaction! + + def up + remove_concurrent_index_by_name :ci_pipelines, :index_ci_pipelines_on_project_id_and_created_at + end + + def down + add_concurrent_index :ci_pipelines, [:project_id, :created_at] + end +end |