douyinWEB/scripts/DEPLOY_TEST1_SAFE.md
2026-08-15 04:50:28 -05:00

26 lines
653 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# test1 分支部署数据安全红线
## 原则
服务器上的业务数据是唯一真实来源。`test1` 只允许更新**代码**,禁止用本机或 git 覆盖数据。
## 禁止覆盖
- `backend/data/monitor.db`(及 `-shm` / `-wal`)
- `backend/data/covers/`
- `backend/data/clips/`
- `backend/data/tiktok_cookies/`
- `pb_data/`
## 正确部署
```bash
python scripts/_deploy_test1_safe.py
```
该脚本只会:备份 DB 到 `/tmp` → `git pull test1` → 重启 API → 前端 build → 重启 Web。
## Schema 变更
允许 `ALTER TABLE ADD COLUMN` 等向前兼容迁移;禁止 DROP 表/列、禁止用本机 DB 替换线上。