Files
unknownandCursor 21cc721fcc feat(queries): 完成 M04 查询定义与版本激活
交付不可变查询版本、保存即生效与激活(D26),并带控制台列表筛选排序与试跑预览;补 RLS 下 current_version_no 回填迁移。

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-11-18 18:32:24 +08:00

29 lines
1.0 KiB
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# M04 增补:去掉草稿 + 版本激活
## Goal
查询定义不再使用「草稿/发布」两步。保存内容即生成不可变新版本并自动设为当前生效;可激活任一历史版本;列表与详情均可切换。
## Decisions
- D26(1=C,2=A):版本切换=激活 `current_version_no`;保存内容=新版本且自动 current。
- 版本行仍不可变(D24 库级约束保留)。`draft_*` 列本轮保留并镜像 current,对外不暴露 draft。
## In Scope
- `current_version_no` 迁移与回填。
- create → v1 + current;save-as-version;activate;去 publish/draft API 形状。
- 控制台:保存/激活/列表切换版本;文案去草稿/发布。
## Out Of Scope
- 物理删除 `draft_*` 列。
- 场景采集(M08)。
- 新权限点编码。
## Acceptance
- 新建保存即有 v1 且为 current;再保存得 v2 且 current=v2。
- 激活旧版后列表/详情/默认预览跟 current。
- UI 无保存草稿/发布/返回草稿;列表可切换版本。