bd51fef5cc
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.
6 lines
435 B
SQL
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;
|