"""Added DownloadsReleases model

Revision ID: 1bc681714e49
Revises: 40be3bb4d9d7
Create Date: 2017-10-11 21:04:21.342407

"""
from alembic import op
import sqlalchemy as sa


# revision identifiers, used by Alembic.
revision = '1bc681714e49'
down_revision = '40be3bb4d9d7'
branch_labels = None
depends_on = None


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.create_table('DownloadsReleases',
    sa.Column('DownloadID', sa.Integer(), nullable=False),
    sa.Column('ReleaseID', sa.Integer(), nullable=False),
    sa.Column('DownloadDate', sa.DateTime(), nullable=False),
    sa.ForeignKeyConstraint(['ReleaseID'], ['Releases.ReleaseID'], ondelete='CASCADE'),
    sa.PrimaryKeyConstraint('DownloadID')
    )
    # ### end Alembic commands ###


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