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.
package/drivers/azureCosmos.cjs
CHANGED
|
@@ -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.
|
|
504
|
+
await client.database(options.databaseName).containers.createIfNotExists({
|
|
505
505
|
id: options.containerName,
|
|
506
506
|
partitionKey: "/_partition"
|
|
507
507
|
});
|
package/drivers/azureCosmos.mjs
CHANGED
|
@@ -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.
|
|
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
|
}
|