Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Set oxvendor = oxmanufacturers and oxmanufacutrers = oxvendor
# 1. Export oxvendors table + data (eg. oxvendor.sql)
# 2. Export oxmanufacturers table + data (eg. oxmanufacturers.sql)
# 3. Clean up manufacturers
DELETE FROM oxmanufacturers;
# 4. Clean up vendors
DELETE FROM oxvendor;
# 5. Replace "oxvendor" with "oxmanufacturers" in oxvendor.sql
# 6. Import oxvendor.sql
# 7. Replace "oxmanufacturers" with "oxvendor" in oxmanufacturers.sql
# 8. Import oxmanufacturers.sql
# 9. Switch oxvendor/oxmanufacturer ids (field oxshortdesc_3 used, change it!)
UPDATE oxarticles SET oxshortdesc_3 = oxmanufacturerid;
UPDATE oxarticles SET oxmanufacturerid = oxvendorid;
UPDATE oxarticles SET oxvendorid = oxshortdesc_3;
UPDATE oxarticles SET oxshortdesc_3 = '';
# 10. Done!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.