"""RottenMovie add columns 2

Revision ID: b48d3707d548
Revises: 60dd503aa24b
Create Date: 2018-06-24 16:50:59.228102

"""
from alembic import op
import sqlalchemy as sa


# revision identifiers, used by Alembic.
revision = 'b48d3707d548'
down_revision = '60dd503aa24b'
branch_labels = None
depends_on = None


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.add_column('rotten_movie', sa.Column('affiliate_amazon_url', sa.String(length=1000), nullable=True))
    op.add_column('rotten_movie', sa.Column('affiliate_amazon_valid', sa.Boolean(), nullable=True))
    op.add_column('rotten_movie', sa.Column('affiliate_apple_url', sa.String(length=1000), nullable=True))
    op.add_column('rotten_movie', sa.Column('affiliate_apple_valid', sa.Boolean(), nullable=True))
    op.add_column('rotten_movie', sa.Column('affiliate_fandangonow_url', sa.String(length=1000), nullable=True))
    op.add_column('rotten_movie', sa.Column('affiliate_fandangonow_valid', sa.Boolean(), nullable=True))
    op.add_column('rotten_movie', sa.Column('affiliate_netflix_url', sa.String(length=1000), nullable=True))
    op.add_column('rotten_movie', sa.Column('affiliate_netflix_valid', sa.Boolean(), nullable=True))
    op.add_column('rotten_movie', sa.Column('affiliate_vudu_url', sa.String(length=1000), nullable=True))
    op.add_column('rotten_movie', sa.Column('affiliate_vudu_valid', sa.Boolean(), nullable=True))
    op.create_index(op.f('ix_rotten_movie_affiliate_amazon_valid'), 'rotten_movie', ['affiliate_amazon_valid'], unique=False)
    op.create_index(op.f('ix_rotten_movie_affiliate_apple_valid'), 'rotten_movie', ['affiliate_apple_valid'], unique=False)
    op.create_index(op.f('ix_rotten_movie_affiliate_fandangonow_valid'), 'rotten_movie', ['affiliate_fandangonow_valid'], unique=False)
    op.create_index(op.f('ix_rotten_movie_affiliate_netflix_valid'), 'rotten_movie', ['affiliate_netflix_valid'], unique=False)
    op.create_index(op.f('ix_rotten_movie_affiliate_vudu_valid'), 'rotten_movie', ['affiliate_vudu_valid'], unique=False)
    # ### end Alembic commands ###


def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.drop_index(op.f('ix_rotten_movie_affiliate_vudu_valid'), table_name='rotten_movie')
    op.drop_index(op.f('ix_rotten_movie_affiliate_netflix_valid'), table_name='rotten_movie')
    op.drop_index(op.f('ix_rotten_movie_affiliate_fandangonow_valid'), table_name='rotten_movie')
    op.drop_index(op.f('ix_rotten_movie_affiliate_apple_valid'), table_name='rotten_movie')
    op.drop_index(op.f('ix_rotten_movie_affiliate_amazon_valid'), table_name='rotten_movie')
    op.drop_column('rotten_movie', 'affiliate_vudu_valid')
    op.drop_column('rotten_movie', 'affiliate_vudu_url')
    op.drop_column('rotten_movie', 'affiliate_netflix_valid')
    op.drop_column('rotten_movie', 'affiliate_netflix_url')
    op.drop_column('rotten_movie', 'affiliate_fandangonow_valid')
    op.drop_column('rotten_movie', 'affiliate_fandangonow_url')
    op.drop_column('rotten_movie', 'affiliate_apple_valid')
    op.drop_column('rotten_movie', 'affiliate_apple_url')
    op.drop_column('rotten_movie', 'affiliate_amazon_valid')
    op.drop_column('rotten_movie', 'affiliate_amazon_url')
    # ### end Alembic commands ###
