mirror of
https://github.com/MeshCore-Beacon/beacon-server.git
synced 2026-10-17 11:30:03 +00:00
A repeater that advertises 0/0 is hiding its position. It was stored as a literal 0/0 that every consumer had to special-case; now the stored latitude, longitude and location source are cleared, an omitted location still preserves the stored one, and the nodeUpdate event sends explicit null lat/lng so clients can clear too. Migration 043 drops rows stored as 0/0 before this change.
7 lines
348 B
SQL
7 lines
348 B
SQL
-- Copyright 2026 Beacon Contributors
|
|
-- SPDX-License-Identifier: AGPL-3.0-or-later
|
|
|
|
-- An explicit 0/0 advert now clears the stored position; drop old 0/0 rows and stale sources.
|
|
UPDATE nodes SET latitude = NULL, longitude = NULL, location_source = NULL
|
|
WHERE location_source = 'advert' AND (latitude IS NULL OR (latitude = 0 AND longitude = 0));
|