开源的从16.1升级到18.7 (16.1的版本也是一路升级过来的)已解决 悬赏5积分
报错如下 mysql 版本是5.5.45
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>
禅道版本:禅道开源版 18.7
安装包类型:源码包
操作系统:CentOS
客户端浏览器:Chrome
🍋 这个错误是因为禅道代码中使用了MySQL5.5版本不支持的语法特性。
您可以下载最新的禅道18.9版本,该版本优化了MySQL的兼容性,支持MySQL5.5的安装升级。 基于安全、性能和兼容性考虑,建议您升级一下服务器的数据库版本,MySQL5.5官方已于2021年停止维护和安全更新。
回复
|