[shotwell/shotwell-0.24] Remove uniqueness of PhotoTableMD5Format index
- From: Jens Georg <jensgeorg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [shotwell/shotwell-0.24] Remove uniqueness of PhotoTableMD5Format index
- Date: Wed, 9 Nov 2016 20:58:57 +0000 (UTC)
commit d0178219f560aee9a37b02d7b9bcf78bcb6bc70a
Author: Jens Georg <mail jensge org>
Date: Wed Nov 9 21:48:26 2016 +0100
Remove uniqueness of PhotoTableMD5Format index
Signed-off-by: Jens Georg <mail jensge org>
https://bugzilla.gnome.org/show_bug.cgi?id=772223
src/db/PhotoTable.vala | 9 ++++++++-
1 files changed, 8 insertions(+), 1 deletions(-)
---
diff --git a/src/db/PhotoTable.vala b/src/db/PhotoTable.vala
index f774df5..4ea2790 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 PhotoTableMD5Format on PhotoTable(md5,
file_format)", -1, out stmt);
assert (res == Sqlite.OK);
res = stmt.step ();
if (res != Sqlite.DONE) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]