Additional database indexing.

This commit is contained in:
Patrick Fic
2023-04-28 09:37:49 -07:00
parent ea7c22daec
commit 51ebfd86e7
22 changed files with 34 additions and 0 deletions

View File

@@ -0,0 +1 @@
DROP INDEX IF EXISTS "public"."job_conversations_jobid";

View File

@@ -0,0 +1,2 @@
CREATE INDEX "job_conversations_jobid" on
"public"."job_conversations" using btree ("jobid");

View File

@@ -0,0 +1 @@
DROP INDEX IF EXISTS "public"."job_conversations_conversationid";

View File

@@ -0,0 +1,2 @@
CREATE INDEX "job_conversations_conversationid" on
"public"."job_conversations" using btree ("conversationid");

View File

@@ -0,0 +1 @@
DROP INDEX IF EXISTS "public"."job_conversations_job_and_conversation_id";

View File

@@ -0,0 +1,2 @@
CREATE INDEX "job_conversations_job_and_conversation_id" on
"public"."job_conversations" using btree ("conversationid", "jobid");

View File

@@ -0,0 +1 @@
DROP INDEX IF EXISTS "public"."idx_payments_jobid";

View File

@@ -0,0 +1,2 @@
CREATE INDEX "idx_payments_jobid" on
"public"."payments" using btree ("jobid");

View File

@@ -0,0 +1 @@
DROP INDEX IF EXISTS "public"."idx_mixdata_jobid";

View File

@@ -0,0 +1,2 @@
CREATE INDEX "idx_mixdata_jobid" on
"public"."mixdata" using btree ("jobid");

View File

@@ -0,0 +1 @@
DROP INDEX IF EXISTS "public"."idx_notes_jobid";

View File

@@ -0,0 +1,2 @@
CREATE INDEX "idx_notes_jobid" on
"public"."notes" using btree ("jobid");

View File

@@ -0,0 +1 @@
DROP INDEX IF EXISTS "public"."idx_users_authid";

View File

@@ -0,0 +1,2 @@
CREATE INDEX "idx_users_authid" on
"public"."users" using btree ("authid");

View File

@@ -0,0 +1 @@
DROP INDEX IF EXISTS "public"."idx_employees_shopid";

View File

@@ -0,0 +1,2 @@
CREATE INDEX "idx_employees_shopid" on
"public"."employees" using btree ("shopid");

View File

@@ -0,0 +1 @@
DROP INDEX IF EXISTS "public"."idx_employee_vacation_employeeid";

View File

@@ -0,0 +1,2 @@
CREATE INDEX "idx_employee_vacation_employeeid" on
"public"."employee_vacation" using btree ("employeeid");

View File

@@ -0,0 +1 @@
DROP INDEX IF EXISTS "public"."idx_counters_shopid_type";

View File

@@ -0,0 +1,2 @@
CREATE INDEX "idx_counters_shopid_type" on
"public"."counters" using btree ("shopid", "countertype");

View File

@@ -0,0 +1,3 @@
-- Could not auto-generate a down migration.
-- Please write an appropriate down migration for the SQL below:
-- CREATE INDEX idx_jobs_inproduction_true ON jobs(inproduction) WHERE inproduction = true;

View File

@@ -0,0 +1 @@
CREATE INDEX idx_jobs_inproduction_true ON jobs(inproduction) WHERE inproduction = true;