31 lines
1.1 KiB
SQL
31 lines
1.1 KiB
SQL
-- 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
|
|
);
|