feat(CC-067): add assumptions + outcome_reviews tables (migration 0013)

This commit is contained in:
admin-valentin 2026-08-02 12:12:56 +00:00
parent 5de297c848
commit 6251954890

View file

@ -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
);