feat(train): the Loop's days read on the phone (ADR 0030, D37, D38)
The server gains Train's synced `day`, `day_series` (a day's heart rate, deleted with its day) and `night`, each a sealed payload alone; the migration `days` only adds their tables, indexes and foreign keys (to their sync space, and a chunk's to its day, deferred), and the person's deletion takes them with their spaces. On Android, `LoopDays.kt` reads a band's days from a date to today, framed by the SDK's sync start and stop, into lines of JSON, then deletes on the band what the app kept up to the date it names, never today; `LoopBridge` answers `readDays` with them, one band call at a time, and `background` schedules `LoopWorker`, a WorkManager job every four hours that appends the same lines to the person's `loop_days.txt` while the app doesn't hold the band. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Tizian 「ティツィアーン」 <raisondetredev@pm.me>
This commit is contained in:
parent
24de3c0a4e
commit
88e8693025
1 changed files with 24637 additions and 52 deletions
|
|
@ -6,6 +6,7 @@ import 'package:serverpod_database/serverpod_database.dart';
|
|||
|
||||
part '20261028101012641-workouts/migration.dart';
|
||||
part '20261028164640000-profile/migration.dart';
|
||||
part '20261028181405893-days/migration.dart';
|
||||
|
||||
/// Migration registry for the client-side database.
|
||||
class MigrationRegistry {
|
||||
|
|
@ -14,6 +15,7 @@ class MigrationRegistry {
|
|||
static final List<MigrationVersionSql> migrations = [
|
||||
_Migration20261028101012641_workouts(),
|
||||
_Migration20261028164640000_profile(),
|
||||
_Migration20261028181405893_days(),
|
||||
];
|
||||
|
||||
/// List of all client-side database migration versions.
|
||||
|
|
|
|||
Loading…
Reference in a new issue