16:57:17 ERROR: SQLSTATE[42000]: Syntax error or access violation: 1061 Duplicate key name 'team'<p>The sql is: ALTER TABLE `zt_team` ADD UNIQUE `team` (`root`, `type`, `account`)</p> in lib\base\dao\dao.class.php on line 1394, last called by lib\base\dao\dao.class.php on line 768 through function sqlError.
in framework\base\router.class.php on line 2224 when visiting /zentao/upgrade.php?m=upgrade&f=execute
这块原因是的唯一索引重复了。
操作步骤:
(1)先还原下禅道的数据库
(2)通过sql查询下是否有重复的键值,执行一下sql;
select `root`,`type`,`account`, count(1) as count
from zt_team
group by `root`,`type`,`account`
having count>1;
如果结果为空,表示没有重复记录,直接网页访问upgrade.php进行升级;
如果有结果输入,删除重复的记录,保留最后一条,然后网页访问upgrade.php进行升级。
in framework\base\router.class.php on line 2224 when visiting /zentao/upgrade.php?m=upgrade&f=execute
从9.1.8升级到12.0.1 网页上点按钮执行sql后,出现这个错误
在C:\ XAMPP \ zentao \框架\基\ router.class.php上线2215来访时/zentao/upgrade.php?m=upgrade&f=execute
如果升级失败,备份怎么还原?
注意:文件内容为空。如果之前文件存在,删除之后重新创建。
按照上述做了还是没用,还是这个提示