refactor(db): migrate CV extraction data
Move upload artifacts and extraction runs into an additive provider-aware migration. Preserve parsed results, indexes, and nullable artifact retention semantics.
This commit is contained in:
@@ -67,7 +67,7 @@ already-correct database. Two consequences worth knowing:
|
||||
Created by EF migrations, never by the reconciler:
|
||||
|
||||
`AccountDeletionFiles`, `AccountDeletionRequests`, `AiUsageRecords`, `Attachments`, `Companies`,
|
||||
`Correspondences`, `EmailDrafts`, `EmailSendAttempts`, `GmailConnections`,
|
||||
`Correspondences`, `CvExtractionRuns`, `CvUploadArtifacts`, `EmailDrafts`, `EmailSendAttempts`, `GmailConnections`,
|
||||
`GmailReviewDecisions`, `ImapConnections`, `JobApplications`, `JobEvents`, `Jobs`,
|
||||
`MicrosoftGraphConnections`, `RuleSettings`, `SystemEmailSettings`, `TrustedDevices`,
|
||||
`TwoFactorRecoveryCodes`, `UserNotifications`, `UserOperations`, `UserRuleSettings`, and `UserSessions`.
|
||||
@@ -92,6 +92,10 @@ The email-provider connection group (`GmailConnections`, `MicrosoftGraphConnecti
|
||||
additive Gmail sync-column repair plus guarded MariaDB identity/index repair; it does not create
|
||||
these tables.
|
||||
|
||||
The CV import persistence group (`CvUploadArtifacts` and `CvExtractionRuns`) moved in
|
||||
`20260830125000_AdoptCvExtractionSchema`. The extraction run's optional artifact foreign key remains
|
||||
`ON DELETE SET NULL`, so retention cleanup cannot erase the extraction/review record.
|
||||
|
||||
The reconciler may **repair** these (add a missing column, add an index, fix a non-`AUTO_INCREMENT`
|
||||
primary key) and may seed the default `RuleSettings` row — but it must never `CREATE TABLE` them.
|
||||
It used to create `RuleSettings`, which is precisely why a clean install failed with
|
||||
@@ -101,8 +105,7 @@ It used to create `RuleSettings`, which is precisely why a clean install failed
|
||||
|
||||
Created by `StartupInitializationExtensions`, with a **no-op migration** holding the model snapshot:
|
||||
|
||||
`CvUploadArtifacts`, `CvExtractionRuns`, `TailoredCvDrafts`,
|
||||
`CareerProfiles`, `CareerProfileVersions`, the six CareerProfile children (`CareerExperiences`,
|
||||
`TailoredCvDrafts`, `CareerProfiles`, `CareerProfileVersions`, the six CareerProfile children (`CareerExperiences`,
|
||||
`CareerEducations`, `CareerSkills`, `CareerProjects`, `CareerCertifications`, `CareerLanguages`),
|
||||
`InterviewPrepNotes`, `AiWorkspaceNotes`, `CvVariants`, `CvVariantVersions`, `AiInteractions`,
|
||||
`ApplicationChecklistItems`, `CoverLetterVersions`, and `InterviewPrepItems`.
|
||||
|
||||
Reference in New Issue
Block a user