Schema update step to remove linked files from My Publications
This commit is contained in:
parent
9bd01af2a5
commit
7bd8f47dac
2 changed files with 9 additions and 1 deletions
|
@ -2408,6 +2408,14 @@ Zotero.Schema = new function(){
|
|||
+ ids.map(id => `(${id})`).join(', '));
|
||||
}
|
||||
}
|
||||
|
||||
else if (i == 94) {
|
||||
let ids = yield Zotero.DB.columnQueryAsync("SELECT itemID FROM publicationsItems WHERE itemID IN (SELECT itemID FROM items JOIN itemAttachments USING (itemID) WHERE linkMode=2)");
|
||||
for (let id of ids) {
|
||||
yield Zotero.DB.queryAsync("UPDATE items SET synced=0, clientDateModified=CURRENT_TIMESTAMP WHERE itemID=?", id);
|
||||
}
|
||||
yield Zotero.DB.queryAsync("DELETE FROM publicationsItems WHERE itemID IN (SELECT itemID FROM items JOIN itemAttachments USING (itemID) WHERE linkMode=2)");
|
||||
}
|
||||
}
|
||||
|
||||
yield _updateDBVersion('userdata', toVersion);
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
-- 93
|
||||
-- 94
|
||||
|
||||
-- Copyright (c) 2009 Center for History and New Media
|
||||
-- George Mason University, Fairfax, Virginia, USA
|
||||
|
|
Loading…
Reference in a new issue