diff options
Diffstat (limited to 'db/migrate/20200721230558_add_index_to_projects_aimed_for_deletion.rb')
-rw-r--r-- | db/migrate/20200721230558_add_index_to_projects_aimed_for_deletion.rb | 27 |
1 files changed, 0 insertions, 27 deletions
diff --git a/db/migrate/20200721230558_add_index_to_projects_aimed_for_deletion.rb b/db/migrate/20200721230558_add_index_to_projects_aimed_for_deletion.rb deleted file mode 100644 index 44dfe2ff3e1..00000000000 --- a/db/migrate/20200721230558_add_index_to_projects_aimed_for_deletion.rb +++ /dev/null @@ -1,27 +0,0 @@ -# frozen_string_literal: true - -class AddIndexToProjectsAimedForDeletion < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - PROJECTS_AIMED_FOR_DELETION_INDEX_NAME = "index_projects_aimed_for_deletion" - MARKED_FOR_DELETION_PROJECTS_INDEX_NAME = "index_projects_on_marked_for_deletion_at" - - disable_ddl_transaction! - - def up - add_concurrent_index :projects, - :marked_for_deletion_at, - where: "marked_for_deletion_at IS NOT NULL AND pending_delete = false", - name: PROJECTS_AIMED_FOR_DELETION_INDEX_NAME - - remove_concurrent_index_by_name :projects, MARKED_FOR_DELETION_PROJECTS_INDEX_NAME - end - - def down - remove_concurrent_index_by_name :projects, PROJECTS_AIMED_FOR_DELETION_INDEX_NAME - - add_concurrent_index :projects, :marked_for_deletion_at, where: 'marked_for_deletion_at IS NOT NULL' - end -end |