Pre-launch — Gluecron is in final validation. Public signups and git hosting for non-owner users open after launch review.
CodeIssuesDiscussionsWikiPull RequestsProjectsCommitsActionsReleasesContributorsPulse● GatesSecuritySettingsDeploymentsPipelineInsightsAgents✨ Explain✨ Ask AI✨ Workspace✨ Spec✨ Tests▓ Debt Map✨ NL Search🏛 Archaeology
Blame · Line-by-line history

0002_saved_replies_and_email.sql

Each line is annotated with the commit that last touched it. Click any SHA to jump to that commit and see the surrounding change.

0002_saved_replies_and_email.sqlBlame26 lines · 1 contributor
24cf2caClaude1-- Gluecron migration 0002:
2-- - saved_replies (Block A6)
3-- - users.notify_email_on_mention, users.notify_email_on_assign (Block A8)
4
5--> statement-breakpoint
6CREATE TABLE IF NOT EXISTS "saved_replies" (
7 "id" uuid PRIMARY KEY DEFAULT gen_random_uuid() NOT NULL,
8 "user_id" uuid NOT NULL,
9 "shortcut" text NOT NULL,
10 "body" text NOT NULL,
11 "created_at" timestamp DEFAULT now() NOT NULL,
12 "updated_at" timestamp DEFAULT now() NOT NULL,
13 CONSTRAINT "saved_replies_user_id_fk" FOREIGN KEY ("user_id") REFERENCES "users"("id") ON DELETE cascade
14);
15
16--> statement-breakpoint
17CREATE UNIQUE INDEX IF NOT EXISTS "saved_replies_user_shortcut" ON "saved_replies" ("user_id", "shortcut");
18
19--> statement-breakpoint
20ALTER TABLE "users" ADD COLUMN IF NOT EXISTS "notify_email_on_mention" boolean DEFAULT true NOT NULL;
21
22--> statement-breakpoint
23ALTER TABLE "users" ADD COLUMN IF NOT EXISTS "notify_email_on_assign" boolean DEFAULT true NOT NULL;
24
25--> statement-breakpoint
26ALTER TABLE "users" ADD COLUMN IF NOT EXISTS "notify_email_on_gate_fail" boolean DEFAULT true NOT NULL;