mirror of
https://github.com/ckaczor/sqltoolsservice.git
synced 2026-02-02 01:25:42 -05:00
Applying Changes to SQL Database Projects and Using Projects in Comparison (#1282)
* passing initial testing * update local project from database * update local project * update project from database * update project from database * update project from database * update project from database * update project from database * update project from database * update project from database * update project from database * update project from database * update project from database * Bump .net version * PR feedback Co-authored-by: Noureldine Yehia <t-nyehia@microsoft.com>
This commit is contained in:
@@ -13,7 +13,7 @@ namespace Microsoft.SqlTools.ServiceLayer.SchemaCompare.Contracts
|
||||
/// <summary>
|
||||
/// Parameters for a schema compare generate script request.
|
||||
/// </summary>
|
||||
public class SchemaCompareGenerateScriptParams : SchemaComparePublishChangesParams
|
||||
public class SchemaCompareGenerateScriptParams : SchemaComparePublishDatabaseChangesParams
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
// Copyright (c) Microsoft. All rights reserved.
|
||||
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
||||
//
|
||||
|
||||
using Microsoft.SqlTools.Hosting.Protocol.Contracts;
|
||||
using Microsoft.SqlTools.ServiceLayer.TaskServices;
|
||||
using Microsoft.SqlTools.ServiceLayer.Utility;
|
||||
@@ -9,9 +10,9 @@ using Microsoft.SqlTools.ServiceLayer.Utility;
|
||||
namespace Microsoft.SqlTools.ServiceLayer.SchemaCompare.Contracts
|
||||
{
|
||||
/// <summary>
|
||||
/// Parameters for a schema compare publish changes request.
|
||||
/// Parameters for a schema compare publish database changes request.
|
||||
/// </summary>
|
||||
public class SchemaComparePublishChangesParams
|
||||
public class SchemaComparePublishDatabaseChangesParams
|
||||
{
|
||||
/// <summary>
|
||||
/// Operation id of the schema compare operation
|
||||
@@ -35,11 +36,11 @@ namespace Microsoft.SqlTools.ServiceLayer.SchemaCompare.Contracts
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Defines the Schema Compare publish changes request type
|
||||
/// Defines the Schema Compare publish database changes request type
|
||||
/// </summary>
|
||||
class SchemaComparePublishChangesRequest
|
||||
class SchemaComparePublishDatabaseChangesRequest
|
||||
{
|
||||
public static readonly RequestType<SchemaComparePublishChangesParams, ResultStatus> Type =
|
||||
RequestType<SchemaComparePublishChangesParams, ResultStatus>.Create("schemaCompare/publish");
|
||||
public static readonly RequestType<SchemaComparePublishDatabaseChangesParams, ResultStatus> Type =
|
||||
RequestType<SchemaComparePublishDatabaseChangesParams, ResultStatus>.Create("schemaCompare/publishDatabase");
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,47 @@
|
||||
//
|
||||
// Copyright (c) Microsoft. All rights reserved.
|
||||
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
||||
//
|
||||
|
||||
using Microsoft.SqlServer.Dac;
|
||||
using Microsoft.SqlServer.Dac.Compare;
|
||||
using Microsoft.SqlTools.Hosting.Protocol.Contracts;
|
||||
using Microsoft.SqlTools.ServiceLayer.TaskServices;
|
||||
|
||||
namespace Microsoft.SqlTools.ServiceLayer.SchemaCompare.Contracts
|
||||
{
|
||||
/// <summary>
|
||||
/// Parameters for a schema compare publish project changes request.
|
||||
/// </summary>
|
||||
public class SchemaComparePublishProjectChangesParams
|
||||
{
|
||||
/// <summary>
|
||||
/// Operation id of the schema compare operation
|
||||
/// </summary>
|
||||
public string OperationId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Path of project folder
|
||||
/// </summary>
|
||||
public string TargetProjectPath { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// folder structure of target folder
|
||||
/// </summary>
|
||||
public DacExtractTarget TargetFolderStructure { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Execution mode for the operation. Default is execution
|
||||
/// </summary>
|
||||
public TaskExecutionMode TaskExecutionMode { get; set; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Defines the Schema Compare publish project changes request type
|
||||
/// </summary>
|
||||
class SchemaComparePublishProjectChangesRequest
|
||||
{
|
||||
public static readonly RequestType<SchemaComparePublishProjectChangesParams, SchemaComparePublishProjectResult> Type =
|
||||
RequestType<SchemaComparePublishProjectChangesParams, SchemaComparePublishProjectResult>.Create("schemaCompare/publishProject");
|
||||
}
|
||||
}
|
||||
@@ -12,12 +12,19 @@ using Microsoft.SqlTools.ServiceLayer.Utility;
|
||||
|
||||
namespace Microsoft.SqlTools.ServiceLayer.SchemaCompare.Contracts
|
||||
{
|
||||
/// <summary>
|
||||
/// Types of schema compare endpoints
|
||||
/// </summary>
|
||||
public enum SchemaCompareEndpointType
|
||||
{
|
||||
Database,
|
||||
Project,
|
||||
Dacpac
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Info needed from endpoints for schema comparison
|
||||
/// </summary>
|
||||
public class SchemaCompareEndpointInfo
|
||||
{
|
||||
/// <summary>
|
||||
@@ -25,6 +32,21 @@ namespace Microsoft.SqlTools.ServiceLayer.SchemaCompare.Contracts
|
||||
/// </summary>
|
||||
public SchemaCompareEndpointType EndpointType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the project file path
|
||||
/// </summary>
|
||||
public string ProjectFilePath { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the scripts included in project
|
||||
/// </summary>
|
||||
public string[] TargetScripts { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the project data schema provider
|
||||
/// </summary>
|
||||
public string DataSchemaProvider { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets package filepath
|
||||
/// </summary>
|
||||
|
||||
Reference in New Issue
Block a user