www

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | Submodules | README | LICENSE

commit ad965b1675d7154054c5ae6b84d2aacd3e5f1383
parent ebf6447351fa9e4c559e842da23bb17a7be44de7
Author: Dan Stillman <dstillman@zotero.org>
Date:   Wed, 10 Jun 2009 07:28:30 +0000

Fix possible "syncDeleteLog not empty and no timestamp in Zotero.Sync.delete()" error after upgrading


Diffstat:
Mchrome/content/zotero/xpcom/schema.js | 6++++++
Muserdata.sql | 2+-
2 files changed, 7 insertions(+), 1 deletion(-)

diff --git a/chrome/content/zotero/xpcom/schema.js b/chrome/content/zotero/xpcom/schema.js @@ -2368,6 +2368,12 @@ Zotero.Schema = new function(){ if (i==57) { Zotero.DB.query("UPDATE itemAttachments SET linkMode=0, mimeType=NULL WHERE linkMode IS NULL AND mimeType=0"); } + + if (i==58) { + if (!Zotero.DB.valueQuery("SELECT COUNT(*) FROM version WHERE schema='syncdeletelog'") && Zotero.DB.valueQuery("SELECT COUNT(*) FROM syncDeleteLog")) { + Zotero.DB.query("INSERT INTO version VALUES ('syncdeletelog', CURRENT_TIMESTAMP)"); + } + } } _updateDBVersion('userdata', toVersion); diff --git a/userdata.sql b/userdata.sql @@ -1,4 +1,4 @@ --- 57 +-- 58 -- This file creates tables containing user-specific data for new users -- -- any changes made here must be mirrored in transition steps in schema.js::_migrateSchema()