old_contents: """empty message
  
  Revision ID: 93809e7fbe16
  Revises: 2fdf0e8b8e08
  Create Date: 2017-08-17 13:09:51.145481
  
  """
  
  # revision identifiers, used by Alembic.
  revision = '93809e7fbe16'
  down_revision = '2fdf0e8b8e08'
  
  from alembic import op
  import sqlalchemy as sa
  from sqlalchemy.dialects import postgresql
  
  request_status_types = postgresql.ENUM(
      'draft', 'active', 'suspended', 'cancelled', 'completed',
      'entered-in-error', 'unknown', name='request_statuses',
      create_type=False)
  
  
  def upgrade():
      # ### commands auto generated by Alembic - please adjust! ###
      op.create_table('communication_requests',
      sa.Column('id', sa.Integer(), nullable=False),
      sa.Column('status', request_status_types, nullable=False),
      sa.Column('notify_days_after_event', sa.Integer(), nullable=False),
      sa.Column('questionnaire_bank_id', sa.Integer(), nullable=False),
      sa.ForeignKeyConstraint(['questionnaire_bank_id'], ['questionnaire_banks.id'], ),
      sa.PrimaryKeyConstraint('id'),
      sa.UniqueConstraint('questionnaire_bank_id', 'notify_days_after_event', name='_communication_request_qb_days')
      )
      op.create_table('communication_request_identifiers',
      sa.Column('id', sa.Integer(), nullable=False),
      sa.Column('communication_request_id', sa.Integer(), nullable=False),
      sa.Column('identifier_id', sa.Integer(), nullable=False),
      sa.ForeignKeyConstraint(['communication_request_id'], ['communication_requests.id'], ondelete='cascade'),
      sa.ForeignKeyConstraint(['identifier_id'], ['identifiers.id'], ondelete='cascade'),
      sa.PrimaryKeyConstraint('id'),
      sa.UniqueConstraint('communication_request_id', 'identifier_id', name='_communication_request_identifier')
      )
      # ### end Alembic commands ###
  
  
  def downgrade():
      # ### commands auto generated by Alembic - please adjust! ###
      op.drop_table('communication_request_identifiers')
      op.drop_table('communication_requests')
      # ### end Alembic commands ###
  
new_contents: """empty message
  
  Revision ID: 93809e7fbe16
  Revises: 2fdf0e8b8e08
  Create Date: 2017-08-17 13:09:51.145481
  
  """
  
  # revision identifiers, used by Alembic.
  revision = '93809e7fbe16'
  down_revision = '2fdf0e8b8e08'
  
  from alembic import op
  import sqlalchemy as sa
  from sqlalchemy.dialects import postgresql
  
  request_status_types = postgresql.ENUM(
      'draft', 'active', 'suspended', 'cancelled', 'completed',
      'entered-in-error', 'unknown', name='request_statuses',
      create_type=False)
  
  
  def upgrade():
      # ### commands auto generated by Alembic - please adjust! ###
      request_status_types.create(op.get_bind(), checkfirst=True)
      op.create_table('communication_requests',
      sa.Column('id', sa.Integer(), nullable=False),
      sa.Column('status', request_status_types, nullable=False),
      sa.Column('notify_days_after_event', sa.Integer(), nullable=False),
      sa.Column('questionnaire_bank_id', sa.Integer(), nullable=False),
      sa.ForeignKeyConstraint(['questionnaire_bank_id'], ['questionnaire_banks.id'], ),
      sa.PrimaryKeyConstraint('id'),
      sa.UniqueConstraint('questionnaire_bank_id', 'notify_days_after_event', name='_communication_request_qb_days')
      )
      op.create_table('communication_request_identifiers',
      sa.Column('id', sa.Integer(), nullable=False),
      sa.Column('communication_request_id', sa.Integer(), nullable=False),
      sa.Column('identifier_id', sa.Integer(), nullable=False),
      sa.ForeignKeyConstraint(['communication_request_id'], ['communication_requests.id'], ondelete='cascade'),
      sa.ForeignKeyConstraint(['identifier_id'], ['identifiers.id'], ondelete='cascade'),
      sa.PrimaryKeyConstraint('id'),
      sa.UniqueConstraint('communication_request_id', 'identifier_id', name='_communication_request_identifier')
      )
      # ### end Alembic commands ###
  
  
  def downgrade():
      # ### commands auto generated by Alembic - please adjust! ###
      op.drop_table('communication_request_identifiers')
      op.drop_table('communication_requests')
      # ### end Alembic commands ###
  
subject: Fix migration ENUM issue