Fase 3c (code, nog niet uitgerold): foto's altijd in de bibliotheektabel, HeroImages-migratie met controle, schakelaars en hulpmiddelen weg
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -82,3 +82,4 @@ Kept while Bryan is away (2026-11-17): no questions to him, a most probable assu
|
||||
| 51 | **"Controle bibliotheek" panel in the library screen** (SLS-Main for Bryan, 2026-11-17). | A small panel under the storage meter, for administrators (the whole screen is admin only), asks `GET media-library/read-check` only when its button is clicked and says in plain words (nl/en) whether the library tables match each module or lists the differences, plus the state of the three switches (copy, write-through, reading off/compare/on; the response now carries `copyOnStartup` and `dualWrite`). It changes nothing. Always shown, not only on test. | Show it only when the read switch is not off: Bryan could then not check before switching. | `LibraryCheck.tsx`, `MediaLibraryController.ReadCheck`, `IMediaLibrarySwitchState` |
|
||||
| 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` |
|
||||
|
||||
Reference in New Issue
Block a user