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.

43 lines
1.7 KiB
Python

"""empty message
Revision ID: fffd191071bc
Revises: f9f008bd64bf
Create Date: 2025-10-20 11:27:19.426979
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = 'fffd191071bc'
down_revision = 'f9f008bd64bf'
branch_labels = None
depends_on = None
def upgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.create_table('sys_menu',
sa.Column('name', sa.String(length=255), nullable=False, comment='菜单名称'),
sa.Column('type', sa.Enum('catalog', 'menu', 'button', 'embedded', 'link', name='menutypeenum'), nullable=False, comment='菜单类型'),
sa.Column('path', sa.String(length=255), nullable=False, comment='菜单路径'),
sa.Column('component', sa.String(length=255), nullable=False, comment='菜单组件'),
sa.Column('redirect', sa.String(length=255), nullable=True, comment='菜单重定向'),
sa.Column('sort', sa.Integer(), nullable=False, comment='排序'),
sa.Column('meta', sa.JSON(), nullable=True, comment='菜单元数据'),
sa.Column('status', sa.Enum('enabled', 'disabled', name='statusenum'), nullable=False, comment='状态'),
sa.Column('parent_id', sa.String(length=36), nullable=False, comment='父菜单ID'),
sa.Column('id', sa.String(length=36), nullable=False, comment='标识'),
sa.Column('created_at', sa.DateTime(), nullable=True, comment='创建时间'),
sa.Column('updated_at', sa.DateTime(), nullable=True, comment='更新时间'),
sa.PrimaryKeyConstraint('id', name=op.f('pk_sys_menu'))
)
# ### end Alembic commands ###
def downgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.drop_table('sys_menu')
# ### end Alembic commands ###