From f0c57ac2e2edd2a8995458287fdaf88dd2afad5d Mon Sep 17 00:00:00 2001 From: whoisasx Date: Mon, 1 Jun 2026 03:24:44 +0530 Subject: [PATCH] docs: clarify notification routing migration --- .../sqlite/migrations/0003_notification_deliveries.sql | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/backend/internal/storage/sqlite/migrations/0003_notification_deliveries.sql b/backend/internal/storage/sqlite/migrations/0003_notification_deliveries.sql index 66a97f100..4c7cca1db 100644 --- a/backend/internal/storage/sqlite/migrations/0003_notification_deliveries.sql +++ b/backend/internal/storage/sqlite/migrations/0003_notification_deliveries.sql @@ -1,6 +1,10 @@ -- +goose Up -- +goose StatementBegin ALTER TABLE notifications ADD COLUMN routed_at TIMESTAMP; +-- Notifications that already exist when this migration runs predate the +-- delivery runtime. Treat them as already routed so an upgrade does not +-- synthesize new AO-app desktop toasts for historical notification rows; the +-- dashboard read model still sees those rows directly from notifications. UPDATE notifications SET routed_at = updated_at WHERE routed_at IS NULL; CREATE INDEX idx_notifications_unrouted ON notifications(seq)