Save file structure in scmp file (#1878)

* Save file structure in scmp files

* Update DacFx version and add test

* Address comments

* Fix test

* try to fix tests

---------

Co-authored-by: Kim Santiago <kisantia@microsoft.com>
This commit is contained in:
Sakshi Sharma
2023-02-24 14:24:25 -08:00
committed by GitHub
parent f7fd478857
commit b44f0d561f
4 changed files with 63 additions and 3 deletions

View File

@@ -5,6 +5,7 @@
#nullable disable
using System.Collections.Generic;
using Microsoft.SqlServer.Dac;
using Microsoft.SqlServer.Dac.Compare;
using Microsoft.SqlTools.Hosting.Protocol.Contracts;
using Microsoft.SqlTools.ServiceLayer.Connection.Contracts;
@@ -70,6 +71,11 @@ namespace Microsoft.SqlTools.ServiceLayer.SchemaCompare.Contracts
/// Connection details
/// </summary>
public ConnectionDetails ConnectionDetails { get; set; }
/// <summary>
/// Extract target of the project used when extracting a database to file system or updating the project from database
/// </summary>
public DacExtractTarget? ExtractTarget { get; set; }
}
/// <summary>

View File

@@ -176,7 +176,9 @@ namespace Microsoft.SqlTools.ServiceLayer.SchemaCompare
{
case SchemaCompareEndpointType.Project:
{
return new SchemaCompareProjectEndpoint(endpointInfo.ProjectFilePath, endpointInfo.TargetScripts, endpointInfo.DataSchemaProvider);
return endpointInfo?.ExtractTarget != null
? new SchemaCompareProjectEndpoint(endpointInfo.ProjectFilePath, endpointInfo.TargetScripts, endpointInfo.DataSchemaProvider, (DacExtractTarget)endpointInfo?.ExtractTarget)
: new SchemaCompareProjectEndpoint(endpointInfo.ProjectFilePath, endpointInfo.TargetScripts, endpointInfo.DataSchemaProvider);
}
case SchemaCompareEndpointType.Dacpac:
{