halkyon/halkyon_learn_server/migrations/20260930094729362-studysets
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Tizian 「ティツィアーン」 8f45b39c0e
feat: step 7's migration, with an index on spaceId
The first migration since the initial one, created with the CLI (serverpod create-migration --tag studysets), since no MCP bridge was set up yet. On the server it is one transaction that only adds: gen_random_uuid_v7(), the studyset table, the sync engine's tables (spaces, their members and nodes, the CRDT bookkeeping, the log of integrity violations) with their foreign keys, and, from Serverpod v4.0.3, the auth module's profile image foreign key re-created as DEFERRABLE INITIALLY DEFERRED, so that dumps restore. The server tests apply it to their Postgres.

studyset gets an index on spaceId: deleting a space cascades into every synced table, and Postgres doesn't index foreign keys by itself, so account deletion and pruning would otherwise read whole tables. AGENTS.md makes it the rule for every synced table.

The client migration creates each device's SQLite schema. The generator builds it from the whole definition, so it also contains the server's own tables; only the synced tables and the bookkeeping ever hold data on a device.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Tizian 「ティツィアーン」 <raisondetredev@pm.me>
2026-09-30 20:38:15 +02:00
..
definition.json feat: step 7's migration, with an index on spaceId 2026-09-30 20:38:15 +02:00
definition.sql feat: step 7's migration, with an index on spaceId 2026-09-30 20:38:15 +02:00
definition_project.json feat: step 7's migration, with an index on spaceId 2026-09-30 20:38:15 +02:00
migration.json feat: step 7's migration, with an index on spaceId 2026-09-30 20:38:15 +02:00
migration.sql feat: step 7's migration, with an index on spaceId 2026-09-30 20:38:15 +02:00