Hi forum team,
I encountered an error during upgrade to V8.5.4 on SQL Database
2020-08-26 17:01:14.677 ** ERROR ** [V8.4.6] Exception-[23000] SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '23' for key 'PRIMARY'
2020-08-26 17:01:14.677 ** ERROR ** [V8.4.6] For query : INSERT INTO `planningmode` (`id`, `applyTo`, `name`, `code`, `sortOrder`, `idle`, `mandatoryStartDate`, `mandatoryEndDate`) VALUES
(23, 'Activity', 'PlanningModeManual', 'MAN', 900, 0 , 0, 0);
2020-08-26 17:01:14.677 ** ERROR ** [V8.4.6] Strack trace :
2020-08-26 17:01:14.677 ** ERROR ** [V8.4.6] #0 Sql->query called at [/var/www/html/projeqtor/db/maintenanceFunctions.php:71]
2020-08-26 17:01:14.677 ** ERROR ** [V8.4.6] #1 runScript called at [/var/www/html/projeqtor/db/maintenance.php:111]
2020-08-26 17:01:14.677 ** ERROR ** [V8.4.6] #2 include called at [/var/www/html/projeqtor/tool/loginCheck.php:143]
Here, you can show our planningmode table
I check table planningelementbaseline and planningelement to show idPlanningMode values used
planningelement : 1, 2, 4, 5, 7, 8, 9, 16, 17, 19, 20, 22, 23
planningelementbaseline : 1, 2, 4, 5, 7, 8, 9, 16, 17, 19, 20, 22
I just upgrade and have not create any element
Could you recommend me an action to create the record corresponding to the new manual scheduling feature?
Many Thanks
Hi,
You have some unexpected duplicates in the table.
Id 23 to 38 are modes already existing with lower ids.
Delete these lines, and re-execute script
INSERT INTO `planningmode` (`id`, `applyTo`, `name`, `code`, `sortOrder`, `idle`, `mandatoryStartDate`, `mandatoryEndDate`) VALUES (23, 'Activity', 'PlanningModeManual', 'MAN', 900, 0 , 0, 0);
Then fix not expected on
UPDATE `planningelement` set idPlanningMode=9 where planning mode=9;
(you should not have idPlanningMode over 22 in planning element)
