def METHOD_NAME():
    op.add_column('reservations', sa.Column('event_id', sa.Integer(), nullable=True), schema='roombooking')
    op.create_foreign_key(None, 'reservations', 'events', ['event_id'], ['id'], source_schema='roombooking',
                          referent_schema='events')
    op.create_index(None, 'reservations', ['event_id'], unique=False, schema='roombooking')
    # Move reservation_links.event_id back to reservation.event_id
    op.execute('''
        UPDATE roombooking.reservations
        SET event_id = reserv_link.event_id
        FROM (
            SELECT id, event_id
            FROM roombooking.reservation_links
            WHERE event_id IS NOT NULL
        ) reserv_link
        WHERE link_id = reserv_link.id;
    ''')
    op.drop_column('reservations', 'link_id', schema='roombooking')
    op.drop_table('reservation_links', schema='roombooking')