fix schema compare dropdown not selecting correct db when multiple active connections (#14999)

* fix schema compare dropdown not selecting correct db when multiple active connections

* fix when no username so default is used
This commit is contained in:
Kim Santiago
2021-04-06 16:15:31 -07:00
committed by GitHub
parent 04af3e161a
commit eb8c1c396d

View File

@@ -91,9 +91,14 @@ export class SchemaCompareMainWindow {
let sourceDacpac = context as string;
if (profile) {
let ownerUri = await azdata.connection.getUriForConnection((profile.id));
let usr = profile.userName;
if (!usr) {
usr = loc.defaultText;
}
this.sourceEndpointInfo = {
endpointType: mssql.SchemaCompareEndpointType.Database,
serverDisplayName: `${profile.serverName} ${profile.userName}`,
serverDisplayName: `${profile.serverName} (${usr})`,
serverName: profile.serverName,
databaseName: profile.databaseName,
ownerUri: ownerUri,