summaryrefslogtreecommitdiff
path: root/db/migrate/20210429032320_add_escalation_rules.rb
diff options
context:
space:
mode:
Diffstat (limited to 'db/migrate/20210429032320_add_escalation_rules.rb')
-rw-r--r--db/migrate/20210429032320_add_escalation_rules.rb19
1 files changed, 0 insertions, 19 deletions
diff --git a/db/migrate/20210429032320_add_escalation_rules.rb b/db/migrate/20210429032320_add_escalation_rules.rb
deleted file mode 100644
index 2297f7511a6..00000000000
--- a/db/migrate/20210429032320_add_escalation_rules.rb
+++ /dev/null
@@ -1,19 +0,0 @@
-# frozen_string_literal: true
-
-class AddEscalationRules < ActiveRecord::Migration[6.0]
- include Gitlab::Database::MigrationHelpers
-
- RULE_SCHEDULE_INDEX_NAME = 'index_on_oncall_schedule_escalation_rule'
- UNIQUENESS_INDEX_NAME = 'index_on_policy_schedule_status_elapsed_time_escalation_rules'
-
- def change
- create_table :incident_management_escalation_rules do |t|
- t.belongs_to :policy, index: false, null: false, foreign_key: { on_delete: :cascade, to_table: :incident_management_escalation_policies }
- t.belongs_to :oncall_schedule, index: { name: RULE_SCHEDULE_INDEX_NAME }, null: false, foreign_key: { on_delete: :cascade, to_table: :incident_management_oncall_schedules }
- t.integer :status, null: false, limit: 2
- t.integer :elapsed_time_seconds, null: false, limit: 4
-
- t.index [:policy_id, :oncall_schedule_id, :status, :elapsed_time_seconds], unique: true, name: UNIQUENESS_INDEX_NAME
- end
- end
-end