@mikro-orm/mongodb 7.0.18-dev.0 → 7.0.18-dev.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -20,10 +20,13 @@ export class MongoSchemaGenerator extends AbstractSchemaGenerator {
20
20
  throw err;
21
21
  }
22
22
  }));
23
+ // Collections must exist before we touch indexes. `createIndex` on a missing collection
24
+ // races with the explicit `createCollection` above, and on retries the recovery path can
25
+ // see partial state and drop indexes that were already created successfully.
26
+ await Promise.all(promises);
23
27
  if (options.ensureIndexes) {
24
28
  await this.ensureIndexes({ ensureCollections: false });
25
29
  }
26
- await Promise.all(promises);
27
30
  }
28
31
  async drop(options = {}) {
29
32
  await this.connection.ensureConnection();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mikro-orm/mongodb",
3
- "version": "7.0.18-dev.0",
3
+ "version": "7.0.18-dev.1",
4
4
  "description": "TypeScript ORM for Node.js based on Data Mapper, Unit of Work and Identity Map patterns. Supports MongoDB, MySQL, PostgreSQL and SQLite databases as well as usage with vanilla JavaScript.",
5
5
  "keywords": [
6
6
  "data-mapper",
@@ -53,7 +53,7 @@
53
53
  "@mikro-orm/core": "^7.0.17"
54
54
  },
55
55
  "peerDependencies": {
56
- "@mikro-orm/core": "7.0.18-dev.0"
56
+ "@mikro-orm/core": "7.0.18-dev.1"
57
57
  },
58
58
  "engines": {
59
59
  "node": ">= 22.17.0"