Files
EpicNext-Cms/drizzle/migrations/0023_housekeeping.sql
T

17 lines
714 B
SQL

-- 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`)
);