From: Matthew G. <mat...@gm...> - 2008-03-30 21:49:36
|
More thoughts about the DB update. If the version that the DB reports is the same as the version in the code, i.e. the schema versions match, then the DB update should do absolutely nothing. This makes giving the super-user the ability to do the update less "scary" and should work for Bishop's use case no? Bishop, you could update the phpESP code, immediately login as the super user and do the DB update. Then your user, super-users, could click update all day long and nothing would happen other than a page that says DB is already up to date. This brings up another issue we should handle, if the schema is mismatched, we should report on the admin side that the DB needs updating and then on deployed survey side, that submissions cannot be done at this time. On Sat, 2008-03-29 at 23:25 +0100, Franky Van Liedekerke wrote: > > > > Now I also plan an easier update: > > > 1) read config files > > > 2) check version of phpesp in db with the one in phpESP.ini.fixed > > > if version table in db doesn't exist > > > ==> suggest version=2.0.2, is changeable > > See comment I made about the suggested version in my reply to the SVN > > diff email. > > See my reply in private. > > > > if version table in db exists ==> take that one > > > 3) show a link to take db backup if wanted > > > 4) show a link to execute the update scenario: 2.0.2==>2.0.3, > > > 2.0.3==>2.0.4, ... for this, the update db scripts need to be parsed > > > and the DB prefix added if needed > > > 5) if update ok and tables contain no prefix: show link to script > > > for prefix update, and warns it needs to be changed in the config > > > file when executed > > > > > > Any comments? > > I like the idea of allowing DB updates inside the application, we just > > need to be darn sure not to destroy anything ;-) > > Indeed, but as always: one should always take a backup before doing an > upgrade, even on command line. > > Franky -- Matthew Gregg <mat...@gm...> |