forked from polka_billy/porridger
35 lines
918 B
Python
35 lines
918 B
Python
"""email->nickname in User model
|
|
|
|
Revision ID: 58290a82b821
|
|
Revises: 9c19b9658512
|
|
Create Date: 2023-08-07 23:37:58.017279
|
|
|
|
"""
|
|
from alembic import op
|
|
import sqlalchemy as sa
|
|
|
|
|
|
# revision identifiers, used by Alembic.
|
|
revision = '58290a82b821'
|
|
down_revision = '9c19b9658512'
|
|
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.add_column(sa.Column('nickname', sa.String(), nullable=True))
|
|
batch_op.drop_column('email')
|
|
|
|
# ### 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('email', sa.VARCHAR(), nullable=True))
|
|
batch_op.drop_column('nickname')
|
|
|
|
# ### end Alembic commands ###
|