"""empty message

Revision ID: d8b2fb59942c
Revises: 
Create Date: 2018-10-30 08:25:00.548232

"""
from alembic import op
import sqlalchemy as sa


# revision identifiers, used by Alembic.
revision = 'd8b2fb59942d'
down_revision = '20a9bf13f901'
branch_labels = None
depends_on = None


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.add_column('designs', sa.Column('feature_num', sa.Integer(), nullable=True))

    op.create_table('designdetailslabels',
                    sa.Column('id', sa.Integer(), nullable=False),
                    sa.Column('label_num', sa.Integer(), nullable=True),
                    sa.Column('label', sa.Text(), nullable=True),
                    sa.PrimaryKeyConstraint('id'),
                    sa.UniqueConstraint('id')
                    )

    op.add_column('designdetails', sa.Column('label_id', sa.Integer(), nullable=True))
    op.create_foreign_key(None, 'designdetails', 'designdetailslabels', ['label_id'], ['id'])

    op.create_table('tasks',
                    sa.Column('id', sa.Integer(), nullable=False),
                    sa.Column('status', sa.String(length=120), nullable=True),
                    sa.Column('info', sa.Text(), nullable=True),
                    sa.PrimaryKeyConstraint('id'),
                    sa.UniqueConstraint('id')
                    )
    # ### end Alembic commands ###


def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.drop_column('designs', 'feature_num')
    op.drop_column('designdetails', 'sub_id')
    op.drop_table('designdetailslabels')
    # ### end Alembic commands ###
