def METHOD_NAME():
    # ### commands auto generated by Alembic - please adjust! ###
    op.alter_column(
        'facilitytransactions',
        'followup_request_id',
        existing_type=sa.INTEGER(),
        nullable=True,
    )
    op.alter_column(
        'facilitytransactions',
        'initiator_id',
        existing_type=sa.INTEGER(),
        nullable=True,
    )
    op.drop_constraint(
        'facilitytransactions_followup_request_id_fkey',
        'facilitytransactions',
        type_='foreignkey',
    )
    op.create_foreign_key(
        None,
        'facilitytransactions',
        'followuprequests',
        ['followup_request_id'],
        ['id'],
        ondelete='SET NULL',
    )
    op.alter_column(
        'followuprequests',
        'last_modified_by_id',
        existing_type=sa.INTEGER(),
        nullable=True,
    )
    op.alter_column(
        'followuprequests', 'requester_id', existing_type=sa.INTEGER(), nullable=True
    )
    op.drop_constraint(
        'followuprequests_requester_id_fkey', 'followuprequests', type_='foreignkey'
    )
    op.create_foreign_key(
        None, 'followuprequests', 'users', ['requester_id'], ['id'], ondelete='SET NULL'
    )
    op.drop_constraint(
        'photometry_instrument_id_fkey', 'photometry', type_='foreignkey'
    )
    op.create_foreign_key(
        None, 'photometry', 'instruments', ['instrument_id'], ['id'], ondelete='CASCADE'
    )
    op.drop_constraint(
        'spectra_followup_request_id_fkey', 'spectra', type_='foreignkey'
    )
    op.drop_constraint('spectra_assignment_id_fkey', 'spectra', type_='foreignkey')
    op.create_foreign_key(
        None,
        'spectra',
        'classicalassignments',
        ['assignment_id'],
        ['id'],
        ondelete='SET NULL',
    )
    op.create_foreign_key(
        None,
        'spectra',
        'followuprequests',
        ['followup_request_id'],
        ['id'],
        ondelete='SET NULL',
    )
    # ### end Alembic commands ###