Files
syops/backend/migrations/versions/d143df04ab5a_merge_migration_heads.py

38 lines
1.2 KiB
Python

"""merge migration heads: 合并「用户多角色/意见反馈附图」与「部门树」两条迁移头
用途:c375467a21f9 与 eff84b4f6171 两条并行迁移链各自成头,导致
``flask db upgrade`` 报 Multiple head revisions(见 scripts/check_migration_heads.py)。
本迁移仅归并两条链,无任何表结构变更,upgrade/downgrade 均为空操作。
依赖关系:down_revision 同时挂载两条待归并的迁移头
- c375467a21f9(合并用户多角色与意见反馈附图两条 alembic 头)
- eff84b4f6171(合并部门树与最新 dev 迁移头)
逻辑关系:作为迁移图的新唯一 head,位于两条链收敛点之后,
后续新迁移应以本 revision 为 down_revision。
Revision ID: d143df04ab5a
Revises: c375467a21f9, eff84b4f6171
Create Date: 2026-10-30
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = 'd143df04ab5a'
down_revision = ('c375467a21f9', 'eff84b4f6171')
branch_labels = None
depends_on = None
def upgrade():
"""纯 merge 迁移:仅收敛迁移图,无结构变更。"""
pass
def downgrade():
"""拆开 merge 点即回到原两条并行头,无需回滚任何结构。"""
pass