Repeat itemAnnotations schema update step after 078e3bb079
This commit is contained in:
parent
078e3bb079
commit
7700cd776a
2 changed files with 12 additions and 1 deletions
|
@ -3430,6 +3430,17 @@ Zotero.Schema = new function(){
|
|||
await Zotero.DB.queryAsync("CREATE INDEX itemAnnotations_parentItemID ON itemAnnotations(parentItemID)");
|
||||
}
|
||||
|
||||
else if (i == 120) {
|
||||
// Repeat 119 if it didn't go through
|
||||
if (!await Zotero.DB.columnExists('itemAnnotations', 'authorName')) {
|
||||
await Zotero.DB.queryAsync("CREATE TABLE itemAnnotationsTemp (\n itemID INTEGER PRIMARY KEY,\n parentItemID INT NOT NULL,\n type INTEGER NOT NULL,\n authorName TEXT,\n text TEXT,\n comment TEXT,\n color TEXT,\n pageLabel TEXT,\n sortIndex TEXT NOT NULL,\n position TEXT NOT NULL,\n isExternal INT NOT NULL,\n FOREIGN KEY (itemID) REFERENCES items(itemID) ON DELETE CASCADE,\n FOREIGN KEY (parentItemID) REFERENCES itemAttachments(itemID)\n)");
|
||||
await Zotero.DB.queryAsync("INSERT INTO itemAnnotationsTemp SELECT itemID, parentItemID, type, '', text, comment, color, pageLabel, sortIndex, position, isExternal FROM itemAnnotations");
|
||||
await Zotero.DB.queryAsync("DROP TABLE itemAnnotations");
|
||||
await Zotero.DB.queryAsync("ALTER TABLE itemAnnotationsTemp RENAME TO itemAnnotations");
|
||||
await Zotero.DB.queryAsync("CREATE INDEX itemAnnotations_parentItemID ON itemAnnotations(parentItemID)");
|
||||
}
|
||||
}
|
||||
|
||||
// If breaking compatibility or doing anything dangerous, clear minorUpdateFrom
|
||||
}
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
-- 119
|
||||
-- 120
|
||||
|
||||
-- Copyright (c) 2009 Center for History and New Media
|
||||
-- George Mason University, Fairfax, Virginia, USA
|
||||
|
|
Loading…
Reference in a new issue