All the damn upgrade threads have pushed me to my limits. I've finally merged the upgrade system into the installer. I've also set it so that it will automatically decide if it should install or upgrade based on the existence of the config.php file contents.
So the next version of OpenCart (assuming v1.5.2, but whatever) will have this new upgrade script.
At this time it is simplified just to have a single upgrade button that runs the upgrade.sql
I want to make it so that it can programmatically determine the existing version and know which upgrade scripts to run. Unfortunately we need to have a static version number to do this. The current VERSION constant is stored in the index.php file, but when you upload the new files, it overwrites the index.php file and the last version is lost.
So my idea is to add the config version to the config.php files during install.
Then compare the index version to the config version and run the upgrade steps from the current version to the new version.
I'm thinking to keep it simple, it can just be added as a comment to the config.php file
Code: Select all
// config_version = 1.5.0
So the first upgrade would have to manually choose which version you have.. but after that this new comment will exist.
More demos to follow.