Exclude Object Types Coming from DacFx and tests all working as expected (#20015)

* Include Objects Coming from DacFx and tests all working as expected

* Exclude Object types functionality is working as expected and Unit tests

* more refactor updates

* Updated comments and prop name

* Addressing the coments and code updates accordingly

* Updating according to the comments

* STS vbump

* These changes should be deleted with SC changes, not here

* format fixed
This commit is contained in:
Sai Avishkar Sreerama
2022-08-08 12:04:24 -05:00
committed by GitHub
parent 66115d8f80
commit 2b5d2f0a0b
12 changed files with 193 additions and 26 deletions

View File

@@ -325,13 +325,6 @@ export async function defaultAzureAccountServiceFactory(): Promise<vscodeMssql.I
export async function getDefaultPublishDeploymentOptions(project: ISqlProject): Promise<mssql.DeploymentOptions | vscodeMssql.DeploymentOptions> {
const schemaCompareService = await getSchemaCompareService();
const result = await schemaCompareService.schemaCompareGetDefaultOptions();
// re-include database-scoped credentials
if (getAzdataApi()) {
result.defaultDeploymentOptions.excludeObjectTypes.value = (result.defaultDeploymentOptions as mssql.DeploymentOptions).excludeObjectTypes.value?.filter(x => x !== mssql.SchemaObjectType.DatabaseScopedCredentials);
} else {
result.defaultDeploymentOptions.excludeObjectTypes.value = (result.defaultDeploymentOptions as vscodeMssql.DeploymentOptions).excludeObjectTypes.value?.filter(x => x !== vscodeMssql.SchemaObjectType.DatabaseScopedCredentials);
}
// this option needs to be true for same database references validation to work
if (project.databaseReferences.length > 0) {
result.defaultDeploymentOptions.booleanOptionsDictionary.includeCompositeObjects.value = true;