fix(reports): separate readable categories from report content
Store readable category snapshots separately from details and evidence, validate report categories, and preserve context in admin displays and moderation actions. Widen report categories to TEXT and bump the schema to 3.2.0 without legacy data conversion. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
1 parent
b2811cc248
commit
b45fd161f0
16 files changed
+797
-75
No files matched your search
@@ -3,7 +3,7 @@
|
||||
/**
|
||||
* 工单表结构契约:
|
||||
* 1) 6 张 aksrt_ticket* 表全部由 DBMigratorPart2 建出,且被 migrate_ticket_tables() 调用;
|
||||
* 2) SCHEMA_VERSION 已升到 3.1.0(dbDelta 只在版本变化时重跑);
|
||||
* 2) SCHEMA_VERSION 已升到 3.2.0(dbDelta 只在版本变化时重跑);
|
||||
* 3) aksrt_order_aftersale 已从 schema 与表名映射中彻底移除;
|
||||
* 4) 状态与部门 seeds 幂等,默认状态被标记为不可改删。
|
||||
*/
|
||||
@@ -27,7 +27,7 @@ const TABLES = [
|
||||
|
||||
test('schema version is bumped so dbDelta re-runs', () => {
|
||||
const migrator = read('src/Core/DBMigrator.php');
|
||||
assert.match(migrator, /const SCHEMA_VERSION = '3\.1\.0';/, 'SCHEMA_VERSION must be 3.1.0');
|
||||
assert.match(migrator, /const SCHEMA_VERSION = '3\.2\.0';/, 'SCHEMA_VERSION must be 3.2.0');
|
||||
assert.ok(migrator.includes('use DBMigratorTicket;'), 'DBMigratorTicket trait not composed');
|
||||
// 版本注释要说明每次升版做了什么,否则后人看不懂升版原因。
|
||||
assert.match(migrator, /3\.0\.0: 售后(order_aftersale)整体替换为工单系统/);
|
||||
|
||||
Reference in new issue
Block a user