mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-07 17:23:56 -05:00
Feature/schemacompare options (#5143)
* extension now working * make button messages better * fix diff editor title disappearing and remove border from source and target name boxes * redoing a bunch of stuff that disappeared after rebasing * add images and add to extensions.ts * moving a few changes to the right place after rebase * formatting * Initial schema compare options working code * Adding description.icon etc. * Enabling disabling options button * Name change: SchemaCompareOptions to DeploymentOptions. To reflect SqltoolsService side parameters * Adding sorting and correct sql tools version * Adding options button themes * Formatting fix * Adding get default options call to get options from tools service * Exclude/Include changes - first commit * Adding border to checkboxes * Taking PR comments * Updating to latest sqltools with schema compare options
This commit is contained in:
@@ -439,6 +439,7 @@ export interface SchemaCompareParams {
|
||||
sourceEndpointInfo: azdata.SchemaCompareEndpointInfo;
|
||||
targetEndpointInfo: azdata.SchemaCompareEndpointInfo;
|
||||
taskExecutionMode: TaskExecutionMode;
|
||||
deploymentOptions: azdata.DeploymentOptions;
|
||||
}
|
||||
|
||||
export interface SchemaCompareGenerateScriptParams {
|
||||
@@ -455,6 +456,17 @@ export interface SchemaComparePublishChangesParams {
|
||||
taskExecutionMode: TaskExecutionMode;
|
||||
}
|
||||
|
||||
export interface SchemaCompareGetOptionsParams {
|
||||
|
||||
}
|
||||
|
||||
export interface SchemaCompareNodeParams {
|
||||
operationId: string;
|
||||
diffEntry: azdata.DiffEntry;
|
||||
includeRequest: boolean;
|
||||
taskExecutionMode: TaskExecutionMode;
|
||||
}
|
||||
|
||||
export namespace SchemaCompareRequest {
|
||||
export const type = new RequestType<SchemaCompareParams, azdata.SchemaCompareResult, void, void>('schemaCompare/compare');
|
||||
}
|
||||
@@ -466,4 +478,13 @@ export namespace SchemaCompareGenerateScriptRequest {
|
||||
export namespace SchemaComparePublishChangesRequest {
|
||||
export const type = new RequestType<SchemaComparePublishChangesParams, azdata.ResultStatus, void, void>('schemaCompare/publish');
|
||||
}
|
||||
|
||||
export namespace SchemaCompareGetDefaultOptionsRequest {
|
||||
export const type = new RequestType<SchemaCompareGetOptionsParams, azdata.SchemaCompareOptionsResult, void, void>('schemaCompare/getDefaultOptions');
|
||||
}
|
||||
|
||||
export namespace SchemaCompareIncludeExcludeNodeRequest {
|
||||
export const type = new RequestType<SchemaCompareNodeParams, azdata.ResultStatus, void, void>('schemaCompare/includeExcludeNode');
|
||||
}
|
||||
|
||||
// ------------------------------- <Schema Compare> -----------------------------
|
||||
|
||||
@@ -145,7 +145,9 @@ export class DacFxServicesFeature extends SqlOpsFeature<undefined> {
|
||||
export class SchemaCompareServicesFeature extends SqlOpsFeature<undefined> {
|
||||
private static readonly messageTypes: RPCMessageType[] = [
|
||||
contracts.SchemaCompareRequest.type,
|
||||
contracts.SchemaCompareGenerateScriptRequest.type
|
||||
contracts.SchemaCompareGenerateScriptRequest.type,
|
||||
contracts.SchemaCompareGetDefaultOptionsRequest.type,
|
||||
contracts.SchemaCompareIncludeExcludeNodeRequest.type
|
||||
];
|
||||
|
||||
constructor(client: SqlOpsDataClient) {
|
||||
@@ -165,8 +167,8 @@ export class SchemaCompareServicesFeature extends SqlOpsFeature<undefined> {
|
||||
protected registerProvider(options: undefined): Disposable {
|
||||
const client = this._client;
|
||||
|
||||
let schemaCompare = (sourceEndpointInfo: azdata.SchemaCompareEndpointInfo, targetEndpointInfo: azdata.SchemaCompareEndpointInfo, taskExecutionMode: azdata.TaskExecutionMode): Thenable<azdata.SchemaCompareResult> => {
|
||||
let params: contracts.SchemaCompareParams = { sourceEndpointInfo: sourceEndpointInfo, targetEndpointInfo: targetEndpointInfo, taskExecutionMode: taskExecutionMode };
|
||||
let schemaCompare = (sourceEndpointInfo: azdata.SchemaCompareEndpointInfo, targetEndpointInfo: azdata.SchemaCompareEndpointInfo, taskExecutionMode: azdata.TaskExecutionMode, deploymentOptions: azdata.DeploymentOptions): Thenable<azdata.SchemaCompareResult> => {
|
||||
let params: contracts.SchemaCompareParams = { sourceEndpointInfo: sourceEndpointInfo, targetEndpointInfo: targetEndpointInfo, taskExecutionMode: taskExecutionMode, deploymentOptions: deploymentOptions };
|
||||
return client.sendRequest(contracts.SchemaCompareRequest.type, params).then(
|
||||
r => {
|
||||
return r;
|
||||
@@ -204,11 +206,39 @@ export class SchemaCompareServicesFeature extends SqlOpsFeature<undefined> {
|
||||
);
|
||||
};
|
||||
|
||||
let schemaCompareGetDefaultOptions = (): Thenable<azdata.SchemaCompareOptionsResult> => {
|
||||
let params: contracts.SchemaCompareGetOptionsParams = {};
|
||||
return client.sendRequest(contracts.SchemaCompareGetDefaultOptionsRequest.type, params).then(
|
||||
r => {
|
||||
return r;
|
||||
},
|
||||
e => {
|
||||
client.logFailedRequest(contracts.SchemaCompareGetDefaultOptionsRequest.type, e);
|
||||
return Promise.resolve(undefined);
|
||||
}
|
||||
);
|
||||
};
|
||||
|
||||
let schemaCompareIncludeExcludeNode = (operationId: string, diffEntry: azdata.DiffEntry, includeRequest: boolean, taskExecutionMode: azdata.TaskExecutionMode): Thenable<azdata.DacFxResult> => {
|
||||
let params: contracts.SchemaCompareNodeParams = { operationId: operationId, diffEntry, includeRequest, taskExecutionMode: taskExecutionMode };
|
||||
return client.sendRequest(contracts.SchemaCompareIncludeExcludeNodeRequest.type, params).then(
|
||||
r => {
|
||||
return r;
|
||||
},
|
||||
e => {
|
||||
client.logFailedRequest(contracts.SchemaCompareIncludeExcludeNodeRequest.type, e);
|
||||
return Promise.resolve(undefined);
|
||||
}
|
||||
);
|
||||
};
|
||||
|
||||
return azdata.dataprotocol.registerSchemaCompareServicesProvider({
|
||||
providerId: client.providerId,
|
||||
schemaCompare,
|
||||
schemaCompareGenerateScript,
|
||||
schemaComparePublishChanges
|
||||
schemaComparePublishChanges,
|
||||
schemaCompareGetDefaultOptions,
|
||||
schemaCompareIncludeExcludeNode
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
1714
extensions/schema-compare/src/dialogs/schemaCompareOptionsDialog.ts
Normal file
1714
extensions/schema-compare/src/dialogs/schemaCompareOptionsDialog.ts
Normal file
File diff suppressed because it is too large
Load Diff
3
extensions/schema-compare/src/media/options-inverse.svg
Normal file
3
extensions/schema-compare/src/media/options-inverse.svg
Normal file
@@ -0,0 +1,3 @@
|
||||
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M13.9297 7.71875C13.9297 7.76562 13.9297 7.8125 13.9297 7.85938C13.9349 7.90625 13.9375 7.95312 13.9375 8C13.9375 8.04688 13.9349 8.09375 13.9297 8.14062C13.9297 8.1875 13.9297 8.23438 13.9297 8.28125L15.9531 9.53906L14.7109 12.5312L12.3906 12C12.2656 12.1354 12.1354 12.2656 12 12.3906L12.5312 14.7109L9.53906 15.9531L8.28125 13.9297C8.23438 13.9297 8.1875 13.9323 8.14062 13.9375C8.09375 13.9375 8.04688 13.9375 8 13.9375C7.95312 13.9375 7.90625 13.9375 7.85938 13.9375C7.8125 13.9323 7.76562 13.9297 7.71875 13.9297L6.46094 15.9531L3.46875 14.7109L4 12.3906C3.86458 12.2656 3.73438 12.1354 3.60938 12L1.28906 12.5312L0.046875 9.53906L2.07031 8.28125C2.07031 8.23438 2.06771 8.1875 2.0625 8.14062C2.0625 8.09375 2.0625 8.04688 2.0625 8C2.0625 7.95312 2.0625 7.90625 2.0625 7.85938C2.06771 7.8125 2.07031 7.76562 2.07031 7.71875L0.046875 6.46094L1.28906 3.46875L3.60938 4C3.73438 3.86458 3.86458 3.73438 4 3.60938L3.46875 1.28906L6.46094 0.046875L7.71875 2.07031C7.76562 2.07031 7.8125 2.07031 7.85938 2.07031C7.90625 2.0651 7.95312 2.0625 8 2.0625C8.04688 2.0625 8.09375 2.0651 8.14062 2.07031C8.1875 2.07031 8.23438 2.07031 8.28125 2.07031L9.53906 0.046875L12.5312 1.28906L12 3.60938C12.1354 3.73438 12.2656 3.86458 12.3906 4L14.7109 3.46875L15.9531 6.46094L13.9297 7.71875ZM13.0156 8.73438C13.026 8.60938 13.0365 8.48698 13.0469 8.36719C13.0573 8.24219 13.0625 8.11719 13.0625 7.99219C13.0625 7.8724 13.0573 7.75 13.0469 7.625C13.0365 7.5 13.026 7.3776 13.0156 7.25781L14.8594 6.10938L14.1875 4.48438L12.0703 4.97656C11.9089 4.77865 11.7422 4.59635 11.5703 4.42969C11.4036 4.26302 11.2214 4.09635 11.0234 3.92969L11.5156 1.8125L9.89062 1.14062L8.73438 2.98438C8.61458 2.97396 8.49219 2.96354 8.36719 2.95312C8.24219 2.94271 8.11979 2.9375 8 2.9375C7.875 2.9375 7.75 2.94271 7.625 2.95312C7.50521 2.96354 7.38281 2.97396 7.25781 2.98438L6.10938 1.14062L4.48438 1.8125L4.97656 3.92969C4.77865 4.09115 4.59635 4.25781 4.42969 4.42969C4.26302 4.59635 4.09635 4.77865 3.92969 4.97656L1.8125 4.48438L1.14062 6.10938L2.98438 7.26562C2.97396 7.39062 2.96354 7.51562 2.95312 7.64062C2.94271 7.76042 2.9375 7.88281 2.9375 8.00781C2.9375 8.1276 2.94271 8.25 2.95312 8.375C2.96354 8.5 2.97396 8.6224 2.98438 8.74219L1.14062 9.89062L1.8125 11.5156L3.92969 11.0234C4.09115 11.2214 4.25521 11.4036 4.42188 11.5703C4.59375 11.737 4.77865 11.9036 4.97656 12.0703L4.48438 14.1875L6.10938 14.8594L7.26562 13.0156C7.38542 13.026 7.50781 13.0365 7.63281 13.0469C7.75781 13.0573 7.88021 13.0625 8 13.0625C8.125 13.0625 8.2474 13.0573 8.36719 13.0469C8.49219 13.0365 8.61719 13.026 8.74219 13.0156L9.89062 14.8594L11.5156 14.1875L11.0234 12.0703C11.2214 11.9089 11.4036 11.7448 11.5703 11.5781C11.737 11.4062 11.9036 11.2214 12.0703 11.0234L14.1875 11.5156L14.8594 9.89062L13.0156 8.73438ZM8 5.0625C8.40625 5.0625 8.78646 5.14062 9.14062 5.29688C9.5 5.44792 9.8125 5.65625 10.0781 5.92188C10.3438 6.1875 10.5521 6.5 10.7031 6.85938C10.8594 7.21354 10.9375 7.59375 10.9375 8C10.9375 8.40625 10.8594 8.78906 10.7031 9.14844C10.5521 9.5026 10.3438 9.8125 10.0781 10.0781C9.8125 10.3438 9.5 10.5547 9.14062 10.7109C8.78646 10.862 8.40625 10.9375 8 10.9375C7.59375 10.9375 7.21094 10.862 6.85156 10.7109C6.4974 10.5547 6.1875 10.3438 5.92188 10.0781C5.65625 9.8125 5.44531 9.5026 5.28906 9.14844C5.13802 8.78906 5.0625 8.40625 5.0625 8C5.0625 7.59375 5.13802 7.21354 5.28906 6.85938C5.44531 6.5 5.65625 6.1875 5.92188 5.92188C6.1875 5.65625 6.4974 5.44792 6.85156 5.29688C7.21094 5.14062 7.59375 5.0625 8 5.0625ZM8 10.0625C8.28646 10.0625 8.55469 10.0104 8.80469 9.90625C9.05469 9.79688 9.27344 9.64844 9.46094 9.46094C9.64844 9.27344 9.79427 9.05469 9.89844 8.80469C10.0078 8.55469 10.0625 8.28646 10.0625 8C10.0625 7.71354 10.0078 7.44531 9.89844 7.19531C9.79427 6.94531 9.64844 6.72656 9.46094 6.53906C9.27344 6.35156 9.05469 6.20573 8.80469 6.10156C8.55469 5.99219 8.28646 5.9375 8 5.9375C7.71354 5.9375 7.44531 5.99219 7.19531 6.10156C6.94531 6.20573 6.72656 6.35156 6.53906 6.53906C6.35156 6.72656 6.20312 6.94531 6.09375 7.19531C5.98958 7.44531 5.9375 7.71354 5.9375 8C5.9375 8.28646 5.98958 8.55469 6.09375 8.80469C6.20312 9.05469 6.35156 9.27344 6.53906 9.46094C6.72656 9.64844 6.94531 9.79688 7.19531 9.90625C7.44531 10.0104 7.71354 10.0625 8 10.0625Z" fill="#4894FE"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 4.3 KiB |
3
extensions/schema-compare/src/media/options.svg
Normal file
3
extensions/schema-compare/src/media/options.svg
Normal file
@@ -0,0 +1,3 @@
|
||||
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M13.9297 7.71875C13.9297 7.76562 13.9297 7.8125 13.9297 7.85938C13.9349 7.90625 13.9375 7.95312 13.9375 8C13.9375 8.04688 13.9349 8.09375 13.9297 8.14062C13.9297 8.1875 13.9297 8.23438 13.9297 8.28125L15.9531 9.53906L14.7109 12.5312L12.3906 12C12.2656 12.1354 12.1354 12.2656 12 12.3906L12.5312 14.7109L9.53906 15.9531L8.28125 13.9297C8.23438 13.9297 8.1875 13.9323 8.14062 13.9375C8.09375 13.9375 8.04688 13.9375 8 13.9375C7.95312 13.9375 7.90625 13.9375 7.85938 13.9375C7.8125 13.9323 7.76562 13.9297 7.71875 13.9297L6.46094 15.9531L3.46875 14.7109L4 12.3906C3.86458 12.2656 3.73438 12.1354 3.60938 12L1.28906 12.5312L0.046875 9.53906L2.07031 8.28125C2.07031 8.23438 2.06771 8.1875 2.0625 8.14062C2.0625 8.09375 2.0625 8.04688 2.0625 8C2.0625 7.95312 2.0625 7.90625 2.0625 7.85938C2.06771 7.8125 2.07031 7.76562 2.07031 7.71875L0.046875 6.46094L1.28906 3.46875L3.60938 4C3.73438 3.86458 3.86458 3.73438 4 3.60938L3.46875 1.28906L6.46094 0.046875L7.71875 2.07031C7.76562 2.07031 7.8125 2.07031 7.85938 2.07031C7.90625 2.0651 7.95312 2.0625 8 2.0625C8.04688 2.0625 8.09375 2.0651 8.14062 2.07031C8.1875 2.07031 8.23438 2.07031 8.28125 2.07031L9.53906 0.046875L12.5312 1.28906L12 3.60938C12.1354 3.73438 12.2656 3.86458 12.3906 4L14.7109 3.46875L15.9531 6.46094L13.9297 7.71875ZM13.0156 8.73438C13.026 8.60938 13.0365 8.48698 13.0469 8.36719C13.0573 8.24219 13.0625 8.11719 13.0625 7.99219C13.0625 7.8724 13.0573 7.75 13.0469 7.625C13.0365 7.5 13.026 7.3776 13.0156 7.25781L14.8594 6.10938L14.1875 4.48438L12.0703 4.97656C11.9089 4.77865 11.7422 4.59635 11.5703 4.42969C11.4036 4.26302 11.2214 4.09635 11.0234 3.92969L11.5156 1.8125L9.89062 1.14062L8.73438 2.98438C8.61458 2.97396 8.49219 2.96354 8.36719 2.95312C8.24219 2.94271 8.11979 2.9375 8 2.9375C7.875 2.9375 7.75 2.94271 7.625 2.95312C7.50521 2.96354 7.38281 2.97396 7.25781 2.98438L6.10938 1.14062L4.48438 1.8125L4.97656 3.92969C4.77865 4.09115 4.59635 4.25781 4.42969 4.42969C4.26302 4.59635 4.09635 4.77865 3.92969 4.97656L1.8125 4.48438L1.14062 6.10938L2.98438 7.26562C2.97396 7.39062 2.96354 7.51562 2.95312 7.64062C2.94271 7.76042 2.9375 7.88281 2.9375 8.00781C2.9375 8.1276 2.94271 8.25 2.95312 8.375C2.96354 8.5 2.97396 8.6224 2.98438 8.74219L1.14062 9.89062L1.8125 11.5156L3.92969 11.0234C4.09115 11.2214 4.25521 11.4036 4.42188 11.5703C4.59375 11.737 4.77865 11.9036 4.97656 12.0703L4.48438 14.1875L6.10938 14.8594L7.26562 13.0156C7.38542 13.026 7.50781 13.0365 7.63281 13.0469C7.75781 13.0573 7.88021 13.0625 8 13.0625C8.125 13.0625 8.2474 13.0573 8.36719 13.0469C8.49219 13.0365 8.61719 13.026 8.74219 13.0156L9.89062 14.8594L11.5156 14.1875L11.0234 12.0703C11.2214 11.9089 11.4036 11.7448 11.5703 11.5781C11.737 11.4062 11.9036 11.2214 12.0703 11.0234L14.1875 11.5156L14.8594 9.89062L13.0156 8.73438ZM8 5.0625C8.40625 5.0625 8.78646 5.14062 9.14062 5.29688C9.5 5.44792 9.8125 5.65625 10.0781 5.92188C10.3438 6.1875 10.5521 6.5 10.7031 6.85938C10.8594 7.21354 10.9375 7.59375 10.9375 8C10.9375 8.40625 10.8594 8.78906 10.7031 9.14844C10.5521 9.5026 10.3438 9.8125 10.0781 10.0781C9.8125 10.3438 9.5 10.5547 9.14062 10.7109C8.78646 10.862 8.40625 10.9375 8 10.9375C7.59375 10.9375 7.21094 10.862 6.85156 10.7109C6.4974 10.5547 6.1875 10.3438 5.92188 10.0781C5.65625 9.8125 5.44531 9.5026 5.28906 9.14844C5.13802 8.78906 5.0625 8.40625 5.0625 8C5.0625 7.59375 5.13802 7.21354 5.28906 6.85938C5.44531 6.5 5.65625 6.1875 5.92188 5.92188C6.1875 5.65625 6.4974 5.44792 6.85156 5.29688C7.21094 5.14062 7.59375 5.0625 8 5.0625ZM8 10.0625C8.28646 10.0625 8.55469 10.0104 8.80469 9.90625C9.05469 9.79688 9.27344 9.64844 9.46094 9.46094C9.64844 9.27344 9.79427 9.05469 9.89844 8.80469C10.0078 8.55469 10.0625 8.28646 10.0625 8C10.0625 7.71354 10.0078 7.44531 9.89844 7.19531C9.79427 6.94531 9.64844 6.72656 9.46094 6.53906C9.27344 6.35156 9.05469 6.20573 8.80469 6.10156C8.55469 5.99219 8.28646 5.9375 8 5.9375C7.71354 5.9375 7.44531 5.99219 7.19531 6.10156C6.94531 6.20573 6.72656 6.35156 6.53906 6.53906C6.35156 6.72656 6.20312 6.94531 6.09375 7.19531C5.98958 7.44531 5.9375 7.71354 5.9375 8C5.9375 8.28646 5.98958 8.55469 6.09375 8.80469C6.20312 9.05469 6.35156 9.27344 6.53906 9.46094C6.72656 9.64844 6.94531 9.79688 7.19531 9.90625C7.44531 10.0104 7.71354 10.0625 8 10.0625Z" fill="#015CDA"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 4.3 KiB |
@@ -7,11 +7,17 @@ import * as nls from 'vscode-nls';
|
||||
import * as azdata from 'azdata';
|
||||
import * as vscode from 'vscode';
|
||||
import * as os from 'os';
|
||||
import { SchemaCompareOptionsDialog } from './dialogs/schemaCompareOptionsDialog';
|
||||
import * as path from 'path';
|
||||
const localize = nls.loadMessageBundle();
|
||||
|
||||
export class SchemaCompareResult {
|
||||
private differencesTable: azdata.TableComponent;
|
||||
private diffViewTopPane: azdata.FlexContainer;
|
||||
private includeComponent: azdata.TableComponent;
|
||||
private checkboxList: azdata.FlexContainer;
|
||||
private checkBoxes: azdata.CheckBoxComponent[] = [];
|
||||
private lastCheckBoxes: azdata.CheckBoxComponent[] = [];
|
||||
private loader: azdata.LoadingComponent;
|
||||
private editor: azdata.workspace.ModelViewEditor;
|
||||
private diffEditor: azdata.DiffEditorComponent;
|
||||
@@ -21,12 +27,17 @@ export class SchemaCompareResult {
|
||||
private sourceTargetFlexLayout: azdata.FlexContainer;
|
||||
private switchButton: azdata.ButtonComponent;
|
||||
private compareButton: azdata.ButtonComponent;
|
||||
private optionsButton: azdata.ButtonComponent;
|
||||
private generateScriptButton: azdata.ButtonComponent;
|
||||
private applyButton: azdata.ButtonComponent;
|
||||
private SchemaCompareActionMap: Map<Number, string>;
|
||||
private comparisonResult: azdata.SchemaCompareResult;
|
||||
private lastComparisonResult: azdata.SchemaCompareResult;
|
||||
private sourceNameComponent: azdata.TableComponent;
|
||||
private targetNameComponent: azdata.TableComponent;
|
||||
private deploymentOptions: azdata.DeploymentOptions;
|
||||
private schemaCompareOptionDialog: SchemaCompareOptionsDialog;
|
||||
private viewModel: azdata.ModelView;
|
||||
|
||||
constructor(private sourceName: string, private targetName: string, private sourceEndpointInfo: azdata.SchemaCompareEndpointInfo, private targetEndpointInfo: azdata.SchemaCompareEndpointInfo) {
|
||||
this.SchemaCompareActionMap = new Map<Number, string>();
|
||||
@@ -35,11 +46,30 @@ export class SchemaCompareResult {
|
||||
this.SchemaCompareActionMap[azdata.SchemaUpdateAction.Add] = localize('schemaCompare.addAction', 'Add');
|
||||
|
||||
this.editor = azdata.workspace.createModelViewEditor(localize('schemaCompare.Title', 'Schema Compare'), { retainContextWhenHidden: true, supportsSave: true });
|
||||
this.GetDefaultDeploymentOptions();
|
||||
|
||||
this.editor.registerContent(async view => {
|
||||
|
||||
this.viewModel = view;
|
||||
this.differencesTable = view.modelBuilder.table().withProperties({
|
||||
data: [],
|
||||
height: 300,
|
||||
height: 300
|
||||
}).component();
|
||||
|
||||
this.diffViewTopPane = view.modelBuilder.flexContainer().withLayout({
|
||||
flexFlow: 'row'
|
||||
}).withProperties({
|
||||
alignItems: 'stretch',
|
||||
horizontal: true
|
||||
}).component();
|
||||
|
||||
this.checkboxList = view.modelBuilder.flexContainer().withLayout({
|
||||
flexFlow: 'column'
|
||||
}).component();
|
||||
|
||||
this.includeComponent = view.modelBuilder.table().withProperties({
|
||||
data: [],
|
||||
height: 28,
|
||||
}).component();
|
||||
|
||||
this.diffEditor = view.modelBuilder.diffeditor().withProperties({
|
||||
@@ -67,6 +97,7 @@ export class SchemaCompareResult {
|
||||
this.createCompareButton(view);
|
||||
this.createGenerateScriptButton(view);
|
||||
this.createApplyButton(view);
|
||||
this.createOptionsButton(view);
|
||||
this.resetButtons();
|
||||
|
||||
let toolBar = view.modelBuilder.toolbarContainer();
|
||||
@@ -75,7 +106,9 @@ export class SchemaCompareResult {
|
||||
}, {
|
||||
component: this.generateScriptButton
|
||||
}, {
|
||||
component: this.applyButton,
|
||||
component: this.applyButton
|
||||
}, {
|
||||
component: this.optionsButton,
|
||||
toolbarSeparatorAfter: true
|
||||
}, {
|
||||
component: this.switchButton
|
||||
@@ -144,8 +177,13 @@ export class SchemaCompareResult {
|
||||
}
|
||||
|
||||
private async execute(): Promise<void> {
|
||||
if (this.schemaCompareOptionDialog && this.schemaCompareOptionDialog.deploymentOptions) {
|
||||
// take updates if any
|
||||
this.deploymentOptions = this.schemaCompareOptionDialog.deploymentOptions;
|
||||
}
|
||||
|
||||
let service = await SchemaCompareResult.getService('MSSQL');
|
||||
this.comparisonResult = await service.schemaCompare(this.sourceEndpointInfo, this.targetEndpointInfo, azdata.TaskExecutionMode.execute);
|
||||
this.comparisonResult = await service.schemaCompare(this.sourceEndpointInfo, this.targetEndpointInfo, azdata.TaskExecutionMode.execute, this.deploymentOptions);
|
||||
if (!this.comparisonResult || !this.comparisonResult.success) {
|
||||
vscode.window.showErrorMessage(localize('schemaCompare.compareErrorMessage', "Schema Compare failed: {0}", this.comparisonResult.errorMessage ? this.comparisonResult.errorMessage : 'Unknown'));
|
||||
return;
|
||||
@@ -178,7 +216,24 @@ export class SchemaCompareResult {
|
||||
}]
|
||||
});
|
||||
|
||||
this.splitView.addItem(this.differencesTable);
|
||||
this.includeComponent.updateProperties({
|
||||
data: [],
|
||||
columns: [
|
||||
{
|
||||
value: localize('schemaCompare.Include', 'Include'),
|
||||
cssClass: 'center-align',
|
||||
width: 25
|
||||
}
|
||||
]
|
||||
});
|
||||
|
||||
this.checkboxList.clearItems();
|
||||
this.checkboxList.addItem(this.includeComponent);
|
||||
this.checkBoxes.forEach(box => this.checkboxList.addItem(box, { CSSStyles: { 'height': '24px', 'border-bottom': '1px #BDBDBD solid', 'border-right': '1px #BDBDBD dotted' } }));
|
||||
this.diffViewTopPane.addItem(this.checkboxList, { CSSStyles: { 'margin-left': '10px', 'width': '4%' } });
|
||||
this.diffViewTopPane.addItem(this.differencesTable, { CSSStyles: { 'width': '96%' } });
|
||||
|
||||
this.splitView.addItem(this.diffViewTopPane);
|
||||
this.splitView.addItem(this.diffEditor);
|
||||
this.splitView.setLayout({
|
||||
orientation: 'vertical',
|
||||
@@ -188,6 +243,7 @@ export class SchemaCompareResult {
|
||||
this.flexModel.removeItem(this.loader);
|
||||
this.switchButton.enabled = true;
|
||||
this.compareButton.enabled = true;
|
||||
this.optionsButton.enabled = true;
|
||||
|
||||
if (this.comparisonResult.differences.length > 0) {
|
||||
this.flexModel.addItem(this.splitView);
|
||||
@@ -223,10 +279,34 @@ export class SchemaCompareResult {
|
||||
|
||||
private getAllDifferences(differences: azdata.DiffEntry[]): string[][] {
|
||||
let data = [];
|
||||
this.checkBoxes = [];
|
||||
if (differences) {
|
||||
differences.forEach(difference => {
|
||||
if (difference.differenceType === azdata.SchemaDifferenceType.Object) {
|
||||
if (difference.sourceValue !== null || difference.targetValue !== null) {
|
||||
let checkbox: azdata.CheckBoxComponent = this.viewModel.modelBuilder.checkBox().withProperties({
|
||||
checked: this.populateFromState(difference)
|
||||
}).component();
|
||||
|
||||
checkbox.onChanged(async () => {
|
||||
if (checkbox.checked) {
|
||||
let service = await SchemaCompareResult.getService('MSSQL');
|
||||
let result = await service.schemaCompareIncludeExcludeNode(this.comparisonResult.operationId, difference, true, azdata.TaskExecutionMode.execute);
|
||||
if (!result || !result.success) {
|
||||
vscode.window.showErrorMessage(
|
||||
localize('schemaCompare.includeNodeErrorMessage', "Include Node failed. Reason: '{0}'", (result && result.errorMessage) ? result.errorMessage : 'Unknown'));
|
||||
}
|
||||
}
|
||||
else {
|
||||
let service = await SchemaCompareResult.getService('MSSQL');
|
||||
let result = await service.schemaCompareIncludeExcludeNode(this.comparisonResult.operationId, difference, false, azdata.TaskExecutionMode.execute);
|
||||
if (!result || !result.success) {
|
||||
vscode.window.showErrorMessage(
|
||||
localize('schemaCompare.excludeNodeErrorMessage', "Exclude Node failed. Reason: '{0}'", (result && result.errorMessage) ? result.errorMessage : 'Unknown'));
|
||||
}
|
||||
}
|
||||
});
|
||||
this.checkBoxes.push(checkbox);
|
||||
data.push([difference.name, difference.sourceValue, this.SchemaCompareActionMap[difference.updateAction], difference.targetValue]);
|
||||
}
|
||||
}
|
||||
@@ -250,6 +330,18 @@ export class SchemaCompareResult {
|
||||
return script;
|
||||
}
|
||||
|
||||
private populateFromState(diffEntry: azdata.DiffEntry): boolean {
|
||||
if (!this.lastComparisonResult || !this.lastCheckBoxes) {
|
||||
return true;
|
||||
}
|
||||
let lastIndex = this.lastComparisonResult.differences.findIndex(x => x.sourceValue === diffEntry.sourceValue && x.targetValue === diffEntry.targetValue && x.name === diffEntry.name);
|
||||
if (lastIndex === -1 || lastIndex >= this.lastCheckBoxes.length) {
|
||||
// couldnt find the change or the check box corresponsing to it
|
||||
return true;
|
||||
}
|
||||
return this.lastCheckBoxes[lastIndex].checked;
|
||||
}
|
||||
|
||||
private reExecute(): void {
|
||||
this.flexModel.removeItem(this.splitView);
|
||||
this.flexModel.removeItem(this.noDifferencesLabel);
|
||||
@@ -260,6 +352,10 @@ export class SchemaCompareResult {
|
||||
});
|
||||
this.differencesTable.selectedRows = null;
|
||||
this.resetButtons();
|
||||
|
||||
this.lastCheckBoxes = this.checkBoxes;
|
||||
this.lastComparisonResult = this.comparisonResult; //To populate state related UX
|
||||
|
||||
this.execute();
|
||||
}
|
||||
|
||||
@@ -316,6 +412,27 @@ export class SchemaCompareResult {
|
||||
});
|
||||
}
|
||||
|
||||
private createOptionsButton(view: azdata.ModelView) {
|
||||
this.optionsButton = view.modelBuilder.button().withProperties({
|
||||
label: localize('schemaCompare.optionsButton', 'Options'),
|
||||
iconPath: {
|
||||
light: path.join(__dirname, 'media', 'options.svg'),
|
||||
dark: path.join(__dirname, 'media', 'options_reverse.svg')
|
||||
},
|
||||
title: localize('schemaCompare.optionsButtonTitle', 'Options')
|
||||
}).component();
|
||||
|
||||
this.optionsButton.onDidClick(async (click) => {
|
||||
//restore options from last time
|
||||
if (this.schemaCompareOptionDialog && this.schemaCompareOptionDialog.deploymentOptions) {
|
||||
this.deploymentOptions = this.schemaCompareOptionDialog.deploymentOptions;
|
||||
}
|
||||
// create fresh every time
|
||||
this.schemaCompareOptionDialog = new SchemaCompareOptionsDialog(this.deploymentOptions);
|
||||
await this.schemaCompareOptionDialog.openDialog();
|
||||
});
|
||||
}
|
||||
|
||||
private createApplyButton(view: azdata.ModelView) {
|
||||
|
||||
this.applyButton = view.modelBuilder.button().withProperties({
|
||||
@@ -338,6 +455,7 @@ export class SchemaCompareResult {
|
||||
|
||||
private resetButtons(): void {
|
||||
this.compareButton.enabled = false;
|
||||
this.optionsButton.enabled = false;
|
||||
this.switchButton.enabled = false;
|
||||
this.generateScriptButton.enabled = false;
|
||||
this.applyButton.enabled = false;
|
||||
@@ -390,4 +508,11 @@ export class SchemaCompareResult {
|
||||
let service = azdata.dataprotocol.getProvider<azdata.SchemaCompareServicesProvider>(providerName, azdata.DataProviderType.SchemaCompareServicesProvider);
|
||||
return service;
|
||||
}
|
||||
|
||||
private async GetDefaultDeploymentOptions(): Promise<void> {
|
||||
// Same as dacfx default options
|
||||
let service = await SchemaCompareResult.getService('MSSQL');
|
||||
let result = await service.schemaCompareGetDefaultOptions();
|
||||
this.deploymentOptions = result.defaultDeploymentOptions;
|
||||
}
|
||||
}
|
||||
158
src/sql/azdata.proposed.d.ts
vendored
158
src/sql/azdata.proposed.d.ts
vendored
@@ -1742,10 +1742,166 @@ declare module 'azdata' {
|
||||
ownerUri: string;
|
||||
}
|
||||
|
||||
export interface SchemaCompareOptionsResult extends ResultStatus {
|
||||
defaultDeploymentOptions: DeploymentOptions;
|
||||
}
|
||||
|
||||
export interface DeploymentOptions {
|
||||
ignoreTableOptions: boolean;
|
||||
ignoreSemicolonBetweenStatements: boolean;
|
||||
ignoreRouteLifetime: boolean;
|
||||
ignoreRoleMembership: boolean;
|
||||
ignoreQuotedIdentifiers: boolean;
|
||||
ignorePermissions: boolean;
|
||||
ignorePartitionSchemes: boolean;
|
||||
ignoreObjectPlacementOnPartitionScheme: boolean;
|
||||
ignoreNotForReplication: boolean;
|
||||
ignoreLoginSids: boolean;
|
||||
ignoreLockHintsOnIndexes: boolean;
|
||||
ignoreKeywordCasing: boolean;
|
||||
ignoreIndexPadding: boolean;
|
||||
ignoreIndexOptions: boolean;
|
||||
ignoreIncrement: boolean;
|
||||
ignoreIdentitySeed: boolean;
|
||||
ignoreUserSettingsObjects: boolean;
|
||||
ignoreFullTextCatalogFilePath: boolean;
|
||||
ignoreWhitespace: boolean;
|
||||
ignoreWithNocheckOnForeignKeys: boolean;
|
||||
verifyCollationCompatibility: boolean;
|
||||
unmodifiableObjectWarnings: boolean;
|
||||
treatVerificationErrorsAsWarnings: boolean;
|
||||
scriptRefreshModule: boolean;
|
||||
scriptNewConstraintValidation: boolean;
|
||||
scriptFileSize: boolean;
|
||||
scriptDeployStateChecks: boolean;
|
||||
scriptDatabaseOptions: boolean;
|
||||
scriptDatabaseCompatibility: boolean;
|
||||
scriptDatabaseCollation: boolean;
|
||||
runDeploymentPlanExecutors: boolean;
|
||||
registerDataTierApplication: boolean;
|
||||
populateFilesOnFileGroups: boolean;
|
||||
noAlterStatementsToChangeClrTypes: boolean;
|
||||
includeTransactionalScripts: boolean;
|
||||
includeCompositeObjects: boolean;
|
||||
allowUnsafeRowLevelSecurityDataMovement: boolean;
|
||||
ignoreWithNocheckOnCheckConstraints: boolean;
|
||||
ignoreFillFactor: boolean;
|
||||
ignoreFileSize: boolean;
|
||||
ignoreFilegroupPlacement: boolean;
|
||||
doNotAlterReplicatedObjects: boolean;
|
||||
doNotAlterChangeDataCaptureObjects: boolean;
|
||||
disableAndReenableDdlTriggers: boolean;
|
||||
deployDatabaseInSingleUserMode: boolean;
|
||||
createNewDatabase: boolean;
|
||||
compareUsingTargetCollation: boolean;
|
||||
commentOutSetVarDeclarations: boolean;
|
||||
blockWhenDriftDetected: boolean;
|
||||
blockOnPossibleDataLoss: boolean;
|
||||
backupDatabaseBeforeChanges: boolean;
|
||||
allowIncompatiblePlatform: boolean;
|
||||
allowDropBlockingAssemblies: boolean;
|
||||
dropConstraintsNotInSource: boolean;
|
||||
dropDmlTriggersNotInSource: boolean;
|
||||
dropExtendedPropertiesNotInSource: boolean;
|
||||
dropIndexesNotInSource: boolean;
|
||||
ignoreFileAndLogFilePath: boolean;
|
||||
ignoreExtendedProperties: boolean;
|
||||
ignoreDmlTriggerState: boolean;
|
||||
ignoreDmlTriggerOrder: boolean;
|
||||
ignoreDefaultSchema: boolean;
|
||||
ignoreDdlTriggerState: boolean;
|
||||
ignoreDdlTriggerOrder: boolean;
|
||||
ignoreCryptographicProviderFilePath: boolean;
|
||||
verifyDeployment: boolean;
|
||||
ignoreComments: boolean;
|
||||
ignoreColumnCollation: boolean;
|
||||
ignoreAuthorizer: boolean;
|
||||
ignoreAnsiNulls: boolean;
|
||||
generateSmartDefaults: boolean;
|
||||
dropStatisticsNotInSource: boolean;
|
||||
dropRoleMembersNotInSource: boolean;
|
||||
dropPermissionsNotInSource: boolean;
|
||||
dropObjectsNotInSource: boolean;
|
||||
ignoreColumnOrder: boolean;
|
||||
doNotDropObjectTypes: SchemaObjectType[];
|
||||
excludeObjectTypes: SchemaObjectType[];
|
||||
}
|
||||
|
||||
export enum SchemaObjectType {
|
||||
aggregates = 0,
|
||||
applicationRoles = 1,
|
||||
assemblies = 2,
|
||||
assemblyFiles = 3,
|
||||
asymmetricKeys = 4,
|
||||
brokerPriorities = 5,
|
||||
certificates = 6,
|
||||
columnEncryptionKeys = 7,
|
||||
columnMasterKeys = 8,
|
||||
contracts = 9,
|
||||
databaseOptions = 10,
|
||||
databaseRoles = 11,
|
||||
databaseTriggers = 12,
|
||||
defaults = 13,
|
||||
extendedProperties = 14,
|
||||
externalDataSources = 15,
|
||||
externalFileFormats = 16,
|
||||
externalTables = 17,
|
||||
filegroups = 18,
|
||||
fileTables = 19,
|
||||
fullTextCatalogs = 20,
|
||||
fullTextStoplists = 21,
|
||||
messageTypes = 22,
|
||||
partitionFunctions = 23,
|
||||
partitionSchemes = 24,
|
||||
permissions = 25,
|
||||
queues = 26,
|
||||
remoteServiceBindings = 27,
|
||||
roleMembership = 28,
|
||||
rules = 29,
|
||||
scalarValuedFunctions = 30,
|
||||
searchPropertyLists = 31,
|
||||
securityPolicies = 32,
|
||||
sequences = 33,
|
||||
services = 34,
|
||||
signatures = 35,
|
||||
storedProcedures = 36,
|
||||
symmetricKeys = 37,
|
||||
synonyms = 38,
|
||||
tables = 39,
|
||||
tableValuedFunctions = 40,
|
||||
userDefinedDataTypes = 41,
|
||||
userDefinedTableTypes = 42,
|
||||
clrUserDefinedTypes = 43,
|
||||
users = 44,
|
||||
views = 45,
|
||||
xmlSchemaCollections = 46,
|
||||
audits = 47,
|
||||
credentials = 48,
|
||||
cryptographicProviders = 49,
|
||||
databaseAuditSpecifications = 50,
|
||||
databaseEncryptionKeys = 51,
|
||||
databaseScopedCredentials = 52,
|
||||
endpoints = 53,
|
||||
errorMessages = 54,
|
||||
eventNotifications = 55,
|
||||
eventSessions = 56,
|
||||
linkedServerLogins = 57,
|
||||
linkedServers = 58,
|
||||
logins = 59,
|
||||
masterKeys = 60,
|
||||
routes = 61,
|
||||
serverAuditSpecifications = 62,
|
||||
serverRoleMembership = 63,
|
||||
serverRoles = 64,
|
||||
serverTriggers = 65
|
||||
}
|
||||
|
||||
export interface SchemaCompareServicesProvider extends DataProvider {
|
||||
schemaCompare(sourceEndpointInfo: SchemaCompareEndpointInfo, targetEndpointInfo: SchemaCompareEndpointInfo, taskExecutionMode: TaskExecutionMode): Thenable<SchemaCompareResult>;
|
||||
schemaCompare(sourceEndpointInfo: SchemaCompareEndpointInfo, targetEndpointInfo: SchemaCompareEndpointInfo, taskExecutionMode: TaskExecutionMode, deploymentOptions: DeploymentOptions): Thenable<SchemaCompareResult>;
|
||||
schemaCompareGenerateScript(operationId: string, targetDatabaseName: string, scriptFilePath: string, taskExecutionMode: TaskExecutionMode): Thenable<ResultStatus>;
|
||||
schemaComparePublishChanges(operationId: string, targetServerName: string, targetDatabaseName: string, taskExecutionMode: TaskExecutionMode): Thenable<ResultStatus>;
|
||||
schemaCompareGetDefaultOptions(): Thenable<SchemaCompareOptionsResult>;
|
||||
schemaCompareIncludeExcludeNode(operationId: string, diffEntry: DiffEntry, IncludeRequest: boolean, taskExecutionMode: TaskExecutionMode): Thenable<ResultStatus>;
|
||||
}
|
||||
|
||||
// Security service interfaces ------------------------------------------------------------------------
|
||||
|
||||
@@ -17,9 +17,11 @@ export interface ISchemaCompareService {
|
||||
_serviceBrand: any;
|
||||
|
||||
registerProvider(providerId: string, provider: azdata.SchemaCompareServicesProvider): void;
|
||||
schemaCompare(sourceEndpointInfo: azdata.SchemaCompareEndpointInfo, targetEndpointInfo: azdata.SchemaCompareEndpointInfo, taskExecutionMode: azdata.TaskExecutionMode): void;
|
||||
schemaCompare(sourceEndpointInfo: azdata.SchemaCompareEndpointInfo, targetEndpointInfo: azdata.SchemaCompareEndpointInfo, taskExecutionMode: azdata.TaskExecutionMode, deploymentOptions: azdata.DeploymentOptions): void;
|
||||
schemaCompareGenerateScript(operationId: string, targetDatabaseName: string, scriptFilePath: string, taskExecutionMode: azdata.TaskExecutionMode): void;
|
||||
schemaComparePublishChanges(operationId: string, targetServerName: string, targetDatabaseName: string, taskExecutionMode: azdata.TaskExecutionMode): void;
|
||||
schemaCompareGetDefaultOptions(): void;
|
||||
schemaCompareIncludeExcludeNode(operationId: string, diffEntry: azdata.DiffEntry, includeRequest: boolean, taskExecutionMode: azdata.TaskExecutionMode): void;
|
||||
}
|
||||
|
||||
export class SchemaCompareService implements ISchemaCompareService {
|
||||
@@ -32,9 +34,9 @@ export class SchemaCompareService implements ISchemaCompareService {
|
||||
this._providers[providerId] = provider;
|
||||
}
|
||||
|
||||
schemaCompare(sourceEndpointInfo: azdata.SchemaCompareEndpointInfo, targetEndpointInfo: azdata.SchemaCompareEndpointInfo, taskExecutionMode: azdata.TaskExecutionMode): Thenable<azdata.SchemaCompareResult> {
|
||||
schemaCompare(sourceEndpointInfo: azdata.SchemaCompareEndpointInfo, targetEndpointInfo: azdata.SchemaCompareEndpointInfo, taskExecutionMode: azdata.TaskExecutionMode, deploymentOptions: azdata.DeploymentOptions): Thenable<azdata.SchemaCompareResult> {
|
||||
return this._runAction(sourceEndpointInfo.ownerUri, (runner) => {
|
||||
return runner.schemaCompare(sourceEndpointInfo, targetEndpointInfo, taskExecutionMode);
|
||||
return runner.schemaCompare(sourceEndpointInfo, targetEndpointInfo, taskExecutionMode, deploymentOptions);
|
||||
});
|
||||
}
|
||||
|
||||
@@ -50,6 +52,18 @@ export class SchemaCompareService implements ISchemaCompareService {
|
||||
});
|
||||
}
|
||||
|
||||
schemaCompareGetDefaultOptions(): Thenable<azdata.SchemaCompareOptionsResult> {
|
||||
return this._runAction('', (runner) => {
|
||||
return runner.schemaCompareGetDefaultOptions();
|
||||
});
|
||||
}
|
||||
|
||||
schemaCompareIncludeExcludeNode(operationId: string, diffEntry: azdata.DiffEntry, includeRequest: boolean, taskExecutionMode: azdata.TaskExecutionMode): Thenable<azdata.ResultStatus> {
|
||||
return this._runAction('', (runner) => {
|
||||
return runner.schemaCompareIncludeExcludeNode(operationId, diffEntry, includeRequest, taskExecutionMode);
|
||||
});
|
||||
}
|
||||
|
||||
private _runAction<T>(uri: string, action: (handler: azdata.SchemaCompareServicesProvider) => Thenable<T>): Thenable<T> {
|
||||
let providerId: string = this._connectionService.getProviderIdFromUri(uri);
|
||||
|
||||
|
||||
@@ -563,3 +563,72 @@ export enum SchemaCompareEndpointType {
|
||||
database = 0,
|
||||
dacpac = 1
|
||||
}
|
||||
|
||||
export enum SchemaObjectType {
|
||||
aggregates = 0,
|
||||
applicationRoles = 1,
|
||||
assemblies = 2,
|
||||
assemblyFiles = 3,
|
||||
asymmetricKeys = 4,
|
||||
brokerPriorities = 5,
|
||||
certificates = 6,
|
||||
columnEncryptionKeys = 7,
|
||||
columnMasterKeys = 8,
|
||||
contracts = 9,
|
||||
databaseOptions = 10,
|
||||
databaseRoles = 11,
|
||||
databaseTriggers = 12,
|
||||
defaults = 13,
|
||||
extendedProperties = 14,
|
||||
externalDataSources = 15,
|
||||
externalFileFormats = 16,
|
||||
externalTables = 17,
|
||||
filegroups = 18,
|
||||
fileTables = 19,
|
||||
fullTextCatalogs = 20,
|
||||
fullTextStoplists = 21,
|
||||
messageTypes = 22,
|
||||
partitionFunctions = 23,
|
||||
partitionSchemes = 24,
|
||||
permissions = 25,
|
||||
queues = 26,
|
||||
remoteServiceBindings = 27,
|
||||
roleMembership = 28,
|
||||
rules = 29,
|
||||
scalarValuedFunctions = 30,
|
||||
searchPropertyLists = 31,
|
||||
securityPolicies = 32,
|
||||
sequences = 33,
|
||||
services = 34,
|
||||
signatures = 35,
|
||||
storedProcedures = 36,
|
||||
symmetricKeys = 37,
|
||||
synonyms = 38,
|
||||
tables = 39,
|
||||
tableValuedFunctions = 40,
|
||||
userDefinedDataTypes = 41,
|
||||
userDefinedTableTypes = 42,
|
||||
clrUserDefinedTypes = 43,
|
||||
users = 44,
|
||||
views = 45,
|
||||
xmlSchemaCollections = 46,
|
||||
audits = 47,
|
||||
credentials = 48,
|
||||
cryptographicProviders = 49,
|
||||
databaseAuditSpecifications = 50,
|
||||
databaseEncryptionKeys = 51,
|
||||
databaseScopedCredentials = 52,
|
||||
endpoints = 53,
|
||||
errorMessages = 54,
|
||||
eventNotifications = 55,
|
||||
eventSessions = 56,
|
||||
linkedServerLogins = 57,
|
||||
linkedServers = 58,
|
||||
logins = 59,
|
||||
masterKeys = 60,
|
||||
routes = 61,
|
||||
serverAuditSpecifications = 62,
|
||||
serverRoleMembership = 63,
|
||||
serverRoles = 64,
|
||||
serverTriggers = 65
|
||||
}
|
||||
@@ -457,14 +457,20 @@ export class MainThreadDataProtocol implements MainThreadDataProtocolShape {
|
||||
public $registerSchemaCompareServicesProvider(providerId: string, handle: number): Promise<any> {
|
||||
const self = this;
|
||||
this._schemaCompareService.registerProvider(providerId, <azdata.SchemaCompareServicesProvider>{
|
||||
schemaCompare(sourceEndpointInfo: azdata.SchemaCompareEndpointInfo, targetEndpointInfo: azdata.SchemaCompareEndpointInfo, taskExecutionMode: azdata.TaskExecutionMode): Thenable<azdata.SchemaCompareResult> {
|
||||
return self._proxy.$schemaCompare(handle, sourceEndpointInfo, targetEndpointInfo, taskExecutionMode);
|
||||
schemaCompare(sourceEndpointInfo: azdata.SchemaCompareEndpointInfo, targetEndpointInfo: azdata.SchemaCompareEndpointInfo, taskExecutionMode: azdata.TaskExecutionMode, schemaComapareOptions: azdata.DeploymentOptions): Thenable<azdata.SchemaCompareResult> {
|
||||
return self._proxy.$schemaCompare(handle, sourceEndpointInfo, targetEndpointInfo, taskExecutionMode, schemaComapareOptions);
|
||||
},
|
||||
schemaCompareGenerateScript(operationId: string, targetDatabaseName: string, scriptFilePath: string, taskExecutionMode: azdata.TaskExecutionMode): Thenable<azdata.ResultStatus> {
|
||||
return self._proxy.$schemaCompareGenerateScript(handle, operationId, targetDatabaseName, scriptFilePath, taskExecutionMode);
|
||||
},
|
||||
schemaComparePublishChanges(operationId: string, targetServerName: string, targetDatabaseName: string, taskExecutionMode: azdata.TaskExecutionMode): Thenable<azdata.ResultStatus> {
|
||||
return self._proxy.$schemaComparePublishChanges(handle, operationId, targetServerName, targetDatabaseName, taskExecutionMode);
|
||||
},
|
||||
schemaCompareGetDefaultOptions(): Thenable<azdata.SchemaCompareOptionsResult> {
|
||||
return self._proxy.$schemaCompareGetDefaultOptions(handle);
|
||||
},
|
||||
schemaCompareIncludeExcludeNode(operationId: string, diffEntry: azdata.DiffEntry, includeRequest: boolean, taskExecutionMode: azdata.TaskExecutionMode): Thenable<azdata.ResultStatus> {
|
||||
return self._proxy.$schemaCompareIncludeExcludeNode(handle, operationId, diffEntry, includeRequest, taskExecutionMode);
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
@@ -536,7 +536,8 @@ export function createApiFactory(
|
||||
extensions: extensions,
|
||||
SchemaUpdateAction: sqlExtHostTypes.SchemaUpdateAction,
|
||||
SchemaDifferenceType: sqlExtHostTypes.SchemaDifferenceType,
|
||||
SchemaCompareEndpointType: sqlExtHostTypes.SchemaCompareEndpointType
|
||||
SchemaCompareEndpointType: sqlExtHostTypes.SchemaCompareEndpointType,
|
||||
SchemaObjectType: sqlExtHostTypes.SchemaObjectType
|
||||
};
|
||||
},
|
||||
|
||||
|
||||
@@ -457,7 +457,7 @@ export abstract class ExtHostDataProtocolShape {
|
||||
/**
|
||||
* Schema compare
|
||||
*/
|
||||
$schemaCompare(handle: number, sourceEndpointInfo: azdata.SchemaCompareEndpointInfo, targetEndpointInfo: azdata.SchemaCompareEndpointInfo, taskExecutionMode: azdata.TaskExecutionMode): Thenable<azdata.SchemaCompareResult> { throw ni(); }
|
||||
$schemaCompare(handle: number, sourceEndpointInfo: azdata.SchemaCompareEndpointInfo, targetEndpointInfo: azdata.SchemaCompareEndpointInfo, taskExecutionMode: azdata.TaskExecutionMode, schemaComapareOptions: azdata.DeploymentOptions): Thenable<azdata.SchemaCompareResult> { throw ni(); }
|
||||
|
||||
/**
|
||||
* Schema compare generate script
|
||||
@@ -468,6 +468,17 @@ export abstract class ExtHostDataProtocolShape {
|
||||
* Schema compare publish changes
|
||||
*/
|
||||
$schemaComparePublishChanges(handle: number, operationId: string, targetServerName: string, targetDatabaseName: string, taskExecutionMode: azdata.TaskExecutionMode): Thenable<azdata.SchemaCompareResult> { throw ni(); }
|
||||
|
||||
/**
|
||||
* Schema compare get default options
|
||||
*/
|
||||
$schemaCompareGetDefaultOptions(handle: number): Thenable<azdata.SchemaCompareOptionsResult> { throw ni(); }
|
||||
|
||||
|
||||
/**
|
||||
* Schema comapre Include node
|
||||
*/
|
||||
$schemaCompareIncludeExcludeNode(handle: number, operationId: string, diffEntry: azdata.DiffEntry, includeRequest: boolean, taskExecutionMode: azdata.TaskExecutionMode): Thenable<azdata.ResultStatus> { throw ni(); }
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user