Update procedure needs to be optimized
completed by: The Little Pirate
mentors: Carsten Schmitz, Machaven
On a manual update from an earlier version there are often DB changes that the upgrade procedure has to do on the database. (Example update from 1.87 to 1.90). The problem is that these DB upgrades are executed as soon as the admin enters the admin page (even if not logged in). So if the admin wasn't ready or entered the wrong DB details that sucks.
So if you are having many Limesurvey installations on the same server and you want to add another fresh installation you really have to take care to use the correct settings in config.php. Otherwise you might update an existing installation instead of setting up a new one because when calling /admin/install the update script is called automatically without asking you if you really want to proceed. You might end in having an old installation using old files but being updated to the latest DB scheme which causes lots of problems at this old installation.
- If a new upgrade to run is detected prevent the script from being run automatically without asking for the users agreement. List some of the following details first to identify which installation is updated:
- On bottom of that page should be a "Update this installation" button to start the update.
- There is an automatic update procedure called the Comfortupgrade which also uses the automatic upgrade procedure. Make sure that the ComfortUpdate still runs the same way and does not get the mentioned screen.
- Create a database with 1.87 and create a backup of the DB
- Test the upgrade using the LimeSurvey 1.91 dev version (you can get that by subversion), between test use the 1.87 db dump to restore the database
- Implement the change above - after implementation test if the ComfortUpgrade still runs fine. (you will need tha 1.87 version for that again)
- If you have questions, get in touch with us.
- Create a patch we can review.