fix(sessions): title rectification chats with the result time

This commit is contained in:
jesse-ux
2026-09-25 01:56:57 +08:00
parent 514951d708
commit 88fe67df9b
17 changed files with 592 additions and 118 deletions
@@ -1,12 +1,14 @@
// 只读核对工具。**修补本身已由迁移承担**:
// 历史核对工具,不是活的改标题路径。--apply 会直接报错。
// 下面三段 SQL 只为锁住历史迁移
// frontend/supabase/migrations/20260916020000_rectification_session_title_repair.sql
// 产品跑 Gitea → `Migrate Staging Database` 就会应用它,不需要 SSH 或库口令。
// 不得执行 TITLE_APPLY_SQL:它会把标题写回日期。
// 结果时间口径的回填是
// frontend/supabase/migrations/20260925010000_rectification_session_title_result.sql。
//
// 本文件保留下来有两个用处:
// 1. 排查时数一数还有多少行没对上(不写库,只 select count);
// 2. 下面三段 SQL 是那条迁移的**唯一出处**,迁移逐字抄它们。
// tests/rectification-session-title-repair-migration.test.ts 会比对两边,
// 改了这里而没同步迁移(或反过来)测试就红。
// 2. 下面三段 SQL 只锁历史迁移的逐字合同,不是新的改标题路径。
// tests/rectification-session-title-repair-migration.test.ts 会比对两边。
//
// 需要 SCHEMA_DATABASE_URL 才能连库;没有它的环境只能跑上面那个合同测试。