halkyon/apps/train/halkyon_train_client/lib/migrations/migration_registry.dart
Tizian 「ティツィアーン」 b72cea1fe0
feat(base,app,keys): keys of shared spaces, sealed to each member
Step 3 of ADR 0044 (D3, D18, D19). A shared space's data keys are
sealed on a device to each member's public keys; the instance keeps
what devices sealed and never opens it.

- halkyon_keys: the safety code of two accounts' public keys
  (`safetyCode`), 60 digits, the same on both sides.
- halkyon_base: the register hands out accounts' public keys
  (`public-keys-of`, local and remote); the table `shared_space_key`
  and the endpoint `sharedSpaceKeys` (memberKeys, keysNeeded, seal,
  mine). Only the Owner and Editors seal, the first key sealed to a
  member stays, and a member's keys go with their membership. Every
  host's migration creates the table.
- halkyon_app: `ContentCipher` seals a key to another account and
  opens one sealed by another; `SharedKeys` shares a space's key with
  its members, seals keys to newcomers and opens the person's own,
  holding each member to the public keys `KeyPins` pinned on first
  sight (`key_pins.json` in the person's folder), a change refused
  until trusted anew.

Learn takes them into its `Privacy` in step 4.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Tizian 「ティツィアーン」 <raisondetredev@pm.me>
2026-11-11 11:35:42 +01:00

39 lines
1.7 KiB
Dart

/// AUTOGENERATED BY SERVERPOD create-migration - DO NOT EDIT BY HAND
/// Merging: resolve registry conflicts the same as migration_registry.txt.
library;
import 'package:serverpod_database/serverpod_database.dart';
part '20261028101012641-workouts/migration.dart';
part '20261028164640000-profile/migration.dart';
part '20261028181405893-days/migration.dart';
part '20261028211508606-plans/migration.dart';
part '20261028231042668-routes/migration.dart';
part '20261102103211357-training-places/migration.dart';
part '20261102113104496-strength-plans/migration.dart';
part '20261103204323683-body-weights/migration.dart';
part '20261110225636220-file-store/migration.dart';
part '20261111091721828-shared-spaces/migration.dart';
part '20261111100125761-shared-space-keys/migration.dart';
/// Migration registry for the client-side database.
class MigrationRegistry {
/// Ordered list of all client-side database migrations.
/// New migrations are always appended at the end.
static final List<MigrationVersionSql> migrations = [
_Migration20261028101012641_workouts(),
_Migration20261028164640000_profile(),
_Migration20261028181405893_days(),
_Migration20261028211508606_plans(),
_Migration20261028231042668_routes(),
_Migration20261102103211357_training_places(),
_Migration20261102113104496_strength_plans(),
_Migration20261103204323683_body_weights(),
_Migration20261110225636220_file_store(),
_Migration20261111091721828_shared_spaces(),
_Migration20261111100125761_shared_space_keys(),
];
/// List of all client-side database migration versions.
static List<String> get versions => migrations.map((m) => m.version).toList();
}