Database migration error 1.7 to 1.8
Submitted by bundooravet on Mon, 18/04/2016 - 23:58
Hello All, On a test system when attempting to upgrade from 1.7 to 1.8 running the script : migrate-1.7-to-1.8.sql I get this error: ERROR 1062 <23000> at line 3120: Duplicate entry '2941-lowQuantity' for key 'PRIMARY' The db update script continues on regardless but perhaps as a result of this error the "entity_link_details" table is empty. Any thought/advice would be appreciated.
Re: Database migration error 1.7 to 1.8
I'm not yet sure why this is happening, but it means that your product templates haven't migrated correctly.
I'll run some tests tomorrow to see if I can reproduce the problem.
Re: Database migration error 1.7 to 1.8
Is this just the fact they have a duplicate entityrelationship in that table and its breaching the PK restraints when you try to import it into the entitylinks....
Re: Database migration error 1.7 to 1.8
Yes. A product has been included more than once by a product template, and the script is unable to handle this. The workaround is to:
To detect the duplicates, run:
The returned columns are:
Re: Database migration error 1.7 to 1.8
The migration script attached to OVPMS-1753 corrects the above problem.
You will need to start with a 1.7 database for it to work correctly, as the original version of the script deletes the old template relationships.
Re: Database migration error 1.7 to 1.8
Thank you Tim and Ben for the rapid response.