refactor(db): migrate Gmail review decisions
Move creation ownership from startup reconciliation to an additive provider-aware migration. Preserve legacy decisions during downgrade and add the previously missing MariaDB table path.
This commit is contained in:
@@ -556,18 +556,6 @@ public static class StartupInitializationExtensions
|
||||
"LastSyncStatus" TEXT NULL,
|
||||
"LastSyncError" TEXT NULL
|
||||
);
|
||||
""");
|
||||
|
||||
Exec(c, """
|
||||
CREATE TABLE IF NOT EXISTS "GmailReviewDecisions" (
|
||||
"Id" INTEGER NOT NULL CONSTRAINT "PK_GmailReviewDecisions" PRIMARY KEY AUTOINCREMENT,
|
||||
"OwnerUserId" TEXT NOT NULL,
|
||||
"ThreadId" TEXT NOT NULL,
|
||||
"JobApplicationId" INTEGER NULL,
|
||||
"Decision" TEXT NOT NULL,
|
||||
"Note" TEXT NULL,
|
||||
"UpdatedAt" TEXT NOT NULL
|
||||
);
|
||||
""");
|
||||
|
||||
EnsureColumn(c, "GmailConnections", "LastSyncAttemptedAt", "ALTER TABLE GmailConnections ADD COLUMN LastSyncAttemptedAt TEXT NULL;");
|
||||
|
||||
@@ -17,6 +17,7 @@ internal static class StartupSchemaOwnership
|
||||
"Correspondences",
|
||||
"EmailDrafts",
|
||||
"EmailSendAttempts",
|
||||
"GmailReviewDecisions",
|
||||
"JobApplications",
|
||||
"JobEvents",
|
||||
"Jobs",
|
||||
@@ -53,7 +54,6 @@ internal static class StartupSchemaOwnership
|
||||
"CvVariants",
|
||||
"CvVariantVersions",
|
||||
"GmailConnections",
|
||||
"GmailReviewDecisions",
|
||||
"ImapConnections",
|
||||
"InterviewPrepItems",
|
||||
"InterviewPrepNotes",
|
||||
|
||||
Reference in New Issue
Block a user