commit 5847388862a95379cf703972c6b0815037bd3976
parent 4ac368e0527ad34f9c71985bd33da4a52e468cfa
Author: Dan Stillman <dstillman@zotero.org>
Date: Fri, 5 Jan 2018 02:53:27 -0500
Add schema update step to remove dc:isReplacedBy relations
These should've all been replaced with dc:replaces relations in a schema
update step, so any that exist were likely synced down from the API
(since fixed) and should be obsolete/redundant.
Diffstat:
2 files changed, 6 insertions(+), 1 deletion(-)
diff --git a/chrome/content/zotero/xpcom/schema.js b/chrome/content/zotero/xpcom/schema.js
@@ -2509,6 +2509,11 @@ Zotero.Schema = new function(){
yield Zotero.DB.queryAsync("DELETE FROM itemRelations WHERE predicateID=(SELECT predicateID FROM relationPredicates WHERE predicate='owl:sameAs') AND object LIKE ?", 'http://www.archive.org/%');
}
+ else if (i == 99) {
+ yield Zotero.DB.queryAsync("DELETE FROM itemRelations WHERE predicateID=(SELECT predicateID FROM relationPredicates WHERE predicate='dc:isReplacedBy')");
+ yield Zotero.DB.queryAsync("DELETE FROM relationPredicates WHERE predicate='dc:isReplacedBy'");
+ }
+
// If breaking compatibility or doing anything dangerous, clear minorUpdateFrom
}
diff --git a/resource/schema/userdata.sql b/resource/schema/userdata.sql
@@ -1,4 +1,4 @@
--- 98
+-- 99
-- Copyright (c) 2009 Center for History and New Media
-- George Mason University, Fairfax, Virginia, USA