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>
11 lines
457 B
SQL
11 lines
457 B
SQL
-- Add recurring_series table to store recurrence patterns
|
|
CREATE TABLE "recurring_series" (
|
|
"id" uuid PRIMARY KEY DEFAULT gen_random_uuid() NOT NULL,
|
|
"frequency_weeks" integer NOT NULL,
|
|
"created_at" timestamp DEFAULT now() NOT NULL
|
|
);
|
|
|
|
-- Extend appointments with series tracking
|
|
ALTER TABLE "appointments" ADD COLUMN "series_id" uuid REFERENCES "recurring_series"("id") ON DELETE SET NULL;
|
|
ALTER TABLE "appointments" ADD COLUMN "series_index" integer;
|