Skip to content

Commit

Permalink
[#89,!22] Added log_message column to audit MySQL tables.
Browse files Browse the repository at this point in the history
  • Loading branch information
msiodelski committed Sep 18, 2018
1 parent 20bc3ce commit e28c0c7
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/bin/admin/tests/mysql_tests.sh.in
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions src/share/database/scripts/mysql/dhcpdb_create.mysql
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down Expand Up @@ -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),
Expand Down
2 changes: 2 additions & 0 deletions src/share/database/scripts/mysql/upgrade_6.0_to_7.0.sh.in
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down Expand Up @@ -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),
Expand Down

0 comments on commit e28c0c7

Please sign in to comment.