Corrected primary key in the image_version table.
authorJoel Rosdahl <joel@rosdahl.net>
Tue, 22 Feb 2005 07:15:34 +0000 (07:15 +0000)
committerJoel Rosdahl <joel@rosdahl.net>
Tue, 22 Feb 2005 07:15:34 +0000 (07:15 +0000)
Added index on image_version.image.

src/lib/kofoto/shelf.py

index a8f0bbf..942ec8d 100644 (file)
@@ -172,9 +172,10 @@ schema = """
         
         FOREIGN KEY (image) REFERENCES image,
         UNIQUE      (hash),
-        PRIMARY KEY (id, version)
+        PRIMARY KEY (id)
     );
 
+    CREATE INDEX image_version_image_index ON image_version (image);
     CREATE INDEX image_version_location_index ON image_version (directory, filename);
 
     -- Members in an album.