39 lines
1.8 KiB
Python
39 lines
1.8 KiB
Python
"""update
|
|
|
|
Revision ID: 1d13c64e1444
|
|
Revises: ab5fb033599e
|
|
Create Date: 2022-10-05 21:17:42.029110
|
|
|
|
"""
|
|
from alembic import op
|
|
import sqlalchemy as sa
|
|
from sqlalchemy.dialects import mysql
|
|
|
|
# revision identifiers, used by Alembic.
|
|
revision = '1d13c64e1444'
|
|
down_revision = 'ab5fb033599e'
|
|
branch_labels = None
|
|
depends_on = None
|
|
|
|
|
|
def upgrade():
|
|
# ### commands auto generated by Alembic - please adjust! ###
|
|
op.add_column('vadmin_system_dict_details', sa.Column('disabled', sa.Boolean(), nullable=True, comment='字典状态,是否禁用'))
|
|
op.add_column('vadmin_system_dict_details', sa.Column('order', sa.Integer(), nullable=True, comment='字典排序'))
|
|
op.drop_column('vadmin_system_dict_details', 'status')
|
|
op.drop_column('vadmin_system_dict_details', 'sort')
|
|
op.add_column('vadmin_system_dict_type', sa.Column('disabled', sa.Boolean(), nullable=True, comment='字典状态,是否禁用'))
|
|
op.drop_column('vadmin_system_dict_type', 'status')
|
|
# ### end Alembic commands ###
|
|
|
|
|
|
def downgrade():
|
|
# ### commands auto generated by Alembic - please adjust! ###
|
|
op.add_column('vadmin_system_dict_type', sa.Column('status', mysql.TINYINT(display_width=1), autoincrement=False, nullable=True, comment='字典状态,是否可用'))
|
|
op.drop_column('vadmin_system_dict_type', 'disabled')
|
|
op.add_column('vadmin_system_dict_details', sa.Column('sort', mysql.INTEGER(display_width=11), autoincrement=False, nullable=True, comment='字典排序'))
|
|
op.add_column('vadmin_system_dict_details', sa.Column('status', mysql.TINYINT(display_width=1), autoincrement=False, nullable=True, comment='字典状态,是否可用'))
|
|
op.drop_column('vadmin_system_dict_details', 'order')
|
|
op.drop_column('vadmin_system_dict_details', 'disabled')
|
|
# ### end Alembic commands ###
|