Skip to content

Commit

Permalink
refactor: Remove duplicate user index creation (#8662)
Browse files Browse the repository at this point in the history
  • Loading branch information
cbaker6 committed Jun 29, 2023
1 parent 31805c9 commit 3f03bd3
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 7 deletions.
2 changes: 1 addition & 1 deletion spec/DefinedSchemas.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -554,7 +554,7 @@ describe('DefinedSchemas', () => {
});
});

it('should not delete automatically classes', async () => {
it('should not delete classes automatically', async () => {
await reconfigureServer({
schema: { definitions: [{ className: '_User' }, { className: 'Test' }] },
});
Expand Down
6 changes: 0 additions & 6 deletions src/Controllers/DatabaseController.js
Original file line number Diff line number Diff line change
Expand Up @@ -1716,12 +1716,6 @@ class DatabaseController {
throw error;
});

await this.adapter
.ensureIndex('_User', requiredUserFields, ['username'], 'case_insensitive_username', true)
.catch(error => {
logger.warn('Unable to create case insensitive username index: ', error);
throw error;
});
await this.adapter
.ensureIndex('_User', requiredUserFields, ['username'], 'case_insensitive_username', true)
.catch(error => {
Expand Down

0 comments on commit 3f03bd3

Please sign in to comment.