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

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

More
21 Jun 2022 23:08 - 21 Jun 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 Jun 2022 23:10 by Tony44.

Please Log in or Create an account to join the conversation.

More
22 Jun 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 Log in or Create an account to join the conversation.

More
22 Jun 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 Log in or Create an account to join the conversation.

More
23 Jun 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 Log in or Create an account to join the conversation.

More
24 Jun 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 Log in or Create an account to join the conversation.

Moderators: babynusprotion
Time to create page: 0.035 seconds

Cookies settings

×

Functional Cookies

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

Please login to see yours activities!

Other cookies

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