browser-go-api/migrations/versions/0e0f8ad1362d_.py
2019-10-05 23:57:36 -07:00

30 lines
779 B
Python

"""empty message
Revision ID: 0e0f8ad1362d
Revises: 50aab465cf44
Create Date: 2019-10-05 23:21:57.620808
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = '0e0f8ad1362d'
down_revision = '50aab465cf44'
branch_labels = None
depends_on = None
def upgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.add_column('users', sa.Column('username', sa.String(length=255), nullable=False))
op.create_unique_constraint(None, 'users', ['username'])
# ### end Alembic commands ###
def downgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.drop_constraint(None, 'users', type_='unique')
op.drop_column('users', 'username')
# ### end Alembic commands ###