Jul 22 - Initial code
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
-- Additive migration: adds the audit_log table required by the admin panel.
|
||||
-- Run this against an ALREADY-DEPLOYED jqc_features database that predates the
|
||||
-- admin feature. Safe to re-run (IF NOT EXISTS). New deploys don't need it —
|
||||
-- schema.sql already includes this table.
|
||||
|
||||
USE jqc_features;
|
||||
|
||||
CREATE TABLE IF NOT EXISTS audit_log (
|
||||
id INT AUTO_INCREMENT PRIMARY KEY,
|
||||
actor VARCHAR(80) NULL,
|
||||
action VARCHAR(40) NOT NULL,
|
||||
entity VARCHAR(40) NOT NULL,
|
||||
entity_id INT NULL,
|
||||
detail VARCHAR(255) NULL,
|
||||
created_at DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||
KEY idx_audit_created (created_at)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
|
||||
Reference in New Issue
Block a user