From: Francis Dupont Date: Sat, 2 Feb 2019 01:59:53 +0000 (+0100) Subject: [354-compilation-with-mysql-fails-on-fedora-29] Updated schema & upgrade X-Git-Tag: 458-config-backend-support-in-src-lib_base~11 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a6c64391129737fa45da2817000857c81d690489;p=thirdparty%2Fkea.git [354-compilation-with-mysql-fails-on-fedora-29] Updated schema & upgrade --- 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;