-- Migration 004 — Phase 7 notify and send (AGENTS.md §4 FR-9/FR-13/FR-14, -- §11 Phase 7). -- -- `notifications` becomes the delivery log: one row per brief per recipient per -- channel. The brief text is the `summary` column (it was already there), and -- the new columns record where the row belongs (scope), which channel and -- Apprise tag were used, whether the delivery succeeded, and the redacted error -- when it did not. A failed send is therefore visible and loud instead of being -- lost (FR-12). -- -- A draft (built but not sent) is a row with an empty `channel`, ok = 0 and -- sent_at NULL, which is what the Phase 5 dashboard already showed. ALTER TABLE notifications ADD COLUMN scope TEXT NOT NULL DEFAULT ''; ALTER TABLE notifications ADD COLUMN channel TEXT NOT NULL DEFAULT ''; ALTER TABLE notifications ADD COLUMN tag TEXT NOT NULL DEFAULT ''; ALTER TABLE notifications ADD COLUMN ok INTEGER NOT NULL DEFAULT 0; ALTER TABLE notifications ADD COLUMN error TEXT NOT NULL DEFAULT ''; CREATE INDEX IF NOT EXISTS idx_notifications_scope ON notifications(scope, created_at);