Forum

Server migration ca...
 
Notifications
Retirer tout

Server migration causes database errors

3 Posts
2 Utilisateurs
0 Reactions
1,641 Vu
(@scud167)
Posts: 14
Eminent Member
Début du sujet
 
[#7944]

Hello,

I am trying to switch Projeqtor from CentOS to an ubuntu server, but the base import is causing me problems.

2021-12-04 14:23:48.294 ** ERROR ** [V9.1.2] Exception-[HY000] SQLSTATE[HY000]: General error: 1364 Field 'id' doesn't have a default value
2021-12-04 14:23:48.294 ** ERROR ** [V9.1.2]    For query : insert into ticket ( reference , name , idTicketType , idProject , creationDateTime , lastUpdateDateTime , idUser , idStatus , isRegression , handled , done , solved , idle , cancelled , delayReadOnly ) values ('--99', 'ffdsf', '194', '10', '2021-12-04 14:23:43', '2021-12-04 14:23:48', '3', '43', '0', '0', '0', '0', '0', '0', '0')
2021-12-04 14:23:48.294 ** ERROR ** [V9.1.2]    Strack trace :
2021-12-04 14:23:48.294 ** ERROR ** [V9.1.2]    #0 Sql->query called at [/var/www/wordpress/projeqtor/model/persistence/SqlElement.php:1364]
2021-12-04 14:23:48.294 ** ERROR ** [V9.1.2]    #1 SqlElement->insertSqlElement called at [/var/www/wordpress/projeqtor/model/persistence/SqlElement.php:1136]
2021-12-04 14:23:48.294 ** ERROR ** [V9.1.2]    #2 SqlElement->saveSqlElement called at [/var/www/wordpress/projeqtor/model/persistence/SqlElement.php:794]
2021-12-04 14:23:48.294 ** ERROR ** [V9.1.2]    #3 SqlElement->save called at [/var/www/wordpress/projeqtor/model/TicketMain.php:472]
2021-12-04 14:23:48.294 ** ERROR ** [V9.1.2]    #4 TicketMain->save called at [/var/www/wordpress/projeqtor/tool/saveObject.php:110]
Fermer

I have a problem with the primary keys, which causes me this error every time I want to create a ticket (for example, I have this error also when I change the global parameters too).

Has anyone ever had this error?

Thanks, have a good day,

Gael


 
Posté : 04/12/2021 4:32 pm
(@scud167)
Posts: 14
Eminent Member
Début du sujet
 

I found why.

During the database migration, some primary keys were skipped, and with them the auto incrementation of these keys.
To restore the tool, I think I will have to go over all the errors and check that the keys are correctly placed in the database.


 
Posté : 04/12/2021 4:39 pm
(@babynus)
Posts: 14952
Membre Admin
 

Hi,
Maybe you may try and change the way you dump tables.
For instance dump done with phpMyAdmin or dump from our Backup Databse plugin export the id, so items will be imported with same id.
This is mandatory to preserve id, otherwise you'll loose link with foreign tables.
 


 
Posté : 06/12/2021 5:53 pm
Share:
Retour en haut