Upgrading sqlite database format



Hi,

I recently upgraded my Ubuntu installation from 6.06 to 6.10, and thusly upgraded my F-Spot installation from about 0.1.1 (or so, I think) to 0.2.1.

Now my photos won't load, and I have traced the problem to a change in the way the SQLite database is stored:

ugo elecpg83:~$ f-spot
Starting new FSpot server
XXXXX
Mono.Data.SqliteClient.SqliteSyntaxException: file is encrypted or is not a database
  at Mono.Data.SqliteClient.SqliteCommand.GetNextStatement (IntPtr pzStart, System.IntPtr pzTail, System.IntPtr pStmt) [0x00000]
  at Mono.Data.SqliteClient.SqliteCommand.ExecuteReader (CommandBehavior behavior, Boolean want_results, System.Int32 rows_affected) [0x00000]
  at Mono.Data.SqliteClient.SqliteCommand.ExecuteNonQuery () [0x00000]
  at MetaStore.CreateTable () [0x00000]
  at MetaStore..ctor (Mono.Data.SqliteClient.SqliteConnection connection, Boolean is_new) [0x00000]
  at Db.Init (System.String path, Boolean create_if_missing) [0x00000]
  at FSpot.Core..ctor () [0x00000]
  at FSpot.Driver.Main (System.String[] args) [0x00000]
XXXXX
<snip>

Looking in ~/.gnome2/f-spot/ I see the old photo database is for SQLite version ? and the new database is for SQLite 3:
hugo elecpg83:~/.gnome2/f-spot$ file photos.db
photos.db: SQLite database (Version 3)
hugo elecpg83:~/.gnome2/f-spot$ file photos.db.old
photos.db.old: SQLite Database Version

(photo.db.old is a new autogenerated empty database that works, photo.db.old, when moved to photo.db causes the above error).

Is there any way to (semi-)automagically convert my old database to the new format? I really hope so!

Cheers,
Hugo


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