Files
streamline/drizzle/0026_prototypes.sql
T
2026-11-16 17:26:44 -08:00

55 lines
1.8 KiB
SQL

-- 原型需求(Prototype)—— 第四条 track,见 docs/prototype.md。
--
-- 与 features 平行、不共用(CLAUDE.md「三种任务类型不要混」现在是四种):没有
-- branch / MR / plan / regen / readable 列,因为这条线不交付代码;多出来的四列是它的
-- 交付物本身:baseline(在哪个已装 App 上验证)、script / report_markdown(最新一轮的
-- Frida 脚本和接手包全文,晋升成 Feature 时要原样带走)、promoted_feature_id。
-- 每一轮的脚本 + 报告归档在 prototype_rounds,晋升时能回看演进。
CREATE TABLE IF NOT EXISTS "prototypes" (
"product_profile" text,
"id" text PRIMARY KEY NOT NULL,
"title" text NOT NULL,
"description" text DEFAULT '' NOT NULL,
"platform" text NOT NULL,
"base_ref" text,
"remark" text,
"attachments" text,
"review_feedback" text,
"review_history" text,
"workspace_path" text,
"pinned" bigint DEFAULT 0 NOT NULL,
"status" text DEFAULT 'awaiting_prototype' NOT NULL,
"priority_key" double precision NOT NULL,
"watchers" text,
"creator_email" text,
"created_at" bigint NOT NULL,
"started_at" bigint,
"finished_at" bigint,
"duration_ms" bigint,
"total_duration_ms" bigint,
"log_path" text,
"before_evidence_path" text,
"after_evidence_path" text,
"failure_reason" text,
"attempts" bigint DEFAULT 0 NOT NULL,
"executor_node_id" text,
"status_changed_at" bigint,
"clusters" text,
"lang" text,
"baseline" text,
"script" text,
"report_markdown" text,
"promoted_feature_id" text
);
CREATE TABLE IF NOT EXISTS "prototype_rounds" (
"prototype_id" text NOT NULL REFERENCES "prototypes"("id") ON DELETE CASCADE,
"round" bigint NOT NULL,
"script" text,
"markdown" text,
"created_at" bigint NOT NULL,
PRIMARY KEY ("prototype_id", "round")
);
CREATE INDEX IF NOT EXISTS "prototypes_status_idx" ON "prototypes" ("status");