Adds index on _Role name property (#3586)
* Adds index on _Role name property In order to avoid having different _Role objects with the same name, adding an index on the name property of _Role is necessary. Fixes #3579 * Uses throw instead of Promise.reject when enforcing unique indexes * Fixes wrong sorting of results in schemas tests
This commit is contained in:
committed by
Arthur Cinader
parent
0181fb51b3
commit
9bfa0c60c4
@@ -494,7 +494,8 @@ describe('SchemaController', () => {
|
||||
|
||||
it('creates non-custom classes which include relation field', done => {
|
||||
config.database.loadSchema()
|
||||
.then(schema => schema.addClassIfNotExists('_Role', {}))
|
||||
//as `_Role` is always created by default, we only get it here
|
||||
.then(schema => schema.getOneSchema('_Role'))
|
||||
.then(actualSchema => {
|
||||
const expectedSchema = {
|
||||
className: '_Role',
|
||||
|
||||
Reference in New Issue
Block a user