Add init db selectively

This commit is contained in:
Xin Wang
2026-02-10 10:38:01 +08:00
parent 323ef61573
commit aa2a358b38
2 changed files with 102 additions and 9 deletions

View File

@@ -21,6 +21,22 @@ python init_db.py
- 创建 `data/app.db` SQLite 数据库
- 初始化默认声音数据
可选参数(按需重建):
```bash
# 仅重建数据库drop + create并初始化默认数据
python init_db.py --rebuild-db
# 仅重建向量库集合(不动 DB 表结构);会重置文档索引状态为 pending
python init_db.py --rebuild-vector-store
# 同时重建 DB 和向量库
python init_db.py --rebuild-db --rebuild-vector-store
# 仅执行重建,不写入默认数据
python init_db.py --rebuild-db --skip-seed
```
### 3. 启动服务
```bash