old_contents: """empty message
  
  Revision ID: 65f28fd897d
  Revises: 11288927b825
  Create Date: 2015-09-23 14:44:44.824420
  
  """
  
  # revision identifiers, used by Alembic.
  revision = '65f28fd897d'
  down_revision = '11288927b825'
  
  from alembic import op
  import sqlalchemy as sa
  
  
  def upgrade():
      ### commands auto generated by Alembic - please adjust! ###
      op.create_table('referral_permission',
      sa.Column('created', sa.DateTime(), nullable=True),
      sa.Column('last_modified', sa.DateTime(), nullable=True),
      sa.Column('id', sa.Integer(), nullable=False),
      sa.Column('from_service_id', sa.Integer(), nullable=True),
      sa.Column('to_servide_id', sa.Integer(), nullable=True),
      sa.Column('last_modified_by_id', sa.Integer(), nullable=True),
      sa.Column('created_by_id', sa.Integer(), nullable=True),
      sa.ForeignKeyConstraint(['created_by_id'], ['app_user.id'], name='fk_created_by_id', use_alter=True),
      sa.ForeignKeyConstraint(['from_service_id'], ['service.id'], ),
      sa.ForeignKeyConstraint(['last_modified_by_id'], ['app_user.id'], name='fk_last_modified_by_id', use_alter=True),
      sa.ForeignKeyConstraint(['to_servide_id'], ['service.id'], ),
      sa.PrimaryKeyConstraint('id')
      )
      ### end Alembic commands ###
  
  
  def downgrade():
      ### commands auto generated by Alembic - please adjust! ###
      op.drop_table('referral_permission')
      ### end Alembic commands ###
  
new_contents: """empty message
  
  Revision ID: 65f28fd897d
  Revises: 11288927b825
  Create Date: 2015-09-23 14:44:44.824420
  
  """
  
  # revision identifiers, used by Alembic.
  revision = '65f28fd897d'
  down_revision = '3f1fecf4ecc8'
  
  from alembic import op
  import sqlalchemy as sa
  
  
  def upgrade():
      ### commands auto generated by Alembic - please adjust! ###
      op.create_table('referral_permission',
      sa.Column('created', sa.DateTime(), nullable=True),
      sa.Column('last_modified', sa.DateTime(), nullable=True),
      sa.Column('id', sa.Integer(), nullable=False),
      sa.Column('from_service_id', sa.Integer(), nullable=True),
      sa.Column('to_servide_id', sa.Integer(), nullable=True),
      sa.Column('last_modified_by_id', sa.Integer(), nullable=True),
      sa.Column('created_by_id', sa.Integer(), nullable=True),
      sa.ForeignKeyConstraint(['created_by_id'], ['app_user.id'], name='fk_created_by_id', use_alter=True),
      sa.ForeignKeyConstraint(['from_service_id'], ['service.id'], ),
      sa.ForeignKeyConstraint(['last_modified_by_id'], ['app_user.id'], name='fk_last_modified_by_id', use_alter=True),
      sa.ForeignKeyConstraint(['to_servide_id'], ['service.id'], ),
      sa.PrimaryKeyConstraint('id')
      )
      ### end Alembic commands ###
  
  
  def downgrade():
      ### commands auto generated by Alembic - please adjust! ###
      op.drop_table('referral_permission')
      ### end Alembic commands ###
  
subject: fix migrations