From 7ecbbdf3980e38c2dab21f652e5e26894f358408 Mon Sep 17 00:00:00 2001 From: Austin Bryan <108432101+austincraigbryan@users.noreply.github.com> Date: Wed, 29 Mar 2023 13:44:29 -0700 Subject: [PATCH] Fixing setTargetServerName in SqlMigration extension. Previously if a case was entered it would run all code in the following cases as well (#22477) --- extensions/sql-migration/src/models/stateMachine.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/extensions/sql-migration/src/models/stateMachine.ts b/extensions/sql-migration/src/models/stateMachine.ts index 87fc69f90c..b6372af261 100644 --- a/extensions/sql-migration/src/models/stateMachine.ts +++ b/extensions/sql-migration/src/models/stateMachine.ts @@ -1328,14 +1328,17 @@ export class MigrationStateModel implements Model, vscode.Disposable { case MigrationTargetType.SQLMI: const sqlMi = this._targetServerInstance as SqlManagedInstance; this._targetServerName = sqlMi.properties.fullyQualifiedDomainName; + break; case MigrationTargetType.SQLDB: const sqlDb = this._targetServerInstance as AzureSqlDatabaseServer; this._targetServerName = sqlDb.properties.fullyQualifiedDomainName; + break; case MigrationTargetType.SQLVM: // For sqlvm, we need to use ip address from the network interface to connect to the server const sqlVm = this._targetServerInstance as SqlVMServer; const networkInterfaces = Array.from(sqlVm.networkInterfaces.values()); this._targetServerName = NetworkInterfaceModel.getIpAddress(networkInterfaces); + break; } }