This commit is contained in:
Dan Stillman 2012-01-10 19:48:30 -05:00
parent 8ddab2fbec
commit 2a102577d1
2 changed files with 5 additions and 1 deletions

View file

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

View file

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