Restore fallback DB creation in retractions.js
Removed in 5b9e6497af
, but then we reverted missing-table creation via
schema integrity check
This commit is contained in:
parent
4003c3d1fc
commit
2094a6023c
1 changed files with 8 additions and 0 deletions
|
@ -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();
|
||||
|
|
Loading…
Reference in a new issue