Actually upgrades won't work at all from 1.4.x or 1.5.x. Mainly because of the order of the progressive files.
For example, 1001.php calls
Code: Select all
// order
$query = $this->db->query("SELECT * FROM `" . DB_PREFIX . "order`");
foreach ($query->rows as $result) {
if (preg_match('/^(a:)/', $result['custom_field'])) {
But custom_field in the order table didn't exist in 1.4 or 1.5
The code to add custom_field to the order, customer, etc tables doesn't happen until 1003.
So first and foremost, 1003 and 1001 need to be swapped, otherwise you get an error.
Also the issue with the group column being left behind in previous versions will cause problems in 1005, as the call to rename group to code will fail since upgrades to 2.0.x and 2.1.x failed to remove group by default. So most stores have both code and group columns still, which also causes other issues since many records have a race condition that potentially loads the wrong record from settings. That code actually needs to have a subquery to check if the 'code' columns already exists. If it doesn't exist, rename group to code, if it does exist, just drop the group column. So anyone who upgraded from 1.5.x to 2.x (and didn't use my upgrade service), will have errors upgrading to 2.2. I also moved that step up to 1001 after swapping it with 1003.
I see you removed the dynamic system that 2.1 had. I actually ran the 2.2 upgrade with only the new static code, then ran it again using the dynamic system that actually parses through the opencart.sql file and updates all the fields accordingly. There were a few things the dynamic system found that the static files missed.
1. customer has a "code" column. Not sure if it is used, but it exists in the opencart.sql file
2. order_recurring has a "reference" column. Again not sure if it is used. The upgrade scripts in 2.2 don't add it, but the dynamic system found it in the opencart.sql and added it.
3. Also the dynamic system updates things like new default values and I added in support for unsigned int changes. It also fixes broken or incorrect indexes on tables. So in the end, it did a much more thorough job. I would recommend adding that back. You can still use the progressive format for other changes after that script runs. I added it to the 1000.php file back where it was initially at the bottom. It actually takes care of a lot of the other static stuff in other progressive files so a lot of that could be cleaned up.
Finally, unrelated to upgrades... there is a parenthesis mistake on admin->customer->customer list in the controller. Simple enough to fix.
That's all I've found so far.