You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 51ff0c1
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: drizzle/0000_init.sql
+6-1Lines changed: 6 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -127,6 +127,7 @@ CREATE TABLE "contacts" (
127
127
"avatar_url"text,
128
128
"tags"text[] DEFAULT '{}'::text[] NOT NULL,
129
129
"custom_fields" jsonb DEFAULT '{}'::jsonb NOT NULL,
130
+
"alternate_emails"text[] DEFAULT '{}'::text[] NOT NULL,
130
131
"last_contacted_at"timestamp with time zone,
131
132
"message_count"integer DEFAULT 0NOT NULL,
132
133
"created_at"timestamp with time zone DEFAULT now() NOT NULL,
@@ -601,7 +602,9 @@ CREATE INDEX "audit_logs_created_idx" ON "audit_logs" USING btree ("created_at")
601
602
CREATEINDEX "canned_responses_org_idx" ON"canned_responses" USING btree ("org_id");--> statement-breakpoint
602
603
CREATEINDEX "comments_conversation_idx" ON"comments" USING btree ("conversation_id","created_at");--> statement-breakpoint
603
604
CREATEINDEX "contacts_org_idx" ON"contacts" USING btree ("org_id");--> statement-breakpoint
604
-
CREATEUNIQUE INDEX "contacts_org_email_idx" ON"contacts" USING btree ("org_id",lower("email"));--> statement-breakpoint
605
+
CREATEUNIQUE INDEX "contacts_org_email_idx" ON"contacts" USING btree ("org_id",lower("email")) WHERE"contacts"."owner_user_id" is null;--> statement-breakpoint
606
+
CREATEUNIQUE INDEX "contacts_owner_email_idx" ON"contacts" USING btree ("org_id","owner_user_id",lower("email")) WHERE"contacts"."owner_user_id"is not null;--> statement-breakpoint
607
+
CREATEINDEX "contacts_alternate_emails_idx" ON"contacts" USING gin ("alternate_emails");--> statement-breakpoint
605
608
CREATEINDEX "conv_assignees_user_idx" ON"conversation_assignees" USING btree ("user_id");--> statement-breakpoint
606
609
CREATEINDEX "conversation_events_conv_idx" ON"conversation_events" USING btree ("conversation_id","created_at");--> statement-breakpoint
607
610
CREATEINDEX "conv_labels_label_idx" ON"conversation_labels" USING btree ("label_id");--> statement-breakpoint
@@ -624,8 +627,10 @@ CREATE INDEX "memberships_user_idx" ON "memberships" USING btree ("user_id");-->
624
627
CREATEINDEX "messages_conversation_idx" ON"messages" USING btree ("conversation_id","created_at");--> statement-breakpoint
625
628
CREATEINDEX "messages_org_msgid_idx" ON"messages" USING btree ("org_id","message_id");--> statement-breakpoint
626
629
CREATEUNIQUE INDEX "messages_account_msgid_idx" ON"messages" USING btree ("account_id","message_id");--> statement-breakpoint
630
+
CREATEINDEX "messages_account_reply_idx" ON"messages" USING btree ("account_id","in_reply_to");--> statement-breakpoint
627
631
CREATEINDEX "messages_status_send_idx" ON"messages" USING btree ("status","send_at");--> statement-breakpoint
628
632
CREATEINDEX "messages_author_idx" ON"messages" USING btree ("author_id");--> statement-breakpoint
0 commit comments