"""reconfigured db tables

Revision ID: 673a9686441a
Revises: 
Create Date: 2021-06-12 11:19:24.141552

"""
from alembic import op
import sqlalchemy as sa


# revision identifiers, used by Alembic.
revision = '673a9686441a'
down_revision = None
branch_labels = None
depends_on = None


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.drop_table('role')
    op.add_column('patient', sa.Column('date_created', sa.DateTime(), nullable=True))
    op.add_column('user', sa.Column('date_created', sa.DateTime(), nullable=True))
    op.add_column('user', sa.Column('admin', sa.Boolean(), nullable=True))
    op.drop_column('user', 'confirmed_at')
    # ### end Alembic commands ###


def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.add_column('user', sa.Column('confirmed_at', sa.DATETIME(), nullable=True))
    op.drop_column('user', 'admin')
    op.drop_column('user', 'date_created')
    op.drop_column('patient', 'date_created')
    op.create_table('role',
    sa.Column('id', sa.INTEGER(), nullable=False),
    sa.Column('name', sa.VARCHAR(length=80), nullable=True),
    sa.Column('description', sa.VARCHAR(length=255), nullable=True),
    sa.PrimaryKeyConstraint('id'),
    sa.UniqueConstraint('name')
    )
    # ### end Alembic commands ###
