From 29c02e5746aea3bf4a7c52cfcd542ba498a90577 Mon Sep 17 00:00:00 2001 From: Aasim Khan Date: Wed, 10 Mar 2021 18:23:39 -0800 Subject: [PATCH] Resetting subscriptions after AD tenant is changed in migration wizard (#14656) * Resetting subscriptions after AD tenant is changed * removing migration in progress info message at the end * printing migration started errors in console. --- extensions/sql-migration/src/models/stateMachine.ts | 3 +-- extensions/sql-migration/src/wizard/accountsSelectionPage.ts | 3 +++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/extensions/sql-migration/src/models/stateMachine.ts b/extensions/sql-migration/src/models/stateMachine.ts index 8734e6687b..e9091f69c4 100644 --- a/extensions/sql-migration/src/models/stateMachine.ts +++ b/extensions/sql-migration/src/models/stateMachine.ts @@ -524,11 +524,10 @@ export class MigrationStateModel implements Model, vscode.Disposable { vscode.window.showInformationMessage(localize("sql.migration.starting.migration.message", 'Starting migration for database {0} to {1}', db, this._targetServerInstance.name)); } } catch (e) { + console.log(e); vscode.window.showInformationMessage(e); } }); - - vscode.window.showInformationMessage(constants.MIGRATION_STARTED); } } diff --git a/extensions/sql-migration/src/wizard/accountsSelectionPage.ts b/extensions/sql-migration/src/wizard/accountsSelectionPage.ts index ba3c15f2de..e6131585fc 100644 --- a/extensions/sql-migration/src/wizard/accountsSelectionPage.ts +++ b/extensions/sql-migration/src/wizard/accountsSelectionPage.ts @@ -118,6 +118,9 @@ export class AccountsSelectionPage extends MigrationWizardPage { */ if (value.selected) { this.migrationStateModel._azureAccount.properties.tenants = [this.migrationStateModel.getTenant(value.index)]; + this.migrationStateModel._subscriptions = undefined!; + this.migrationStateModel._targetSubscription = undefined!; + this.migrationStateModel._databaseBackup.subscription = undefined!; } });