feat: add pending_changes table (Step 2 — outbound sync queue)

Protocol-agnostic queue for local mutations (flag, move, delete) that
need to be sent to the server. Enables offline-first behaviour: changes
are written here first and drained by the sync worker. Tracks attempt
count and last error for durable retries.

DB schema bumped to v6.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Thomas Güttler
2026-04-19 16:08:17 +02:00
co-authored by Claude Sonnet 4.6
parent 475ba34d28
commit c6fb5154fb
2 changed files with 25 additions and 3 deletions
+1 -1
View File
@@ -46,7 +46,7 @@ sync_state (
)
```
### Step 2 — `pending_changes` table `[ ]`
### Step 2 — `pending_changes` table `[x]`
Protocol-agnostic outbound queue. Any local mutation (flag, move, delete) is written
here first. A sync worker drains the queue and sends to server. Enables offline-first.