This commit is contained in:
大哥大哥的大哥哥
2026-09-09 14:47:29 +08:00
parent 4d9da40abd
commit 65755c9e96
832 changed files with 412085 additions and 0 deletions
@@ -0,0 +1,17 @@
-- 唐侦探 season-01 独立存档。仅新增表;不修改用户、患者或三消业务表。
-- 默认前缀 zyt_;部署时须与 database.prefix 核对。不要对线上库自动执行。
CREATE TABLE IF NOT EXISTS `zyt_tcm_tang_detective_progress` (
`id` bigint unsigned NOT NULL AUTO_INCREMENT,
`user_id` int unsigned NOT NULL COMMENT '统一 token 对应的小程序用户 ID',
`schema_version` smallint unsigned NOT NULL DEFAULT 1,
`content_version` varchar(32) NOT NULL DEFAULT 'season-01',
`revision` int unsigned NOT NULL DEFAULT 1 COMMENT '成功写入递增,旧修订不能覆盖',
`story_generation` int unsigned NOT NULL DEFAULT 0 COMMENT '重新开始故事时递增',
`progress_json` text NOT NULL COMMENT '严格白名单 ID 及游标,不含正文或健康选择',
`last_request_id` varchar(64) CHARACTER SET ascii COLLATE ascii_bin NOT NULL,
`last_request_hash` char(64) CHARACTER SET ascii COLLATE ascii_bin NOT NULL,
`create_time` int unsigned NOT NULL DEFAULT 0,
`update_time` int unsigned NOT NULL DEFAULT 0,
PRIMARY KEY (`id`),
UNIQUE KEY `uk_tang_progress_user` (`user_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='唐侦探用户独立章节存档';