View Single Post
  #65  
Old 07-31-2004, 03:19 PM
  lildawg's Avatar 
lildawg lildawg is offline
 

X-Adept
  
Join Date: Jan 2003
Location: Utah
Posts: 686
 

Default

The database migration tool was already released. However I had errors and had to reinstall my 3.5.0 and upgrade the database all the way to 3.5.10 then do a sql dump then download the sql dump and manually insert pieces as it kept erroring. There was one major flaw I had. I have a few thousand products and they all have options. The sql dump file has an error in it and every time it add a option it then deletes it so in the end I only had one. An actual example of this is here

Quote:
DELETE FROM xcart_class_options;
REPLACE INTO xcart_class_options (optionid,classid,option_name,price_modifier,modif ier_type) VALUES ('0','1','Small','','');
REPLACE INTO xcart_class_options (optionid,classid,option_name,price_modifier,modif ier_type) VALUES ('0','1','Medium','','');
REPLACE INTO xcart_class_options (optionid,classid,option_name,price_modifier,modif ier_type) VALUES ('0','1','Large','','');
REPLACE INTO xcart_classes (classid,productid, class, classtext,is_modifier) VALUES ('2','5','Color','Choose Color','Y');
DELETE FROM xcart_class_options;
REPLACE INTO xcart_class_options (optionid,classid,option_name,price_modifier,modif ier_type) VALUES ('0','2','Black','','');
REPLACE INTO xcart_class_options (optionid,classid,option_name,price_modifier,modif ier_type) VALUES ('0','2','Bright Pink','','');
REPLACE INTO xcart_class_options (optionid,classid,option_name,price_modifier,modif ier_type) VALUES ('0','2','Lilac','','');
REPLACE INTO xcart_class_options (optionid,classid,option_name,price_modifier,modif ier_type) VALUES ('0','2','Mango','','');
REPLACE INTO xcart_class_options (optionid,classid,option_name,price_modifier,modif ier_type) VALUES ('0','2','Red','','');
REPLACE INTO xcart_classes (classid,productid, class, classtext,is_modifier) VALUES ('3','10','Size','Choose Size','Y');
DELETE FROM xcart_class_options;
REPLACE INTO xcart_class_options (optionid,classid,option_name,price_modifier,modif ier_type) VALUES ('0','3','Small','','');
REPLACE INTO xcart_class_options (optionid,classid,option_name,price_modifier,modif ier_type) VALUES ('0','3','Medium','','');
REPLACE INTO xcart_class_options (optionid,classid,option_name,price_modifier,modif ier_type) VALUES ('0','3','large','','');
REPLACE INTO xcart_class_options (optionid,classid,option_name,price_modifier,modif ier_type) VALUES ('0','3','X-Large','5','');
REPLACE INTO xcart_classes (classid,productid, class, classtext,is_modifier) VALUES ('4','10','Color','Tea Roses Only','Y');
DELETE FROM xcart_class_options;
REPLACE INTO xcart_class_options (optionid,classid,option_name,price_modifier,modif ier_type) VALUES ('0','4','Tea Roses','','');
REPLACE INTO xcart_classes (classid,productid, class, classtext,is_modifier) VALUES ('5','11','Size','Choose Size','Y');
DELETE FROM xcart_class_options;

I opened the sql dump file in word pad and deleted away all the rest of the commands except the options and then did a replace and typed in replace DELETE FROM xcart_class_options; with a blank. It removed all those delete lines that where messing up my options and then I resaved the file as a different name and then used MySQL admin and queried the file. It then added my options. So in all I was successfully able to upgrade my site after 2 days of working on it and about five re-installs. It wasnt easy and shouldnt be tried by any one not comfortable with manual database work. Hopefully this info will get out there so others know what problems I encountered. I also informed x-cart of this so they can get it fixed.
Reply With Quote