升级报错
12.0->18.9,总是报sql语法错误
SQLSTATE[42000]: Syntax error or access violation: 1067 Invalid default value for 'updatedDate'<p>The sql is:
CREATE TABLE IF NOT EXISTS `zt_solution` (
`id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
`name` char(50),
`appID` mediumint(8) unsigned NOT NULL,
`appName` char(50) NOT NULL,
`appVersion` char(20) NOT NULL,
`version` char(50) NOT NULL,
`chart` char(50) NOT NULL,
`cover` varchar(255),
`desc` text,
`introduction` varchar(500),
`source` char(20) NOT NULL,
`channel` char(20),
`components` text,
`status` char(20) NOT NULL,
`deleted` tinyint(1) NOT NULL DEFAULT 0,
`createdBy` char(30) NOT NULL,
`createdAt` datetime NOT NULL,
`updatedDate` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8</p>
SQLSTATE[42000]: Syntax error or access violation: 1067 Invalid default value for 'createdDate'<p>The sql is:
CREATE TABLE `zt_artifactrepo` (
`id` smallint(8) UNSIGNED NOT NULL AUTO_INCREMENT,
`name` varchar(45) CHARACTER SET utf8 NOT NULL,
`products` varchar(1000) CHARACTER SET utf8 NOT NULL,
`serverID` smallint(8) NOT NULL,
`repoName` varchar(45) CHARACTER SET utf8 NOT NULL,
`format` varchar(10) CHARACTER SET utf8 NOT NULL,
`type` char(7) CHARACTER SET utf8 NOT NULL,
`status` varchar(10) CHARACTER SET utf8 NOT NULL,
`createdBy` varchar(30) CHARACTER SET utf8 NOT NULL,
`createdDate` datetime DEFAULT CURRENT_TIMESTAMP,
`editedBy` varchar(30) CHARACTER SET utf8 NOT NULL,
`editedDate` datetime DEFAULT CURRENT_TIMESTAMP,
`deleted` tinyint(4) UNSIGNED NOT NULL DEFAULT '0',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4</p>
目前是 12->15 报错
Fatal error: Uncaught exception 'PDOException' with message 'SQLSTATE[42S02]: Base table or view not found: 1146 Table 'pmdb_new0113_bak.zt_workflowfield' doesn't exist' in /mnt/storage_vdb/web/zentaopms_bak_for_update/lib/filter/filter.class.php:44 Stack trace: #0 /mnt/storage_vdb/web/zentaopms_bak_for_update/lib/filter/filter.class.php(44): PDO->query('SELECT * FROM `...') #1 /mnt/storage_vdb/web/zentaopms_bak_for_update/module/upgrade/control.php(163): fixer->get('mode') #2 [internal function]: upgrade->to15Guide('12_0') #3 /mnt/storage_vdb/web/zentaopms_bak_for_update/framework/base/router.class.php(1782): call_user_func_array(Array, Array) #4 /mnt/storage_vdb/web/zentaopms_bak_for_update/www/upgrade.php(64): baseRouter->loadModule() #5 {main} thrown in
/mnt/storage_vdb/web/zentaopms_bak_for_update/lib/filter/filter.class.php on line
44
09:15:54 Uncaught exception 'PDOException' with message 'SQLSTATE[42S02]: Base table or view not found: 1146 Table 'pmdb_new0113_bak.zt_workflowfield' doesn't exist' in lib/filter/filter.class.php:44
Stack trace:
#0 lib/filter/filter.class.php(44): PDO->query('SELECT * FROM `...')
#1 module/upgrade/control.php(163): fixer->get('mode')
#2 [internal function]: upgrade->to15Guide('12_0')
#3 framework/base/router.class.php(1782): call_user_func_array(Array, Array)
#4 www/upgrade.php(64): baseRouter->loadModule()
#5 {main}
thrown in lib/filter/filter.class.php on line 44 when visiting /upgrade.php?m=upgrade&f=to15Guide&fromVersion=12_0