Re: Migration from sqlite2 to sqlite3



Hi Frederik,

F-Spot does use sqlite3 by default. I mean, if both sqlite2 and sqlite3
are available on your system and you start f-spot for the first time,
your db will be version 3.

Upgrading your old db from version 2 to version 3 is pretty trivial, and
a script called f-spot-sqlite-upgrade is available in the tools folder
of the sources.

Right now, we can't auto-upgrade everyone database by running this
script to ease the pain of packages maintainers, cause this script need
both sqlite2 and sqlite3 installed at the same time (and if we do so, I
guess quite a lot of packages maintainers will start to become really
angry :) )

I know, upgrading the db is not a task that should be left to the user,
and most of the packaging systems do not have any ways to run scripts on
user owned files...

My guess is that the only working (but unelegant) option to solve both
user and maintainers headaches is, from a F-Spot point of view, bundle a
copy of sqlite2 in our tree and toolbox, and check for db version at
every start... hopefully this hack could be removed after 2 years or
more... Patch for this is welcome.

Hope this clarify the situation and helps you

regards

stephane

On Sat, 2007-04-28 at 14:03 +0000, Frederik Himpe wrote:
> My questions here are a follow-up on a discussion in Mandriva development 
> list about F-spot and sqlite: http://archives.mandrivalinux.com/
> cooker/2007-04/msg02229.php
> 
> It seems F-Spot by default still uses the old (obsolete?) sqlite2 for its 
> database. Several distributions, like Debian and Ubuntu, have patched F-
> Spot to use the superior sqlite3 by default (patch can be found also on 
> the above address). Is there any reason why this is not the default in F-
> Spot?
> 
> We can very well imagine that sometime in the future, distributions will 
> not include sqlite2 anymore, which will cause problems for existing 
> users. Now that most distributions still ship both versions, would not it 
> be interesting to add code to F-Spot which automatically migrates from 
> sqlite2 to sqlite3 if both are available on the system? This would 
> prepare F-Spot better for a future where sqlite2 is not available anymore.
> 
-- 
Stephane Delcroix
stephane delcroix org




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