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.

SQL error when addi...
 
Notifications
Clear all

SQL error when adding a new object

4 Posts
2 Users
0 Reactions
2,347 Views
(@esther)
Posts: 8
Active Member
Topic starter
 
[#5634]

Hi,

When I try to add a new object in Projeqtor (project, activity, ticket, meeting, etc.) I get one of the following errors:

- this one about unique constraint violation : SQLSTATE[23505]: Unique violation: 7 ERREUR: la valeur d'une clé dupliquée rompt la contrainte unique « activity_pkey » DETAIL: La clé « (id)=( 8 ) » existe déjà.
- this one about a cancelled transaction : SQLSTATE[25P02]: In failed sql transaction: 7 ERREUR: la transaction est annulée, les commandes sont ignorées jusqu'à la fin du bloc de la transaction

Attached is the log file.
Do you know what could cause this error? I never saw this before. I recently created user accounts so that people can connect to Projeqtor. Could it be that ?

Many thanks.


 
Posted : 19 Dec 2018 18H20
(@babynus)
Posts: 14952
Member Admin
 

I guess you are using PostgreSql
Try and realign sequences with real data.

You can try and execute updatePgSeq($table)
for instance
updatePgSeq('table')


 
Posted : 19 Dec 2018 23H15
(@esther)
Posts: 8
Active Member
Topic starter
 

Hi,

Thanks for your reply, it does the job.
However, I get this error quite often on various tables.
Do you think it may be related to how Projeqtor handles sequences?
Are there other users reporting the same issue?
Do you plan to address this issue in further versions?

Thanks


 
Posted : 24 Dec 2018 15H38
(@babynus)
Posts: 14952
Member Admin
 

Do you think it may be related to how Projeqtor handles sequences?

No, it is related to how PostgreSql handles sequences.

For instance, after import of tables, you must be sure to correctly update sequence, like proposed.


 
Posted : 24 Dec 2018 15H41
Share:

Scroll to Top