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

41 lines
1.2 KiB
Python

"""empty message
Revision ID: 698ff838fb8e
Revises: 49aeda2e2b80
Create Date: 2023-04-15 09:11:10.273475
"""
from alembic import op
import sqlalchemy as sa
from sqlalchemy.dialects import mysql
# revision identifiers, used by Alembic.
revision = '698ff838fb8e'
down_revision = '49aeda2e2b80'
branch_labels = None
depends_on = None
def upgrade():
# ### commands auto generated by Alembic - please adjust! ###
with op.batch_alter_table('users', schema=None) as batch_op:
batch_op.alter_column('location',
existing_type=mysql.VARCHAR(length=64),
type_=sa.String(length=256),
existing_nullable=True)
batch_op.drop_column('address')
# ### end Alembic commands ###
def downgrade():
# ### commands auto generated by Alembic - please adjust! ###
with op.batch_alter_table('users', schema=None) as batch_op:
batch_op.add_column(sa.Column('address', mysql.VARCHAR(length=256), nullable=True))
batch_op.alter_column('location',
existing_type=sa.String(length=256),
type_=mysql.VARCHAR(length=64),
existing_nullable=True)
# ### end Alembic commands ###