From: Tomek Mrugalski Date: Mon, 31 May 2021 17:02:50 +0000 (+0200) Subject: [#90] Added dhcp6_audit_revision table X-Git-Tag: eng-drop-2021-11-10~73 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=2f520658eab5b2b9bb4f373d6ef5130c8477c464;p=thirdparty%2Fkea.git [#90] Added dhcp6_audit_revision table --- diff --git a/src/share/database/scripts/pgsql/upgrade_6.2_to_7.0.sh.in b/src/share/database/scripts/pgsql/upgrade_6.2_to_7.0.sh.in index 1157b58328..870d9e06de 100644 --- a/src/share/database/scripts/pgsql/upgrade_6.2_to_7.0.sh.in +++ b/src/share/database/scripts/pgsql/upgrade_6.2_to_7.0.sh.in @@ -409,6 +409,18 @@ CREATE TRIGGER dhcp6_option_def_server_modification_ts_update FOR EACH ROW EXECUTE PROCEDURE modification_ts_update(); +-- Now create two tables for audit revisions... +CREATE TABLE dhcp6_audit_revision ( + id SERIAL PRIMARY KEY NOT NULL, + modification_ts timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, + log_message text DEFAULT NULL, + server_id BIGINT DEFAULT NULL +); +CREATE TRIGGER dhcp6_audit_revision_modification_ts_update + AFTER UPDATE ON dhcp6_audit_revision + FOR EACH ROW EXECUTE PROCEDURE modification_ts_update(); + + -- Update the schema version number