old_contents: """add_multi_field_rule_target_file
  
  Revision ID: d63006c19c94
  Revises: f9881b041355
  Create Date: 2016-05-19 22:00:52.138084
  
  """
  
  # revision identifiers, used by Alembic.
  revision = 'd63006c19c94'
  down_revision = 'f9881b041355'
  branch_labels = None
  depends_on = None
  
  from alembic import op
  import sqlalchemy as sa
  
  
  def upgrade(engine_name):
      globals()["upgrade_%s" % engine_name]()
  
  
  def downgrade(engine_name):
      globals()["downgrade_%s" % engine_name]()
  
  
  
  
  
  def upgrade_error_data():
      ### commands auto generated by Alembic - please adjust! ###
      pass
      ### end Alembic commands ###
  
  
  def downgrade_error_data():
      ### commands auto generated by Alembic - please adjust! ###
      pass
      ### end Alembic commands ###
  
  
  def upgrade_job_tracker():
      ### commands auto generated by Alembic - please adjust! ###
      pass
      ### end Alembic commands ###
  
  
  def downgrade_job_tracker():
      ### commands auto generated by Alembic - please adjust! ###
      pass
      ### end Alembic commands ###
  
  
  def upgrade_user_manager():
      ### commands auto generated by Alembic - please adjust! ###
      pass
      ### end Alembic commands ###
  
  
  def downgrade_user_manager():
      ### commands auto generated by Alembic - please adjust! ###
      pass
      ### end Alembic commands ###
  
  
  def upgrade_validation():
      ### commands auto generated by Alembic - please adjust! ###
      op.add_column('multi_field_rule', sa.Column('target_file_id', sa.Integer(), nullable=True))
      op.create_foreign_key('fk_target_file_id', 'multi_field_rule', 'file_type', ['target_file_id'], ['file_id'])
      ### end Alembic commands ###
  
  
  def downgrade_validation():
      ### commands auto generated by Alembic - please adjust! ###
      op.drop_constraint('fk_target_file_id', 'multi_field_rule', type_='foreignkey')
      op.drop_column('multi_field_rule', 'target_file_id')
      ### end Alembic commands ###
  
  
  def upgrade_staging():
      ### commands auto generated by Alembic - please adjust! ###
      pass
      ### end Alembic commands ###
  
  
  def downgrade_staging():
      ### commands auto generated by Alembic - please adjust! ###
      pass
      ### end Alembic commands ###
  
  
new_contents: """add_multi_field_rule_target_file
  
  Revision ID: d63006c19c94
  Revises: f9881b041355
  Create Date: 2016-05-19 22:00:52.138084
  
  """
  
  # revision identifiers, used by Alembic.
  revision = 'd63006c19c94'
  down_revision = '43c82b52d950'
  branch_labels = None
  depends_on = None
  
  from alembic import op
  import sqlalchemy as sa
  
  
  def upgrade(engine_name):
      globals()["upgrade_%s" % engine_name]()
  
  
  def downgrade(engine_name):
      globals()["downgrade_%s" % engine_name]()
  
  
  
  
  
  def upgrade_error_data():
      ### commands auto generated by Alembic - please adjust! ###
      pass
      ### end Alembic commands ###
  
  
  def downgrade_error_data():
      ### commands auto generated by Alembic - please adjust! ###
      pass
      ### end Alembic commands ###
  
  
  def upgrade_job_tracker():
      ### commands auto generated by Alembic - please adjust! ###
      pass
      ### end Alembic commands ###
  
  
  def downgrade_job_tracker():
      ### commands auto generated by Alembic - please adjust! ###
      pass
      ### end Alembic commands ###
  
  
  def upgrade_user_manager():
      ### commands auto generated by Alembic - please adjust! ###
      pass
      ### end Alembic commands ###
  
  
  def downgrade_user_manager():
      ### commands auto generated by Alembic - please adjust! ###
      pass
      ### end Alembic commands ###
  
  
  def upgrade_validation():
      ### commands auto generated by Alembic - please adjust! ###
      op.add_column('multi_field_rule', sa.Column('target_file_id', sa.Integer(), nullable=True))
      op.create_foreign_key('fk_target_file_id', 'multi_field_rule', 'file_type', ['target_file_id'], ['file_id'])
      ### end Alembic commands ###
  
  
  def downgrade_validation():
      ### commands auto generated by Alembic - please adjust! ###
      op.drop_constraint('fk_target_file_id', 'multi_field_rule', type_='foreignkey')
      op.drop_column('multi_field_rule', 'target_file_id')
      ### end Alembic commands ###
  
  
  def upgrade_staging():
      ### commands auto generated by Alembic - please adjust! ###
      pass
      ### end Alembic commands ###
  
  
  def downgrade_staging():
      ### commands auto generated by Alembic - please adjust! ###
      pass
      ### end Alembic commands ###
  
  
subject: update migration down version after merging in dev updates