fix compare after opening scmp with dacpacs failing (#6201)

This commit is contained in:
Kim Santiago
2019-06-27 18:26:02 -07:00
committed by GitHub
parent 4ef25ecf37
commit b34e3cbe90
2 changed files with 21 additions and 6 deletions

View File

@@ -880,7 +880,16 @@ export class SchemaCompareResult {
this.sourceEndpointInfo.ownerUri = ownerUri;
}
} else {
this.sourceEndpointInfo = result.sourceEndpointInfo;
// need to do this instead of just setting it to the result.sourceEndpointInfo because some fields are null which will cause an error when sending the compare request
this.sourceEndpointInfo = {
endpointType: azdata.SchemaCompareEndpointType.Dacpac,
serverDisplayName: '',
serverName: '',
databaseName: '',
ownerUri: '',
packageFilePath: result.sourceEndpointInfo.packageFilePath,
connectionDetails: undefined
};
}
if (result.targetEndpointInfo && result.targetEndpointInfo.endpointType === azdata.SchemaCompareEndpointType.Database) {
@@ -890,7 +899,16 @@ export class SchemaCompareResult {
this.targetEndpointInfo.ownerUri = ownerUri;
}
} else {
this.targetEndpointInfo = result.targetEndpointInfo;
// need to do this instead of just setting it to the result.targetEndpointInfo because some fields are null which will cause an error when sending the compare request
this.targetEndpointInfo = {
endpointType: azdata.SchemaCompareEndpointType.Dacpac,
serverDisplayName: '',
serverName: '',
databaseName: '',
ownerUri: '',
packageFilePath: result.targetEndpointInfo.packageFilePath,
connectionDetails: undefined
};
}
this.updateSourceAndTarget();