Re: Migration from sqlite2 to sqlite3



On Wed, 02 May 2007 13:37:13 +0200, Stephane Delcroix wrote:

> 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.

OK, I verified this, and you are right. Probably it did not in the older 
version that Debian includes, but in Mandriva cooker, I get indeed sqlite 
version 3 db.

> 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.

Yep, it's not difficult, but it's annoying to ask users to start a shell 
to upgrade their db :-(

It seems like the script is a fairly recent addition, only available in 
svn at the moment.
 
> 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.

I think F-Spot should include code which checks availability of both 
versions of libsqlite.so and upgrade the db if it's necessary. I think it 
should do this with standard Mono libraries and libsqlite.so.X, so we 
don't need a dependency on the sqlite and sqlite3 programs themselves 
(which in most distro's are in other package than the libraries).

Distro's could stop including the old sqlite2 library by default, but for 
people upgrading their distro to a newer version, the package probably 
won't be uninstalled, and so the upgrade then can be done automagically. 
For people installing a distro for the first time, they'll have only the 
slqite3 libs, and so for them there won't be a problem neither.

That leaves only those people upgrading their system, but not having 
sqlite2 libs installed (e.g. because they formatted all partitions to 
install a new distro but reuse older /home), but that seems to be a case 
which we cannot fix automagically.

If I ever get some time and courage (never programmed in C#, and actually 
it's already a rather long time ago I did some real programming at 
all...), I'll maybe see if I could start coding something like this.

> Hope this clarify the situation and helps you

Thanks for the information, I see the situation much clearer now!

-- 
Frederik Himpe




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