diff --git a/extensions/import/src/wizard/pages/deployConfigPage.ts b/extensions/import/src/wizard/pages/deployConfigPage.ts index 67d4fd61a3..0cf01695d5 100644 --- a/extensions/import/src/wizard/pages/deployConfigPage.ts +++ b/extensions/import/src/wizard/pages/deployConfigPage.ts @@ -32,7 +32,7 @@ export class DeployConfigPage extends DacFxConfigPage { } async start(): Promise { - let serverComponent = await this.createServerDropdown(true); + let serverComponent = await this.createServerDropdown(true); let fileBrowserComponent = await this.createFileBrowser(); this.databaseComponent = await this.createDatabaseTextBox(); this.databaseComponent.title = localize('dacFx.databaseNameTextBox', 'Database Name'); @@ -131,7 +131,7 @@ export class DeployConfigPage extends DacFxConfigPage { this.model.database = this.databaseTextBox.value; }); - // Initialize with upgrade existing true + //Initialize with upgrade existing true upgradeRadioButton.checked = true; this.model.upgradeExisting = true; @@ -149,10 +149,10 @@ export class DeployConfigPage extends DacFxConfigPage { } protected async createDeployDatabaseDropdown(): Promise { - this.databaseDropdown = this.view.modelBuilder.dropDown().withProperties({ + this.databaseDropdown = this.view.modelBuilder.dropDown().withProperties({ required: true }).component(); - // Handle database changes + //Handle database changes this.databaseDropdown.onValueChanged(async () => { this.model.database = (this.databaseDropdown.value).name; }); @@ -172,7 +172,8 @@ export class DeployConfigPage extends DacFxConfigPage { } let values = await this.getDatabaseValues(); - if (this.model.database === undefined) { + //set the database to the first dropdown value if upgrading, otherwise it should get set to the textbox value + if (this.model.upgradeExisting) { this.model.database = values[0].name; }