File tree Expand file tree Collapse file tree 2 files changed +15
-7
lines changed Expand file tree Collapse file tree 2 files changed +15
-7
lines changed Original file line number Diff line number Diff line change @@ -569,14 +569,16 @@ export class MongoStorageAdapter {
569
569
return this . getAllClasses ( )
570
570
. then ( ( classes ) => {
571
571
572
+ /* eslint-disable no-console */
573
+ //console.dir(classes);
574
+ /* eslint-enable no-console */
575
+
572
576
// map out promises from individual classes
573
577
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
+
579
+ /* eslint-disable no-console */
580
+ //console.info(`~ ` + schema.className);
581
+ /* eslint-enable no-console */
580
582
581
583
// get indexes for this given collection
582
584
return this . getIndexes ( schema . className ) . then ( ( indexes ) => {
@@ -593,6 +595,12 @@ export class MongoStorageAdapter {
593
595
$set : { _metadata : { indexes : indexes } }
594
596
} ) ) ;
595
597
598
+ } ) . catch ( ( ) => { //err
599
+ /* eslint-disable no-console */
600
+ // silently eat the error as collection may NOT exist?
601
+ //console.info(`Caught an error for ` + schema.className);
602
+ //console.dir(err);
603
+ /* eslint-enable no-console */
596
604
} ) ;
597
605
} ) ;
598
606
return Promise . all ( promises ) ;
Original file line number Diff line number Diff line change @@ -1005,7 +1005,7 @@ DatabaseController.prototype.performInitialization = function() {
1005
1005
throw error ;
1006
1006
} ) ;
1007
1007
1008
- const indexPromise = this . adapter . updateSchemaWithIndexes ( ) ;
1008
+ const indexPromise = this . adapter . updateSchemaWithIndexes ( ) ) ;
1009
1009
1010
1010
// Create tables for volatile classes
1011
1011
const adapterInit = this . adapter . performInitialization ( { VolatileClassesSchemas : SchemaController . VolatileClassesSchemas } ) ;
You can’t perform that action at this time.
0 commit comments