You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
19 lines
458 B
Django/Jinja
19 lines
458 B
Django/Jinja
# 数据库迁移
|
|
|
|
本目录是业务项目唯一的 Alembic migration 流。
|
|
|
|
```bash
|
|
uv run python -m alembic -c migrations/alembic.ini revision --autogenerate -m "alice add example table"
|
|
uv run python -m alembic -c migrations/alembic.ini upgrade head
|
|
```
|
|
|
|
`versions/` 下的 migration 文件必须提交到 Git。
|
|
|
|
{% if include_system %}
|
|
系统 migration 同步:
|
|
|
|
```bash
|
|
uv run iti-system migrations sync --target migrations/versions
|
|
```
|
|
{% endif %}
|