refactor(db): migrate tailored CV drafts

Move job-specific tailored documents into an additive provider-aware migration. Preserve edited content, indexes, and application cascade semantics.
This commit is contained in:
cesnimda
2026-08-30 17:03:48 +02:00
parent e28cc0ad47
commit 9922426aa5
9 changed files with 159 additions and 63 deletions
+6 -2
View File
@@ -27,6 +27,8 @@ cohesive table groups. It does not attempt to delete the legacy reconciler whole
MariaDB index/identity repair remain for historical installations.
- Added `20260830125000_AdoptCvExtractionSchema` for upload artifacts and extraction runs, retaining
parsed output and the nullable `ON DELETE SET NULL` artifact relationship.
- Added `20260830126000_AdoptTailoredCvDraftSchema` for the job-specific tailored document, retaining
generated and manually edited content plus its `ON DELETE CASCADE` application relationship.
- Corrected the ownership runbook: new tables now default to migrations; the reconciler is legacy
compatibility code to retire one dependency group at a time.
@@ -52,14 +54,16 @@ migration.
and re-upgrade, and all five expected provider indexes are present afterwards.
- Representative CV artifact metadata and structured extraction output survive adoption, downgrade,
and re-upgrade; deleting the artifact preserves the run and clears its nullable relationship.
- A representative tailored CV's summary, custom section, and generation context survive adoption,
downgrade, and re-upgrade; deleting the parent application still deletes its draft.
- Generated MariaDB SQL contains the provider-correct `SystemEmailSettings` DDL.
- Full backend: 727/727 passed after the CV extraction persistence transfer.
- Full backend: 728/728 passed after the tailored CV draft transfer.
- Fresh application startup over a new disposable SQLite database applied
`20260830120000_AdoptSystemEmailSettingsSchema` and reached the healthy listening state.
## Remaining JT-019 work
Twenty-four model tables remain startup-created, including the Identity group and several tables
Twenty-three model tables remain startup-created, including the Identity group and several tables
with parent dependencies. Transfer them in small dependency-aware migrations with blank, populated,
retry and MariaDB runtime proof. Column/index repairs must remain until historical upgrade fixtures
prove each one redundant.