Commit 2b6024b5 authored by Sarah Yasonik's avatar Sarah Yasonik Committed by Sean Arnold

Rename index constant

parent 43177df6
......@@ -3,13 +3,13 @@
class AddEscalationRules < ActiveRecord::Migration[6.0]
include Gitlab::Database::MigrationHelpers
RULE_PROJECT_INDEX_NAME = 'index_on_project_escalation_rule'
RULE_POLICY_INDEX_NAME = 'index_on_project_escalation_rule'
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: { name: RULE_PROJECT_INDEX_NAME }, null: false, foreign_key: { on_delete: :cascade, to_table: :incident_management_escalation_policies }
t.belongs_to :policy, index: { name: RULE_POLICY_INDEX_NAME }, 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, null: false, limit: 4
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment