Merge branch 'refactor/backend-architecture' into development

This commit is contained in:
yangshilin
2026-03-18 17:18:23 +08:00
parent 2070a03d35
commit 48b70e1350
266 changed files with 12386 additions and 9690 deletions

View File

@@ -0,0 +1,19 @@
-- 修正章节排序索引,与 8 分类体系对齐
-- childhood=0, education=1, career_early=2, career_achievement=3,
-- career_challenge=4, family=5, beliefs=6, summary=7
UPDATE chapters SET order_index = 0 WHERE category = 'childhood' AND order_index != 0;
UPDATE chapters SET order_index = 1 WHERE category = 'education' AND order_index != 1;
UPDATE chapters SET order_index = 2 WHERE category = 'career_early' AND order_index != 2;
UPDATE chapters SET order_index = 3 WHERE category = 'career_achievement' AND order_index != 3;
UPDATE chapters SET order_index = 4 WHERE category = 'career_challenge' AND order_index != 4;
UPDATE chapters SET order_index = 5 WHERE category = 'family' AND order_index != 5;
UPDATE chapters SET order_index = 6 WHERE category IN ('belief', 'beliefs') AND order_index != 6;
UPDATE chapters SET order_index = 7 WHERE category = 'summary' AND order_index != 7;
-- 旧的 5-stage "career" 章节归入 career_early
UPDATE chapters SET category = 'career_early', order_index = 2
WHERE category = 'career';
-- 旧的 "belief" 统一为 "beliefs"
UPDATE chapters SET category = 'beliefs'
WHERE category = 'belief';