refactor(db): migrate auth support tables

Move recovery codes, trusted devices, and revocable sessions into an additive provider-aware migration. Preserve existing security records and retain guarded MariaDB repairs for historical schemas.
This commit is contained in:
cesnimda
2026-08-30 16:52:07 +02:00
parent b425f1edc5
commit 2e2d649f6f
9 changed files with 209 additions and 113 deletions
@@ -23,9 +23,12 @@ internal static class StartupSchemaOwnership
"Jobs",
"RuleSettings",
"SystemEmailSettings",
"TrustedDevices",
"TwoFactorRecoveryCodes",
"UserNotifications",
"UserOperations",
"UserRuleSettings",
"UserSessions",
};
internal static readonly IReadOnlySet<string> ReconcilerOwnedTables = new HashSet<string>(StringComparer.Ordinal)
@@ -59,9 +62,6 @@ internal static class StartupSchemaOwnership
"InterviewPrepNotes",
"MicrosoftGraphConnections",
"TailoredCvDrafts",
"TrustedDevices",
"TwoFactorRecoveryCodes",
"UserSessions",
};
// Historical migrations contain guarded compatibility bootstraps for these tables so direct