List Info

Thread: Upgrading DB apps




Upgrading DB apps
user name
2006-02-14 12:41:10
I have a app that relies on you having installed it and then
run 
setup to create a table in a database. In fact the app has
several 
plugins and each plugin has at least one database table. 


What I'd like to do is make it so that if you upgrade to a
newer version 
of a plugin then it migrates your data from an earlier
version of the 
schema to the latest version.  

Since plugins may be distributed seperately from the main
app I'd like 
to make the upgrade mechanism available to all plugins -
external or 
'core'.

Is there a sane known way to do this?

Would the requirement that you can't upgrade more than one
step at a 
time (like for example requiring that you apply patches in
order) be too 
onerous a restriction (i.e you can't jump straight from 1.0
to 3.0 you 
must go 1.0 -> 2.0 -> 3.0)

Simon




Upgrading DB apps
user name
2006-02-14 13:25:20
On Tue, 14 Feb 2006, Simon Wistow wrote:

> What I'd like to do is make it so that if you upgrade
to a newer version
> of a plugin then it migrates your data from an earlier
version of the
> schema to the latest version.

Do the plugins share tables at all ?

If so they need to be aware of each other and avoid upgrades
which would
break the other plugins. Same applies to the core app I
guess. c.f.
Firefox update that broke the WebDev toolbar for a few days.

> Is there a sane known way to do this?
>
> Would the requirement that you can't upgrade more than
one step at a
> time (like for example requiring that you apply patches
in order) be too
> onerous a restriction (i.e you can't jump straight
from 1.0 to 3.0 you
> must go 1.0 -> 2.0 -> 3.0)

I don't know about sane exactly but you might set it up as
a series of
incremental changes that can be applied sequentially. This
is how a
certain large CMS of my aquaintance does it.  The challenge
is to do it
automatically if the updates are reliant on external tables
or plugins. In
that case several different updates may have to be
interleaved.

Maybe some sort of resolver that gets the list of updates,
pre and post
conditions from each plugin, works out the dependancy chain
and calls the
updates in the right order ?

Simon.

-- 
"Hi, I'm crazy Eddie! I put babies on spikes!"

[1-2]

about | contact  Other archives ( Real Estate discussion Medical topics )