Forum

SQL error when addi...
 
Notifications
Retirer tout

SQL error when adding a new object

4 Posts
2 Utilisateurs
0 Reactions
2,346 Vu
(@esther)
Posts: 8
Active Member
Début du sujet
 
[#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.


 
Posté : 19 Déc PM 18:1212
(@babynus)
Posts: 14952
Membre 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')


 
Posté : 19 Déc PM 23:1212
(@esther)
Posts: 8
Active Member
Début du sujet
 

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


 
Posté : 24 Déc PM 15:1212
(@babynus)
Posts: 14952
Membre 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.


 
Posté : 24 Déc PM 15:1212
Share:
Retour en haut