diff --git a/chrome/content/zotero/xpcom/retractions.js b/chrome/content/zotero/xpcom/retractions.js index 44d51d0ac1..be419efde0 100644 --- a/chrome/content/zotero/xpcom/retractions.js +++ b/chrome/content/zotero/xpcom/retractions.js @@ -48,6 +48,14 @@ Zotero.Retractions = { return; } + // TEMP: Until we can figure out why some schema updates aren't going through despite the + // version number being incremented, create table here if it's missing + await Zotero.DB.queryAsync("CREATE TABLE IF NOT EXISTS retractedItems (\n itemID INTEGER PRIMARY KEY,\n data TEXT,\n FOREIGN KEY (itemID) REFERENCES items(itemID) ON DELETE CASCADE\n);"); + try { + await Zotero.DB.queryAsync("ALTER TABLE retractedItems ADD COLUMN flag INT DEFAULT 0"); + } + catch (e) {} + // Load mappings of keys (DOI hashes and PMIDs) to items and vice versa and register for // item changes so they can be kept up to date in notify(). await this._cacheKeyMappings(); diff --git a/chrome/content/zotero/xpcom/schema.js b/chrome/content/zotero/xpcom/schema.js index c4359c7ce9..51150f6379 100644 --- a/chrome/content/zotero/xpcom/schema.js +++ b/chrome/content/zotero/xpcom/schema.js @@ -2513,6 +2513,7 @@ Zotero.Schema = new function(){ } } + // Duplicated in retractions.js::init() due to undiagnosed schema update bug else if (i == 105) { // This was originally in 103 and then 104, but some schema update steps are being // missed for some people, so run again with IF NOT EXISTS until we figure out