Add ability to change source and target to Schema Compare (#6026)

* add ability to change source and target

* addressing comments

* fixes after rebasing

* add check for user

* bump extension version
This commit is contained in:
Kim Santiago
2019-06-19 15:42:46 -07:00
committed by GitHub
parent 453caa92d4
commit 32313c71e4
9 changed files with 307 additions and 140 deletions

View File

@@ -3,6 +3,7 @@
* Licensed under the Source EULA. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
'use strict';
import * as azdata from 'azdata';
export interface IPackageInfo {
name: string;
@@ -31,4 +32,20 @@ export function getTelemetryErrorType(msg: string): string {
else {
return 'Other';
}
}
/**
* Return the appropriate endpoint name depending on if the endpoint is a dacpac or a database
* @param endpoint endpoint to get the name of
*/
export function getEndpointName(endpoint: azdata.SchemaCompareEndpointInfo): string {
if (!endpoint) {
return undefined;
}
if (endpoint.endpointType === azdata.SchemaCompareEndpointType.Database) {
return `${endpoint.serverName}.${endpoint.databaseName}`;
} else {
return endpoint.packageFilePath;
}
}