feat(server): studysets, the first synced table (migration pending)

Adopts serverpod_offline_sync v0.0.8 (ADR 0001): its module (nickname offline_sync) and the experimental database: sync in generator.yaml, its server and client packages, and overrides that keep the four Serverpod core packages on v4.0.2, since the package pins v4.0.0 exactly and the spike showed it works on v4.0.2. The app's new dependencies come along because the workspace shares one lock file.

Studyset is the first synced model. Its space owns it, so it has no owner column, and only the envelope is a column: keyId and nonce stay null (no end-to-end encryption; ADR 0002, rule 6), and payload holds the content as versioned UTF-8 JSON, so a new content field changes the payload's schema version instead of this table, whose every migration locks older app versions out of syncing (rule 3). The audience column of the original design is gone: it served key selection, and the engine's spaces decide who reads a row.

The generated server and client code is included. The migration isn't: it is created together with the move to Serverpod v4.0.3 and reviewed first, like the client's local migration (the client's lib/migrations is still empty).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Tizian 「ティツィアーン」 <raisondetredev@pm.me>
This commit is contained in:
Tizian 「ティツィアーン」 2026-09-30 10:11:24 +02:00
commit 6769598df5
Signed by: raisondetredev
GPG key ID: 07F6FCF405488B64

View file

@ -1111,7 +1111,7 @@ packages:
source: hosted
version: "3.0.1"
serverpod:
dependency: transitive
dependency: "direct overridden"
description:
name: serverpod
sha256: "5de0b0c9ac5ebcba3d71e171382f4051352cf4af5ff475c5fa660d325d52c237"
@ -1167,7 +1167,7 @@ packages:
source: hosted
version: "4.0.2"
serverpod_client:
dependency: transitive
dependency: "direct overridden"
description:
name: serverpod_client
sha256: "85ed6639f7b4acd7d39eba63e8213195561eed48a3333dc9a146281db6a189ae"
@ -1175,7 +1175,7 @@ packages:
source: hosted
version: "4.0.2"
serverpod_database:
dependency: transitive
dependency: "direct overridden"
description:
name: serverpod_database
sha256: b27f7182251c5aca49d5285b9885025b5520498ff447cd101f06b9ca6dff1a17
@ -1214,8 +1214,32 @@ packages:
url: "https://pub.dev"
source: hosted
version: "0.1.0"
serverpod_serialization:
serverpod_offline_sync:
dependency: transitive
description:
name: serverpod_offline_sync
sha256: abf99fdc78dfe02e21960d4618acb3cbb71976262731b6f17c2c29f2782450c4
url: "https://pub.dev"
source: hosted
version: "0.0.8"
serverpod_offline_sync_client:
dependency: transitive
description:
name: serverpod_offline_sync_client
sha256: e517b3161dc1a07f5bed4801aa971349a550774ae6f0b85472d0d273c88a3198
url: "https://pub.dev"
source: hosted
version: "0.0.8"
serverpod_offline_sync_server:
dependency: transitive
description:
name: serverpod_offline_sync_server
sha256: fcb313b21a72b04602793de0719bca7aeaf929f97b90f5bfe77a82a91e5eaf36
url: "https://pub.dev"
source: hosted
version: "0.0.8"
serverpod_serialization:
dependency: "direct overridden"
description:
name: serverpod_serialization
sha256: c9882640744d2308081b3e7c1b4bf962f502105b14754317e002ccbf748850f2