From: Marcin Siodelski Date: Fri, 14 Sep 2018 08:14:45 +0000 (+0200) Subject: [#89,!22] Added log_message column to audit MySQL tables. X-Git-Tag: 134-bugs--xcode-10_base~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e28c0c7b3e7a7729167cdad993f634ed1f0ac53b;p=thirdparty%2Fkea.git [#89,!22] Added log_message column to audit MySQL tables. --- diff --git a/src/bin/admin/tests/mysql_tests.sh.in b/src/bin/admin/tests/mysql_tests.sh.in index 06e3d87881..a11644f190 100644 --- a/src/bin/admin/tests/mysql_tests.sh.in +++ b/src/bin/admin/tests/mysql_tests.sh.in @@ -482,7 +482,7 @@ EOF run_statement "dhcp4_server" "$qry" # table: dhcp4_audit - qry="select id, object_type, object_id, modification_type, modification_ts from dhcp4_audit" + qry="select id, object_type, object_id, modification_type, modification_ts, log_message from dhcp4_audit" run_statement "dhcp4_audit" "$qry" # table: dhcp4_global_parameter @@ -534,7 +534,7 @@ EOF run_statement "dhcp6_server" "$qry" # table: dhcp6_audit - qry="select id, object_type, object_id, modification_type, modification_ts from dhcp6_audit" + qry="select id, object_type, object_id, modification_type, modification_ts, log_message from dhcp6_audit" run_statement "dhcp6_audit" "$qry" # table: dhcp6_global_parameter diff --git a/src/share/database/scripts/mysql/dhcpdb_create.mysql b/src/share/database/scripts/mysql/dhcpdb_create.mysql index a3a2d6500e..ba54aac2c5 100644 --- a/src/share/database/scripts/mysql/dhcpdb_create.mysql +++ b/src/share/database/scripts/mysql/dhcpdb_create.mysql @@ -808,6 +808,7 @@ CREATE TABLE IF NOT EXISTS dhcp4_audit ( object_id BIGINT(20) UNSIGNED NOT NULL, modification_type TINYINT(1) NOT NULL, modification_ts TIMESTAMP NOT NULL, + log_message TEXT, PRIMARY KEY (id), KEY key_dhcp4_audit_by_modification_ts (modification_ts), KEY fk_dhcp4_audit_modification_type (modification_type), @@ -1048,6 +1049,7 @@ CREATE TABLE IF NOT EXISTS dhcp6_audit ( object_id BIGINT(20) UNSIGNED NOT NULL, modification_type TINYINT(1) NOT NULL, modification_ts TIMESTAMP NOT NULL, + log_message TEXT, PRIMARY KEY (id), KEY key_dhcp6_audit_modification_ts (modification_ts), KEY fk_dhcp6_audit_modification_type (modification_type), diff --git a/src/share/database/scripts/mysql/upgrade_6.0_to_7.0.sh.in b/src/share/database/scripts/mysql/upgrade_6.0_to_7.0.sh.in index b482afe92d..f02fa7ca8e 100644 --- a/src/share/database/scripts/mysql/upgrade_6.0_to_7.0.sh.in +++ b/src/share/database/scripts/mysql/upgrade_6.0_to_7.0.sh.in @@ -148,6 +148,7 @@ CREATE TABLE IF NOT EXISTS dhcp4_audit ( object_id BIGINT(2) UNSIGNED NOT NULL, modification_type TINYINT(1) NOT NULL, modification_ts TIMESTAMP NOT NULL, + log_message TEXT, PRIMARY KEY (id), KEY key_dhcp4_audit_by_modification_ts (modification_ts), KEY fk_dhcp4_audit_modification_type (modification_type), @@ -373,6 +374,7 @@ CREATE TABLE IF NOT EXISTS dhcp6_audit ( object_id BIGINT(20) UNSIGNED NOT NULL, modification_type TINYINT(1) NOT NULL, modification_ts TIMESTAMP NOT NULL, + log_message TEXT, PRIMARY KEY (id), KEY key_dhcp6_audit_modification_ts (modification_ts), KEY fk_dhcp6_audit_modification_type (modification_type),