Fix a couple more potential upgrade errors with space trimming
This commit is contained in:
parent
fa2a8bb30e
commit
cf644465e3
1 changed files with 2 additions and 2 deletions
|
@ -2059,7 +2059,7 @@ Zotero.Schema = new function(){
|
|||
var trimmed = Zotero.Utilities.prototype.trim(row.value);
|
||||
var valueID = Zotero.DB.valueQuery("SELECT valueID FROM itemDataValues WHERE value=?", trimmed);
|
||||
if (valueID) {
|
||||
Zotero.DB.query("UPDATE itemData SET valueID=? WHERE valueID=?", [valueID, row.valueID]);
|
||||
Zotero.DB.query("UPDATE OR REPLACE itemData SET valueID=? WHERE valueID=?", [valueID, row.valueID]);
|
||||
Zotero.DB.query("DELETE FROM itemDataValues WHERE valueID=?", row.valueID);
|
||||
}
|
||||
else {
|
||||
|
@ -2092,7 +2092,7 @@ Zotero.Schema = new function(){
|
|||
var trimmed = Zotero.Utilities.prototype.trim(row.name);
|
||||
var tagID = Zotero.DB.valueQuery("SELECT tagID FROM tags WHERE name=?", trimmed);
|
||||
if (tagID) {
|
||||
Zotero.DB.query("UPDATE itemTags SET tagID=? WHERE tagID=?", [tagID, row.tagID]);
|
||||
Zotero.DB.query("UPDATE OR REPLACE itemTags SET tagID=? WHERE tagID=?", [tagID, row.tagID]);
|
||||
Zotero.DB.query("DELETE FROM tags WHERE tagID=?", row.tagID);
|
||||
}
|
||||
else {
|
||||
|
|
Loading…
Reference in a new issue