mirror of
https://github.com/ckaczor/sqltoolsservice.git
synced 2026-02-16 10:58:30 -05:00
Add Schema Compare support for AAD (#853)
* pass AzureAcountToken if there is one * Addressing comments * formatting * more formatting and moving getting connectionstring from constructor to CreateSchemaCompareEndpoint()
This commit is contained in:
@@ -32,17 +32,17 @@ namespace Microsoft.SqlTools.ServiceLayer.SchemaCompare
|
||||
|
||||
public SchemaCompareSaveScmpParams Parameters { get; set; }
|
||||
|
||||
public string SourceConnectionString { get; set; }
|
||||
public ConnectionInfo SourceConnectionInfo { get; set; }
|
||||
|
||||
public string TargetConnectionString { get; set; }
|
||||
public ConnectionInfo TargetConnectionInfo { get; set; }
|
||||
|
||||
public SchemaCompareSaveScmpOperation(SchemaCompareSaveScmpParams parameters, ConnectionInfo sourceConnInfo, ConnectionInfo targetConnInfo)
|
||||
{
|
||||
Validate.IsNotNull("parameters", parameters);
|
||||
Validate.IsNotNull("parameters.ScmpFilePath", parameters.ScmpFilePath);
|
||||
this.Parameters = parameters;
|
||||
this.SourceConnectionString = SchemaCompareUtils.GetConnectionString(sourceConnInfo, parameters.SourceEndpointInfo.DatabaseName);
|
||||
this.TargetConnectionString = SchemaCompareUtils.GetConnectionString(targetConnInfo, parameters.TargetEndpointInfo.DatabaseName);
|
||||
this.SourceConnectionInfo = sourceConnInfo;
|
||||
this.TargetConnectionInfo = targetConnInfo;
|
||||
this.OperationId = Guid.NewGuid().ToString();
|
||||
}
|
||||
|
||||
@@ -55,8 +55,8 @@ namespace Microsoft.SqlTools.ServiceLayer.SchemaCompare
|
||||
|
||||
try
|
||||
{
|
||||
SchemaCompareEndpoint sourceEndpoint = SchemaCompareUtils.CreateSchemaCompareEndpoint(this.Parameters.SourceEndpointInfo, this.SourceConnectionString);
|
||||
SchemaCompareEndpoint targetEndpoint = SchemaCompareUtils.CreateSchemaCompareEndpoint(this.Parameters.TargetEndpointInfo, this.TargetConnectionString);
|
||||
SchemaCompareEndpoint sourceEndpoint = SchemaCompareUtils.CreateSchemaCompareEndpoint(this.Parameters.SourceEndpointInfo, this.SourceConnectionInfo);
|
||||
SchemaCompareEndpoint targetEndpoint = SchemaCompareUtils.CreateSchemaCompareEndpoint(this.Parameters.TargetEndpointInfo, this.TargetConnectionInfo);
|
||||
|
||||
SchemaComparison comparison = new SchemaComparison(sourceEndpoint, targetEndpoint);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user