<reponame>bmoretz/Mastering-Flask
"""initial migration

Revision ID: 462cbdc2765a
Revises: 
Create Date: 2019-03-19 09:40:21.801310

"""
from alembic import op
import sqlalchemy as sa


# revision identifiers, used by Alembic.
revision = '<KEY>'
down_revision = None
branch_labels = None
depends_on = None


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.add_column('user', sa.Column('username', sa.String(length=255), nullable=False))
    op.create_index(op.f('ix_user_username'), 'user', ['username'], unique=True)
    op.drop_index('ix_user_user_name', table_name='user')
    op.drop_column('user', 'user_name')
    # ### end Alembic commands ###


def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.add_column('user', sa.Column('user_name', sa.VARCHAR(length=255), nullable=False))
    op.create_index('ix_user_user_name', 'user', ['user_name'], unique=1)
    op.drop_index(op.f('ix_user_username'), table_name='user')
    op.drop_column('user', 'username')
    # ### end Alembic commands ###

"""initial migration

Revision ID: 462cbdc2765a
Revises: 
Create Date: 2019-03-19 09:40:21.801310

"""
from alembic import op
import sqlalchemy as sa


# revision identifiers, used by Alembic.
revision = '<KEY>'
down_revision = None
branch_labels = None
depends_on = None


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.add_column('user', sa.Column('username', sa.String(length=255), nullable=False))
    op.create_index(op.f('ix_user_username'), 'user', ['username'], unique=True)
    op.drop_index('ix_user_user_name', table_name='user')
    op.drop_column('user', 'user_name')
    # ### end Alembic commands ###


def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.add_column('user', sa.Column('user_name', sa.VARCHAR(length=255), nullable=False))
    op.create_index('ix_user_user_name', 'user', ['user_name'], unique=1)
    op.drop_index(op.f('ix_user_username'), table_name='user')
    op.drop_column('user', 'username')
    # ### end Alembic commands ###
initial migration  Revision ID: 462cbdc2765a Revises:  Create Date: 2019-03-19 09:40:21.801310 # revision identifiers, used by Alembic. # ### commands auto generated by Alembic - please adjust! ### # ### end Alembic commands ### # ### commands auto generated by Alembic - please adjust! ### # ### end Alembic commands ###