Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Duplicate entry for key 'PRIMARY' webERP version 4.15.2
02-25-2023, 09:31 PM,
#1
Duplicate entry for key 'PRIMARY' webERP version 4.15.2
I guess everything starts from table systypes, and if column typeno is not updated correctly it'll let to duplicate entry for whatever key. 

When I installed/upgraded to version 4.15.2 most accounts couldn't be update, 

I took a look to the systypes tables and I found out that all typeno where updated back to 0 and  under SQL_CommonFunctions.inc

line 19
PHP Code:
$SQL "UPDATE systypes SET typeno = typeno + 1 WHERE typeid = '" $TransType "'"

increments any primary ID of a give account ID (typename), however I don't get it why that when I ran the upgrade all my typeno was updated to back to 0, Hence facing Duplicate entry  for key 'PRIMARY' for almost everything
Reply
03-14-2023, 01:44 AM,
#2
RE: Duplicate entry for key 'PRIMARY' webERP version 4.15.2
Unfortunately I don't have any tips, but I can say I upgraded a site to 4.15.2 without issue (the site was running pre-4.15.2 code that was pulled from git and not modified).
http://www.dalescott.net
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)