Productie in een keer: de start kopieert HeroImages in de bibliotheek vlak voor de drop
Continuous Integration / config-asf (pull_request) Successful in 6s
Continuous Integration / config-sls (pull_request) Successful in 7s
Continuous Integration / changes (pull_request) Successful in 12s
Continuous Integration / frontend-prepare (pull_request) Skipped
Continuous Integration / frontend-build (pull_request) Skipped
Continuous Integration / frontend-test (pull_request) Skipped
Continuous Integration / frontend-lint (pull_request) Skipped
Continuous Integration / vulnerability-scan (pull_request) Successful in 1m12s
Continuous Integration / compile-sites (pull_request) Successful in 2m9s
Continuous Integration / backend-build (pull_request) Successful in 2m12s
Continuous Integration / backend-test (pull_request) Successful in 2m41s
Continuous Integration / publish-sls-test (pull_request) Skipped
Continuous Integration / publish-sls-production (pull_request) Skipped
Continuous Integration / deploy-sls-test (pull_request) Skipped
Continuous Integration / deploy-sls-production (pull_request) Skipped
Continuous Integration / publish-asf-test (pull_request) Skipped
Continuous Integration / deploy-asf-test (pull_request) Skipped
Continuous Integration / smoke-sls-test (pull_request) Skipped
Continuous Integration / smoke-asf-test (pull_request) Skipped

Een weigerende guard stopt de applicatie nu echt (ModuleStartupException wordt door de orchestrator doorgegooid).

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-18 09:08:58 +01:00
co-authored by Claude Sonnet 5.5
parent 24f8ce1cc1
commit 370bd0dfd1
11 changed files with 249 additions and 26 deletions
@@ -83,3 +83,4 @@ Kept while Bryan is away (2026-11-17): no questions to him, a most probable assu
| 52 | **Phase 3a: the library tables hold what the hero needs to publish** (2026-11-18). | Additive migration `AddHeroPhotoColumns` of the Media module: `MediaAssets.SetHash`, `MediaAssets.Variants` (the module's own JSON), the wide/tall overrides of the photo's crop, and `MediaUses.Variants`. The copy, the write-through and the verification fill and compare them; the read check shows a difference in them. Nothing reads them to publish yet (that is 3b). | Store the variants relationally: more tables for no gain while only the hero publishes from here. | `MediaEntities`, `MediaLibraryCopier`, `HeroMediaMigrationSource` |
| 53 | **Phase 3b maps the hero's photos onto the library table, behind a switch, with HeroImages kept as a copy** (2026-11-18). | `Media__Library__HeroPhotosInLibrary` (default off, test only via the workflow input `media_library_hero_photos`). On: the hero's photo entity is the library's `MediaAssets` rows of module `hero`; `HeroImages` is mirrored after every change so the switch can go back; the application refuses to start if the library lacks a photo or its set/variants; the foreign key slide -> `HeroImages` is dropped by a reversible Hero migration. No data is deleted in 3b; dropping `HeroImages` is step 3c. | Move the data in one go and drop the old table at once: cannot be switched back. | `HeroDbContext.ConfigureStorage`, `HeroLegacyImageMirror`, `HeroPhotoStorageGuard`, migration `DropSlideImageForeignKey` |
| 54 | **3c is built on its own branch and drops `HeroImages` behind a guard** (2026-11-18). | `feature/media-library-phase3c`: the photos always live in `MediaAssets`; the switches, copier, write-through, reader, mirror, read-check endpoint and the "Controle bibliotheek" panel are gone (Bryan: keep the panel until 3b is verified, then remove it in 3c); migration `DropHeroImagesTable` is destructive and only runs when the library holds every photo (guard before the migrations), `Down` gives the empty table. Not deployed before 3b is verified on test, a fresh restore point exists and SLS-Main has been told the exact migration. `MediaUses` stays unused in the database. | Keep the migration aids for another release: more code to carry for no use. | `HeroImagesDropGuard`, `DropHeroImagesTable`, `HeroDbContext` |
| 55 | **Production gets 3c in one release: the start-up copies `HeroImages` into the library right before the drop** (2026-11-18). | `HeroImagesDropGuard.PrepareAndVerify` applies the hero's migrations up to the drop, asks the Media module (`IMediaLibrarySchema`) to migrate its tables, copies the photos into `MediaAssets` in one transaction (update differing, insert missing, never delete) and then runs the strict check; a refusal throws `ModuleStartupException`, which the module orchestrator now rethrows so the application really does not start (before, every module error was logged and ignored). `MediaUses` are not copied (nothing reads them after 3c). | Staged road on production (phase 2 with the copy, 3b switch, then 3c): more releases and a period with the switches; the copier code would have to stay on master. | `HeroImagesDropGuard`, `IMediaLibrarySchema`, `ModuleOrchestrator`, `production-rollout.md` |