new_contents: """extensions_to_determinations
  
  Revision ID: fc3748f88edb
  Revises: fe020577865e
  Create Date: 2016-11-17 10:43:00.031710
  
  """
  
  # revision identifiers, used by Alembic.
  revision = 'fc3748f88edb'
  down_revision = 'fe020577865e'
  
  from alembic import op
  import sqlalchemy as sa
  from sqlalchemy.dialects import postgresql
  
  def upgrade():
      ### commands auto generated by Alembic - please adjust! ###
      op.create_table('determinations',
      sa.Column('id', sa.Integer(), nullable=False),
      sa.Column('dtype', sa.Enum('denial', 'acknowledgment', 'extension', 'closing', name='determination_type'), nullable=False),
      sa.Column('reason', sa.String(), nullable=True),
      sa.Column('date', sa.DateTime(), nullable=True),
      sa.ForeignKeyConstraint(['id'], ['responses.id'], ),
      sa.PrimaryKeyConstraint('id')
      )
      op.drop_table('extensions')
      op.add_column('requests', sa.Column('status', sa.Enum('Open', 'In Progress', 'Due Soon', 'Overdue', 'Closed', 'Re-Opened', name='status'), nullable=False))
      op.drop_column('requests', 'current_status')
      op.alter_column('responses', 'type',
                 existing_type=postgresql.ENUM('notes', 'links', 'files', 'instructions', 'extensions', 'emails', name='type'),
                 type_=sa.Enum('notes', 'links', 'files', 'instructions', 'determinations', 'emails', name='type'),
                 existing_nullable=True)
      ### end Alembic commands ###
  
  
  def downgrade():
      ### commands auto generated by Alembic - please adjust! ###
      op.alter_column('responses', 'type',
                 existing_type=sa.Enum('notes', 'links', 'files', 'instructions', 'determinations', 'emails', name='type'),
                 type_=postgresql.ENUM('notes', 'links', 'files', 'instructions', 'extensions', 'emails', name='type'),
                 existing_nullable=True)
      op.add_column('requests', sa.Column('current_status', postgresql.ENUM('Open', 'In Progress', 'Due Soon', 'Overdue', 'Closed', 'Re-Opened', name='status'), autoincrement=False, nullable=False))
      op.drop_column('requests', 'status')
      op.create_table('extensions',
      sa.Column('id', sa.INTEGER(), autoincrement=False, nullable=False),
      sa.Column('reason', sa.VARCHAR(), autoincrement=False, nullable=True),
      sa.Column('date', postgresql.TIMESTAMP(), autoincrement=False, nullable=True),
      sa.ForeignKeyConstraint(['id'], ['responses.id'], name='extensions_id_fkey'),
      sa.PrimaryKeyConstraint('id', name='extensions_pkey')
      )
      op.drop_table('determinations')
      ### end Alembic commands ###
  
subject: add migration