If userID is set, migrate any item relations with local user key
DB update to go along with 0d8643087a
This commit is contained in:
parent
0d8643087a
commit
3a5490a1ef
|
@ -2371,6 +2371,13 @@ Zotero.Schema = new function(){
|
|||
else if (i == 91) {
|
||||
yield Zotero.DB.queryAsync("ALTER TABLE libraries ADD COLUMN archived INT NOT NULL DEFAULT 0");
|
||||
}
|
||||
|
||||
else if (i == 92) {
|
||||
let userID = yield Zotero.DB.valueQueryAsync("SELECT value FROM settings WHERE setting='account' AND key='userID'");
|
||||
if (userID) {
|
||||
yield Zotero.DB.queryAsync("UPDATE itemRelations SET object='http://zotero.org/users/' || ? || SUBSTR(object, 39) WHERE object LIKE ?", [userID, 'http://zotero.org/users/local/%']);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
yield _updateDBVersion('userdata', toVersion);
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
-- 91
|
||||
-- 92
|
||||
|
||||
-- Copyright (c) 2009 Center for History and New Media
|
||||
-- George Mason University, Fairfax, Virginia, USA
|
||||
|
|
Loading…
Reference in New Issue
Block a user