docs: clarify notification routing migration

This commit is contained in:
whoisasx 2026-06-01 03:24:44 +05:30
parent d39e8e0da3
commit f0c57ac2e2
1 changed files with 4 additions and 0 deletions

View File

@ -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)