summaryrefslogtreecommitdiff
path: root/db/migrate/20201125233219_add_incident_management_on_call_participants.rb
diff options
context:
space:
mode:
Diffstat (limited to 'db/migrate/20201125233219_add_incident_management_on_call_participants.rb')
-rw-r--r--db/migrate/20201125233219_add_incident_management_on_call_participants.rb33
1 files changed, 0 insertions, 33 deletions
diff --git a/db/migrate/20201125233219_add_incident_management_on_call_participants.rb b/db/migrate/20201125233219_add_incident_management_on_call_participants.rb
deleted file mode 100644
index 2a9b1d8b276..00000000000
--- a/db/migrate/20201125233219_add_incident_management_on_call_participants.rb
+++ /dev/null
@@ -1,33 +0,0 @@
-# frozen_string_literal: true
-
-class AddIncidentManagementOnCallParticipants < ActiveRecord::Migration[6.0]
- include Gitlab::Database::MigrationHelpers
-
- DOWNTIME = false
-
- PARTICIPANT_ROTATION_INDEX_NAME = 'index_inc_mgmnt_oncall_participants_on_oncall_rotation_id'
- PARTICIPANT_USER_INDEX_NAME = 'index_inc_mgmnt_oncall_participants_on_oncall_user_id'
- UNIQUE_INDEX_NAME = 'index_inc_mgmnt_oncall_participants_on_user_id_and_rotation_id'
-
- disable_ddl_transaction!
-
- def up
- unless table_exists?(:incident_management_oncall_participants)
- with_lock_retries do
- create_table :incident_management_oncall_participants do |t|
- t.references :oncall_rotation, index: false, null: false, foreign_key: { to_table: :incident_management_oncall_rotations, on_delete: :cascade }
- t.references :user, index: false, null: false, foreign_key: { on_delete: :cascade }
- t.integer :color_palette, limit: 2, null: false
- t.integer :color_weight, limit: 2, null: false
- t.index :user_id, name: PARTICIPANT_USER_INDEX_NAME
- t.index :oncall_rotation_id, name: PARTICIPANT_ROTATION_INDEX_NAME
- t.index [:user_id, :oncall_rotation_id], unique: true, name: UNIQUE_INDEX_NAME
- end
- end
- end
- end
-
- def down
- drop_table :incident_management_oncall_participants
- end
-end