"""tablecleanup

Revision ID: 54dac710b166
Revises: 1000f82c87cd
Create Date: 2021-08-09 08:06:38.893697

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

# revision identifiers, used by Alembic.
revision = '54dac710b166'
down_revision = '1000f82c87cd'
branch_labels = None
depends_on = None


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


def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.create_table('tenant',
    sa.Column('id', sa.INTEGER(), autoincrement=True, nullable=False),
    sa.Column('tenant_name', sa.VARCHAR(), autoincrement=False, nullable=False),
    sa.Column('relam', sa.VARCHAR(), autoincrement=False, nullable=False),
    sa.Column('audience', sa.VARCHAR(), autoincrement=False, nullable=False),
    sa.PrimaryKeyConstraint('id', name='tenant_pkey')
    )
    op.create_table('application_communication',
    sa.Column('id', sa.INTEGER(), autoincrement=True, nullable=False),
    sa.Column('application_id', sa.INTEGER(), autoincrement=False, nullable=False),
    sa.Column('message', sa.VARCHAR(length=3000), autoincrement=False, nullable=False),
    sa.Column('created_by', sa.VARCHAR(), autoincrement=False, nullable=False),
    sa.Column('created', postgresql.TIMESTAMP(), autoincrement=False, nullable=False),
    sa.ForeignKeyConstraint(['application_id'], ['application.id'], name='application_communication_application_id_fkey'),
    sa.PrimaryKeyConstraint('id', name='application_communication_pkey')
    )
    op.create_table('form_io_token',
    sa.Column('id', sa.INTEGER(), autoincrement=True, nullable=False),
    sa.Column('keycloak_role', sa.VARCHAR(length=50), autoincrement=False, nullable=False),
    sa.Column('formio_token', sa.VARCHAR(length=500), autoincrement=False, nullable=False),
    sa.Column('formio_role', sa.VARCHAR(length=50), autoincrement=False, nullable=False),
    sa.Column('created', postgresql.TIMESTAMP(), autoincrement=False, nullable=False),
    sa.PrimaryKeyConstraint('id', name='form_io_token_pkey')
    )
    # ### end Alembic commands ###
 
