[add] migration script
This commit is contained in:
32
api/migrations/versions/adaefcbe2aa1_202603261630.py
Normal file
32
api/migrations/versions/adaefcbe2aa1_202603261630.py
Normal file
@@ -0,0 +1,32 @@
|
||||
"""202603261630
|
||||
|
||||
Revision ID: adaefcbe2aa1
|
||||
Revises: 1ea8fe97b5b7
|
||||
Create Date: 2026-03-26 16:27:17.590077
|
||||
|
||||
"""
|
||||
from typing import Sequence, Union
|
||||
|
||||
from alembic import op
|
||||
import sqlalchemy as sa
|
||||
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision: str = 'adaefcbe2aa1'
|
||||
down_revision: Union[str, None] = '1ea8fe97b5b7'
|
||||
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.add_column('tenants', sa.Column('feature_billing', sa.Boolean(), server_default='false', nullable=False, comment='是否启用收费管理菜单'))
|
||||
op.add_column('tenants', sa.Column('feature_user_management', sa.Boolean(), server_default='false', nullable=False, comment='是否启用用户管理菜单'))
|
||||
# ### end Alembic commands ###
|
||||
|
||||
|
||||
def downgrade() -> None:
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
op.drop_column('tenants', 'feature_user_management')
|
||||
op.drop_column('tenants', 'feature_billing')
|
||||
# ### end Alembic commands ###
|
||||
Reference in New Issue
Block a user