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:
authorGitLab Bot <gitlab-bot@gitlab.com>2021-03-16 21:18:33 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2021-03-16 21:18:33 +0300
commitf64a639bcfa1fc2bc89ca7db268f594306edfd7c (patch)
treea2c3c2ebcc3b45e596949db485d6ed18ffaacfa1 /db/migrate/20210222042745_add_is_removed_index_to_oncall_participant.rb
parentbfbc3e0d6583ea1a91f627528bedc3d65ba4b10f (diff)
Add latest changes from gitlab-org/gitlab@13-10-stable-eev13.10.0-rc40
Diffstat (limited to 'db/migrate/20210222042745_add_is_removed_index_to_oncall_participant.rb')
-rw-r--r--db/migrate/20210222042745_add_is_removed_index_to_oncall_participant.rb21
1 files changed, 21 insertions, 0 deletions
diff --git a/db/migrate/20210222042745_add_is_removed_index_to_oncall_participant.rb b/db/migrate/20210222042745_add_is_removed_index_to_oncall_participant.rb
new file mode 100644
index 00000000000..cfa9b1b89c9
--- /dev/null
+++ b/db/migrate/20210222042745_add_is_removed_index_to_oncall_participant.rb
@@ -0,0 +1,21 @@
+# frozen_string_literal: true
+
+class AddIsRemovedIndexToOncallParticipant < ActiveRecord::Migration[6.0]
+ include Gitlab::Database::MigrationHelpers
+
+ disable_ddl_transaction!
+
+ DOWNTIME = false
+ EXISTING_INDEX_NAME = 'index_inc_mgmnt_oncall_participants_on_oncall_rotation_id'
+ NEW_INDEX_NAME = 'index_inc_mgmnt_oncall_pcpnt_on_oncall_rotation_id_is_removed'
+
+ def up
+ add_concurrent_index :incident_management_oncall_participants, [:oncall_rotation_id, :is_removed], name: NEW_INDEX_NAME
+ remove_concurrent_index_by_name(:incident_management_oncall_participants, EXISTING_INDEX_NAME)
+ end
+
+ def down
+ add_concurrent_index :incident_management_oncall_participants, :oncall_rotation_id, name: EXISTING_INDEX_NAME
+ remove_concurrent_index_by_name(:incident_management_oncall_participants, NEW_INDEX_NAME)
+ end
+end