summaryrefslogtreecommitdiff
path: root/src/db/PhotoTable.vala
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff-webhosting.net>2016-11-25 04:11:58 +0100
committerJörg Frings-Fürst <debian@jff-webhosting.net>2016-11-25 04:11:58 +0100
commitccff5442184e84d511c2bd25ed3da53e4336a272 (patch)
tree8402a0ba68852e0aec5841ed4519ccfe88352223 /src/db/PhotoTable.vala
parenta1e1833f48ed618273dab9198b547148a89832a7 (diff)
parent4a3f1fdfe1eb3743564adcee35d5513224339260 (diff)
Merge tag 'upstream/0.25.1'
Upstream version 0.25.1
Diffstat (limited to 'src/db/PhotoTable.vala')
-rw-r--r--src/db/PhotoTable.vala9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/db/PhotoTable.vala b/src/db/PhotoTable.vala
index f774df5..4304da8 100644
--- a/src/db/PhotoTable.vala
+++ b/src/db/PhotoTable.vala
@@ -162,7 +162,14 @@ public class PhotoTable : DatabaseTable {
// https://bugzilla.gnome.org/show_bug.cgi?id=742670
//
// 1) index on md5,file_format
- res = db.prepare_v2 ("CREATE UNIQUE INDEX IF NOT EXISTS PhotoTableMD5Format on PhotoTable(md5, file_format)", -1, out stmt);
+ res = db.prepare_v2 ("DROP INDEX IF EXISTS PhotoTableMD5Format", -1, out stmt);
+ assert (res == Sqlite.OK);
+ res = stmt.step ();
+ if (res != Sqlite.DONE) {
+ DatabaseTable.warning ("Failed to drop old PhotoTable index", res);
+ }
+
+ res = db.prepare_v2 ("CREATE INDEX IF NOT EXISTS PhotoTableMD5FormatV2 on PhotoTable(md5, file_format)", -1, out stmt);
assert (res == Sqlite.OK);
res = stmt.step ();
if (res != Sqlite.DONE) {