"""change basic design

Revision ID: fed23b3ce53a
Revises: 837d76119ac0
Create Date: 2017-01-15 10:13:57.990812

"""
from alembic import op
import sqlalchemy as sa


# revision identifiers, used by Alembic.
revision = 'fed23b3ce53a'
down_revision = '837d76119ac0'
branch_labels = None
depends_on = None


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.create_table('basic_design',
    sa.Column('id', sa.Integer(), nullable=False),
    sa.Column('part_id', sa.String(length=64), nullable=True),
    sa.Column('part_id_sample_id', sa.Integer(), nullable=True),
    sa.Column('clip_id', sa.String(length=64), nullable=True),
    sa.Column('clip_id_batch_id', sa.Integer(), nullable=True),
    sa.Column('stitch_id', sa.String(length=64), nullable=True),
    sa.Column('unique_job_id', sa.String(length=64), nullable=True),
    sa.Column('unique_clip_number', sa.Integer(), nullable=True),
    sa.Column('uploaded_filename', sa.String(length=64), nullable=True),
    sa.PrimaryKeyConstraint('id')
    )
    op.create_index(op.f('ix_basic_design_clip_id'), 'basic_design', ['clip_id'], unique=False)
    op.create_index(op.f('ix_basic_design_clip_id_batch_id'), 'basic_design', ['clip_id_batch_id'], unique=False)
    op.create_index(op.f('ix_basic_design_part_id'), 'basic_design', ['part_id'], unique=False)
    op.create_index(op.f('ix_basic_design_part_id_sample_id'), 'basic_design', ['part_id_sample_id'], unique=False)
    op.create_index(op.f('ix_basic_design_stitch_id'), 'basic_design', ['stitch_id'], unique=False)
    op.create_index(op.f('ix_basic_design_unique_clip_number'), 'basic_design', ['unique_clip_number'], unique=False)
    op.create_index(op.f('ix_basic_design_unique_job_id'), 'basic_design', ['unique_job_id'], unique=False)
    op.create_index(op.f('ix_basic_design_uploaded_filename'), 'basic_design', ['uploaded_filename'], unique=False)
    op.drop_table('design')
    # ### end Alembic commands ###


def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.create_table('design',
    sa.Column('id', sa.INTEGER(), nullable=False),
    sa.Column('part_id', sa.VARCHAR(length=64), autoincrement=False, nullable=True),
    sa.Column('part_id_sample_id', sa.INTEGER(), autoincrement=False, nullable=True),
    sa.Column('clip_id', sa.VARCHAR(length=64), autoincrement=False, nullable=True),
    sa.Column('clip_id_batch_id', sa.INTEGER(), autoincrement=False, nullable=True),
    sa.Column('stitch_id', sa.VARCHAR(length=64), autoincrement=False, nullable=True),
    sa.Column('unique_job_id', sa.VARCHAR(length=64), autoincrement=False, nullable=True),
    sa.Column('unique_clip_number', sa.INTEGER(), autoincrement=False, nullable=True),
    sa.Column('uploaded_filename', sa.VARCHAR(length=64), autoincrement=False, nullable=True),
    sa.PrimaryKeyConstraint('id', name='design_pkey')
    )
    op.drop_index(op.f('ix_basic_design_uploaded_filename'), table_name='basic_design')
    op.drop_index(op.f('ix_basic_design_unique_job_id'), table_name='basic_design')
    op.drop_index(op.f('ix_basic_design_unique_clip_number'), table_name='basic_design')
    op.drop_index(op.f('ix_basic_design_stitch_id'), table_name='basic_design')
    op.drop_index(op.f('ix_basic_design_part_id_sample_id'), table_name='basic_design')
    op.drop_index(op.f('ix_basic_design_part_id'), table_name='basic_design')
    op.drop_index(op.f('ix_basic_design_clip_id_batch_id'), table_name='basic_design')
    op.drop_index(op.f('ix_basic_design_clip_id'), table_name='basic_design')
    op.drop_table('basic_design')
    # ### end Alembic commands ###
