Operations migrations
model_operations 使用独立 Alembic 版本线,禁止与平台库 migrations/
混用。当前 V0.1 全量基线仍以 DBA 已审核的 SQL 为准:
docs/database/model_operations-完整建表-V0.1.sql
后续增量变更命令:
uv run --package backend alembic -c operations-alembic.ini current
uv run --package backend alembic -c operations-alembic.ini revision --autogenerate -m "change"
uv run --package backend alembic -c operations-alembic.ini upgrade head
首个增量 revision 建立前,不要用 Alembic 代替 V0.1 全量建表 SQL。
env.py 会忽略尚未纳入 P0 ORM 的已存在业务表,避免 autogenerate
误生成删表操作。