Files
potato-mesh/data/migrations/20260824_add_node_dest_hash.sql
l5y 4b586316ae fix reticulum protocol loose ends from #888 review (#893)
* fix reticulum protocol loose ends from #888 review

* data: fix quoted Compose defaults blacking out every channel

* data,web: fix four defects found reviewing this PR
2026-08-27 08:04:08 +02:00

30 lines
1.3 KiB
PL/PgSQL

-- Copyright © 2025-26 l5yth & contributors
--
-- Licensed under the Apache License, Version 2.0 (the "License");
-- you may not use this file except in compliance with the License.
-- You may obtain a copy of the License at
--
-- http://www.apache.org/licenses/LICENSE-2.0
--
-- Unless required by applicable law or agreed to in writing, software
-- distributed under the License is distributed on an "AS IS" BASIS,
-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-- See the License for the specific language governing permissions and
-- limitations under the License.
-- Add the destination-hash back-reference to the nodes table.
--
-- A Reticulum peer announces one destination per aspect (lxmf.delivery,
-- nomadnetwork.node, …), each with its own destination hash, all derived from
-- a single identity. The identity keys the node row; this column stores the
-- JSON array of destination hashes that resolve to it, so a hash seen on the
-- wire can be traced back to the node (#888).
--
-- NULL for protocols with no such indirection. Applied automatically at boot
-- by `Database.ensure_schema_upgrades`; this file is the standalone form for operators
-- who migrate out of band.
BEGIN;
ALTER TABLE nodes ADD COLUMN dest_hash TEXT;
COMMIT;