2024-07-29 11:43:52 +08:00

37 lines
1.1 KiB
Python

"""empty message
Revision ID: 72bce1509968
Revises: 411a1d0b9294
Create Date: 2023-04-14 10:35:25.887068
"""
from alembic import op
import sqlalchemy as sa
from sqlalchemy.dialects import mysql
# revision identifiers, used by Alembic.
revision = '72bce1509968'
down_revision = '411a1d0b9294'
branch_labels = None
depends_on = None
def upgrade():
# ### commands auto generated by Alembic - please adjust! ###
with op.batch_alter_table('workday', schema=None) as batch_op:
batch_op.add_column(sa.Column('morning_num', sa.Integer(), nullable=True))
batch_op.add_column(sa.Column('afternoon_num', sa.Integer(), nullable=True))
batch_op.drop_column('num')
# ### end Alembic commands ###
def downgrade():
# ### commands auto generated by Alembic - please adjust! ###
with op.batch_alter_table('workday', schema=None) as batch_op:
batch_op.add_column(sa.Column('num', mysql.INTEGER(display_width=11), autoincrement=False, nullable=True))
batch_op.drop_column('afternoon_num')
batch_op.drop_column('morning_num')
# ### end Alembic commands ###