def METHOD_NAME():
    if is_sqlite:
        with op.batch_alter_table('dept_membership_request', reflect_kwargs=sqlite_reflect_kwargs) as batch_op:
            batch_op.add_column(sa.Column('id', residue.UUID(), nullable=True))
            batch_op.alter_column('department_id', existing_type=residue.UUID(), nullable=True)
    else:
        op.add_column('dept_membership_request', sa.Column('id', residue.UUID(), nullable=True))
        op.alter_column('dept_membership_request', 'department_id', existing_type=residue.UUID(), nullable=True)
    connection = op.get_bind()
    all_requests = connection.execute(dept_membership_request_table.select())
    for request in all_requests:
        connection.execute(
            dept_membership_request_table.update().where(and_(
                dept_membership_request_table.c.attendee_id == request.attendee_id,
                dept_membership_request_table.c.department_id == request.department_id
            )).values({
                'id': str(uuid.uuid4())
            })
        )
    attendees_requesting_any = connection.execute(attendee_table.select().where(
        attendee_table.c.requested_any_dept == True
    ))
    for attendee in attendees_requesting_any:
        connection.execute(
            dept_membership_request_table.insert().values({
                'id': str(uuid.uuid4()),
                'attendee_id': attendee.id,
                'department_id': None
            })
        )
    if is_sqlite:
        with op.batch_alter_table('dept_membership_request', reflect_kwargs=sqlite_reflect_kwargs) as batch_op:
            batch_op.alter_column('id', existing_type=residue.UUID(), nullable=False)
            batch_op.create_primary_key('pk_dept_membership_request', ['id', ])
        with op.batch_alter_table('attendee', reflect_kwargs=sqlite_reflect_kwargs) as batch_op:
            batch_op.drop_column('requested_any_dept')
    else:
        op.alter_column('dept_membership_request', 'id', existing_type=residue.UUID(), nullable=False)
        op.create_primary_key('pk_dept_membership_request', 'dept_membership_request', ['id', ])
        op.drop_column('attendee', 'requested_any_dept')