"""empty message

Revision ID: 151f16e166d2
Revises: 5bdb53d5de37
Create Date: 2018-05-03 14:59:15.784509

"""
from alembic import op
import sqlalchemy as sa


# revision identifiers, used by Alembic.
revision = '151f16e166d2'
down_revision = '5bdb53d5de37'
branch_labels = None
depends_on = None


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.drop_table('accounts')
    op.drop_table('roles')
    # ### end Alembic commands ###


def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.create_table('roles',
    sa.Column('id', sa.INTEGER(), server_default=sa.text("nextval('roles_id_seq'::regclass)"), nullable=False),
    sa.Column('display_name', sa.VARCHAR(), autoincrement=False, nullable=True),
    sa.PrimaryKeyConstraint('id', name='roles_pkey'),
    postgresql_ignore_search_path=False
    )
    op.create_table('accounts',
    sa.Column('id', sa.INTEGER(), nullable=False),
    sa.Column('username', sa.VARCHAR(), autoincrement=False, nullable=True),
    sa.Column('password', sa.VARCHAR(), autoincrement=False, nullable=True),
    sa.Column('role_id', sa.INTEGER(), autoincrement=False, nullable=True),
    sa.ForeignKeyConstraint(['role_id'], ['roles.id'], name='accounts_role_id_fkey'),
    sa.PrimaryKeyConstraint('id', name='accounts_pkey')
    )
    # ### end Alembic commands ###
