mirror of
https://github.com/MBombeck/HealthLog.git
synced 2026-11-10 21:32:18 +00:00
refactor(backup): run the restore as ordered steps from per-domain modules
restoreBackup becomes an orchestrator: the checks before the first delete move to restore-preflight.ts, and the transaction runs the steps listed in backup-domains.ts in dependency order, emptying the account first and then rebuilding it domain by domain. The inline restores for measurements, medications, mood, labs, illness, allergies, family history, workouts, nutrient days, documents, the instance settings and the cleared notification channels move into one module per domain, beside the existing section modules. Cross-domain references travel through one typed context instead of local variables. The order of every write, the refusals and their audit rows, the skip report, the cleared counts and the reported phases are unchanged; the golden copies of the restored account still match. Guards that pinned the restore by path now point at the domain files.
This commit is contained in:
1 parent
dcf49dd14e
commit
e7b31fe8e0
27 files changed
+3778
-3008
No files matched your search
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"$comment": "Production functions over 200 lines, keyed \"file :: name\", and their length. Maintained by src/__tests__/source-size-ratchet.test.ts.",
|
||||
"count": 415,
|
||||
"total": 154643,
|
||||
"count": 413,
|
||||
"total": 149647,
|
||||
"entries": {
|
||||
"app/achievements/page.tsx :: AchievementsPage": 206,
|
||||
"app/api/admin/backups/upload/route.ts :: apiHandler(arg)": 314,
|
||||
@@ -324,8 +324,6 @@
|
||||
"lib/export/profile-backup.ts :: buildProfileBackupSection": 270,
|
||||
"lib/export/profile-backup.ts :: restoreProfileData": 291,
|
||||
"lib/export/records-backup.ts :: buildRecordsBackupSection": 308,
|
||||
"lib/export/restore-backup.ts :: restoreBackup": 2833,
|
||||
"lib/export/restore-backup.ts :: restoreBackup > prisma.$transaction(arg)": 2163,
|
||||
"lib/export/vaccinations-backup.ts :: restoreVaccinationsData": 216,
|
||||
"lib/export/visits-backup.ts :: restoreVisitsData": 261,
|
||||
"lib/fhir/build-bundle.ts :: buildFhirDocumentBundle": 363,
|
||||
|
||||
Reference in new issue
Block a user