View ProjeQtOr On SourceForge.net
ProjeQtOr - Project Management Tool
Supportez nous sur Capterra
OIN - Open Invention Network
ProjeQtOr free project management software - [SOLVED] Error duplicate entry during migration to V10.0.0 - ProjeQtOr

Prochaines Sessions

Les prochaines formations et démonstrations sont ouvertes, inscrivez-vous rapidement !

 

Démonstration de ProjeQtOr

(gratuit, sur inscription)
 

13 mai 2025 (10h30-12h)

5 juin 2025 (16h-17h30)

 
 

Planifiez avec ProjeQtOr

14 et 15 mai 2025 (9h-12h30)

18 et 19 juin 2025 (9h-12h30)

 
 

Administrez avec ProjeQtOr

20 et 21 mai (9h-12h30)

25 et 26 juin (9h-12h30)

 

 

 

[SOLVED] Error duplicate entry during migration to V10.0.0

More
21 Jui 2022 23:08 - 21 Jui 2022 23:10 #1 by Tony44
Hello,

I saw the errors below while migrating to V10.0.0 on a test environment.
Did I make a wrong manipulation ?
How to fix the issue ?

2022-06-21 22:16:05.027 ***** ERROR ***** [V9.5.5] Exception-[23000] SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '215' for key 'PRIMARY'
2022-06-21 22:16:05.031 ***** ERROR ***** [V9.5.5]    For query : INSERT INTO `modulemenu` (`id`,`idModule`,`idMenu`,`hidden`,`active`) VALUES
(215,32,275,0,0),
(216,32,276,0,0),
(217,32,277,0,0),
(221,32,281,0,0),
(224,31,208,0,(SELECT ms.active FROM  `module` as ms WHERE ms.id=31));
2022-06-21 22:16:05.031 ***** ERROR ***** [V9.5.5]    Strack trace :
2022-06-21 22:16:05.032 ***** ERROR ***** [V9.5.5]    #0 Sql->query called at [C:\Program Files (x86)\EasyPHP-Devserver-17\eds-www\projeqtor\db\maintenanceFunctions.php:72]
2022-06-21 22:16:05.033 ***** ERROR ***** [V9.5.5]    #1 runScript called at [C:\Program Files (x86)\EasyPHP-Devserver-17\eds-www\projeqtor\db\maintenance.php:140]
2022-06-21 22:16:05.034 ***** ERROR ***** [V9.5.5]    #2 include called at [C:\Program Files (x86)\EasyPHP-Devserver-17\eds-www\projeqtor\tool\loginCheck.php:144]
2022-06-21 22:16:05.399 ***** ERROR ***** [V9.5.5] Exception-[23000] SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '218' for key 'PRIMARY'
2022-06-21 22:16:05.400 ***** ERROR ***** [V9.5.5]    For query : INSERT INTO `modulemenu` (`id`,`idModule`,`idMenu`,`hidden`,`active`) VALUES
(218,33,278,0,0),
(219,33,279,0,0),
(220,33,280,0,0),
(222,33,282,0,0),
(223,33,283,0,0);
2022-06-21 22:16:05.401 ***** ERROR ***** [V9.5.5]    Strack trace :
2022-06-21 22:16:05.401 ***** ERROR ***** [V9.5.5]    #0 Sql->query called at [C:\Program Files (x86)\EasyPHP-Devserver-17\eds-www\projeqtor\db\maintenanceFunctions.php:72]
2022-06-21 22:16:05.402 ***** ERROR ***** [V9.5.5]    #1 runScript called at [C:\Program Files (x86)\EasyPHP-Devserver-17\eds-www\projeqtor\db\maintenance.php:140]
2022-06-21 22:16:05.402 ***** ERROR ***** [V9.5.5]    #2 include called at [C:\Program Files (x86)\EasyPHP-Devserver-17\eds-www\projeqtor\tool\loginCheck.php:144]

Thanks for your help

Tony44
Last edit: 21 Jui 2022 23:10 by Tony44.

Please Connexion or Create an account to join the conversation.

More
22 Jui 2022 09:01 #2 by babynus
Hi,
Either you ran migration twice (but it does not seem to be the case as you should have at least another error before thos one)
or you have some unconsistency in table moduleMenu
Please run query :
select max(id) from modulemenu;
result before migration should be 214
It you have higher value search for duplicates:
select count(id),idModule, idMenu from modulemenu group by idModule, idMenu having count(id)>1;
This query should return no line.
Remove duplicates et change id until max is 214

Babynus
Administrator of ProjeQtOr web site

Please Connexion or Create an account to join the conversation.

More
22 Jui 2022 23:12 #3 by Tony44
Hi Babynus,

There were indeed duplicates (18), which I deleted.

The table now contains 200 records.
The largest id in this table is now 207: I'm not sure I understood, should this id be replaced by 214 ?

Should the migration to V10.0.0 be restarted and if so, how ?

Thanks again

Tony44

Please Connexion or Create an account to join the conversation.

More
23 Jui 2022 12:01 #4 by babynus
Hi,
200 records is not enough for V9.5
You should have 207 records (see attached csv)

To finish, if you restored the DB to V9.5, you can replay it after fixing issue on modulemenu table
If you did not restore, check up to where the migration went.
I guess to went correctly up to the end, so if no other error is reported on log file, just check that dbVersion (line of table parameter where parameterCode is 'dbVersion') is correctly set to V10.0.0 and you can envoy the new version.
 

Babynus
Administrator of ProjeQtOr web site
Attachments:

Please Connexion or Create an account to join the conversation.

More
24 Jui 2022 00:19 #5 by Tony44
Hi,

So I added the missing records according to the csv.
Effectively, 'dbVersion' was indeed set to V10.0.0.
I think everything is in order.

Thanks for the help !

Tony44

Please Connexion or Create an account to join the conversation.

Moderators: babynusprotion
Time to create page: 0.038 seconds

Paramétrages de cookies

×

Cookies fonctionnels

Ce site utilise des cookies pour assurer son bon fonctionnement et ne peuvent pas être désactivés de nos systèmes. Nous ne les utilisons pas à des fins publicitaires. Si ces cookies sont bloqués, certaines parties du site ne pourront pas fonctionner.

Session

Veuillez vous connecter pour voir vos activités!

Autres cookies

Ce site web utilise un certain nombre de cookies pour gérer, par exemple, les sessions utilisateurs.