
# 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 ###


# 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 ###

Fix proper default values for metadata migration
Fix proper default values for metadata migration

  
  # 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('imdb_rating', sa.Float(), nullable=False, server_default='0'))
-     op.add_column('movie', sa.Column('metascore', sa.Integer(), nullable=False, 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, 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, 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 ###
  
Fix proper default values for metadata migration
## Code Before:

# 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 ###

## Instruction:
Fix proper default values for metadata migration
## Code After:

# 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 ###
