From 1935ce1adbd83eb9cc8cb2bb226f42abee729266 Mon Sep 17 00:00:00 2001 From: Benjin Dubishar Date: Thu, 8 Oct 2020 21:44:23 -0700 Subject: [PATCH] Include database-scoped credentials when deploying with default options (#12840) --- .../src/dialogs/publishDatabaseDialog.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/extensions/sql-database-projects/src/dialogs/publishDatabaseDialog.ts b/extensions/sql-database-projects/src/dialogs/publishDatabaseDialog.ts index d19fefab79..bb20167f10 100644 --- a/extensions/sql-database-projects/src/dialogs/publishDatabaseDialog.ts +++ b/extensions/sql-database-projects/src/dialogs/publishDatabaseDialog.ts @@ -211,10 +211,14 @@ export class PublishDatabaseDialog { private async getDeploymentOptions(): Promise { // eventually, database options will be configurable in this dialog - // but for now, just send the default DacFx deployment options if no options were loaded from a publish profile + // but for now, just send the default DacFx deployment options if no options were loaded from a publish profile if (!this.deploymentOptions) { this.deploymentOptions = await utils.GetDefaultDeploymentOptions(); + // re-include database-scoped credentials + // 53 comes from $\DacFx_Preview_Dev\Product\Source\DeploymentApi\ObjectTypes.cs (exact value from decompiled metadata) + this.deploymentOptions.excludeObjectTypes = this.deploymentOptions.excludeObjectTypes.filter(x => x !== 53); + // this option needs to be true for same database references validation to work if (this.project.databaseReferences.length > 0) { this.deploymentOptions.includeCompositeObjects = true;