new_contents: from alembic import op
  import sqlalchemy as sa
  
  
  """empty message
  
  Revision ID: 8d187efaa505
  Revises: dc58763db4a8
  Create Date: 2017-11-06 17:30:01.086866
  
  """
  
  # revision identifiers, used by Alembic.
  revision = '8d187efaa505'
  down_revision = 'dc58763db4a8'
  
  
  def upgrade():
      # ### commands auto generated by Alembic - please adjust! ###
      op.create_table('research_protocols',
      sa.Column('id', sa.Integer(), nullable=False),
      sa.Column('name', sa.Text(), nullable=False),
      sa.Column('created_at', sa.DateTime(), nullable=False),
      sa.PrimaryKeyConstraint('id'),
      sa.UniqueConstraint('name')
      )
      op.add_column(u'organizations', sa.Column('research_protocol_id', sa.Integer(), nullable=True))
      op.create_foreign_key('org_rp_fkey', 'organizations', 'research_protocols', ['research_protocol_id'], ['id'])
      # ### end Alembic commands ###
  
  
  def downgrade():
      # ### commands auto generated by Alembic - please adjust! ###
      op.drop_constraint('org_rp_fkey', 'organizations', type_='foreignkey')
      op.drop_column(u'organizations', 'research_protocol_id')
      op.drop_table('research_protocols')
      # ### end Alembic commands ###
  
subject: add migration for RPs + org ref