Initial import of streamline

This commit is contained in:
2026-11-16 17:26:44 -08:00
commit 8e4aec1855
1221 changed files with 274256 additions and 0 deletions
+27
View File
@@ -0,0 +1,27 @@
-- Ideas 详情的评论和审阅章(docs/ideas.md)。0071 已上线,这两张表另起一个迁移。
--
-- 只建新表,不动已有表:先跑迁移再上代码即可,反过来只有评论区 / 盖章报错,不影响看板和 Ideas 墙。
-- 评论:想法详情里的评论区。想法从 Ideas 移除时一起删。
CREATE TABLE IF NOT EXISTS "idea_comments" (
"id" text PRIMARY KEY,
"idea_id" text NOT NULL,
"email" text NOT NULL,
"text" text NOT NULL,
"created_at" bigint NOT NULL
);
CREATE INDEX IF NOT EXISTS idea_comments_idea_idx ON "idea_comments" ("idea_id", "created_at");
-- 审阅章:详情弹窗上盖的 PASS / CONDITIONAL PASS / NO PASS。每人每条想法一个,盖新的替换旧的;
-- x / y 是弹窗内的相对位置(0..1)。NO PASS / CONDITIONAL PASS 要求盖章人在这条下留过评论(写原因)。
-- 想法从 Ideas 移除时一起删。
CREATE TABLE IF NOT EXISTS "idea_stamps" (
"idea_id" text NOT NULL,
"email" text NOT NULL,
"kind" text NOT NULL,
"x" double precision NOT NULL,
"y" double precision NOT NULL,
"rot" double precision NOT NULL DEFAULT 0,
"created_at" bigint NOT NULL,
PRIMARY KEY ("idea_id", "email")
);