Forum

Welcome to ProjeQtOr new Forum. We migrated old forum to the new website.
You will find all your posts here, with your usual account.
Just one point : you’ll have to reinitialize your password. Use “Lost password” feature.

Server migration ca...
 
Notifications
Clear all

Server migration causes database errors

3 Posts
2 Users
0 Reactions
1,672 Views
(@scud167)
Posts: 14
Active Member
Topic starter
 
[#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


 
Posted : 04 Dec 2021 16H32
(@scud167)
Posts: 14
Active Member
Topic starter
 

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.


 
Posted : 04 Dec 2021 16H39
babynus
(@babynus)
Posts: 14966
Main Contributor 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.
 


 
Posted : 06 Dec 2021 17H53
Share:

Scroll to Top