From 6251954890bbf2b9c5a7795b068f20c44a86d1f7 Mon Sep 17 00:00:00 2001 From: admin-valentin Date: Sun, 2 Aug 2026 12:12:56 +0000 Subject: [PATCH] feat(CC-067): add assumptions + outcome_reviews tables (migration 0013) --- drizzle/0013_assumptions_outcomes.sql | 31 +++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 drizzle/0013_assumptions_outcomes.sql diff --git a/drizzle/0013_assumptions_outcomes.sql b/drizzle/0013_assumptions_outcomes.sql new file mode 100644 index 0000000..55d1963 --- /dev/null +++ b/drizzle/0013_assumptions_outcomes.sql @@ -0,0 +1,31 @@ +-- CC-067: assumptions + outcome_reviews +CREATE TABLE IF NOT EXISTS "assumptions" ( + "id" uuid DEFAULT gen_random_uuid() PRIMARY KEY NOT NULL, + "tenant_id" uuid NOT NULL, + "decision_id" uuid, + "statement" text NOT NULL, + "source" text, + "confidence" text DEFAULT 'medium' NOT NULL, + "status" text DEFAULT 'unverified' NOT NULL, + "review_date" date, + "evidence_url" text, + "notes" text, + "created_at" timestamp DEFAULT now() NOT NULL, + "updated_at" timestamp DEFAULT now() NOT NULL +); + +CREATE TABLE IF NOT EXISTS "outcome_reviews" ( + "id" uuid DEFAULT gen_random_uuid() PRIMARY KEY NOT NULL, + "tenant_id" uuid NOT NULL, + "decision_id" uuid, + "title" text NOT NULL, + "period_start" date, + "period_end" date, + "actual_outcome" text, + "was_successful" boolean, + "lessons_learned" text, + "next_steps" text, + "rating" integer, + "created_at" timestamp DEFAULT now() NOT NULL, + "updated_at" timestamp DEFAULT now() NOT NULL +);