-
Notifications
You must be signed in to change notification settings - Fork 1
Features
Features!
Introducing "admin/websiteStatus" Admin page whose job is to update the various website features. Most such features are just a model db schema update which will perform ALTER table commands to restructure the db to upgrade older db schemas to the latest one the code expects. In practice, it also performs some data-scrubbing to clean up database mistakes as well. Schema mistakes can happen and cleaning them up tended to be a laborious affair generating various SQL scripts to run on the server's admin webpage. Managing such scripts so that could be performed on several websites became a burden, so the Features mechanism was born.
Instead of an "all-in-one" mechanism, each feature stands by itself so that if problems occur during an upgrade, the precise source can be quickly identified rather than guessing which of however-many update scripts failed and generated the error. The website framework and overall website versions are themselves their own features and are handled separately. This way, framework specific update code can be written and not interfere with descendant website code.
After a website has its PHP code updated and your database backed up, log in as your admin and visit the Admin > Website Status page. Upgrade buttons will be displayed for the website and once that is updated, the various models will either show an Upgrade button or the "already up-to-date" message. Click the various Upgrade buttons until everything shows as up-to-date. Now the website can be used as normal. If anything goes wrong with the upgrade, restore your data backup and fix the PHP code causing the issue.