From a6c64391129737fa45da2817000857c81d690489 Mon Sep 17 00:00:00 2001 From: Francis Dupont Date: Sat, 2 Feb 2019 02:59:53 +0100 Subject: [PATCH] [354-compilation-with-mysql-fails-on-fedora-29] Updated schema & upgrade --- src/share/database/scripts/mysql/dhcpdb_create.mysql | 6 ++++-- src/share/database/scripts/mysql/upgrade_7.0_to_8.0.sh.in | 6 ++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/src/share/database/scripts/mysql/dhcpdb_create.mysql b/src/share/database/scripts/mysql/dhcpdb_create.mysql index 3672f53c7f..5fb00b5021 100644 --- a/src/share/database/scripts/mysql/dhcpdb_create.mysql +++ b/src/share/database/scripts/mysql/dhcpdb_create.mysql @@ -1374,7 +1374,8 @@ ALTER TABLE dhcp4_subnet_server MODIFY COLUMN modification_ts TIMESTAMP(6) NOT NULL; ALTER TABLE dhcp4_options - MODIFY COLUMN modification_ts TIMESTAMP(6) NOT NULL; + MODIFY COLUMN modification_ts TIMESTAMP(6) NOT NULL + DEFAULT CURRENT_TIMESTAMP(6); ALTER TABLE dhcp4_options_server MODIFY COLUMN modification_ts TIMESTAMP(6) NOT NULL; @@ -1413,7 +1414,8 @@ ALTER TABLE dhcp6_subnet_server MODIFY COLUMN modification_ts TIMESTAMP(6) NOT NULL; ALTER TABLE dhcp6_options - MODIFY COLUMN modification_ts TIMESTAMP(6) NOT NULL; + MODIFY COLUMN modification_ts TIMESTAMP(6) NOT NULL + DEFAULT CURRENT_TIMESTAMP(6); ALTER TABLE dhcp6_options_server MODIFY COLUMN modification_ts TIMESTAMP(6) NOT NULL; diff --git a/src/share/database/scripts/mysql/upgrade_7.0_to_8.0.sh.in b/src/share/database/scripts/mysql/upgrade_7.0_to_8.0.sh.in index 3bf915266f..d43cc5fab9 100644 --- a/src/share/database/scripts/mysql/upgrade_7.0_to_8.0.sh.in +++ b/src/share/database/scripts/mysql/upgrade_7.0_to_8.0.sh.in @@ -57,7 +57,8 @@ ALTER TABLE dhcp4_subnet_server MODIFY COLUMN modification_ts TIMESTAMP(6) NOT NULL; ALTER TABLE dhcp4_options - MODIFY COLUMN modification_ts TIMESTAMP(6) NOT NULL; + MODIFY COLUMN modification_ts TIMESTAMP(6) NOT NULL + DEFAULT CURRENT_TIMESTAMP(6); ALTER TABLE dhcp4_options_server MODIFY COLUMN modification_ts TIMESTAMP(6) NOT NULL; @@ -96,7 +97,8 @@ ALTER TABLE dhcp6_subnet_server MODIFY COLUMN modification_ts TIMESTAMP(6) NOT NULL; ALTER TABLE dhcp6_options - MODIFY COLUMN modification_ts TIMESTAMP(6) NOT NULL; + MODIFY COLUMN modification_ts TIMESTAMP(6) NOT NULL + DEFAULT CURRENT_TIMESTAMP(6); ALTER TABLE dhcp6_options_server MODIFY COLUMN modification_ts TIMESTAMP(6) NOT NULL; -- 2.47.2