From 750650863100ae9a8c4168047e6b8f4d2db5345e Mon Sep 17 00:00:00 2001 From: MechaCat02 Date: Wed, 16 Sep 2026 22:50:37 +0200 Subject: [PATCH] docs(server): updated_at has decided nothing since protocol 2 The schema's comment still called it the field last-write-wins compares. A write is decided by change_seq alone; updated_at is for display. Co-Authored-By: Claude Opus 5 (1M context) --- server/sql/001-schema.sql | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/server/sql/001-schema.sql b/server/sql/001-schema.sql index 6890fe2..8332ab1 100644 --- a/server/sql/001-schema.sql +++ b/server/sql/001-schema.sql @@ -15,7 +15,9 @@ CREATE TABLE IF NOT EXISTS sync_row ( tbl TEXT NOT NULL, pk TEXT NOT NULL, data JSONB NOT NULL, - -- The client's wall clock, and the field last-write-wins compares. + -- The client's wall clock, when the row was last edited. Kept for display + -- only: since protocol 2 (002-protocol-2.sql) nothing compares it — a + -- write is decided by change_seq alone. updated_at BIGINT NOT NULL, -- A delete. Kept as a row so it can be handed to a device that was -- offline when it happened.