<reponame>charlestondance/amoslims<filename>migrations/versions/87e20657e329_added_ytk_table2.py
"""added ytk table2

Revision ID: 87e20657e329
Revises: 7f964740<PASSWORD>
Create Date: 2017-03-01 16:38:41.617503

"""
from alembic import op
import sqlalchemy as sa


# revision identifiers, used by Alembic.
revision = '87e20657e329'
down_revision = '7f9647401eb1'
branch_labels = None
depends_on = None


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.create_table('ytk_virgin_design',
    sa.Column('id', sa.Integer(), nullable=False),
    sa.Column('stitch_id', sa.String(length=64), nullable=True),
    sa.Column('clip_id', sa.String(length=64), nullable=True),
    sa.Column('part_id', sa.String(length=64), nullable=True),
    sa.Column('part_name', sa.String(length=64), nullable=True),
    sa.Column('experiment_id', sa.String(length=64), nullable=True),
    sa.Column('assembly_level', sa.String(length=64), nullable=True),
    sa.PrimaryKeyConstraint('id')
    )
    op.create_index(op.f('ix_ytk_virgin_design_assembly_level'), 'ytk_virgin_design', ['assembly_level'], unique=False)
    op.create_index(op.f('ix_ytk_virgin_design_clip_id'), 'ytk_virgin_design', ['clip_id'], unique=False)
    op.create_index(op.f('ix_ytk_virgin_design_experiment_id'), 'ytk_virgin_design', ['experiment_id'], unique=False)
    op.create_index(op.f('ix_ytk_virgin_design_part_id'), 'ytk_virgin_design', ['part_id'], unique=False)
    op.create_index(op.f('ix_ytk_virgin_design_part_name'), 'ytk_virgin_design', ['part_name'], unique=False)
    op.create_index(op.f('ix_ytk_virgin_design_stitch_id'), 'ytk_virgin_design', ['stitch_id'], unique=False)
    op.drop_table('basic_ytk_design')
    # ### end Alembic commands ###


def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.create_table('basic_ytk_design',
    sa.Column('id', sa.INTEGER(), nullable=False),
    sa.Column('stitch_id', sa.VARCHAR(length=64), autoincrement=False, nullable=True),
    sa.Column('clip_id', sa.VARCHAR(length=64), autoincrement=False, nullable=True),
    sa.Column('part_id', sa.VARCHAR(length=64), autoincrement=False, nullable=True),
    sa.Column('part_name', sa.VARCHAR(length=64), autoincrement=False, nullable=True),
    sa.Column('experiment_id', sa.VARCHAR(length=64), autoincrement=False, nullable=True),
    sa.Column('assembly_level', sa.VARCHAR(length=64), autoincrement=False, nullable=True),
    sa.PrimaryKeyConstraint('id', name='basic_ytk_design_pkey')
    )
    op.drop_index(op.f('ix_ytk_virgin_design_stitch_id'), table_name='ytk_virgin_design')
    op.drop_index(op.f('ix_ytk_virgin_design_part_name'), table_name='ytk_virgin_design')
    op.drop_index(op.f('ix_ytk_virgin_design_part_id'), table_name='ytk_virgin_design')
    op.drop_index(op.f('ix_ytk_virgin_design_experiment_id'), table_name='ytk_virgin_design')
    op.drop_index(op.f('ix_ytk_virgin_design_clip_id'), table_name='ytk_virgin_design')
    op.drop_index(op.f('ix_ytk_virgin_design_assembly_level'), table_name='ytk_virgin_design')
    op.drop_table('ytk_virgin_design')
    # ### end Alembic commands ###
