matchattaxoutlet Posted October 22, 2013 Share Posted October 22, 2013 Hi Guys, I am looking to upgrade my CC5.2.2 installation (first to 5.2.3 then on to 5.2.4) by manually editing all the files listed in the file diffs uploaded by BSmither. I know this will take time but i'm wondering if there is anything i need to do to upgrade / alter my database, e.g. is there a command i need to run after i have manually made my changes? It's just that i noticed a new file in the list called /setup/db/upgrade/5.2.3.sql in the list and wondered if this changed anything and if i am doing manual changes i won't be running the setup wizard Thanks for any enlightenment Quote Link to comment Share on other sites More sharing options...
Al Brookbanks Posted October 22, 2013 Share Posted October 22, 2013 That's right. You'll need to make all the sql changes between the current version and latest in folder you identified. To prevent a warning about database version miss match you'll need to add a row to the CubeCart_history table to make it think its on the latest version. Quote Link to comment Share on other sites More sharing options...
bsmither Posted October 22, 2013 Share Posted October 22, 2013 The SQL statements in that file modify the database structiure of contents to accommodate what was fixed or added in the code. In this case, a product's Google Category is is now in the database, and a coupon's status as "apply to subtotal only" is recorded. You can enter those statements in CubeCart's Maintenance, Advanced tab, or feed them to your database via phpMyAdmin. (Take note if your database uses any prefix for the tables.) When you get to CC524, there is a file named /setup/scripts/upgrade/5.2.5.php. In here is a PHP statement that deletes the /includes/lib/OFC folder. The Diff_File also has you removing this folder. Quote Link to comment Share on other sites More sharing options...
matchattaxoutlet Posted October 23, 2013 Author Share Posted October 23, 2013 Thanks guys for yet more invaluable advice. Quote Link to comment Share on other sites More sharing options...
matchattaxoutlet Posted January 17, 2014 Author Share Posted January 17, 2014 Hi Guys, Finally got around to manually updating to 5.2.3 but when i tried the SQL statements i got the following message; #1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'ALTER TABLE `CubeCart_inventory` ADD `google_category` VARCHAR( 250 ) NULL' at line 1 Can you shed any light on this for me? I tried it from my admin panel and also in PhpMyAdmin and i get the same message. Quote Link to comment Share on other sites More sharing options...
bsmither Posted January 17, 2014 Share Posted January 17, 2014 I don't know if any newer versions of MySQL (after 5.1) can handle this, but I think the problem is that table names and table column names that do not yet exist or are used as operands in a function (such as ADD) cannot be enclosed in backticks (although I see this in plenty of other places, and the statement as is works fine on my MySQL 5.0). So, try: ALTER TABLE `CubeCart_inventory` ADD google_category VARCHAR( 250 ) NULL; Note the removed backticks that had enclosed google_category. Does your CubeCart database use a table prefix? Quote Link to comment Share on other sites More sharing options...
matchattaxoutlet Posted January 17, 2014 Author Share Posted January 17, 2014 No luck with that i'm afraid Quote Link to comment Share on other sites More sharing options...
bsmither Posted January 17, 2014 Share Posted January 17, 2014 The only other thing I can suggest is to remove the spaces inside the parentheses. VARCHAR(250) But, again, I see that everywhere. Quote Link to comment Share on other sites More sharing options...
matchattaxoutlet Posted January 17, 2014 Author Share Posted January 17, 2014 No Joy! Interestingly, if i add the columns manually once i select the save or add option the statement it relays back to me looks identical to the original statement! Confused? Yes, i am. Quote Link to comment Share on other sites More sharing options...
bsmither Posted January 17, 2014 Share Posted January 17, 2014 This part of the phrase: the right syntax to use near 'ALTER tells us that the problem is just in front of ALTER. The only way I can see this happening is if you have copied something in front of where you saw ALTER, and that something is now on the clipboard with ALTER and gets pasted in the edit box where you have been trying to execute the statement. That something could be a file's Byte Order Mark (BOM), a TAB character (I ran into that once, but generally white space is ignored), a hard-space (character 160), some other control code that is otherwise invisible, etc. You say you have already got this done, so trying other things is moot now. Did you try to just simply manually keyboard the statement into the edit box? Quote Link to comment Share on other sites More sharing options...
matchattaxoutlet Posted January 17, 2014 Author Share Posted January 17, 2014 I understand what you are saying. I actually added a column in phpmyadmin using the add option at the bottom of the column list then just entered the details in the relevant boxes. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.