Re: schema updates and changes



On Sat, 2005-07-30 at 12:22 -0400, Patrick Wagstrom wrote: 
> Hi all,
> 
> So I've been working on my license work, and it's coming along nicely,
> although it seems like my research is conspiring to keep me from
> finishing this.   Anyway, I've got a rather simple question.
> 

Excellent!

> In the past it's been mentioned that the schema is generally regarded as
> more or less stable now, but that doesn't mean it won't change.  For
> example, I've changed it to add license support to F-Spot.
> 
> Is there a way in F-spot to tell what version of the schema you're
> using?  Right now it appears that each component just creates the tables
> when they start up if they're not there.  This doesn't seem like it will
> lend itself nicely if we need to change he schema at some time.
> 

There isn't currently a way to version things, this is part of what
needs to be added before I commit several of my own schema changes.

> I was thinking we could implement something like what MythTV has.  A
> field is stored in the database with information about what version of
> the schema is in use.  If the system starts up and see that it's running
> on an older schema, it automatically updates the schema.  This would
> allow F-Spot to deal with larger changes in the schema automagically in
> the future.

Something like this is probably how I'll handle it.  But however the
versioning is done I want to make changes as infrequently as possible
because writing database version migration code is terribly unpleasant.

> Am I missing something in F-Spot?  Any thoughts on whether or not this
> is a good idea?
> 

Clearly you are not missing anything and this definitely needs to be
addressed.  Right now I'm swamped with preparing a new release (and
becoming a father) but coming up with a plan on on the db versioning is
near the top of the list after that.

--Larry




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]