Docs: controlestappen rond de kopie op test en aanname over deploy zonder dump
Continuous Integration / config-sls (pull_request) Successful in 7s
Continuous Integration / config-asf (pull_request) Successful in 6s
Continuous Integration / changes (pull_request) Successful in 18s
Continuous Integration / frontend-prepare (pull_request) Successful in 31s
Continuous Integration / backend-build (pull_request) Successful in 1m16s
Continuous Integration / vulnerability-scan (pull_request) Successful in 1m29s
Continuous Integration / frontend-build (pull_request) Successful in 52s
Continuous Integration / frontend-test (pull_request) Successful in 2m27s
Continuous Integration / frontend-lint (pull_request) Successful in 2m47s
Continuous Integration / backend-test (pull_request) Successful in 7m28s
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
Continuous Integration / compile-sites (pull_request) Failing after 12m3s
Continuous Integration / config-sls (pull_request) Successful in 7s
Continuous Integration / config-asf (pull_request) Successful in 6s
Continuous Integration / changes (pull_request) Successful in 18s
Continuous Integration / frontend-prepare (pull_request) Successful in 31s
Continuous Integration / backend-build (pull_request) Successful in 1m16s
Continuous Integration / vulnerability-scan (pull_request) Successful in 1m29s
Continuous Integration / frontend-build (pull_request) Successful in 52s
Continuous Integration / frontend-test (pull_request) Successful in 2m27s
Continuous Integration / frontend-lint (pull_request) Successful in 2m47s
Continuous Integration / backend-test (pull_request) Successful in 7m28s
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
Continuous Integration / compile-sites (pull_request) Failing after 12m3s
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -63,3 +63,4 @@ Kept while Bryan is away (2026-11-17): no questions to him, a most probable assu
|
||||
- Assumption 12 now reads: there IS a trash (decision 12), the earlier "no trash in phase A" no longer applies. Assumption 10: deleting a used photo is possible after a second confirmation (built). Assumption 21: the original file name is stored from now on (built).
|
||||
| 33 | **Where the copy runs and what it copies** (built 2026-11-17). | A new module `Modules.Media` owns the tables (`MediaAssets`, `MediaUses`); modules offer their data through `IMediaMigrationSource` so the library module does not depend on the Hero. The copy is a verified mirror in one transaction behind `Media:Library:CopyOnStartup` (default false). The use of a hero slide carries both crops (`wide`, `tall`) of its photo as JSON; its set hash is the photo's current set hash. | A copy job triggered from the admin instead of start-up: easier to time, needs an endpoint and a button. | `Modules.Media/Services/MediaLibraryCopier.cs`, `HeroMediaMigrationSource` |
|
||||
| 34 | **Naming**: entity `MediaAssetUse` (table `MediaUses`), because `MediaUse` already names the read model in Core. | As built. | Rename the table or the record: a small migration. | `Modules.Media/Data` |
|
||||
| 35 | **Test deploy without a separate database dump** (decided on assumption by SLS-Main, 2026-11-17, Bryan away). | The Raspberry Pi test host cannot be dumped by SLS-Main; the test data can be rebuilt with the seed scripts and both database changes of the branch (`AddMediaLibraryColumns`, the empty Media tables) are additive, so the test deploy goes ahead without a dump. The copy stays OFF until Bryan agrees. | Take a dump on the Pi before the deploy (and certainly before the copy is switched on). | `migration-plan.md`, section "Test host" |
|
||||
|
||||
@@ -87,3 +87,23 @@ Nothing reads from the new tables yet (phase 2, the switch, is not built). The l
|
||||
### Still to build (phases 2 and 3)
|
||||
|
||||
The switch (`Media:Library:ReadFromLibrary`, dual write of new uploads, library reading from the new tables) and the contract phase. They need Bryan's acceptance of the copy on test first.
|
||||
|
||||
## Test host: what to check around the copy (prepared 2026-11-17; the copy is NOT switched on yet)
|
||||
|
||||
**Deploy without the copy (decided on assumption by SLS-Main, Bryan away):** the test deploy of the branch carries two additive database changes, the Hero migration `AddMediaLibraryColumns` (three nullable columns) and the empty tables of the Media module. No separate database dump is taken on the Raspberry Pi (SLS-Main cannot make one); the assumption is that the test data can be rebuilt with the seed scripts and that both changes are additive. Bryan checks this assumption later.
|
||||
|
||||
After that deploy, check in the log:
|
||||
|
||||
- `Applying migration '..._AddMediaLibraryColumns'` and `Applying migration '..._InitialCreate'` (Media) appear once, no error;
|
||||
- the Hero admin still opens, a photo can be uploaded and a slide saved (smoke test), and `/media/hero/<setHash>/...` addresses still answer;
|
||||
- `Media__Library__CopyOnStartup` is NOT set: no line `Media library copy verified` appears.
|
||||
|
||||
**To switch the copy on (only after Bryan's agreement):**
|
||||
|
||||
1. Make a database dump first if it can be done, and note the number of rows: `SELECT COUNT(*) FROM HeroImages; SELECT COUNT(*) FROM HeroSlides;`.
|
||||
2. Set the environment variable `Media__Library__CopyOnStartup=true` on the test host and restart the application.
|
||||
3. The log must say `Media library copy verified: N photos and M uses from hero.` with N equal to the `HeroImages` count and M equal to the `HeroSlides` count. An error line `The media library copy failed and was rolled back` means nothing was copied.
|
||||
4. Check: `SELECT COUNT(*) FROM MediaAssets; SELECT COUNT(*) FROM MediaUses;` equals the same counts; the library screen still shows the same photos (it still reads the hero).
|
||||
5. Switch it off again (remove the variable, restart) when done: the copy can be repeated at any time; it is a mirror.
|
||||
|
||||
**Rollback:** remove the variable (the tables stay, unused), or drop the tables with the EF `Down` migration of the Media module; the Hero's own tables are never changed by the copy.
|
||||
|
||||
Reference in New Issue
Block a user