Commit e5df6f9c authored by Sean Arnold's avatar Sean Arnold

Remove unnecessary index

parent a2a88b30
......@@ -3,13 +3,12 @@
class AddEscalationRules < ActiveRecord::Migration[6.0]
include Gitlab::Database::MigrationHelpers
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_POLICY_INDEX_NAME }, null: false, foreign_key: { on_delete: :cascade, to_table: :incident_management_escalation_policies }
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
......
......@@ -23614,8 +23614,6 @@ CREATE INDEX index_on_pages_metadata_not_migrated ON project_pages_metadata USIN
CREATE UNIQUE INDEX index_on_policy_schedule_status_elapsed_time_escalation_rules ON incident_management_escalation_rules USING btree (policy_id, oncall_schedule_id, status, elapsed_time_seconds);
CREATE INDEX index_on_project_escalation_rule ON incident_management_escalation_rules USING btree (policy_id);
CREATE UNIQUE INDEX index_on_project_id_escalation_policy_name_unique ON incident_management_escalation_policies USING btree (project_id, name);
CREATE INDEX index_on_projects_lower_path ON projects USING btree (lower((path)::text));
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