Files
sepot/rust/sepot-relay/migrations/0003_queue_attempt_count.sql
T
Julius Joska bd51fef5cc fix(relay): add the attempt_count column the delivery cap relies on
The delivery-attempt cap reads and increments message_queue.attempt_count,
but the published init schema never created that column. On a fresh
database every queue flush failed, so queued messages were never handed
out after a reconnect.

The column is added in a new migration with IF NOT EXISTS, so installs
that already carry it from an older init schema migrate as a no-op.
2026-09-29 18:30:11 +02:00

6 lines
435 B
SQL

-- Počítadlo pokusů o doručení obálky (strop MAX_DELIVERY_ATTEMPTS v state.rs).
-- Obálka, jejíž ACK se ztratil, se jinak posílá při každém připojení až do TTL,
-- ačkoli ji klient podruhé dešifrovat nedokáže. IF NOT EXISTS: instalace, které
-- sloupec už mají ze starší verze init schématu, projdou beze změny.
ALTER TABLE message_queue ADD COLUMN IF NOT EXISTS attempt_count SMALLINT NOT NULL DEFAULT 0;