tonny Curtain Guru Od Netherlands Člen od dec 2016 tonny 5 feb 2021 16:19 Upgrading from 2.27 to 2.28 gives: How to solve? Checking PHP version... 7.4.11 [OK] Checking application database version... 2.2.7 [OK] Upgrading system to 2.2.8... Fatal error: 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 'alphabetical' at line 2 alter table curtain_Gordijnstoffen.lc_attribute_groups change column sort sort enum('alphabetical','priority') not null default alphabetical; in ~/includes/library/lib_database.inc.php (Line 260) Warning: Platform database version (2.2.7) does not match platform version (2.2.8). Did you run /install/upgrade.php? in ~/includes/library/lib_settings.inc.php (Line 19) Have a great day! Tonny
tim Founder Od Sweden Člen od máj 2013 tim 5 feb 2021 16:33 I see, seems that the default column value is sometimes returned within '' on some machines and sometimes not. I will be back with a fix.
tonny Curtain Guru Od Netherlands Člen od dec 2016 tonny 5 feb 2021 16:50 Tim the Speedy Gonzales of it....:-)
tim Founder Od Sweden Člen od máj 2013 tim 5 feb 2021 20:02 Upgrade patch has been patched and your upgrade is complete.
tonny Curtain Guru Od Netherlands Člen od dec 2016 tonny 5 feb 2021 20:09 Again the best :-) Thank you Tim!
label LiteCart Fan Od Australia Člen od dec 2018 label 21 okt 2021 05:10 Hi, Can I please get this upgrade patch? I just downloaded 2.3.1 and when starting the upgrade I get a very similar error referencing: ~/includes/library/lib_database.inc.php (Line 260) Checking application database version... 2.2.7 [OK] Upgrading database to 2.2.8... Upgrading system to 2.2.8... Fatal error: 1064 - You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '-testing.lc_attribute_groups change column `id` `id` int(11) unsign...' at line 1 alter table cd_eid-testing.lc_attribute_groups change column `id` `id` int(11) unsigned not null auto_increment; in ~/includes/library/lib_database.inc.php (Line 260)```
tim Founder Od Sweden Člen od máj 2013 tim 22 okt 2021 17:23 This is a different error. What MySQL version is this? It doesn't seem to like dash in the database name.
label LiteCart Fan Od Australia Člen od dec 2018 label 23 okt 2021 07:11 Hi Tim, MySQL details: Server: Localhost via UNIX socket Server type: MariaDB Server version: 10.4.14-MariaDB - MariaDB Server Protocol version: 10 Server charset: cp1252 West European (latin1) I tried removing the dash, which solved that error, but I got another error: Checking application database version... 2.2.7 [OK] Upgrading system to 2.2.8... Fatal error: 1067 - Invalid default value for 'author' alter table codih_htest2.lc_orders_comments change column `author` `author` enum('system','staff','customer') not null default ''; in ~/includes/library/lib_database.inc.php (Line 260)```
tim Founder Od Sweden Člen od máj 2013 tim 24 okt 2021 01:21 The database patch 2.2.8.sql was never ran. It needed this query before it could continue with 2.2.8.inc.php: ALTER TABLE `lc_orders_comments` CHANGE COLUMN `author` `author` ENUM('system', 'staff', 'customer') NOT NULL DEFAULT 'system'; Try running that manually before resuming your upgrade. But be aware there can be more things missing from 2.2.8.sql that was never applied. LiteCart doesn't remove an upgrade patch until it is successfully applied.
label LiteCart Fan Od Australia Člen od dec 2018 label 25 okt 2021 01:19 Thanks. I ran that query which solved that problem, but I then got another problem: Checking application database version... 2.2.7 [OK] Upgrading system to 2.2.8... Fatal error: 1054 - Unknown column 'url_type' in 'field list' update lc_languages set url_type = 'path'; in ~/includes/library/lib_database.inc.php (Line 260)``` Which I solved by copying the below query from 2.2.8.sql [quote]ADD COLUMN `url_type` VARCHAR(16) NOT NULL DEFAULT 'path' AFTER `charset`, ADD COLUMN `domain_name` VARCHAR(64) NOT NULL DEFAULT '' AFTER `url_type`;[/quote] And I then tried copying all of that 2.2.8.sql file into the query window which I'm not 100% sure if it worked with the lines in the file. Anyway, the upgrade process then worked. [quote]Upgrade complete! Please delete the ~/install/ folder[/quote] BTW About your previous reply: [quote]The database patch 2.2.8.sql was never ran.[/quote] Do you know why it was never run? Is the upgrade process meant to run it?
tim Founder Od Sweden Člen od máj 2013 tim 25 okt 2021 03:19 I don't know why it was never ran. Did you upgrade via softaculous and forgot to click the link to finalize the upgrade? Is it possible you forgot to upload 2.2.8.sql? Can you describe the whole process how you performed the upgrade and ended up with this issue? Did you have any use of this article? https://wiki.litecart.net/how_to_resume_a_failed_upgrade If you think your database structure could be inconsistent after the upgrade. Try comparing the structure with the structure from a clean install of the same version. As mentioned here in step 4. https://wiki.litecart.net/how_to_recover_a_broken_platform
label LiteCart Fan Od Australia Člen od dec 2018 label 26 okt 2021 22:17 Thanks for the reply. It makes sense now. After I got the error with the dash in the database, I re-uploaded the original 2.2.7 database to the server with a new name (without a dash). So the previous upgrade process must have done some changes on the dashed database and/or deleted .sql files.