From cd1618798e9e6389f1f14f7c1be7c79df06b0530 Mon Sep 17 00:00:00 2001 From: Sakshi Sharma <57200045+SakshiS-harma@users.noreply.github.com> Date: Mon, 15 Aug 2022 08:23:32 -0700 Subject: [PATCH] Save db project information when saved in scmp file (#20335) * Save db project information when saved in scmp file * Address comments --- .../schema-compare/src/schemaCompareMainWindow.ts | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/extensions/schema-compare/src/schemaCompareMainWindow.ts b/extensions/schema-compare/src/schemaCompareMainWindow.ts index f969156a29..9346052d3f 100644 --- a/extensions/schema-compare/src/schemaCompareMainWindow.ts +++ b/extensions/schema-compare/src/schemaCompareMainWindow.ts @@ -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 = {