From 075457be452b09b866d8837df3f6706f8535b5b3 Mon Sep 17 00:00:00 2001 From: Dan Stillman Date: Thu, 24 Aug 2023 05:08:44 -0400 Subject: [PATCH] Use REPLACE instead of INSERT for ebook schema changes Follow-up to bdea760 (#3360), which I changed incorrectly --- chrome/content/zotero/xpcom/schema.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/chrome/content/zotero/xpcom/schema.js b/chrome/content/zotero/xpcom/schema.js index c1a394bddf..e5463e3e77 100644 --- a/chrome/content/zotero/xpcom/schema.js +++ b/chrome/content/zotero/xpcom/schema.js @@ -3451,10 +3451,10 @@ Zotero.Schema = new function(){ } else if (i == 122) { - await Zotero.DB.queryAsync("INSERT INTO fileTypes VALUES(8, 'ebook')"); - await Zotero.DB.queryAsync("INSERT INTO fileTypeMIMETypes VALUES(8, 'application/epub+zip')"); + await Zotero.DB.queryAsync("REPLACE INTO fileTypes VALUES(8, 'ebook')"); + await Zotero.DB.queryAsync("REPLACE INTO fileTypeMIMETypes VALUES(8, 'application/epub+zip')"); // Incorrect, for compatibility - await Zotero.DB.queryAsync("INSERT INTO fileTypeMIMETypes VALUES(8, 'application/epub')"); + await Zotero.DB.queryAsync("REPLACE INTO fileTypeMIMETypes VALUES(8, 'application/epub')"); } // TEMP: When adding 123, check whether IA.authorName fix in items.js::_loadAnnotations()