"""empty message

Revision ID: 18ffda92762f
Revises: c2cdb5688390
Create Date: 2020-07-28 11:37:29.400597

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

# revision identifiers, used by Alembic.
revision = '18ffda92762f'
down_revision = 'c2cdb5688390'
branch_labels = None
depends_on = None


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.create_table('tasks',
        sa.Column('id', sa.Integer(), nullable=False),
        sa.Column('pred_id', sa.BigInteger(), nullable=False),
        sa.Column('type', sa.String(), nullable=False),
        sa.Column('created', sa.DateTime(), nullable=False),
        sa.Column('batch_id', sa.String(), nullable=True),

        sa.ForeignKeyConstraint(['pred_id'], ['predictions.id'], name='fk_predictions'),
        sa.PrimaryKeyConstraint('id')
    )


def downgrade():
    op.drop_table('tasks')
