Open
Description
New Feature / Enhancement Checklist
- I am not disclosing a vulnerability.
- I am not just asking a question.
- I have searched through existing issues.
Current Limitation
parse-server
is currently lacking a way to update DB schema. #7091 should address most of this issue, but unfortunatly, it does not seems like there is a way to add uniqueIndex
despite being able to do so with the mongo client
and postgre
db.collection.createIndex( <key and index type specification>, { unique: true } )
Feature / Enhancement Description
Add a isUniqueIndex
parameter
SchemaController.createIndex(className, index , isUniqueIndex) {}
Or even better, add an options
parameter. The downside of this would be that itwould probably cause problems in inter-compatibility between mongo and postgre
createIndex(className, index , options)
Example Use Case
schema.createIndex("_User" , {username:1} , true)
// or
schema.createIndex("_User" , {username:1} , {unique: true} )
Alternatives / Workarounds
We need to bypass the Parse Schema logic and implement it with manual migrations ... its a real pain !