WP2+WP3: add deletedByUserId + createdByUserId coverage columns
One Class-A migration after WP1 (born-canonical). WP2: deletedByUserId on the 10 MARS-483 gap-2 tables (practicas+A, userRoles, lookupOptions, accountSwitchLinks, supportTickets, supportTicketMessages, supportTicketNotifySubscriptions, practicaImages+A, practicaTeeth+A, practicaToothConductos+A). WP3: createdByUserId on comisiones, periodos, studentAssignments, teacherComisionMemberships, users, userRoles, lookupOptions, practicaTeeth, practicaToothConductos, accessRequests, accountSwitchLinks, supportTicketNotifySubscriptions, systemSettings. All NULLable; FK users(id) ON DELETE SET NULL; indexed only where queried (audit cond 3). Invariant (audit cond 4 + coder): self-registered users/accessRequests get NULL (system/OAuth origin), never self-reference; admin-created rows get the admin id — document in schema comments. Backfill deletedByUserId ONLY where an archive row unambiguously attributes the delete; createdByUserId no backfill. Coder wires every soft-delete server action to set deletedByUserId in the same wrapped tx alongside setArchiveContext — batch this app push with the WP1 repoint if timing allows. Exemptions per Elazar 5a + audit cond 7: appEvents family, dbperfSnapshots, matviewRefreshLog/Runs, practicasIntegrityInventory, practicaEditLocks, rectificarReminderState, emailOutbox, notifications, userNotificationPrefs.
Questions
Activity
-
parent=#2096
-
--body
-
EVO-57 HOLD (Elazar 2026-07-17 via pmmaster): blanket coverage out; re-scope to minimal per-table-justified set when EVO-57 resumes. Plan text retained as reference.