Apply changes from Remote Database to sqlproj - mssql changes (#17655)

* update project from database

* update project from database

* update project from database

* Re-adding schemaComparePublishChanges for temporary backcompat

* Adding comment for keeping enum values in sync

* Correcting enum value

Co-authored-by: Noureldine Yehia <t-nyehia@microsoft.com>
This commit is contained in:
Benjin Dubishar
2021-11-15 15:42:56 -08:00
committed by GitHub
parent d6159a2370
commit b5f8e81250
8 changed files with 163 additions and 19 deletions

View File

@@ -55,11 +55,31 @@ export class SchemaCompareService implements mssql.ISchemaCompareService {
}
public schemaComparePublishChanges(operationId: string, targetServerName: string, targetDatabaseName: string, taskExecutionMode: azdata.TaskExecutionMode): Thenable<azdata.ResultStatus> {
const params: contracts.SchemaComparePublishChangesParams = { operationId: operationId, targetServerName: targetServerName, targetDatabaseName: targetDatabaseName, taskExecutionMode: taskExecutionMode };
return this.client.sendRequest(contracts.SchemaComparePublishChangesRequest.type, params).then(
const params: contracts.SchemaComparePublishDatabaseChangesParams = { operationId: operationId, targetServerName: targetServerName, targetDatabaseName: targetDatabaseName, taskExecutionMode: taskExecutionMode };
return this.client.sendRequest(contracts.SchemaComparePublishChangesRequest.type, params).then(undefined,
e => {
this.client.logFailedRequest(contracts.SchemaComparePublishChangesRequest.type, e); return Promise.resolve(undefined);
}
);
}
public schemaComparePublishDatabaseChanges(operationId: string, targetServerName: string, targetDatabaseName: string, taskExecutionMode: azdata.TaskExecutionMode): Thenable<azdata.ResultStatus> {
const params: contracts.SchemaComparePublishDatabaseChangesParams = { operationId: operationId, targetServerName: targetServerName, targetDatabaseName: targetDatabaseName, taskExecutionMode: taskExecutionMode };
return this.client.sendRequest(contracts.SchemaComparePublishDatabaseChangesRequest.type, params).then(
undefined,
e => {
this.client.logFailedRequest(contracts.SchemaComparePublishChangesRequest.type, e);
this.client.logFailedRequest(contracts.SchemaComparePublishDatabaseChangesRequest.type, e);
return Promise.resolve(undefined);
}
);
}
public schemaComparePublishProjectChanges(operationId: string, targetProjectPath: string, targetFolderStructure: mssql.ExtractTarget, taskExecutionMode: azdata.TaskExecutionMode): Thenable<mssql.SchemaComparePublishProjectResult> {
const params: contracts.SchemaComparePublishProjectChangesParams = { operationId: operationId, targetProjectPath: targetProjectPath, targetFolderStructure: targetFolderStructure, taskExecutionMode: taskExecutionMode };
return this.client.sendRequest(contracts.SchemaComparePublishProjectChangesRequest.type, params).then(
undefined,
(e: any) => {
this.client.logFailedRequest(contracts.SchemaComparePublishProjectChangesRequest.type, e);
return Promise.resolve(undefined);
}
);