rads-db 3.0.2 → 3.0.3

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.
@@ -501,7 +501,7 @@ async function createDatabaseIfNotExists(options, client) {
501
501
  await client.databases.createIfNotExists({
502
502
  id: options.databaseName
503
503
  });
504
- await client.database(options.databaseName).containers.create({
504
+ await client.database(options.databaseName).containers.createIfNotExists({
505
505
  id: options.containerName,
506
506
  partitionKey: "/_partition"
507
507
  });
@@ -322,7 +322,7 @@ function getWhereNameOperatorPair(whereKey) {
322
322
  async function createDatabaseIfNotExists(options, client) {
323
323
  try {
324
324
  await client.databases.createIfNotExists({ id: options.databaseName });
325
- await client.database(options.databaseName).containers.create({ id: options.containerName, partitionKey: "/_partition" });
325
+ await client.database(options.databaseName).containers.createIfNotExists({ id: options.containerName, partitionKey: "/_partition" });
326
326
  } catch (e) {
327
327
  console.error("Error initializing CosmosDb: ", e);
328
328
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rads-db",
3
- "version": "3.0.2",
3
+ "version": "3.0.3",
4
4
  "files": [
5
5
  "dist",
6
6
  "drivers",