"""empty message

Revision ID: a7805cd618d5
Revises: 26edc6ff4584
Create Date: 2019-09-03 23:33:12.395284

"""
from alembic import op
import sqlalchemy as sa
from sqlalchemy.dialects import mysql

# revision identifiers, used by Alembic.
revision = 'a7805cd618d5'
down_revision = '26edc6ff4584'
branch_labels = None
depends_on = None


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.add_column('person', sa.Column('address', sa.String(length=120), nullable=False))
    op.add_column('person', sa.Column('full_name', sa.String(length=100), nullable=False))
    op.drop_index('username', table_name='person')
    op.create_unique_constraint(None, 'person', ['address'])
    op.create_unique_constraint(None, 'person', ['full_name'])
    op.drop_column('person', 'username')
    # ### end Alembic commands ###


def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.add_column('person', sa.Column('username', mysql.VARCHAR(length=100), nullable=False))
    op.drop_constraint(None, 'person', type_='unique')
    op.drop_constraint(None, 'person', type_='unique')
    op.create_index('username', 'person', ['username'], unique=True)
    op.drop_column('person', 'full_name')
    op.drop_column('person', 'address')
    # ### end Alembic commands ###
