mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-10 02:02:35 -05:00
Schema Compare open scmp file (#6118)
* can compare scmp with databases * show error if can't connect to db * excludes now work * fixes after rebase and other small fixes * Addressing comments * fixes after rebasing * fix excludes not always being remembered correctly * fix switched check * addressing comments
This commit is contained in:
17
src/sql/azdata.proposed.d.ts
vendored
17
src/sql/azdata.proposed.d.ts
vendored
@@ -1779,6 +1779,7 @@ declare module 'azdata' {
|
||||
serverName: string;
|
||||
databaseName: string;
|
||||
ownerUri: string;
|
||||
connectionDetails: ConnectionInfo;
|
||||
}
|
||||
|
||||
export interface SchemaCompareObjectId {
|
||||
@@ -1940,12 +1941,28 @@ declare module 'azdata' {
|
||||
ServerTriggers = 65
|
||||
}
|
||||
|
||||
export interface SchemaCompareObjectId {
|
||||
nameParts: string[];
|
||||
sqlObjectType: string;
|
||||
}
|
||||
|
||||
export interface SchemaCompareOpenScmpResult extends ResultStatus {
|
||||
sourceEndpointInfo: SchemaCompareEndpointInfo;
|
||||
targetEndpointInfo: SchemaCompareEndpointInfo;
|
||||
originalTargetName: string;
|
||||
originalConnectionString: string;
|
||||
deploymentOptions: DeploymentOptions;
|
||||
excludedSourceElements: SchemaCompareObjectId[];
|
||||
excludedTargetElements: SchemaCompareObjectId[];
|
||||
}
|
||||
|
||||
export interface SchemaCompareServicesProvider extends DataProvider {
|
||||
schemaCompare(operationId: string, sourceEndpointInfo: SchemaCompareEndpointInfo, targetEndpointInfo: SchemaCompareEndpointInfo, taskExecutionMode: TaskExecutionMode, deploymentOptions: DeploymentOptions): Thenable<SchemaCompareResult>;
|
||||
schemaCompareGenerateScript(operationId: string, targetServerName: string, targetDatabaseName: 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>;
|
||||
schemaCompareOpenScmp(filePath: string): Thenable<SchemaCompareOpenScmpResult>;
|
||||
schemaCompareSaveScmp(sourceEndpointInfo: SchemaCompareEndpointInfo, targetEndpointInfo: SchemaCompareEndpointInfo, taskExecutionMode: TaskExecutionMode, deploymentOptions: DeploymentOptions, scmpFilePath: string, excludedSourceObjects: SchemaCompareObjectId[], excludedTargetObjects: SchemaCompareObjectId[]): Thenable<ResultStatus>;
|
||||
schemaCompareCancel(operationId: string): Thenable<ResultStatus>;
|
||||
}
|
||||
|
||||
@@ -20,6 +20,7 @@ export interface ISchemaCompareService {
|
||||
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;
|
||||
schemaCompareOpenScmp(filePath: string): void;
|
||||
schemaCompareSaveScmp(sourceEndpointInfo: azdata.SchemaCompareEndpointInfo, targetEndpointInfo: azdata.SchemaCompareEndpointInfo, taskExecutionMode: azdata.TaskExecutionMode, deploymentOptions: azdata.DeploymentOptions, scmpFilePath: string, excludedSourceObjects: azdata.SchemaCompareObjectId[], excludedTargetObjects: azdata.SchemaCompareObjectId[]);
|
||||
schemaCompareCancel(operationId: string): void;
|
||||
}
|
||||
@@ -64,6 +65,12 @@ export class SchemaCompareService implements ISchemaCompareService {
|
||||
});
|
||||
}
|
||||
|
||||
schemaCompareOpenScmp(filePath: string): Thenable<azdata.SchemaCompareOpenScmpResult> {
|
||||
return this._runAction('', (runner) => {
|
||||
return runner.schemaCompareOpenScmp(filePath);
|
||||
});
|
||||
}
|
||||
|
||||
schemaCompareSaveScmp(sourceEndpointInfo: azdata.SchemaCompareEndpointInfo, targetEndpointInfo: azdata.SchemaCompareEndpointInfo, taskExecutionMode: azdata.TaskExecutionMode, deploymentOptions: azdata.DeploymentOptions, scmpFilePath: string, excludedSourceObjects: azdata.SchemaCompareObjectId[], excludedTargetObjects: azdata.SchemaCompareObjectId[]) {
|
||||
return this._runAction('', (runner) => {
|
||||
return runner.schemaCompareSaveScmp(sourceEndpointInfo, targetEndpointInfo, taskExecutionMode, deploymentOptions, scmpFilePath, excludedSourceObjects, excludedTargetObjects);
|
||||
|
||||
@@ -485,6 +485,9 @@ export class MainThreadDataProtocol implements MainThreadDataProtocolShape {
|
||||
schemaCompareIncludeExcludeNode(operationId: string, diffEntry: azdata.DiffEntry, includeRequest: boolean, taskExecutionMode: azdata.TaskExecutionMode): Thenable<azdata.ResultStatus> {
|
||||
return self._proxy.$schemaCompareIncludeExcludeNode(handle, operationId, diffEntry, includeRequest, taskExecutionMode);
|
||||
},
|
||||
schemaCompareOpenScmp(filePath: string): Thenable<azdata.SchemaCompareOpenScmpResult> {
|
||||
return self._proxy.$schemaCompareOpenScmp(handle, filePath);
|
||||
},
|
||||
schemaCompareSaveScmp(sourceEndpointInfo: azdata.SchemaCompareEndpointInfo, targetEndpointInfo: azdata.SchemaCompareEndpointInfo, taskExecutionMode: azdata.TaskExecutionMode, deploymentOptions: azdata.DeploymentOptions, scmpFilePath: string, excludedSourceObjects: azdata.SchemaCompareObjectId[], excludedTargetObjects: azdata.SchemaCompareObjectId[]): Thenable<azdata.ResultStatus> {
|
||||
return self._proxy.$schemaCompareSaveScmp(handle, sourceEndpointInfo, targetEndpointInfo, taskExecutionMode, deploymentOptions, scmpFilePath, excludedSourceObjects, excludedTargetObjects);
|
||||
},
|
||||
|
||||
@@ -488,6 +488,12 @@ export abstract class ExtHostDataProtocolShape {
|
||||
*/
|
||||
$schemaCompareIncludeExcludeNode(handle: number, operationId: string, diffEntry: azdata.DiffEntry, includeRequest: boolean, taskExecutionMode: azdata.TaskExecutionMode): Thenable<azdata.ResultStatus> { throw ni(); }
|
||||
|
||||
/**
|
||||
* Schema compare open scmp
|
||||
*/
|
||||
$schemaCompareOpenScmp(handle: number, filePath: string): Thenable<azdata.SchemaCompareOpenScmpResult> { throw ni(); }
|
||||
|
||||
|
||||
/**
|
||||
* Schema compare save scmp
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user