6.0.0-git
2017-09-22

[#8100] Enhancement ideas to make upgrade scripts less confusing (in the long term)
Summary Enhancement ideas to make upgrade scripts less confusing (in the long term)
Queue Horde Base
Queue Version 3.3.3
Type Enhancement
State Resolved
Priority 2. Medium
Owners
Requester kyrian (at) ore (dot) org
Created 2009-03-18 (3110 days ago)
Due
Updated 2009-03-23 (3105 days ago)
Assigned
Resolved 2009-03-23 (3105 days ago)
Milestone
Patch No

History
2009-03-23 11:04:17 Jan Schneider Comment #2
State ⇒ Resolved
Reply to this comment
Use Horde Groupware.
2009-03-18 17:52:07 kyrian (at) ore (dot) org Comment #1
Type ⇒ Enhancement
State ⇒ New
Priority ⇒ 2. Medium
Summary ⇒ Enhancement ideas to make upgrade scripts less confusing (in the long term)
Queue ⇒ Horde Base
Milestone ⇒
Patch ⇒ No
Reply to this comment
With reference to among others: http://bugs.horde.org/ticket/1063



I've been running Horde stuff for a very long time in a number of 
different places etc, and I'm consistently vexed by the upgrade scripts.



They're great, and they do what they say on the tin, but the first 
place people are pointed to when they run into problems is 'have you 
run all the update scripts'?



Well, having run Horde tools for ages, that becomes ever more 
difficult to answer, because there is no built-in way to determine if 
each upgrade script has actually been run before.



This has caused all sorts of duplication in my main Horde 
installation, and frustration when trying to fix eg. the 
aforementioned bug.



In the case of SQL upgrade scripts, I guess a wrapper is needed, but 
still, I would propose one of the following methods be implemented for 
all upgrade scripts in future to help with this issue:



- Ideally, the scripts auto-detect if they have already been run, and abort.



- The scripts delete themselves after they have been run.



- The scripts touch a file that says "X script has been run" and you 
could use the timestamp or existence of that file to work out what's 
happened.



Further, running these scripts in the wrong order (which will tend to 
happen if you don't know which of them you ran last when you upgraded 
the preceeding time!) can really cause problems with an installation, 
so having some method (perhaps a similar one) of making sure they are 
done in order is also important.



Perhaps there is some way to leverage the PHP Shell/SQL Shell 
Administration systems, and some kind of upgrade hunter which scans 
scripts/upgrades/ for each app, and stores in a database once they 
have been run (thus avoiding the re-run and forgetting how far you got 
problem) would be most in keeping with 'the horde way'? If someone can 
give me a pointer on where to start I could give that a go myself...


Saved Queries