halkyon/apps/train/halkyon_train_client/lib/migrations/migration_registry.dart
Tizian 「ティツィアーン」 508994be3a
feat(train): strength plans and sessions (ADR 0035)
Strength plans of exercises from a catalogue or the person's own, in
blocks of one exercise or several done in turn (supersets, circuits),
each with its sets, reps or seconds, weights and rests; each a sealed
`strength_plan` row. Plans are marked with what the place chosen lacks,
and a session offers swaps moving the same way that the place allows.

A session runs on every device, set by set with the rest counted down,
each weight made up from the place's plates, bars and fixed weights with
the plate changes between sets, kept in strength_session.json after each
change so one cut off is carried on, and saved as a workout of the new
activity Strength with its sets, listed on its page; strength training
in Health Connect and FIT, no GPX.

Migration 20261102113104496-strength-plans is purely additive: it
creates the table strength_plan (id uuid v7, spaceId, keyId, the sealed
payload and its nonce), its index on spaceId, and a foreign key to
offline_sync_spaces with ON DELETE CASCADE, so deleting a person's sync
spaces deletes their plans; then the modules' version rows. The
gen_random_uuid_v7 function is created or replaced as in every
migration.

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

31 lines
1.2 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';
/// 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(),
];
/// List of all client-side database migration versions.
static List<String> get versions => migrations.map((m) => m.version).toList();
}