mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-16 18:46:40 -05:00
Fix deploy upgrade existing not choosing the correct database (#14635)
* fix deploy upgrade existing not choosing the correct database * fix test * specify databaseDropdownValue as a string
This commit is contained in:
@@ -22,7 +22,7 @@ export class TestDeployConfigPage extends DeployConfigPage {
|
|||||||
}
|
}
|
||||||
|
|
||||||
SetDatabaseDropDown(): void {
|
SetDatabaseDropDown(): void {
|
||||||
this.databaseDropdown.value = { name: 'DummyDatabase', displayName: 'DummyDatabase' };
|
this.databaseDropdown.value = 'DummyDatabase';
|
||||||
}
|
}
|
||||||
|
|
||||||
SetFileName(): void {
|
SetFileName(): void {
|
||||||
|
|||||||
@@ -104,12 +104,12 @@ export abstract class DacFxConfigPage extends BasePage {
|
|||||||
|
|
||||||
// Handle database changes
|
// Handle database changes
|
||||||
this.databaseDropdown.onValueChanged(() => {
|
this.databaseDropdown.onValueChanged(() => {
|
||||||
const databaseDropdownValue = this.databaseDropdown.value;
|
const databaseDropdownValue: string = this.databaseDropdown.value as string;
|
||||||
if (!databaseDropdownValue) {
|
if (!databaseDropdownValue) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
this.model.database = databaseDropdownValue as string;
|
this.model.database = databaseDropdownValue;
|
||||||
this.fileTextBox.value = this.generateFilePathFromDatabaseAndTimestamp();
|
this.fileTextBox.value = this.generateFilePathFromDatabaseAndTimestamp();
|
||||||
this.model.filePath = this.fileTextBox.value;
|
this.model.filePath = this.fileTextBox.value;
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -142,12 +142,12 @@ export class DeployConfigPage extends DacFxConfigPage {
|
|||||||
|
|
||||||
//Handle database changes
|
//Handle database changes
|
||||||
this.databaseDropdown.onValueChanged(() => {
|
this.databaseDropdown.onValueChanged(() => {
|
||||||
const databaseDropdownValue = this.databaseDropdown.value as azdata.CategoryValue;
|
const databaseDropdownValue: string = this.databaseDropdown.value as string;
|
||||||
if (!databaseDropdownValue) {
|
if (!databaseDropdownValue) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
this.model.database = databaseDropdownValue.name;
|
this.model.database = databaseDropdownValue;
|
||||||
});
|
});
|
||||||
|
|
||||||
this.databaseLoader = this.view.modelBuilder.loadingComponent().withItem(this.databaseDropdown).withProperties({
|
this.databaseLoader = this.view.modelBuilder.loadingComponent().withItem(this.databaseDropdown).withProperties({
|
||||||
|
|||||||
Reference in New Issue
Block a user