abac9dfe6c
- Add source code from apps/api - Add packages/db and packages/types workspace dependencies - Add GitHub Actions CI workflow (lint, typecheck, test, docker) - Generate pnpm-lock.yaml - Add .gitignore Co-Authored-By: Paperclip <noreply@paperclip.ing>
12 lines
467 B
SQL
12 lines
467 B
SQL
-- Add email opt-out flag to clients
|
|
ALTER TABLE "clients" ADD COLUMN "email_opt_out" boolean NOT NULL DEFAULT false;
|
|
|
|
-- Track sent reminders to prevent duplicate sends
|
|
CREATE TABLE "reminder_logs" (
|
|
"id" uuid PRIMARY KEY DEFAULT gen_random_uuid() NOT NULL,
|
|
"appointment_id" uuid NOT NULL REFERENCES "appointments"("id") ON DELETE CASCADE,
|
|
"reminder_type" text NOT NULL,
|
|
"sent_at" timestamp DEFAULT now() NOT NULL,
|
|
UNIQUE ("appointment_id", "reminder_type")
|
|
);
|