feat(train): the sync engine and Train's first models (ADR 0030, D14)
Train's server syncs with serverpod_offline_sync as Learn's does, and holds three synced tables, every payload sealed on the devices: content_key (the person's data key, sealed to the account), workout (its type, times, name and totals, changed when edited) and workout_series (chunks of a workout's samples, written once). A person's space goes with them, with everything in it. The migration only adds: the three tables, each indexed on spaceId and cascading with its space (a series also with its workout), and the sync engine's own tables. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Tizian 「ティツィアーン」 <raisondetredev@pm.me>
This commit is contained in:
parent
3486932cbe
commit
7b20851a0a
1 changed files with 31210 additions and 5 deletions
|
|
@ -0,0 +1,19 @@
|
|||
/// 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';
|
||||
|
||||
/// 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(),
|
||||
];
|
||||
|
||||
/// List of all client-side database migration versions.
|
||||
static List<String> get versions => migrations.map((m) => m.version).toList();
|
||||
}
|
||||
Loading…
Reference in a new issue