docs: clarify notification routing migration
This commit is contained in:
parent
d39e8e0da3
commit
f0c57ac2e2
|
|
@ -1,6 +1,10 @@
|
||||||
-- +goose Up
|
-- +goose Up
|
||||||
-- +goose StatementBegin
|
-- +goose StatementBegin
|
||||||
ALTER TABLE notifications ADD COLUMN routed_at TIMESTAMP;
|
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;
|
UPDATE notifications SET routed_at = updated_at WHERE routed_at IS NULL;
|
||||||
CREATE INDEX idx_notifications_unrouted
|
CREATE INDEX idx_notifications_unrouted
|
||||||
ON notifications(seq)
|
ON notifications(seq)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue