Fix upgrade to database format 3.
authorJoel Rosdahl <joel@rosdahl.net>
Tue, 22 Feb 2005 07:49:39 +0000 (07:49 +0000)
committerJoel Rosdahl <joel@rosdahl.net>
Tue, 22 Feb 2005 07:49:39 +0000 (07:49 +0000)
src/lib/kofoto/shelfupgrade.py

index d6f9a83..9f4b0d3 100644 (file)
@@ -49,14 +49,14 @@ def tryUpgrade(location, toVersion):
                 tablename, tablename))
         cursor.execute(
             " insert into image (id, primary_version)"
-            " select id, id"
+            " select imageid, imageid"
             " from   old.image")
         cursor.execute(
             " insert into image_version"
             "     (id, image, type, hash, directory, filename, mtime,"
             "      width, height)"
-            " select id, id, 'original', hash, directory, filename, mtime,"
-            "        width, height"
+            " select imageid, imageid, 'original', hash, directory, filename,"
+            "        mtime, width, height"
             " from   old.image")
         cursor.execute(
             " update dbinfo"