[add] migration script

This commit is contained in:
Mark
2026-03-26 19:56:31 +08:00
parent a416a6b2bd
commit 3ed6f49bb0

View File

@@ -0,0 +1,32 @@
"""202603261955
Revision ID: 6b8a461148ff
Revises: 1480a7d680fb
Create Date: 2026-03-26 19:55:24.041039
"""
from typing import Sequence, Union
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision: str = '6b8a461148ff'
down_revision: Union[str, None] = '1480a7d680fb'
branch_labels: Union[str, Sequence[str], None] = None
depends_on: Union[str, Sequence[str], None] = None
def upgrade() -> None:
# ### commands auto generated by Alembic - please adjust! ###
op.drop_column('tenants', 'feature_user_management')
op.drop_column('tenants', 'feature_billing')
# ### end Alembic commands ###
def downgrade() -> None:
# ### commands auto generated by Alembic - please adjust! ###
op.add_column('tenants', sa.Column('feature_billing', sa.BOOLEAN(), server_default=sa.text('false'), autoincrement=False, nullable=False, comment='是否启用收费管理菜单'))
op.add_column('tenants', sa.Column('feature_user_management', sa.BOOLEAN(), server_default=sa.text('false'), autoincrement=False, nullable=False, comment='是否启用用户管理菜单'))
# ### end Alembic commands ###