Merge branch 'refactor/backend-architecture' into development
This commit is contained in:
8
api/migrations_legacy/add_chapter_is_active.sql
Normal file
8
api/migrations_legacy/add_chapter_is_active.sql
Normal file
@@ -0,0 +1,8 @@
|
||||
-- 为 chapters 表添加 is_active 字段
|
||||
-- 用于支持"清除回忆"功能:将章节标记为 disabled 而非物理删除
|
||||
-- 默认值为 TRUE,现有章节全部为 active
|
||||
|
||||
ALTER TABLE chapters ADD COLUMN IF NOT EXISTS is_active BOOLEAN DEFAULT TRUE;
|
||||
|
||||
-- 确保现有数据全部为 active
|
||||
UPDATE chapters SET is_active = TRUE WHERE is_active IS NULL;
|
||||
Reference in New Issue
Block a user