Fix proper default values for metadata migration
"""Add movie metadata (imdb rating, number of votes, metascore) and relevancy

Revision ID: 2c240cb3edd1
Revises: 588336e02ca
Create Date: 2014-02-09 13:46:18.630000

"""

# revision identifiers, used by Alembic.
revision = '2c240cb3edd1'
down_revision = '588336e02ca'

from alembic import op
import sqlalchemy as sa


def upgrade():
    ### commands auto generated by Alembic - please adjust! ###
    op.add_column('movie', sa.Column('imdb_rating', sa.Float(), nullable=False, server_default='0'))
    op.add_column('movie', sa.Column('metascore', sa.Integer(), nullable=False, server_default='0'))
    op.add_column('movie', sa.Column('number_of_imdb_votes', sa.Integer(), nullable=False, server_default='0'))
    op.add_column('movie', sa.Column('relevancy', sa.Float(), nullable=False, server_default='0'))
    ### end Alembic commands ###


def downgrade():
    ### commands auto generated by Alembic - please adjust! ###
    op.drop_column('movie', 'relevancy')
    op.drop_column('movie', 'number_of_imdb_votes')
    op.drop_column('movie', 'metascore')
    op.drop_column('movie', 'imdb_rating')
    ### end Alembic commands ###

"""Add movie metadata (imdb rating, number of votes, metascore) and relevancy

Revision ID: 2c240cb3edd1
Revises: 588336e02ca
Create Date: 2014-02-09 13:46:18.630000

"""

# revision identifiers, used by Alembic.
revision = '2c240cb3edd1'
down_revision = '588336e02ca'

from alembic import op
import sqlalchemy as sa


def upgrade():
    ### commands auto generated by Alembic - please adjust! ###
    op.add_column('movie', sa.Column('imdb_rating', sa.Float(), nullable=False, default=0))
    op.add_column('movie', sa.Column('metascore', sa.Integer(), nullable=False, default=0))
    op.add_column('movie', sa.Column('number_of_imdb_votes', sa.Integer(), nullable=False, default=0))
    op.add_column('movie', sa.Column('relevancy', sa.Float(), nullable=False, default=0))
    ### end Alembic commands ###


def downgrade():
    ### commands auto generated by Alembic - please adjust! ###
    op.drop_column('movie', 'relevancy')
    op.drop_column('movie', 'number_of_imdb_votes')
    op.drop_column('movie', 'metascore')
    op.drop_column('movie', 'imdb_rating')
    ### end Alembic commands ###
