55 lines
1.7 KiB
Python
55 lines
1.7 KiB
Python
|
"""empty message
|
||
|
|
||
|
Revision ID: 5bcae7b12e80
|
||
|
Revises: c47fdd1a45f9
|
||
|
Create Date: 2023-04-15 12:36:16.564662
|
||
|
|
||
|
"""
|
||
|
from alembic import op
|
||
|
import sqlalchemy as sa
|
||
|
from sqlalchemy.dialects import mysql
|
||
|
|
||
|
# revision identifiers, used by Alembic.
|
||
|
revision = '5bcae7b12e80'
|
||
|
down_revision = 'c47fdd1a45f9'
|
||
|
branch_labels = None
|
||
|
depends_on = None
|
||
|
|
||
|
|
||
|
def upgrade():
|
||
|
# ### commands auto generated by Alembic - please adjust! ###
|
||
|
with op.batch_alter_table('appointment', schema=None) as batch_op:
|
||
|
batch_op.alter_column('name',
|
||
|
existing_type=mysql.VARCHAR(length=64),
|
||
|
type_=sa.String(length=256),
|
||
|
existing_nullable=True)
|
||
|
batch_op.alter_column('gender',
|
||
|
existing_type=mysql.VARCHAR(length=5),
|
||
|
type_=sa.String(length=256),
|
||
|
existing_nullable=True)
|
||
|
batch_op.alter_column('phone',
|
||
|
existing_type=mysql.VARCHAR(length=15),
|
||
|
type_=sa.String(length=256),
|
||
|
existing_nullable=True)
|
||
|
|
||
|
# ### end Alembic commands ###
|
||
|
|
||
|
|
||
|
def downgrade():
|
||
|
# ### commands auto generated by Alembic - please adjust! ###
|
||
|
with op.batch_alter_table('appointment', schema=None) as batch_op:
|
||
|
batch_op.alter_column('phone',
|
||
|
existing_type=sa.String(length=256),
|
||
|
type_=mysql.VARCHAR(length=15),
|
||
|
existing_nullable=True)
|
||
|
batch_op.alter_column('gender',
|
||
|
existing_type=sa.String(length=256),
|
||
|
type_=mysql.VARCHAR(length=5),
|
||
|
existing_nullable=True)
|
||
|
batch_op.alter_column('name',
|
||
|
existing_type=sa.String(length=256),
|
||
|
type_=mysql.VARCHAR(length=64),
|
||
|
existing_nullable=True)
|
||
|
|
||
|
# ### end Alembic commands ###
|