Fix FK
This commit is contained in:
parent
8ddab2fbec
commit
2a102577d1
2 changed files with 5 additions and 1 deletions
|
@ -3064,6 +3064,10 @@ Zotero.Schema = new function(){
|
||||||
Zotero.wait();
|
Zotero.wait();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TODO
|
||||||
|
//
|
||||||
|
// Replace customBaseFieldMappings to fix FK fields/customField -> customFields->customFieldID
|
||||||
|
|
||||||
_updateDBVersion('userdata', toVersion);
|
_updateDBVersion('userdata', toVersion);
|
||||||
|
|
||||||
Zotero.DB.commitTransaction();
|
Zotero.DB.commitTransaction();
|
||||||
|
|
|
@ -378,7 +378,7 @@ CREATE TABLE customBaseFieldMappings (
|
||||||
PRIMARY KEY (customItemTypeID, baseFieldID, customFieldID),
|
PRIMARY KEY (customItemTypeID, baseFieldID, customFieldID),
|
||||||
FOREIGN KEY (customItemTypeID) REFERENCES customItemTypes(customItemTypeID),
|
FOREIGN KEY (customItemTypeID) REFERENCES customItemTypes(customItemTypeID),
|
||||||
FOREIGN KEY (baseFieldID) REFERENCES fields(fieldID),
|
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_baseFieldID ON customBaseFieldMappings(baseFieldID);
|
||||||
CREATE INDEX customBaseFieldMappings_customFieldID ON customBaseFieldMappings(customFieldID);
|
CREATE INDEX customBaseFieldMappings_customFieldID ON customBaseFieldMappings(customFieldID);
|
||||||
|
|
Loading…
Reference in a new issue