diff --git a/wwwroot/inc/install.php b/wwwroot/inc/install.php index c72af7a36..333ce9b8f 100644 --- a/wwwroot/inc/install.php +++ b/wwwroot/inc/install.php @@ -1171,10 +1171,10 @@ function get_pseudo_file ($name) `mutex_rev` int(10) unsigned NOT NULL default '0', `out_of_sync` enum('yes','no') NOT NULL default 'yes', `last_errno` int(10) unsigned NOT NULL default '0', - `last_change` timestamp NOT NULL default '0000-00-00 00:00:00', - `last_push_started` timestamp NOT NULL default '0000-00-00 00:00:00', - `last_push_finished` timestamp NOT NULL default '0000-00-00 00:00:00', - `last_error_ts` timestamp NOT NULL default '0000-00-00 00:00:00', + `last_change` timestamp NULL default NULL, + `last_push_started` timestamp NULL default NULL, + `last_push_finished` timestamp NULL default NULL, + `last_error_ts` timestamp NULL default NULL, UNIQUE KEY `object_id` (`object_id`), KEY `domain_id` (`domain_id`), KEY `template_id` (`template_id`), diff --git a/wwwroot/inc/pre-init.php b/wwwroot/inc/pre-init.php index df1eac4a3..281aa8cad 100644 --- a/wwwroot/inc/pre-init.php +++ b/wwwroot/inc/pre-init.php @@ -58,11 +58,7 @@ function connectDB() $drvoptions = array ( PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION, - // Cancel one specific SQL mode option that RackTables has been non-compliant - // with but which used to be off by default until MySQL 5.7. As soon as - // respective SQL queries and table columns become compliant with those options - // stop changing @@SQL_MODE but still keep SET NAMES in place. - PDO::MYSQL_ATTR_INIT_COMMAND => 'SET NAMES "utf8", @@SQL_MODE = REPLACE(@@SQL_MODE, "NO_ZERO_DATE", "")', + PDO::MYSQL_ATTR_INIT_COMMAND => 'SET NAMES "utf8"', ); if (isset ($pdo_bufsize)) $drvoptions[PDO::MYSQL_ATTR_MAX_BUFFER_SIZE] = $pdo_bufsize; diff --git a/wwwroot/inc/upgrade.php b/wwwroot/inc/upgrade.php index eaf2458f9..1d57ed6f4 100644 --- a/wwwroot/inc/upgrade.php +++ b/wwwroot/inc/upgrade.php @@ -1948,6 +1948,18 @@ function getUpgradeBatch ($batchid) $query[] = "ALTER TABLE LDAPCache MODIFY COLUMN last_retry timestamp NULL DEFAULT NULL"; $query[] = "DELETE FROM LDAPCache"; + $query[] = "ALTER TABLE VLANSwitch MODIFY COLUMN last_change timestamp NULL DEFAULT NULL"; + $query[] = "UPDATE VLANSwitch set last_change = NULL WHERE last_change = '0000-00-00 00:00:00"; + + $query[] = "ALTER TABLE VLANSwitch MODIFY COLUMN last_push timestamp NULL DEFAULT NULL"; + $query[] = "UPDATE VLANSwitch set last_push = NULL WHERE last_push = '0000-00-00 00:00:00"; + + $query[] = "ALTER TABLE VLANSwitch MODIFY COLUMN last_push_finished timestamp NULL DEFAULT NULL"; + $query[] = "UPDATE VLANSwitch set last_push_finish = NULL WHERE last_push_finish = '0000-00-00 00:00:00"; + + $query[] = "ALTER TABLE VLANSwitch MODIFY COLUMN last_error_ts timestamp NULL DEFAULT NULL"; + $query[] = "UPDATE VLANSwitch set last_error_ts = NULL WHERE last_error_ts = '0000-00-00 00:00:00"; + $query[] = "INSERT INTO ObjectParentCompat (parent_objtype_id, child_objtype_id) VALUES (1787,4)"; $port_trigger_body = <<