Add SSE updates

This commit is contained in:
Andras Schmelczer 2026-06-04 22:12:10 +01:00
commit 688bc0cfe9

View file

@ -0,0 +1,7 @@
-- Per-user revision counter for multi-client sync.
-- Bumped inside the same transaction as every PUT /data so clients can:
-- * detect another client's write (cheap compare, no full-tree diff), and
-- * guard their own writes with compare-and-swap (stale If-Match -> 409).
-- Existing users start at 0; their next confirmed GET seeds the client base.
ALTER TABLE users ADD COLUMN revision INTEGER NOT NULL DEFAULT 0;