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 不提供系统 seed。
seed 分三类:
- 框架 seed:当前没有。
- 系统 seed:由 `iti-system` 提供。
- 业务 seed:由业务项目自己维护。
## 规则
seed 代码必须:
- 幂等。
- 可重复执行。
- 按唯一键 upsert。
- 不做破坏性操作。
seed 代码不得:
- 删除用户数据。
- 重置已有管理员密码。
- 写入与当前包无关的数据。
- 替代 migration 修改表结构。
## 系统 Seed
需要用户、角色、菜单等系统能力时,业务项目应依赖 `iti-system`。
命令:
```bash
uv run python -m flask --app app.py iti-system seed system