mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-16 18:46:40 -05:00
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:
@@ -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;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user