Created
June 5, 2015 07:39
-
-
Save ernie58/db2016996d3c7508e5c2 to your computer and use it in GitHub Desktop.
Indexes in model definition file causes automigrate to crash
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"name": "EduContentMetadataEduContentTag", | |
"base": "PersistedModel", | |
"idInjection": true, | |
"options": { | |
"validateUpsert": true | |
}, | |
"properties": { | |
}, | |
"validations": [], | |
"relations": { | |
"eduContentMetadata": { | |
"type": "belongsTo", | |
"model": "EduContentMetadata", | |
"foreignKey": "EduContentMetadataId" | |
}, | |
"eduContentTag": { | |
"type": "belongsTo", | |
"model": "EduContentTag", | |
"foreignKey": "EduContentTagId" | |
} | |
}, | |
"acls": [], | |
"methods": [], | |
"indexes": { | |
"metadata_tag": { | |
"keys": { | |
"EduContentMetadataId": 1, | |
"EduContentTagId": -1 | |
}, | |
"options": { | |
"unique": true | |
} | |
} | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"name": "EduContentMetadata", | |
"base": "PersistedModel", | |
"idInjection": true, | |
"properties": { | |
"version": { | |
"type": "number", | |
"required": true | |
}, | |
"metaVersion": { | |
"type": "string", | |
"required": true | |
}, | |
"fileType": { | |
"type": "string" | |
}, | |
"author": { | |
"type": "string", | |
"required": true | |
}, | |
"ISBN": { | |
"type": "string" | |
}, | |
"language": { | |
"type": "string", | |
"required": true | |
}, | |
"title": { | |
"type": "string", | |
"required": true | |
}, | |
"description": { | |
"type": "string", | |
"required": true | |
}, | |
"created": { | |
"type": "date", | |
"required": true | |
}, | |
"published": { | |
"type": "date", | |
"required": true | |
}, | |
"quotable": { | |
"type": "boolean", | |
"required": true | |
} | |
}, | |
"validations": [], | |
"relations": { | |
"tags": { | |
"type": "hasMany", | |
"model": "EduContentTag", | |
"foreignKey": "eduContentMetadataId", | |
"through": "EduContentMetadataEduContentTag" | |
} | |
}, | |
"acls": [], | |
"methods": [] | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"name": "EduContentTag", | |
"base": "PersistedModel", | |
"idInjection": true, | |
"properties": { | |
"name": { | |
"type": "string", | |
"required": true | |
} | |
}, | |
"validations": [], | |
"relations": { | |
"eduContentMetadata": { | |
"type": "hasMany", | |
"model": "EduContentMetadata", | |
"foreignKey": "eduContentTagId", | |
"through": "EduContentMetadataEduContentTag" | |
} | |
}, | |
"acls": [], | |
"methods": [] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment