renewal-unlock: orders.renews_at lazy expiry + owner unlock notices (ntfy/sms channels, exempt from metering) — verified

This commit is contained in:
2026-08-10 10:10:50 +10:00
parent 8b5db410a3
commit 9d43403f6f
8 changed files with 141 additions and 33 deletions

View File

@@ -90,3 +90,6 @@ CREATE TABLE IF NOT EXISTS url_shortened (
-- Phase 5.5 quick wins: customer pause + order amounts (idempotent).
ALTER TABLE users ADD COLUMN IF NOT EXISTS paused BOOLEAN NOT NULL DEFAULT FALSE;
ALTER TABLE orders ADD COLUMN IF NOT EXISTS amount NUMERIC(10,2) NOT NULL DEFAULT 0;
-- Renewal tracking (lazy expiry): paid orders past renews_at are treated lapsed.
ALTER TABLE orders ADD COLUMN IF NOT EXISTS renews_at TIMESTAMPTZ;