Add temp workaround for ARM missing parition key information

This commit is contained in:
Steve Faulkner 2020-09-08 19:25:57 -05:00
parent 53bedb1641
commit 54e853ad9a

View File

@ -50,6 +50,7 @@ async function readCollectionsWithARM(databaseId: string): Promise<DataModels.Co
switch (defaultExperience) { switch (defaultExperience) {
case DefaultAccountExperienceType.DocumentDB: case DefaultAccountExperienceType.DocumentDB:
rpResponse = await listSqlContainers(subscriptionId, resourceGroup, accountName, databaseId); rpResponse = await listSqlContainers(subscriptionId, resourceGroup, accountName, databaseId);
rpResponse?.value?.map(collection => collection.properties.resource.partitionKey ??= { paths: ["/_partitionKey"], kind: "Hash", version: 2, systemKey: true });
break; break;
case DefaultAccountExperienceType.MongoDB: case DefaultAccountExperienceType.MongoDB:
rpResponse = await listMongoDBCollections(subscriptionId, resourceGroup, accountName, databaseId); rpResponse = await listMongoDBCollections(subscriptionId, resourceGroup, accountName, databaseId);