"""Added Pipeline Archive model

Revision ID: c789ecdb563c
Revises: 5e23f85605a5
Create Date: 2016-09-14 13:38:06.578309

"""

# revision identifiers, used by Alembic.
revision = 'c789ecdb563c'
down_revision = '5e23f85605a5'

from alembic import op
import sqlalchemy as sa


def upgrade():
    ### commands auto generated by Alembic - please adjust! ###
    op.create_table('pipeline_archive',
    sa.Column('pipeline_id', sa.Integer(), nullable=False),
    sa.Column('task_id', sa.Integer(), nullable=False),
    sa.Column('creation_time', sa.DateTime(), nullable=True),
    sa.ForeignKeyConstraint(['pipeline_id'], ['pipelines.id'], ),
    sa.ForeignKeyConstraint(['task_id'], ['tasks.id'], ),
    sa.PrimaryKeyConstraint('pipeline_id', 'task_id')
    )
    ### end Alembic commands ###


def downgrade():
    ### commands auto generated by Alembic - please adjust! ###
    op.drop_table('pipeline_archive')
    ### end Alembic commands ###