diff --git a/chrome/content/zotero/xpcom/schema.js b/chrome/content/zotero/xpcom/schema.js index 4d14a1868b..3c29ffd42c 100644 --- a/chrome/content/zotero/xpcom/schema.js +++ b/chrome/content/zotero/xpcom/schema.js @@ -3064,6 +3064,10 @@ Zotero.Schema = new function(){ Zotero.wait(); } + // TODO + // + // Replace customBaseFieldMappings to fix FK fields/customField -> customFields->customFieldID + _updateDBVersion('userdata', toVersion); Zotero.DB.commitTransaction(); diff --git a/userdata.sql b/userdata.sql index 6f71b03bf7..be427bf56a 100644 --- a/userdata.sql +++ b/userdata.sql @@ -378,7 +378,7 @@ CREATE TABLE customBaseFieldMappings ( PRIMARY KEY (customItemTypeID, baseFieldID, customFieldID), FOREIGN KEY (customItemTypeID) REFERENCES customItemTypes(customItemTypeID), FOREIGN KEY (baseFieldID) REFERENCES fields(fieldID), - FOREIGN KEY (customFieldID) REFERENCES fields(customFieldID) + FOREIGN KEY (customFieldID) REFERENCES customFields(customFieldID) ); CREATE INDEX customBaseFieldMappings_baseFieldID ON customBaseFieldMappings(baseFieldID); CREATE INDEX customBaseFieldMappings_customFieldID ON customBaseFieldMappings(customFieldID);