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

This commit is contained in:
Dan Stillman 2009-11-14 18:31:48 +00:00
parent c19be7d8ad
commit 3446aaf645
2 changed files with 6 additions and 1 deletions

View file

@ -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();
}

View file

@ -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()