Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'db/post_migrate/20210311093723_add_partial_index_on_ci_pipelines_by_cancelable_status_and_users.rb')
-rw-r--r--db/post_migrate/20210311093723_add_partial_index_on_ci_pipelines_by_cancelable_status_and_users.rb30
1 files changed, 0 insertions, 30 deletions
diff --git a/db/post_migrate/20210311093723_add_partial_index_on_ci_pipelines_by_cancelable_status_and_users.rb b/db/post_migrate/20210311093723_add_partial_index_on_ci_pipelines_by_cancelable_status_and_users.rb
deleted file mode 100644
index 176548be6e6..00000000000
--- a/db/post_migrate/20210311093723_add_partial_index_on_ci_pipelines_by_cancelable_status_and_users.rb
+++ /dev/null
@@ -1,30 +0,0 @@
-# frozen_string_literal: true
-
-class AddPartialIndexOnCiPipelinesByCancelableStatusAndUsers < ActiveRecord::Migration[6.0]
- include Gitlab::Database::MigrationHelpers
-
- DOWNTIME = false
- INDEX_NAME = 'index_ci_pipelines_on_user_id_and_id_and_cancelable_status'
- INDEX_FILTER_CONDITION = <<~SQL
- ((status)::text = ANY (
- ARRAY[
- ('running'::character varying)::text,
- ('waiting_for_resource'::character varying)::text,
- ('preparing'::character varying)::text,
- ('pending'::character varying)::text,
- ('created'::character varying)::text,
- ('scheduled'::character varying)::text
- ]
- ))
- SQL
-
- disable_ddl_transaction!
-
- def up
- add_concurrent_index :ci_pipelines, [:user_id, :id], where: INDEX_FILTER_CONDITION, name: INDEX_NAME
- end
-
- def down
- remove_concurrent_index_by_name :ci_pipelines, INDEX_NAME
- end
-end