File tree Expand file tree Collapse file tree 2 files changed +9
-8
lines changed Expand file tree Collapse file tree 2 files changed +9
-8
lines changed Original file line number Diff line number Diff line change @@ -570,14 +570,16 @@ export class MongoStorageAdapter {
570
570
. then ( ( classes ) => {
571
571
572
572
// map out promises from individual classes
573
- const promises = classes . map ( ( ) => { // schema
574
-
575
- /* eslint-disable no-console */
576
- console . info ( `>>>>>> Preparing for ` + schema . className ) ;
577
- /* eslint-enable no-console */
573
+ const promises = classes . map ( ( schema ) => {
574
+ if ( ! this . classExists ( schema ) ) {
575
+ /* eslint-disable no-console */
576
+ console . info ( `>>>>>> Skipping ` + schema . className ) ;
577
+ /* eslint-enable no-console */
578
+ return ;
579
+ }
578
580
579
581
// get indexes for this given collection
580
- return this . getIndexes ( schema . className ) . then ( ( ) => { // indexes
582
+ return this . getIndexes ( schema . className ) . then ( ( indexes ) => {
581
583
582
584
// reduce indexes
583
585
indexes = indexes . reduce ( ( obj , index ) => {
Original file line number Diff line number Diff line change @@ -1005,8 +1005,7 @@ DatabaseController.prototype.performInitialization = function() {
1005
1005
throw error ;
1006
1006
} ) ;
1007
1007
1008
- const indexPromise = this . loadSchema ( )
1009
- . then ( ( ) => this . adapter . updateSchemaWithIndexes ( ) ) ;
1008
+ const indexPromise = this . adapter . updateSchemaWithIndexes ( ) ;
1010
1009
1011
1010
// Create tables for volatile classes
1012
1011
const adapterInit = this . adapter . performInitialization ( { VolatileClassesSchemas : SchemaController . VolatileClassesSchemas } ) ;
You can’t perform that action at this time.
0 commit comments