"""Added UserID and Updated to release votes model

Revision ID: ff3c2f0d4024
Revises: 325ecf05b3b6
Create Date: 2018-03-27 17:02:23.181328

"""
from alembic import op
import sqlalchemy as sa


# revision identifiers, used by Alembic.
revision = 'ff3c2f0d4024'
down_revision = '325ecf05b3b6'
branch_labels = None
depends_on = None


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.add_column('VotesReleases', sa.Column('Updated', sa.DateTime(), nullable=True))
    op.add_column('VotesReleases', sa.Column('UserID', sa.Integer(), nullable=False))
    op.create_foreign_key(None, 'VotesReleases', 'Users', ['UserID'], ['UserID'], ondelete='CASCADE')
    # ### end Alembic commands ###


def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.drop_constraint(None, 'VotesReleases', type_='foreignkey')
    op.drop_column('VotesReleases', 'UserID')
    op.drop_column('VotesReleases', 'Updated')
    # ### end Alembic commands ###
