feat(housekeeping): add audit and preference storage

This commit is contained in:
Simo committed 2026-08-26 21:42:14 +02:00
1 parent bdb8f0b02b
commit 7c93d3e766
3 files changed
+175 -14

No files matched your search

+17
View File
@@ -0,0 +1,17 @@
-- Housekeeping audit correlation and user presentation preferences.
-- Additive only: this shared schema is also consumed by the emulator.
ALTER TABLE `admin_audit_log`
ADD COLUMN `correlation_id` VARCHAR(64) NULL,
ADD COLUMN `outcome` VARCHAR(32) NULL,
ADD COLUMN `reason` TEXT NULL,
ADD COLUMN `domain` VARCHAR(32) NULL,
ADD INDEX `admin_audit_log_correlation_id_idx` (`correlation_id`);
CREATE TABLE `housekeeping_user_preferences` (
`user_id` INT NOT NULL,
`schema_version` INT NOT NULL DEFAULT 1,
`payload` LONGTEXT NOT NULL,
`created_at` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
`updated_at` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
PRIMARY KEY (`user_id`)
);