Save db project information when saved in scmp file (#20335)

* Save db project information when saved in scmp file

* Address comments
This commit is contained in:
Sakshi Sharma
2022-08-15 08:23:32 -07:00
committed by GitHub
parent ef02a8afae
commit cd1618798e

View File

@@ -1126,6 +1126,20 @@ export class SchemaCompareMainWindow {
if (ownerUri) {
endpointInfo = endpoint;
endpointInfo.ownerUri = ownerUri;
} else if (endpoint.endpointType === mssql.SchemaCompareEndpointType.Project) {
endpointInfo = {
endpointType: endpoint.endpointType,
packageFilePath: '',
serverDisplayName: '',
serverName: '',
databaseName: '',
ownerUri: '',
connectionDetails: undefined,
projectFilePath: endpoint.projectFilePath,
targetScripts: [],
dataSchemaProvider: '',
folderStructure: loc.schemaObjectType // TODO: Pick this automatically from the scmp file, after issue #20332 is resolved (check dsp as well)
};
} else {
// need to do this instead of just setting it to the endpoint because some fields are null which will cause an error when sending the compare request
endpointInfo = {