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.
| 24cf2ca | 1 | -- 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 | |
| 6 | CREATE 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 | |
| 17 | CREATE UNIQUE INDEX IF NOT EXISTS "saved_replies_user_shortcut" ON "saved_replies" ("user_id", "shortcut"); | |
| 18 | ||
| 19 | --> statement-breakpoint | |
| 20 | ALTER TABLE "users" ADD COLUMN IF NOT EXISTS "notify_email_on_mention" boolean DEFAULT true NOT NULL; | |
| 21 | ||
| 22 | --> statement-breakpoint | |
| 23 | ALTER TABLE "users" ADD COLUMN IF NOT EXISTS "notify_email_on_assign" boolean DEFAULT true NOT NULL; | |
| 24 | ||
| 25 | --> statement-breakpoint | |
| 26 | ALTER TABLE "users" ADD COLUMN IF NOT EXISTS "notify_email_on_gate_fail" boolean DEFAULT true NOT NULL; |