diff --git a/chrome/content/zotero/xpcom/annotate.js b/chrome/content/zotero/xpcom/annotate.js index 270ddb3dc4..3ef86be084 100644 --- a/chrome/content/zotero/xpcom/annotate.js +++ b/chrome/content/zotero/xpcom/annotate.js @@ -472,7 +472,7 @@ Zotero.Annotation.prototype.save = function() { // fetch path to node var path = Zotero.Annotate.getPathForPoint(node, offset); - var query = "INSERT INTO annotations VALUES (NULL, ?, ?, ?, ?, ?, ?, ?)"; + var query = "INSERT INTO annotations VALUES (NULL, ?, ?, ?, ?, ?, ?, ?, ?, ?)"; var parameters = [ this.annotationsObj.itemID, // itemID path.parent, // parent @@ -480,6 +480,7 @@ Zotero.Annotation.prototype.save = function() { path.offset, // offset this.x, // x this.y, // y + 30, 5, // cols, rows text // text ]; } diff --git a/chrome/content/zotero/xpcom/schema.js b/chrome/content/zotero/xpcom/schema.js index 63b500e8b8..9de2955ce4 100644 --- a/chrome/content/zotero/xpcom/schema.js +++ b/chrome/content/zotero/xpcom/schema.js @@ -697,6 +697,10 @@ Zotero.Schema = new function(){ Zotero.DB.query("CREATE INDEX itemNotes_sourceItemID ON itemNotes(sourceItemID)"); Zotero.DB.query("DROP TABLE itemNotesTemp"); } + + if (i==15) { + Zotero.DB.query("DROP TABLE annotations"); + } } _updateSchema('userdata'); diff --git a/userdata.sql b/userdata.sql index 7f45886ec1..baeae26cc9 100644 --- a/userdata.sql +++ b/userdata.sql @@ -1,4 +1,4 @@ --- 14 +-- 15 -- This file creates tables containing user-specific data -- any changes -- to existing tables made here must be mirrored in transition steps in @@ -231,6 +231,8 @@ CREATE TABLE IF NOT EXISTS annotations ( offset INT, x INT, y INT, + cols INT, + rows INT, text TEXT, FOREIGN KEY (itemID) REFERENCES itemAttachments(itemID) );