From 3f03bd3c6f27cc1edb7174d06645f517830790fd Mon Sep 17 00:00:00 2001 From: Corey Date: Thu, 29 Jun 2023 19:15:58 -0400 Subject: [PATCH] refactor: Remove duplicate user index creation (#8662) --- spec/DefinedSchemas.spec.js | 2 +- src/Controllers/DatabaseController.js | 6 ------ 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/spec/DefinedSchemas.spec.js b/spec/DefinedSchemas.spec.js index 8d8853766e..a1c7e3dca5 100644 --- a/spec/DefinedSchemas.spec.js +++ b/spec/DefinedSchemas.spec.js @@ -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' }] }, }); diff --git a/src/Controllers/DatabaseController.js b/src/Controllers/DatabaseController.js index 435095fb76..f9c782db87 100644 --- a/src/Controllers/DatabaseController.js +++ b/src/Controllers/DatabaseController.js @@ -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 => {