www

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

commit 3446aaf64501de8c52c5f880562826d1b258b48b
parent c19be7d8adc0f214048e8aaf5cd583ec249a53c1
Author: Dan Stillman <dstillman@zotero.org>
Date:   Sat, 14 Nov 2009 18:31:48 +0000

Fix constraint error "UPDATE itemAttachments SET syncState=?" during sync


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

diff --git a/chrome/content/zotero/xpcom/schema.js b/chrome/content/zotero/xpcom/schema.js @@ -2480,6 +2480,11 @@ Zotero.Schema = new function(){ Zotero.DB.query("DROP TABLE syncDeleteLogOld"); } + if (i==65) { + Zotero.DB.query("UPDATE itemAttachments SET sourceItemID=NULL WHERE sourceItemID IN (SELECT itemID FROM items WHERE itemTypeID IN (1,14))"); + Zotero.DB.query("UPDATE itemNotes SET sourceItemID=NULL WHERE sourceItemID IN (SELECT itemID FROM items WHERE itemTypeID IN (1,14))"); + } + Zotero.wait(); } diff --git a/userdata.sql b/userdata.sql @@ -1,4 +1,4 @@ --- 64 +-- 65 -- 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()