Add SSE updates
This commit is contained in:
parent
d1732128e2
commit
688bc0cfe9
13 changed files with 958 additions and 42 deletions
7
backend/src/life_towers/migrations/002_revision.sql
Normal file
7
backend/src/life_towers/migrations/002_revision.sql
Normal 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;
|
||||
Loading…
Add table
Add a link
Reference in a new issue