From 89b0ce768b65746bd2f0a8673a801b41d912612e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C5=91cze=20Bence?= Date: Tue, 18 Apr 2023 23:32:14 +0200 Subject: [PATCH] add db table for audit log --- .../migrations/structure/20230417_0158_audit_log.sql | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 database/migrations/structure/20230417_0158_audit_log.sql diff --git a/database/migrations/structure/20230417_0158_audit_log.sql b/database/migrations/structure/20230417_0158_audit_log.sql new file mode 100644 index 0000000..7e97a07 --- /dev/null +++ b/database/migrations/structure/20230417_0158_audit_log.sql @@ -0,0 +1,12 @@ +CREATE TABLE `audit_log` ( + `id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `local_table` varchar(255) NOT NULL, + `local_id` int(10) unsigned NOT NULL, + `type` enum('insert','update','delete') NOT NULL, + `date` timestamp NOT NULL DEFAULT current_timestamp(), + `modifier_id` int(10) unsigned NULL, + `column` varchar(255) NULL, + `old` text NULL, + `new` text NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;