Commit 186810bc authored by Sean Arnold's avatar Sean Arnold

Make issue_type index partial (incident only)

parent d0f12452
...@@ -6,8 +6,13 @@ class AddIssueTypeIndexToIssues < ActiveRecord::Migration[6.0] ...@@ -6,8 +6,13 @@ class AddIssueTypeIndexToIssues < ActiveRecord::Migration[6.0]
DOWNTIME = false DOWNTIME = false
disable_ddl_transaction! disable_ddl_transaction!
INCIDENT_TYPE = 1
INDEX_NAME = 'index_issues_on_incident_issue_type'
def up def up
add_concurrent_index :issues, :issue_type add_concurrent_index :issues,
:issue_type, where: "issue_type = #{INCIDENT_TYPE}",
name: INDEX_NAME
end end
def down def down
......
...@@ -19697,7 +19697,7 @@ CREATE INDEX index_issues_on_description_trigram ON public.issues USING gin (des ...@@ -19697,7 +19697,7 @@ CREATE INDEX index_issues_on_description_trigram ON public.issues USING gin (des
CREATE INDEX index_issues_on_duplicated_to_id ON public.issues USING btree (duplicated_to_id) WHERE (duplicated_to_id IS NOT NULL); CREATE INDEX index_issues_on_duplicated_to_id ON public.issues USING btree (duplicated_to_id) WHERE (duplicated_to_id IS NOT NULL);
CREATE INDEX index_issues_on_issue_type ON public.issues USING btree (issue_type); CREATE INDEX index_issues_on_incident_issue_type ON public.issues USING btree (issue_type) WHERE (issue_type = 1);
CREATE INDEX index_issues_on_last_edited_by_id ON public.issues USING btree (last_edited_by_id); CREATE INDEX index_issues_on_last_edited_by_id ON public.issues USING btree (last_edited_by_id);
......
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