mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-16 10:58:30 -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:
|
case MigrationTargetType.SQLMI:
|
||||||
const sqlMi = this._targetServerInstance as SqlManagedInstance;
|
const sqlMi = this._targetServerInstance as SqlManagedInstance;
|
||||||
this._targetServerName = sqlMi.properties.fullyQualifiedDomainName;
|
this._targetServerName = sqlMi.properties.fullyQualifiedDomainName;
|
||||||
|
break;
|
||||||
case MigrationTargetType.SQLDB:
|
case MigrationTargetType.SQLDB:
|
||||||
const sqlDb = this._targetServerInstance as AzureSqlDatabaseServer;
|
const sqlDb = this._targetServerInstance as AzureSqlDatabaseServer;
|
||||||
this._targetServerName = sqlDb.properties.fullyQualifiedDomainName;
|
this._targetServerName = sqlDb.properties.fullyQualifiedDomainName;
|
||||||
|
break;
|
||||||
case MigrationTargetType.SQLVM:
|
case MigrationTargetType.SQLVM:
|
||||||
// For sqlvm, we need to use ip address from the network interface to connect to the server
|
// For sqlvm, we need to use ip address from the network interface to connect to the server
|
||||||
const sqlVm = this._targetServerInstance as SqlVMServer;
|
const sqlVm = this._targetServerInstance as SqlVMServer;
|
||||||
const networkInterfaces = Array.from(sqlVm.networkInterfaces.values());
|
const networkInterfaces = Array.from(sqlVm.networkInterfaces.values());
|
||||||
this._targetServerName = NetworkInterfaceModel.getIpAddress(networkInterfaces);
|
this._targetServerName = NetworkInterfaceModel.getIpAddress(networkInterfaces);
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user