mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-13 17:22:15 -05:00
Fixing setTargetServerName in SqlMigration extension. Previously if a case was entered it would run all code in the following cases as well (#22477)
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user