Last active
July 4, 2020 07:43
-
-
Save proudcommerce/192e4e39223beb7b0b2bf090abd0c605 to your computer and use it in GitHub Desktop.
Set oxvendor = oxmanufacturers and oxmanufacutrers = oxvendor
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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