This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.
# 数据库迁移
iTi-Flask 只初始化 Flask-Migrate。
业务表由业务项目自己维护 migration。
## 基本规则
- 每个业务项目只保留一条 Alembic migration 流。
-`migrations/versions` 必须提交到 Git。
- 运行时数据库文件不提交。
- 已发布的 migration 不回头修改。
- 生产只执行 `db upgrade`。
升级数据库:
```bash
uv run python -m flask --app app.py db upgrade
```
生成 migration:
```bash
uv run python -m flask --app app.py db migrate -m "alice add workorder priority"