calendarwatch_frontend/database/migrations/versions/1e8205594ac1_.py

35 lines
1.0 KiB
Python
Raw Normal View History

2020-05-27 20:06:43 +02:00
"""empty message
Revision ID: 1e8205594ac1
Revises: aeab4aff199b
Create Date: 2020-05-27 16:57:54.384047
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = '1e8205594ac1'
down_revision = 'aeab4aff199b'
branch_labels = None
depends_on = None
def upgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.add_column('user', sa.Column('userid', sa.String(length=64), nullable=True))
op.create_index(op.f('ix_user_userid'), 'user', ['userid'], unique=True)
op.drop_index('ix_user_username', table_name='user')
op.create_index(op.f('ix_user_username'), 'user', ['username'], unique=False)
# ### end Alembic commands ###
def downgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.drop_index(op.f('ix_user_username'), table_name='user')
op.create_index('ix_user_username', 'user', ['username'], unique=True)
op.drop_index(op.f('ix_user_userid'), table_name='user')
op.drop_column('user', 'userid')
# ### end Alembic commands ###