diff --git a/extensions/dacpac/src/test/testDacFxService.ts b/extensions/dacpac/src/test/testDacFxService.ts index 2f62fcc261..d87383ff12 100644 --- a/extensions/dacpac/src/test/testDacFxService.ts +++ b/extensions/dacpac/src/test/testDacFxService.ts @@ -58,88 +58,105 @@ export class DacFxTestService implements mssql.IDacFxService { return Promise.resolve(deployPlan); } getOptionsFromProfile(profilePath: string): Promise { + const sampleDesc = 'Sample Description text'; + const sampleName = 'Sample Display Name'; const optionsResult: mssql.DacFxOptionsResult = { success: true, errorMessage: '', deploymentOptions: { - ignoreTableOptions: false, - ignoreSemicolonBetweenStatements: false, - ignoreRouteLifetime: false, - ignoreRoleMembership: false, - ignoreQuotedIdentifiers: false, - ignorePermissions: false, - ignorePartitionSchemes: false, - ignoreObjectPlacementOnPartitionScheme: false, - ignoreNotForReplication: false, - ignoreLoginSids: false, - ignoreLockHintsOnIndexes: false, - ignoreKeywordCasing: false, - ignoreIndexPadding: false, - ignoreIndexOptions: false, - ignoreIncrement: false, - ignoreIdentitySeed: false, - ignoreUserSettingsObjects: false, - ignoreFullTextCatalogFilePath: false, - ignoreWhitespace: false, - ignoreWithNocheckOnForeignKeys: false, - verifyCollationCompatibility: false, - unmodifiableObjectWarnings: false, - treatVerificationErrorsAsWarnings: false, - scriptRefreshModule: false, - scriptNewConstraintValidation: false, - scriptFileSize: false, - scriptDeployStateChecks: false, - scriptDatabaseOptions: false, - scriptDatabaseCompatibility: false, - scriptDatabaseCollation: false, - runDeploymentPlanExecutors: false, - registerDataTierApplication: false, - populateFilesOnFileGroups: false, - noAlterStatementsToChangeClrTypes: false, - includeTransactionalScripts: false, - includeCompositeObjects: false, - allowUnsafeRowLevelSecurityDataMovement: false, - ignoreWithNocheckOnCheckConstraints: false, - ignoreFillFactor: false, - ignoreFileSize: false, - ignoreFilegroupPlacement: false, - doNotAlterReplicatedObjects: false, - doNotAlterChangeDataCaptureObjects: false, - disableAndReenableDdlTriggers: false, - deployDatabaseInSingleUserMode: false, - createNewDatabase: false, - compareUsingTargetCollation: false, - commentOutSetVarDeclarations: false, - blockWhenDriftDetected: false, - blockOnPossibleDataLoss: false, - backupDatabaseBeforeChanges: false, - allowIncompatiblePlatform: false, - allowDropBlockingAssemblies: false, - dropConstraintsNotInSource: false, - dropDmlTriggersNotInSource: false, - dropExtendedPropertiesNotInSource: false, - dropIndexesNotInSource: false, - ignoreFileAndLogFilePath: false, - ignoreExtendedProperties: false, - ignoreDmlTriggerState: false, - ignoreDmlTriggerOrder: false, - ignoreDefaultSchema: false, - ignoreDdlTriggerState: false, - ignoreDdlTriggerOrder: false, - ignoreCryptographicProviderFilePath: false, - verifyDeployment: false, - ignoreComments: false, - ignoreColumnCollation: false, - ignoreAuthorizer: false, - ignoreAnsiNulls: false, - generateSmartDefaults: false, - dropStatisticsNotInSource: false, - dropRoleMembersNotInSource: false, - dropPermissionsNotInSource: false, - dropObjectsNotInSource: false, - ignoreColumnOrder: false, - doNotDropObjectTypes: [], - excludeObjectTypes: [] + ignoreTableOptions: { value: false, description: sampleDesc, displayName: sampleName }, + ignoreSemicolonBetweenStatements: { value: false, description: sampleDesc, displayName: sampleName }, + ignoreRouteLifetime: { value: false, description: sampleDesc, displayName: sampleName }, + ignoreRoleMembership: { value: false, description: sampleDesc, displayName: sampleName }, + ignoreQuotedIdentifiers: { value: false, description: sampleDesc, displayName: sampleName }, + ignorePermissions: { value: false, description: sampleDesc, displayName: sampleName }, + ignorePartitionSchemes: { value: false, description: sampleDesc, displayName: sampleName }, + ignoreObjectPlacementOnPartitionScheme: { value: false, description: sampleDesc, displayName: sampleName }, + ignoreNotForReplication: { value: false, description: sampleDesc, displayName: sampleName }, + ignoreLoginSids: { value: false, description: sampleDesc, displayName: sampleName }, + ignoreLockHintsOnIndexes: { value: false, description: sampleDesc, displayName: sampleName }, + ignoreKeywordCasing: { value: false, description: sampleDesc, displayName: sampleName }, + ignoreIndexPadding: { value: false, description: sampleDesc, displayName: sampleName }, + ignoreIndexOptions: { value: false, description: sampleDesc, displayName: sampleName }, + ignoreIncrement: { value: false, description: sampleDesc, displayName: sampleName }, + ignoreIdentitySeed: { value: false, description: sampleDesc, displayName: sampleName }, + ignoreUserSettingsObjects: { value: false, description: sampleDesc, displayName: sampleName }, + ignoreFullTextCatalogFilePath: { value: false, description: sampleDesc, displayName: sampleName }, + ignoreWhitespace: { value: false, description: sampleDesc, displayName: sampleName }, + ignoreWithNocheckOnForeignKeys: { value: false, description: sampleDesc, displayName: sampleName }, + verifyCollationCompatibility: { value: false, description: sampleDesc, displayName: sampleName }, + unmodifiableObjectWarnings: { value: false, description: sampleDesc, displayName: sampleName }, + treatVerificationErrorsAsWarnings: { value: false, description: sampleDesc, displayName: sampleName }, + scriptRefreshModule: { value: false, description: sampleDesc, displayName: sampleName }, + scriptNewConstraintValidation: { value: false, description: sampleDesc, displayName: sampleName }, + scriptFileSize: { value: false, description: sampleDesc, displayName: sampleName }, + scriptDeployStateChecks: { value: false, description: sampleDesc, displayName: sampleName }, + scriptDatabaseOptions: { value: false, description: sampleDesc, displayName: sampleName }, + scriptDatabaseCompatibility: { value: false, description: sampleDesc, displayName: sampleName }, + scriptDatabaseCollation: { value: false, description: sampleDesc, displayName: sampleName }, + runDeploymentPlanExecutors: { value: false, description: sampleDesc, displayName: sampleName }, + registerDataTierApplication: { value: false, description: sampleDesc, displayName: sampleName }, + populateFilesOnFileGroups: { value: false, description: sampleDesc, displayName: sampleName }, + noAlterStatementsToChangeClrTypes: { value: false, description: sampleDesc, displayName: sampleName }, + includeTransactionalScripts: { value: false, description: sampleDesc, displayName: sampleName }, + includeCompositeObjects: { value: false, description: sampleDesc, displayName: sampleName }, + allowUnsafeRowLevelSecurityDataMovement: { value: false, description: sampleDesc, displayName: sampleName }, + ignoreWithNocheckOnCheckConstraints: { value: false, description: sampleDesc, displayName: sampleName }, + ignoreFillFactor: { value: false, description: sampleDesc, displayName: sampleName }, + ignoreFileSize: { value: false, description: sampleDesc, displayName: sampleName }, + ignoreFilegroupPlacement: { value: false, description: sampleDesc, displayName: sampleName }, + doNotAlterReplicatedObjects: { value: false, description: sampleDesc, displayName: sampleName }, + doNotAlterChangeDataCaptureObjects: { value: false, description: sampleDesc, displayName: sampleName }, + disableAndReenableDdlTriggers: { value: false, description: sampleDesc, displayName: sampleName }, + deployDatabaseInSingleUserMode: { value: false, description: sampleDesc, displayName: sampleName }, + createNewDatabase: { value: false, description: sampleDesc, displayName: sampleName }, + compareUsingTargetCollation: { value: false, description: sampleDesc, displayName: sampleName }, + commentOutSetVarDeclarations: { value: false, description: sampleDesc, displayName: sampleName }, + blockWhenDriftDetected: { value: false, description: sampleDesc, displayName: sampleName }, + blockOnPossibleDataLoss: { value: false, description: sampleDesc, displayName: sampleName }, + backupDatabaseBeforeChanges: { value: false, description: sampleDesc, displayName: sampleName }, + allowIncompatiblePlatform: { value: false, description: sampleDesc, displayName: sampleName }, + allowDropBlockingAssemblies: { value: false, description: sampleDesc, displayName: sampleName }, + dropConstraintsNotInSource: { value: false, description: sampleDesc, displayName: sampleName }, + dropDmlTriggersNotInSource: { value: false, description: sampleDesc, displayName: sampleName }, + dropExtendedPropertiesNotInSource: { value: false, description: sampleDesc, displayName: sampleName }, + dropIndexesNotInSource: { value: false, description: sampleDesc, displayName: sampleName }, + ignoreFileAndLogFilePath: { value: false, description: sampleDesc, displayName: sampleName }, + ignoreExtendedProperties: { value: false, description: sampleDesc, displayName: sampleName }, + ignoreDmlTriggerState: { value: false, description: sampleDesc, displayName: sampleName }, + ignoreDmlTriggerOrder: { value: false, description: sampleDesc, displayName: sampleName }, + ignoreDefaultSchema: { value: false, description: sampleDesc, displayName: sampleName }, + ignoreDdlTriggerState: { value: false, description: sampleDesc, displayName: sampleName }, + ignoreDdlTriggerOrder: { value: false, description: sampleDesc, displayName: sampleName }, + ignoreCryptographicProviderFilePath: { value: false, description: sampleDesc, displayName: sampleName }, + verifyDeployment: { value: false, description: sampleDesc, displayName: sampleName }, + ignoreComments: { value: false, description: sampleDesc, displayName: sampleName }, + ignoreColumnCollation: { value: false, description: sampleDesc, displayName: sampleName }, + ignoreAuthorizer: { value: false, description: sampleDesc, displayName: sampleName }, + ignoreAnsiNulls: { value: false, description: sampleDesc, displayName: sampleName }, + generateSmartDefaults: { value: false, description: sampleDesc, displayName: sampleName }, + dropStatisticsNotInSource: { value: false, description: sampleDesc, displayName: sampleName }, + dropRoleMembersNotInSource: { value: false, description: sampleDesc, displayName: sampleName }, + dropPermissionsNotInSource: { value: false, description: sampleDesc, displayName: sampleName }, + dropObjectsNotInSource: { value: false, description: sampleDesc, displayName: sampleName }, + ignoreColumnOrder: { value: false, description: sampleDesc, displayName: sampleName }, + doNotDropObjectTypes: { value: [], description: sampleDesc, displayName: sampleName }, + excludeObjectTypes: { value: [], description: sampleDesc, displayName: sampleName }, + ignoreTablePartitionOptions: { value: false, description: sampleDesc, displayName: sampleName }, + doNotEvaluateSqlCmdVariables: { value: false, description: sampleDesc, displayName: sampleName }, + disableParallelismForEnablingIndexes: { value: false, description: sampleDesc, displayName: sampleName }, + disableIndexesForDataPhase: { value: false, description: sampleDesc, displayName: sampleName }, + restoreSequenceCurrentValue: { value: false, description: sampleDesc, displayName: sampleName }, + rebuildIndexesOfflineForDataPhase: { value: false, description: sampleDesc, displayName: sampleName }, + isAlwaysEncryptedParameterizationEnabled: { value: false, description: sampleDesc, displayName: sampleName }, + preserveIdentityLastValues: { value: false, description: sampleDesc, displayName: sampleName }, + allowExternalLibraryPaths: { value: false, description: sampleDesc, displayName: sampleName }, + allowExternalLanguagePaths: { value: false, description: sampleDesc, displayName: sampleName }, + hashObjectNamesInLogs: { value: false, description: sampleDesc, displayName: sampleName }, + doNotDropWorkloadClassifiers: { value: false, description: sampleDesc, displayName: sampleName }, + ignoreWorkloadClassifiers: { value: false, description: sampleDesc, displayName: sampleName }, + ignoreDatabaseWorkloadGroups: { value: false, description: sampleDesc, displayName: sampleName }, + doNotDropDatabaseWorkloadGroups: { value: false, description: sampleDesc, displayName: sampleName } } }; diff --git a/extensions/integration-tests/src/test/schemaCompare.test.ts b/extensions/integration-tests/src/test/schemaCompare.test.ts index b917fd3c88..465f7f9d51 100644 --- a/extensions/integration-tests/src/test/schemaCompare.test.ts +++ b/extensions/integration-tests/src/test/schemaCompare.test.ts @@ -302,7 +302,7 @@ suite('Schema compare integration test suite @DacFx@', () => { assert(includeResult.affectedDependencies[0].included === true, 'Table t2 should be included as a result of including v1. Actual: false'); // excluding views from the comparison should make it so t2 can be excluded - deploymentOptions.excludeObjectTypes.push(mssql.SchemaObjectType.Views); + deploymentOptions.excludeObjectTypes.value.push(mssql.SchemaObjectType.Views); await schemaCompareService.schemaCompare(operationId, source, target, azdata.TaskExecutionMode.execute, deploymentOptions); const excludeResult3 = await schemaCompareService.schemaCompareIncludeExcludeNode(operationId, t2Difference, false, azdata.TaskExecutionMode.execute); assertIncludeExcludeResult(excludeResult3, true, 0, 0); @@ -507,7 +507,7 @@ suite('Schema compare integration test suite @DacFx@', () => { const deploymentOptionsResult = await schemaCompareService.schemaCompareGetDefaultOptions(); let deploymentOptions = deploymentOptionsResult.defaultDeploymentOptions; - deploymentOptions.excludeObjectTypes.push(mssql.SchemaObjectType.TableValuedFunctions); + deploymentOptions.excludeObjectTypes.value.push(mssql.SchemaObjectType.TableValuedFunctions); const schemaCompareResult = await schemaCompareService.schemaCompare(operationId, source, target, azdata.TaskExecutionMode.execute, deploymentOptions); assertSchemaCompareResult(schemaCompareResult, operationId, 3); diff --git a/extensions/mssql/config.json b/extensions/mssql/config.json index 691955e93e..0d41300403 100644 --- a/extensions/mssql/config.json +++ b/extensions/mssql/config.json @@ -1,6 +1,6 @@ { "downloadUrl": "https://github.com/Microsoft/sqltoolsservice/releases/download/{#version#}/microsoft.sqltools.servicelayer-{#fileName#}", - "version": "4.0.0.1", + "version": "4.0.0.4", "downloadFileNames": { "Windows_86": "win-x86-net6.0.zip", "Windows_64": "win-x64-net6.0.zip", diff --git a/extensions/mssql/src/mssql.d.ts b/extensions/mssql/src/mssql.d.ts index 817c00df1c..5b6b46e05f 100644 --- a/extensions/mssql/src/mssql.d.ts +++ b/extensions/mssql/src/mssql.d.ts @@ -153,85 +153,112 @@ declare module 'mssql' { defaultDeploymentOptions: DeploymentOptions; } + export interface DacDeployOptionPropertyBoolean { + value: boolean; + description: string; + displayName: string; + } + + export interface DacDeployOptionPropertyObject { + value: SchemaObjectType[]; + description: string; + displayName: string; + } + 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[]; + ignoreTableOptions: DacDeployOptionPropertyBoolean; + ignoreSemicolonBetweenStatements: DacDeployOptionPropertyBoolean; + ignoreRouteLifetime: DacDeployOptionPropertyBoolean; + ignoreRoleMembership: DacDeployOptionPropertyBoolean; + ignoreQuotedIdentifiers: DacDeployOptionPropertyBoolean; + ignorePermissions: DacDeployOptionPropertyBoolean; + ignorePartitionSchemes: DacDeployOptionPropertyBoolean; + ignoreObjectPlacementOnPartitionScheme: DacDeployOptionPropertyBoolean; + ignoreNotForReplication: DacDeployOptionPropertyBoolean; + ignoreLoginSids: DacDeployOptionPropertyBoolean; + ignoreLockHintsOnIndexes: DacDeployOptionPropertyBoolean; + ignoreKeywordCasing: DacDeployOptionPropertyBoolean; + ignoreIndexPadding: DacDeployOptionPropertyBoolean; + ignoreIndexOptions: DacDeployOptionPropertyBoolean; + ignoreIncrement: DacDeployOptionPropertyBoolean; + ignoreIdentitySeed: DacDeployOptionPropertyBoolean; + ignoreUserSettingsObjects: DacDeployOptionPropertyBoolean; + ignoreFullTextCatalogFilePath: DacDeployOptionPropertyBoolean; + ignoreWhitespace: DacDeployOptionPropertyBoolean; + ignoreWithNocheckOnForeignKeys: DacDeployOptionPropertyBoolean; + verifyCollationCompatibility: DacDeployOptionPropertyBoolean; + unmodifiableObjectWarnings: DacDeployOptionPropertyBoolean; + treatVerificationErrorsAsWarnings: DacDeployOptionPropertyBoolean; + scriptRefreshModule: DacDeployOptionPropertyBoolean; + scriptNewConstraintValidation: DacDeployOptionPropertyBoolean; + scriptFileSize: DacDeployOptionPropertyBoolean; + scriptDeployStateChecks: DacDeployOptionPropertyBoolean; + scriptDatabaseOptions: DacDeployOptionPropertyBoolean; + scriptDatabaseCompatibility: DacDeployOptionPropertyBoolean; + scriptDatabaseCollation: DacDeployOptionPropertyBoolean; + runDeploymentPlanExecutors: DacDeployOptionPropertyBoolean; + registerDataTierApplication: DacDeployOptionPropertyBoolean; + populateFilesOnFileGroups: DacDeployOptionPropertyBoolean; + noAlterStatementsToChangeClrTypes: DacDeployOptionPropertyBoolean; + includeTransactionalScripts: DacDeployOptionPropertyBoolean; + includeCompositeObjects: DacDeployOptionPropertyBoolean; + allowUnsafeRowLevelSecurityDataMovement: DacDeployOptionPropertyBoolean; + ignoreWithNocheckOnCheckConstraints: DacDeployOptionPropertyBoolean; + ignoreFillFactor: DacDeployOptionPropertyBoolean; + ignoreFileSize: DacDeployOptionPropertyBoolean; + ignoreFilegroupPlacement: DacDeployOptionPropertyBoolean; + doNotAlterReplicatedObjects: DacDeployOptionPropertyBoolean; + doNotAlterChangeDataCaptureObjects: DacDeployOptionPropertyBoolean; + disableAndReenableDdlTriggers: DacDeployOptionPropertyBoolean; + deployDatabaseInSingleUserMode: DacDeployOptionPropertyBoolean; + createNewDatabase: DacDeployOptionPropertyBoolean; + compareUsingTargetCollation: DacDeployOptionPropertyBoolean; + commentOutSetVarDeclarations: DacDeployOptionPropertyBoolean; + blockWhenDriftDetected: DacDeployOptionPropertyBoolean; + blockOnPossibleDataLoss: DacDeployOptionPropertyBoolean; + backupDatabaseBeforeChanges: DacDeployOptionPropertyBoolean; + allowIncompatiblePlatform: DacDeployOptionPropertyBoolean; + allowDropBlockingAssemblies: DacDeployOptionPropertyBoolean; + dropConstraintsNotInSource: DacDeployOptionPropertyBoolean; + dropDmlTriggersNotInSource: DacDeployOptionPropertyBoolean; + dropExtendedPropertiesNotInSource: DacDeployOptionPropertyBoolean; + dropIndexesNotInSource: DacDeployOptionPropertyBoolean; + ignoreFileAndLogFilePath: DacDeployOptionPropertyBoolean; + ignoreExtendedProperties: DacDeployOptionPropertyBoolean; + ignoreDmlTriggerState: DacDeployOptionPropertyBoolean; + ignoreDmlTriggerOrder: DacDeployOptionPropertyBoolean; + ignoreDefaultSchema: DacDeployOptionPropertyBoolean; + ignoreDdlTriggerState: DacDeployOptionPropertyBoolean; + ignoreDdlTriggerOrder: DacDeployOptionPropertyBoolean; + ignoreCryptographicProviderFilePath: DacDeployOptionPropertyBoolean; + verifyDeployment: DacDeployOptionPropertyBoolean; + ignoreComments: DacDeployOptionPropertyBoolean; + ignoreColumnCollation: DacDeployOptionPropertyBoolean; + ignoreAuthorizer: DacDeployOptionPropertyBoolean; + ignoreAnsiNulls: DacDeployOptionPropertyBoolean; + generateSmartDefaults: DacDeployOptionPropertyBoolean; + dropStatisticsNotInSource: DacDeployOptionPropertyBoolean; + dropRoleMembersNotInSource: DacDeployOptionPropertyBoolean; + dropPermissionsNotInSource: DacDeployOptionPropertyBoolean; + dropObjectsNotInSource: DacDeployOptionPropertyBoolean; + ignoreColumnOrder: DacDeployOptionPropertyBoolean; + doNotDropObjectTypes: DacDeployOptionPropertyObject; + excludeObjectTypes: DacDeployOptionPropertyObject; + ignoreTablePartitionOptions: DacDeployOptionPropertyBoolean; + doNotEvaluateSqlCmdVariables: DacDeployOptionPropertyBoolean; + disableParallelismForEnablingIndexes: DacDeployOptionPropertyBoolean; + disableIndexesForDataPhase: DacDeployOptionPropertyBoolean; + restoreSequenceCurrentValue: DacDeployOptionPropertyBoolean; + rebuildIndexesOfflineForDataPhase: DacDeployOptionPropertyBoolean; + isAlwaysEncryptedParameterizationEnabled: DacDeployOptionPropertyBoolean; + preserveIdentityLastValues: DacDeployOptionPropertyBoolean; + allowExternalLibraryPaths: DacDeployOptionPropertyBoolean; + allowExternalLanguagePaths: DacDeployOptionPropertyBoolean; + hashObjectNamesInLogs: DacDeployOptionPropertyBoolean; + doNotDropWorkloadClassifiers: DacDeployOptionPropertyBoolean; + ignoreWorkloadClassifiers: DacDeployOptionPropertyBoolean; + ignoreDatabaseWorkloadGroups: DacDeployOptionPropertyBoolean; + doNotDropDatabaseWorkloadGroups: DacDeployOptionPropertyBoolean; } /** diff --git a/extensions/schema-compare/src/dialogs/schemaCompareOptionsDialog.ts b/extensions/schema-compare/src/dialogs/schemaCompareOptionsDialog.ts index ea1101f495..52179a5b62 100644 --- a/extensions/schema-compare/src/dialogs/schemaCompareOptionsDialog.ts +++ b/extensions/schema-compare/src/dialogs/schemaCompareOptionsDialog.ts @@ -96,6 +96,9 @@ export class SchemaCompareOptionsDialog { this.optionsModel.deploymentOptions = result.defaultDeploymentOptions; this.optionsChanged = true; + // This will update the Map table with default values + this.optionsModel.InitializeUpdateOptionsMapTable(); + await this.updateOptionsTable(); this.optionsFlexBuilder.removeItem(this.optionsTable); this.optionsFlexBuilder.insertItem(this.optionsTable, 0, { CSSStyles: { 'overflow': 'scroll', 'height': '65vh' } }); diff --git a/extensions/schema-compare/src/localizedConstants.ts b/extensions/schema-compare/src/localizedConstants.ts index 5cf83be977..0e2b6e1122 100644 --- a/extensions/schema-compare/src/localizedConstants.ts +++ b/extensions/schema-compare/src/localizedConstants.ts @@ -240,85 +240,6 @@ export const ServerRoleMembership: string = localize('SchemaCompare.ServerRoleMe export const ServerRoles: string = localize('SchemaCompare.ServerRoles', "Server Roles"); export const ServerTriggers: string = localize('SchemaCompare.ServerTriggers', "Server Triggers"); -// options descriptions -export const descriptionIgnoreTableOptions: string = localize('SchemaCompare.Description.IgnoreTableOptions', "Specifies whether differences in the table options will be ignored or updated when you publish to a database."); -export const descriptionIgnoreSemicolonBetweenStatements: string = localize('SchemaCompare.Description.IgnoreSemicolonBetweenStatements', "Specifies whether differences in the semi-colons between T-SQL statements will be ignored or updated when you publish to a database."); -export const descriptionIgnoreRouteLifetime: string = localize('SchemaCompare.Description.IgnoreRouteLifetime', "Specifies whether differences in the amount of time that SQL Server retains the route in the routing table should be ignored or updated when you publish to a database."); -export const descriptionIgnoreRoleMembership: string = localize('SchemaCompare.Description.IgnoreRoleMembership', "Specifies whether differences in the role membership of logins should be ignored or updated when you publish to a database."); -export const descriptionIgnoreQuotedIdentifiers: string = localize('SchemaCompare.Description.IgnoreQuotedIdentifiers', "Specifies whether differences in the quoted identifiers setting should be ignored or updated when you publish to a database."); -export const descriptionIgnorePermissions: string = localize('SchemaCompare.Description.IgnorePermissions', "Specifies whether permissions should be ignored."); -export const descriptionIgnorePartitionSchemes: string = localize('SchemaCompare.Description.IgnorePartitionSchemes', "Specifies whether differences in partition schemes and functions should be ignored or updated when you publish to a database."); -export const descriptionIgnoreObjectPlacementOnPartitionScheme: string = localize('SchemaCompare.Description.IgnoreObjectPlacementOnPartitionScheme', "Specifies whether an object\'s placement on a partition scheme should be ignored or updated when you publish to a database."); -export const descriptionIgnoreNotForReplication: string = localize('SchemaCompare.Description.IgnoreNotForReplication', "Specifies whether the not for replication settings should be ignored or updated when you publish to a database."); -export const descriptionIgnoreLoginSids: string = localize('SchemaCompare.Description.IgnoreLoginSids', "Specifies whether differences in the security identification number (SID) should be ignored or updated when you publish to a database."); -export const descriptionIgnoreLockHintsOnIndexes: string = localize('SchemaCompare.Description.IgnoreLockHintsOnIndexes', "Specifies whether differences in the lock hints on indexes should be ignored or updated when you publish to a database."); -export const descriptionIgnoreKeywordCasing: string = localize('SchemaCompare.Description.IgnoreKeywordCasing', "Specifies whether differences in the casing of keywords should be ignored or updated when you publish to a database."); -export const descriptionIgnoreIndexPadding: string = localize('SchemaCompare.Description.IgnoreIndexPadding', "Specifies whether differences in the index padding should be ignored or updated when you publish to a database."); -export const descriptionIgnoreIndexOptions: string = localize('SchemaCompare.Description.IgnoreIndexOptions', "Specifies whether differences in the index options should be ignored or updated when you publish to a database."); -export const descriptionIgnoreIncrement: string = localize('SchemaCompare.Description.IgnoreIncrement', "Specifies whether differences in the increment for an identity column should be ignored or updated when you publish to a database."); -export const descriptionIgnoreIdentitySeed: string = localize('SchemaCompare.Description.IgnoreIdentitySeed', "Specifies whether differences in the seed for an identity column should be ignored or updated when you publish updates to a database."); -export const descriptionIgnoreUserSettingsObjects: string = localize('SchemaCompare.Description.IgnoreUserSettingsObjects', "Specifies whether differences in the user settings objects will be ignored or updated when you publish to a database."); -export const descriptionIgnoreFullTextCatalogFilePath: string = localize('SchemaCompare.Description.IgnoreFullTextCatalogFilePath', "Specifies whether differences in the file path for the full-text catalog should be ignored or whether a warning should be issued when you publish to a database."); -export const descriptionIgnoreWhitespace: string = localize('SchemaCompare.Description.IgnoreWhitespace', "Specifies whether differences in white space will be ignored or updated when you publish to a database."); -export const descriptionIgnoreWithNocheckOnForeignKeys: string = localize('SchemaCompare.Description.IgnoreWithNocheckOnForeignKeys', "Specifies whether differences in the value of the WITH NOCHECK clause for foreign keys will be ignored or updated when you publish to a database."); -export const descriptionVerifyCollationCompatibility: string = localize('SchemaCompare.Description.VerifyCollationCompatibility', "Specifies whether collation compatibility is verified."); -export const descriptionUnmodifiableObjectWarnings: string = localize('SchemaCompare.Description.UnmodifiableObjectWarnings', "Specifies whether warnings should be generated when differences are found in objects that cannot be modified, for example, if the file size or file paths were different for a file."); -export const descriptionTreatVerificationErrorsAsWarnings: string = localize('SchemaCompare.Description.TreatVerificationErrorsAsWarnings', "Specifies whether errors encountered during publish verification should be treated as warnings. The check is performed against the generated deployment plan before the plan is executed against your target database. Plan verification detects problems such as the loss of target-only objects (such as indexes) that must be dropped to make a change. Verification will also detect situations where dependencies (such as a table or view) exist because of a reference to a composite project, but do not exist in the target database. You might choose to do this to get a complete list of all issues, instead of having the publish action stop on the first error."); -export const descriptionScriptRefreshModule: string = localize('SchemaCompare.Description.ScriptRefreshModule', "Include refresh statements at the end of the publish script."); -export const descriptionScriptNewConstraintValidation: string = localize('SchemaCompare.Description.ScriptNewConstraintValidation', "At the end of publish all of the constraints will be verified as one set, avoiding data errors caused by a check or foreign key constraint in the middle of publish. If set to False, your constraints will be published without checking the corresponding data."); -export const descriptionScriptFileSize: string = localize('SchemaCompare.Description.ScriptFileSize', "Controls whether size is specified when adding a file to a filegroup."); -export const descriptionScriptDeployStateChecks: string = localize('SchemaCompare.Description.ScriptDeployStateChecks', "Specifies whether statements are generated in the publish script to verify that the database name and server name match the names specified in the database project."); -export const descriptionScriptDatabaseOptions: string = localize('SchemaCompare.Description.ScriptDatabaseOptions', "Specifies whether target database properties should be set or updated as part of the publish action."); -export const descriptionScriptDatabaseCompatibility: string = localize('SchemaCompare.Description.ScriptDatabaseCompatibility', "Specifies whether differences in the database compatibility should be ignored or updated when you publish to a database."); -export const descriptionScriptDatabaseCollation: string = localize('SchemaCompare.Description.ScriptDatabaseCollation', "Specifies whether differences in the database collation should be ignored or updated when you publish to a database."); -export const descriptionRunDeploymentPlanExecutors: string = localize('SchemaCompare.Description.RunDeploymentPlanExecutors', "Specifies whether DeploymentPlanExecutor contributors should be run when other operations are executed."); -export const descriptionRegisterDataTierApplication: string = localize('SchemaCompare.Description.RegisterDataTierApplication', "Specifies whether the schema is registered with the database server."); -export const descriptionPopulateFilesOnFileGroups: string = localize('SchemaCompare.Description.PopulateFilesOnFileGroups', "Specifies whether a new file is also created when a new FileGroup is created in the target database."); -export const descriptionNoAlterStatementsToChangeClrTypes: string = localize('SchemaCompare.Description.NoAlterStatementsToChangeClrTypes', "Specifies that publish should always drop and re-create an assembly if there is a difference instead of issuing an ALTER ASSEMBLY statement"); -export const descriptionIncludeTransactionalScripts: string = localize('SchemaCompare.Description.IncludeTransactionalScripts', "Specifies whether transactional statements should be used where possible when you publish to a database."); -export const descriptionIncludeCompositeObjects: string = localize('SchemaCompare.Description.IncludeCompositeObjects', "Include all composite elements as part of a single publish operation."); -export const descriptionAllowUnsafeRowLevelSecurityDataMovement: string = localize('SchemaCompare.Description.AllowUnsafeRowLevelSecurityDataMovement', "Do not block data motion on a table which has Row Level Security if this property is set to true. Default is false."); -export const descriptionIgnoreWithNocheckOnCheckConstraints: string = localize('SchemaCompare.Description.IgnoreWithNocheckOnCheckConstraints', "Specifies whether differences in the value of the WITH NOCHECK clause for check constraints will be ignored or updated when you publish to a database."); -export const descriptionIgnoreFillFactor: string = localize('SchemaCompare.Description.IgnoreFillFactor', "Specifies whether differences in the fill factor for index storage should be ignored or whether a warning should be issued when you publish to a database."); -export const descriptionIgnoreFileSize: string = localize('SchemaCompare.Description.IgnoreFileSize', "Specifies whether differences in the file sizes should be ignored or whether a warning should be issued when you publish to a database."); -export const descriptionIgnoreFilegroupPlacement: string = localize('SchemaCompare.Description.IgnoreFilegroupPlacement', "Specifies whether differences in the placement of objects in FILEGROUPs should be ignored or updated when you publish to a database."); -export const descriptionDoNotAlterReplicatedObjects: string = localize('SchemaCompare.Description.DoNotAlterReplicatedObjects', "Specifies whether objects that are replicated are identified during verification."); -export const descriptionDoNotAlterChangeDataCaptureObjects: string = localize('SchemaCompare.Description.DoNotAlterChangeDataCaptureObjects', "If true, Change Data Capture objects are not altered."); -export const descriptionDisableAndReenableDdlTriggers: string = localize('SchemaCompare.Description.DisableAndReenableDdlTriggers', "Specifies whether Data Definition Language (DDL) triggers are disabled at the beginning of the publish process and re-enabled at the end of the publish action."); -export const descriptionDeployDatabaseInSingleUserMode: string = localize('SchemaCompare.Description.DeployDatabaseInSingleUserMode', "If true, the database is set to Single User Mode before deploying."); -export const descriptionCreateNewDatabase: string = localize('SchemaCompare.Description.CreateNewDatabase', "Specifies whether the target database should be updated or whether it should be dropped and re-created when you publish to a database."); -export const descriptionCompareUsingTargetCollation: string = localize('SchemaCompare.Description.CompareUsingTargetCollation', "This setting dictates how the database\'s collation is handled during deployment; by default the target database\'s collation will be updated if it does not match the collation specified by the source. When this option is set, the target database\'s (or server\'s) collation should be used."); -export const descriptionCommentOutSetVarDeclarations: string = localize('SchemaCompare.Description.CommentOutSetVarDeclarations', "Specifies whether the declaration of SETVAR variables should be commented out in the generated publish script. You might choose to do this if you plan to specify the values on the command line when you publish by using a tool such as SQLCMD.EXE."); -export const descriptionBlockWhenDriftDetected: string = localize('SchemaCompare.Description.BlockWhenDriftDetected', "Specifies whether to block updating a database whose schema no longer matches its registration or is unregistered."); -export const descriptionBlockOnPossibleDataLoss: string = localize('SchemaCompare.Description.BlockOnPossibleDataLoss', "Specifies that the publish episode should be terminated if there is a possibility of data loss resulting from the publish operation."); -export const descriptionBackupDatabaseBeforeChanges: string = localize('SchemaCompare.Description.BackupDatabaseBeforeChanges', "Backups the database before deploying any changes."); -export const descriptionAllowIncompatiblePlatform: string = localize('SchemaCompare.Description.AllowIncompatiblePlatform', "Specifies whether to attempt the action despite incompatible SQL Server platforms."); -export const descriptionAllowDropBlockingAssemblies: string = localize('SchemaCompare.Description.AllowDropBlockingAssemblies', "This property is used by SqlClr deployment to cause any blocking assemblies to be dropped as part of the deployment plan. By default, any blocking/referencing assemblies will block an assembly update if the referencing assembly needs to be dropped."); -export const descriptionDropConstraintsNotInSource: string = localize('SchemaCompare.Description.DropConstraintsNotInSource', "Specifies whether constraints that do not exist in the database snapshot (.dacpac) file will be dropped from the target database when you publish to a database."); -export const descriptionDropDmlTriggersNotInSource: string = localize('SchemaCompare.Description.DropDmlTriggersNotInSource', "Specifies whether DML triggers that do not exist in the database snapshot (.dacpac) file will be dropped from the target database when you publish to a database."); -export const descriptionDropExtendedPropertiesNotInSource: string = localize('SchemaCompare.Description.DropExtendedPropertiesNotInSource', "Specifies whether extended properties that do not exist in the database snapshot (.dacpac) file will be dropped from the target database when you publish to a database."); -export const descriptionDropIndexesNotInSource: string = localize('SchemaCompare.Description.DropIndexesNotInSource', "Specifies whether indexes that do not exist in the database snapshot (.dacpac) file will be dropped from the target database when you publish to a database."); -export const descriptionIgnoreFileAndLogFilePath: string = localize('SchemaCompare.Description.IgnoreFileAndLogFilePath', "Specifies whether differences in the paths for files and log files should be ignored or updated when you publish to a database."); -export const descriptionIgnoreExtendedProperties: string = localize('SchemaCompare.Description.IgnoreExtendedProperties', "Specifies whether extended properties should be ignored."); -export const descriptionIgnoreDmlTriggerState: string = localize('SchemaCompare.Description.IgnoreDmlTriggerState', "Specifies whether differences in the enabled or disabled state of DML triggers should be ignored or updated when you publish to a database."); -export const descriptionIgnoreDmlTriggerOrder: string = localize('SchemaCompare.Description.IgnoreDmlTriggerOrder', "Specifies whether differences in the order of Data Manipulation Language (DML) triggers should be ignored or updated when you publish to a database."); -export const descriptionIgnoreDefaultSchema: string = localize('SchemaCompare.Description.IgnoreDefaultSchema', "Specifies whether differences in the default schema should be ignored or updated when you publish to a database."); -export const descriptionIgnoreDdlTriggerState: string = localize('SchemaCompare.Description.IgnoreDdlTriggerState', "Specifies whether differences in the enabled or disabled state of Data Definition Language (DDL) triggers should be ignored or updated when you publish to a database."); -export const descriptionIgnoreDdlTriggerOrder: string = localize('SchemaCompare.Description.IgnoreDdlTriggerOrder', "Specifies whether differences in the order of Data Definition Language (DDL) triggers should be ignored or updated when you publish to a database or server."); -export const descriptionIgnoreCryptographicProviderFilePath: string = localize('SchemaCompare.Description.IgnoreCryptographicProviderFilePath', "Specifies whether differences in the file path for the cryptographic provider should be ignored or updated when you publish to a database."); -export const descriptionVerifyDeployment: string = localize('SchemaCompare.Description.VerifyDeployment', "Specifies whether checks should be performed before publishing that will stop the publish action if issues are present that might block successful publishing. For example, your publish action might stop if you have foreign keys on the target database that do not exist in the database project, and that will cause errors when you publish."); -export const descriptionIgnoreComments: string = localize('SchemaCompare.Description.IgnoreComments', "Specifies whether differences in the comments should be ignored or updated when you publish to a database."); -export const descriptionIgnoreColumnCollation: string = localize('SchemaCompare.Description.IgnoreColumnCollation', "Specifies whether differences in the column collations should be ignored or updated when you publish to a database."); -export const descriptionIgnoreAuthorizer: string = localize('SchemaCompare.Description.IgnoreAuthorizer', "Specifies whether differences in the Authorizer should be ignored or updated when you publish to a database."); -export const descriptionIgnoreAnsiNulls: string = localize('SchemaCompare.Description.IgnoreAnsiNulls', "Specifies whether differences in the ANSI NULLS setting should be ignored or updated when you publish to a database."); -export const descriptionGenerateSmartDefaults: string = localize('SchemaCompare.Description.GenerateSmartDefaults', "Automatically provides a default value when updating a table that contains data with a column that does not allow null values."); -export const descriptionDropStatisticsNotInSource: string = localize('SchemaCompare.Description.DropStatisticsNotInSource', "Specifies whether statistics that do not exist in the database snapshot (.dacpac) file will be dropped from the target database when you publish to a database."); -export const descriptionDropRoleMembersNotInSource: string = localize('SchemaCompare.Description.DropRoleMembersNotInSource', "Specifies whether role members that are not defined in the database snapshot (.dacpac) file will be dropped from the target database when you publish updates to a database.; public optionsLookup = {}; public objectsLookup = {}; - public optionsLabels: string[] = [ - loc.IgnoreTableOptions, - loc.IgnoreSemicolonBetweenStatements, - loc.IgnoreRouteLifetime, - loc.IgnoreRoleMembership, - loc.IgnoreQuotedIdentifiers, - loc.IgnorePermissions, - loc.IgnorePartitionSchemes, - loc.IgnoreObjectPlacementOnPartitionScheme, - loc.IgnoreNotForReplication, - loc.IgnoreLoginSids, - loc.IgnoreLockHintsOnIndexes, - loc.IgnoreKeywordCasing, - loc.IgnoreIndexPadding, - loc.IgnoreIndexOptions, - loc.IgnoreIncrement, - loc.IgnoreIdentitySeed, - loc.IgnoreUserSettingsObjects, - loc.IgnoreFullTextCatalogFilePath, - loc.IgnoreWhitespace, - loc.IgnoreWithNocheckOnForeignKeys, - loc.VerifyCollationCompatibility, - loc.UnmodifiableObjectWarnings, - loc.TreatVerificationErrorsAsWarnings, - loc.ScriptRefreshModule, - loc.ScriptNewConstraintValidation, - loc.ScriptFileSize, - loc.ScriptDeployStateChecks, - loc.ScriptDatabaseOptions, - loc.ScriptDatabaseCompatibility, - loc.ScriptDatabaseCollation, - loc.RunDeploymentPlanExecutors, - loc.RegisterDataTierApplication, - loc.PopulateFilesOnFileGroups, - loc.NoAlterStatementsToChangeClrTypes, - loc.IncludeTransactionalScripts, - loc.IncludeCompositeObjects, - loc.AllowUnsafeRowLevelSecurityDataMovement, - loc.IgnoreWithNocheckOnCheckConstraints, - loc.IgnoreFillFactor, - loc.IgnoreFileSize, - loc.IgnoreFilegroupPlacement, - loc.DoNotAlterReplicatedObjects, - loc.DoNotAlterChangeDataCaptureObjects, - loc.DisableAndReenableDdlTriggers, - loc.DeployDatabaseInSingleUserMode, - loc.CreateNewDatabase, - loc.CompareUsingTargetCollation, - loc.CommentOutSetVarDeclarations, - loc.BlockWhenDriftDetected, - loc.BlockOnPossibleDataLoss, - loc.BackupDatabaseBeforeChanges, - loc.AllowIncompatiblePlatform, - loc.AllowDropBlockingAssemblies, - loc.DropConstraintsNotInSource, - loc.DropDmlTriggersNotInSource, - loc.DropExtendedPropertiesNotInSource, - loc.DropIndexesNotInSource, - loc.IgnoreFileAndLogFilePath, - loc.IgnoreExtendedProperties, - loc.IgnoreDmlTriggerState, - loc.IgnoreDmlTriggerOrder, - loc.IgnoreDefaultSchema, - loc.IgnoreDdlTriggerState, - loc.IgnoreDdlTriggerOrder, - loc.IgnoreCryptographicProviderFilePath, - loc.VerifyDeployment, - loc.IgnoreComments, - loc.IgnoreColumnCollation, - loc.IgnoreAuthorizer, - loc.IgnoreAnsiNulls, - loc.GenerateSmartDefaults, - loc.DropStatisticsNotInSource, - loc.DropRoleMembersNotInSource, - loc.DropPermissionsNotInSource, - loc.DropObjectsNotInSource, - loc.IgnoreColumnOrder, - ].sort(); + //#region Schema Compare Deployment Options + /* + * Initialize the options mapping table + * This will map the key:Option_DisplayName to the value:DacFx_OptionsValue + */ + public InitializeUpdateOptionsMapTable() { + this.optionsMapTable = new Map(); + this.optionsMapTable.set(this.deploymentOptions?.ignoreTableOptions.displayName, this.deploymentOptions.ignoreTableOptions); + this.optionsMapTable.set(this.deploymentOptions.ignoreSemicolonBetweenStatements.displayName, this.deploymentOptions.ignoreSemicolonBetweenStatements); + this.optionsMapTable.set(this.deploymentOptions.ignoreRouteLifetime.displayName, this.deploymentOptions.ignoreRouteLifetime); + this.optionsMapTable.set(this.deploymentOptions.ignoreRoleMembership.displayName, this.deploymentOptions.ignoreRoleMembership); + this.optionsMapTable.set(this.deploymentOptions.ignoreQuotedIdentifiers.displayName, this.deploymentOptions.ignoreQuotedIdentifiers); + this.optionsMapTable.set(this.deploymentOptions.ignorePermissions.displayName, this.deploymentOptions.ignorePermissions); + this.optionsMapTable.set(this.deploymentOptions.ignorePartitionSchemes.displayName, this.deploymentOptions.ignorePartitionSchemes); + this.optionsMapTable.set(this.deploymentOptions.ignoreObjectPlacementOnPartitionScheme.displayName, this.deploymentOptions.ignoreObjectPlacementOnPartitionScheme); + this.optionsMapTable.set(this.deploymentOptions.ignoreNotForReplication.displayName, this.deploymentOptions.ignoreNotForReplication); + this.optionsMapTable.set(this.deploymentOptions.ignoreLoginSids.displayName, this.deploymentOptions.ignoreLoginSids); + this.optionsMapTable.set(this.deploymentOptions.ignoreLockHintsOnIndexes.displayName, this.deploymentOptions.ignoreLockHintsOnIndexes); + this.optionsMapTable.set(this.deploymentOptions.ignoreKeywordCasing.displayName, this.deploymentOptions.ignoreKeywordCasing); + this.optionsMapTable.set(this.deploymentOptions.ignoreIndexPadding.displayName, this.deploymentOptions.ignoreIndexPadding); + this.optionsMapTable.set(this.deploymentOptions.ignoreIndexOptions.displayName, this.deploymentOptions.ignoreIndexOptions); + this.optionsMapTable.set(this.deploymentOptions.ignoreIncrement.displayName, this.deploymentOptions.ignoreIncrement); + this.optionsMapTable.set(this.deploymentOptions.ignoreIdentitySeed.displayName, this.deploymentOptions.ignoreIdentitySeed); + this.optionsMapTable.set(this.deploymentOptions.ignoreUserSettingsObjects.displayName, this.deploymentOptions.ignoreUserSettingsObjects); + this.optionsMapTable.set(this.deploymentOptions.ignoreFullTextCatalogFilePath.displayName, this.deploymentOptions.ignoreFullTextCatalogFilePath); + this.optionsMapTable.set(this.deploymentOptions.ignoreWhitespace.displayName, this.deploymentOptions.ignoreWhitespace); + this.optionsMapTable.set(this.deploymentOptions.ignoreWithNocheckOnForeignKeys.displayName, this.deploymentOptions.ignoreWithNocheckOnForeignKeys); + this.optionsMapTable.set(this.deploymentOptions.verifyCollationCompatibility.displayName, this.deploymentOptions.verifyCollationCompatibility); + this.optionsMapTable.set(this.deploymentOptions.unmodifiableObjectWarnings.displayName, this.deploymentOptions.unmodifiableObjectWarnings); + this.optionsMapTable.set(this.deploymentOptions.treatVerificationErrorsAsWarnings.displayName, this.deploymentOptions.treatVerificationErrorsAsWarnings); + this.optionsMapTable.set(this.deploymentOptions.scriptRefreshModule.displayName, this.deploymentOptions.scriptRefreshModule); + this.optionsMapTable.set(this.deploymentOptions.scriptNewConstraintValidation.displayName, this.deploymentOptions.scriptNewConstraintValidation); + this.optionsMapTable.set(this.deploymentOptions.scriptFileSize.displayName, this.deploymentOptions.scriptFileSize); + this.optionsMapTable.set(this.deploymentOptions.scriptDeployStateChecks.displayName, this.deploymentOptions.scriptDeployStateChecks); + this.optionsMapTable.set(this.deploymentOptions.scriptDatabaseOptions.displayName, this.deploymentOptions.scriptDatabaseOptions); + this.optionsMapTable.set(this.deploymentOptions.scriptDatabaseCompatibility.displayName, this.deploymentOptions.scriptDatabaseCompatibility); + this.optionsMapTable.set(this.deploymentOptions.scriptDatabaseCollation.displayName, this.deploymentOptions.scriptDatabaseCollation); + this.optionsMapTable.set(this.deploymentOptions.runDeploymentPlanExecutors.displayName, this.deploymentOptions.runDeploymentPlanExecutors); + this.optionsMapTable.set(this.deploymentOptions.registerDataTierApplication.displayName, this.deploymentOptions.registerDataTierApplication); + this.optionsMapTable.set(this.deploymentOptions.populateFilesOnFileGroups.displayName, this.deploymentOptions.populateFilesOnFileGroups); + this.optionsMapTable.set(this.deploymentOptions.noAlterStatementsToChangeClrTypes.displayName, this.deploymentOptions.noAlterStatementsToChangeClrTypes); + this.optionsMapTable.set(this.deploymentOptions.includeTransactionalScripts.displayName, this.deploymentOptions.includeTransactionalScripts); + this.optionsMapTable.set(this.deploymentOptions.includeCompositeObjects.displayName, this.deploymentOptions.includeCompositeObjects); + this.optionsMapTable.set(this.deploymentOptions.allowUnsafeRowLevelSecurityDataMovement.displayName, this.deploymentOptions.allowUnsafeRowLevelSecurityDataMovement); + this.optionsMapTable.set(this.deploymentOptions.ignoreWithNocheckOnCheckConstraints.displayName, this.deploymentOptions.ignoreWithNocheckOnCheckConstraints); + this.optionsMapTable.set(this.deploymentOptions.ignoreFillFactor.displayName, this.deploymentOptions.ignoreFillFactor); + this.optionsMapTable.set(this.deploymentOptions.ignoreFileSize.displayName, this.deploymentOptions.ignoreFileSize); + this.optionsMapTable.set(this.deploymentOptions.ignoreFilegroupPlacement.displayName, this.deploymentOptions.ignoreFilegroupPlacement); + this.optionsMapTable.set(this.deploymentOptions.doNotAlterReplicatedObjects.displayName, this.deploymentOptions.doNotAlterReplicatedObjects); + this.optionsMapTable.set(this.deploymentOptions.doNotAlterChangeDataCaptureObjects.displayName, this.deploymentOptions.doNotAlterChangeDataCaptureObjects); + this.optionsMapTable.set(this.deploymentOptions.disableAndReenableDdlTriggers.displayName, this.deploymentOptions.disableAndReenableDdlTriggers); + this.optionsMapTable.set(this.deploymentOptions.deployDatabaseInSingleUserMode.displayName, this.deploymentOptions.deployDatabaseInSingleUserMode); + this.optionsMapTable.set(this.deploymentOptions.createNewDatabase.displayName, this.deploymentOptions.createNewDatabase); + this.optionsMapTable.set(this.deploymentOptions.compareUsingTargetCollation.displayName, this.deploymentOptions.compareUsingTargetCollation); + this.optionsMapTable.set(this.deploymentOptions.commentOutSetVarDeclarations.displayName, this.deploymentOptions.commentOutSetVarDeclarations); + this.optionsMapTable.set(this.deploymentOptions.blockWhenDriftDetected.displayName, this.deploymentOptions.blockWhenDriftDetected); + this.optionsMapTable.set(this.deploymentOptions.blockOnPossibleDataLoss.displayName, this.deploymentOptions.blockOnPossibleDataLoss); + this.optionsMapTable.set(this.deploymentOptions.backupDatabaseBeforeChanges.displayName, this.deploymentOptions.backupDatabaseBeforeChanges); + this.optionsMapTable.set(this.deploymentOptions.allowIncompatiblePlatform.displayName, this.deploymentOptions.allowIncompatiblePlatform); + this.optionsMapTable.set(this.deploymentOptions.allowDropBlockingAssemblies.displayName, this.deploymentOptions.allowDropBlockingAssemblies); + this.optionsMapTable.set(this.deploymentOptions.dropConstraintsNotInSource.displayName, this.deploymentOptions.dropConstraintsNotInSource); + this.optionsMapTable.set(this.deploymentOptions.dropDmlTriggersNotInSource.displayName, this.deploymentOptions.dropDmlTriggersNotInSource); + this.optionsMapTable.set(this.deploymentOptions.dropExtendedPropertiesNotInSource.displayName, this.deploymentOptions.dropExtendedPropertiesNotInSource); + this.optionsMapTable.set(this.deploymentOptions.dropIndexesNotInSource.displayName, this.deploymentOptions.dropIndexesNotInSource); + this.optionsMapTable.set(this.deploymentOptions.ignoreFileAndLogFilePath.displayName, this.deploymentOptions.ignoreFileAndLogFilePath); + this.optionsMapTable.set(this.deploymentOptions.ignoreExtendedProperties.displayName, this.deploymentOptions.ignoreExtendedProperties); + this.optionsMapTable.set(this.deploymentOptions.ignoreDmlTriggerState.displayName, this.deploymentOptions.ignoreDmlTriggerState); + this.optionsMapTable.set(this.deploymentOptions.ignoreDmlTriggerOrder.displayName, this.deploymentOptions.ignoreDmlTriggerOrder); + this.optionsMapTable.set(this.deploymentOptions.ignoreDefaultSchema.displayName, this.deploymentOptions.ignoreDefaultSchema); + this.optionsMapTable.set(this.deploymentOptions.ignoreDdlTriggerState.displayName, this.deploymentOptions.ignoreDdlTriggerState); + this.optionsMapTable.set(this.deploymentOptions.ignoreDdlTriggerOrder.displayName, this.deploymentOptions.ignoreDdlTriggerOrder); + this.optionsMapTable.set(this.deploymentOptions.ignoreCryptographicProviderFilePath.displayName, this.deploymentOptions.ignoreCryptographicProviderFilePath); + this.optionsMapTable.set(this.deploymentOptions.verifyDeployment.displayName, this.deploymentOptions.verifyDeployment); + this.optionsMapTable.set(this.deploymentOptions.ignoreComments.displayName, this.deploymentOptions.ignoreComments); + this.optionsMapTable.set(this.deploymentOptions.ignoreColumnCollation.displayName, this.deploymentOptions.ignoreColumnCollation); + this.optionsMapTable.set(this.deploymentOptions.ignoreAuthorizer.displayName, this.deploymentOptions.ignoreAuthorizer); + this.optionsMapTable.set(this.deploymentOptions.ignoreAnsiNulls.displayName, this.deploymentOptions.ignoreAnsiNulls); + this.optionsMapTable.set(this.deploymentOptions.generateSmartDefaults.displayName, this.deploymentOptions.generateSmartDefaults); + this.optionsMapTable.set(this.deploymentOptions.dropStatisticsNotInSource.displayName, this.deploymentOptions.dropStatisticsNotInSource); + this.optionsMapTable.set(this.deploymentOptions.dropRoleMembersNotInSource.displayName, this.deploymentOptions.dropRoleMembersNotInSource); + this.optionsMapTable.set(this.deploymentOptions.dropPermissionsNotInSource.displayName, this.deploymentOptions.dropPermissionsNotInSource); + this.optionsMapTable.set(this.deploymentOptions.dropObjectsNotInSource.displayName, this.deploymentOptions.dropObjectsNotInSource); + this.optionsMapTable.set(this.deploymentOptions.ignoreColumnOrder.displayName, this.deploymentOptions.ignoreColumnOrder); + this.optionsMapTable.set(this.deploymentOptions.ignoreTablePartitionOptions.displayName, this.deploymentOptions.ignoreTablePartitionOptions); + this.optionsMapTable.set(this.deploymentOptions.doNotEvaluateSqlCmdVariables.displayName, this.deploymentOptions.doNotEvaluateSqlCmdVariables); + this.optionsMapTable.set(this.deploymentOptions.disableParallelismForEnablingIndexes.displayName, this.deploymentOptions.disableParallelismForEnablingIndexes); + this.optionsMapTable.set(this.deploymentOptions.disableIndexesForDataPhase.displayName, this.deploymentOptions.disableIndexesForDataPhase); + this.optionsMapTable.set(this.deploymentOptions.restoreSequenceCurrentValue.displayName, this.deploymentOptions.restoreSequenceCurrentValue); + this.optionsMapTable.set(this.deploymentOptions.rebuildIndexesOfflineForDataPhase.displayName, this.deploymentOptions.rebuildIndexesOfflineForDataPhase); + this.optionsMapTable.set(this.deploymentOptions.preserveIdentityLastValues.displayName, this.deploymentOptions.preserveIdentityLastValues); + this.optionsMapTable.set(this.deploymentOptions.isAlwaysEncryptedParameterizationEnabled.displayName, this.deploymentOptions.isAlwaysEncryptedParameterizationEnabled); + this.optionsMapTable.set(this.deploymentOptions.allowExternalLibraryPaths.displayName, this.deploymentOptions.allowExternalLibraryPaths); + this.optionsMapTable.set(this.deploymentOptions.allowExternalLanguagePaths.displayName, this.deploymentOptions.allowExternalLanguagePaths); + this.optionsMapTable.set(this.deploymentOptions.hashObjectNamesInLogs.displayName, this.deploymentOptions.hashObjectNamesInLogs); + this.optionsMapTable.set(this.deploymentOptions.doNotDropWorkloadClassifiers.displayName, this.deploymentOptions.doNotDropWorkloadClassifiers); + this.optionsMapTable.set(this.deploymentOptions.ignoreWorkloadClassifiers.displayName, this.deploymentOptions.ignoreWorkloadClassifiers); + this.optionsMapTable.set(this.deploymentOptions.ignoreDatabaseWorkloadGroups.displayName, this.deploymentOptions.ignoreDatabaseWorkloadGroups); + this.optionsMapTable.set(this.deploymentOptions.doNotDropDatabaseWorkloadGroups.displayName, this.deploymentOptions.doNotDropDatabaseWorkloadGroups); + } + public optionsLabels: string[] = []; + public InitializeOptionsLabels() { + this.optionsLabels = [this.deploymentOptions.ignoreTableOptions.displayName + , this.deploymentOptions.ignoreSemicolonBetweenStatements.displayName + , this.deploymentOptions.ignoreRouteLifetime.displayName + , this.deploymentOptions.ignoreRoleMembership.displayName + , this.deploymentOptions.ignoreQuotedIdentifiers.displayName + , this.deploymentOptions.ignorePermissions.displayName + , this.deploymentOptions.ignorePartitionSchemes.displayName + , this.deploymentOptions.ignoreObjectPlacementOnPartitionScheme.displayName + , this.deploymentOptions.ignoreNotForReplication.displayName + , this.deploymentOptions.ignoreLoginSids.displayName + , this.deploymentOptions.ignoreLockHintsOnIndexes.displayName + , this.deploymentOptions.ignoreKeywordCasing.displayName + , this.deploymentOptions.ignoreIndexPadding.displayName + , this.deploymentOptions.ignoreIndexOptions.displayName + , this.deploymentOptions.ignoreIncrement.displayName + , this.deploymentOptions.ignoreIdentitySeed.displayName + , this.deploymentOptions.ignoreUserSettingsObjects.displayName + , this.deploymentOptions.ignoreFullTextCatalogFilePath.displayName + , this.deploymentOptions.ignoreWhitespace.displayName + , this.deploymentOptions.ignoreWithNocheckOnForeignKeys.displayName + , this.deploymentOptions.verifyCollationCompatibility.displayName + , this.deploymentOptions.unmodifiableObjectWarnings.displayName + , this.deploymentOptions.treatVerificationErrorsAsWarnings.displayName + , this.deploymentOptions.scriptRefreshModule.displayName + , this.deploymentOptions.scriptNewConstraintValidation.displayName + , this.deploymentOptions.scriptFileSize.displayName + , this.deploymentOptions.scriptDeployStateChecks.displayName + , this.deploymentOptions.scriptDatabaseOptions.displayName + , this.deploymentOptions.scriptDatabaseCompatibility.displayName + , this.deploymentOptions.scriptDatabaseCollation.displayName + , this.deploymentOptions.runDeploymentPlanExecutors.displayName + , this.deploymentOptions.registerDataTierApplication.displayName + , this.deploymentOptions.populateFilesOnFileGroups.displayName + , this.deploymentOptions.noAlterStatementsToChangeClrTypes.displayName + , this.deploymentOptions.includeTransactionalScripts.displayName + , this.deploymentOptions.includeCompositeObjects.displayName + , this.deploymentOptions.allowUnsafeRowLevelSecurityDataMovement.displayName + , this.deploymentOptions.ignoreWithNocheckOnCheckConstraints.displayName + , this.deploymentOptions.ignoreFillFactor.displayName + , this.deploymentOptions.ignoreFileSize.displayName + , this.deploymentOptions.ignoreFilegroupPlacement.displayName + , this.deploymentOptions.doNotAlterReplicatedObjects.displayName + , this.deploymentOptions.doNotAlterChangeDataCaptureObjects.displayName + , this.deploymentOptions.disableAndReenableDdlTriggers.displayName + , this.deploymentOptions.deployDatabaseInSingleUserMode.displayName + , this.deploymentOptions.createNewDatabase.displayName + , this.deploymentOptions.compareUsingTargetCollation.displayName + , this.deploymentOptions.commentOutSetVarDeclarations.displayName + , this.deploymentOptions.blockWhenDriftDetected.displayName + , this.deploymentOptions.blockOnPossibleDataLoss.displayName + , this.deploymentOptions.backupDatabaseBeforeChanges.displayName + , this.deploymentOptions.allowIncompatiblePlatform.displayName + , this.deploymentOptions.allowDropBlockingAssemblies.displayName + , this.deploymentOptions.dropConstraintsNotInSource.displayName + , this.deploymentOptions.dropDmlTriggersNotInSource.displayName + , this.deploymentOptions.dropExtendedPropertiesNotInSource.displayName + , this.deploymentOptions.dropIndexesNotInSource.displayName + , this.deploymentOptions.ignoreFileAndLogFilePath.displayName + , this.deploymentOptions.ignoreExtendedProperties.displayName + , this.deploymentOptions.ignoreDmlTriggerState.displayName + , this.deploymentOptions.ignoreDmlTriggerOrder.displayName + , this.deploymentOptions.ignoreDefaultSchema.displayName + , this.deploymentOptions.ignoreDdlTriggerState.displayName + , this.deploymentOptions.ignoreDdlTriggerOrder.displayName + , this.deploymentOptions.ignoreCryptographicProviderFilePath.displayName + , this.deploymentOptions.verifyDeployment.displayName + , this.deploymentOptions.ignoreComments.displayName + , this.deploymentOptions.ignoreColumnCollation.displayName + , this.deploymentOptions.ignoreAuthorizer.displayName + , this.deploymentOptions.ignoreAnsiNulls.displayName + , this.deploymentOptions.generateSmartDefaults.displayName + , this.deploymentOptions.dropStatisticsNotInSource.displayName + , this.deploymentOptions.dropRoleMembersNotInSource.displayName + , this.deploymentOptions.dropPermissionsNotInSource.displayName + , this.deploymentOptions.dropObjectsNotInSource.displayName + , this.deploymentOptions.ignoreColumnOrder.displayName + , this.deploymentOptions.ignoreTablePartitionOptions.displayName + , this.deploymentOptions.doNotEvaluateSqlCmdVariables.displayName + , this.deploymentOptions.disableParallelismForEnablingIndexes.displayName + , this.deploymentOptions.disableIndexesForDataPhase.displayName + , this.deploymentOptions.restoreSequenceCurrentValue.displayName + , this.deploymentOptions.rebuildIndexesOfflineForDataPhase.displayName + , this.deploymentOptions.preserveIdentityLastValues.displayName + , this.deploymentOptions.isAlwaysEncryptedParameterizationEnabled.displayName + , this.deploymentOptions.allowExternalLibraryPaths.displayName + , this.deploymentOptions.allowExternalLanguagePaths.displayName + , this.deploymentOptions.hashObjectNamesInLogs.displayName + , this.deploymentOptions.doNotDropWorkloadClassifiers.displayName + , this.deploymentOptions.ignoreWorkloadClassifiers.displayName + , this.deploymentOptions.ignoreDatabaseWorkloadGroups.displayName + , this.deploymentOptions.doNotDropDatabaseWorkloadGroups.displayName].sort(); + } + + public getOptionsData(): string[][] { + let data = []; + this.optionsLookup = {}; + this.optionsLabels.forEach(l => { + let checked: boolean = this.getSchemaCompareOptionUtil(l); + data.push([checked, l]); + this.optionsLookup[l] = checked; + }); + return data; + } + //#endregion + //#region Schema Compare Objects public objectTypeLabels: string[] = [ loc.Aggregates, loc.ApplicationRoles, @@ -164,21 +293,6 @@ export class SchemaCompareOptionsModel { loc.ServerTriggers ].sort(); - constructor(defaultOptions: mssql.DeploymentOptions) { - this.deploymentOptions = defaultOptions; - } - - public getOptionsData(): string[][] { - let data = []; - this.optionsLookup = {}; - this.optionsLabels.forEach(l => { - let checked: boolean = this.getSchemaCompareOptionUtil(l); - data.push([checked, l]); - this.optionsLookup[l] = checked; - }); - return data; - } - public getObjectsData(): string[][] { let data = []; this.objectsLookup = {}; @@ -189,6 +303,13 @@ export class SchemaCompareOptionsModel { }); return data; } + //#endregion + + constructor(defaultOptions: mssql.DeploymentOptions) { + this.deploymentOptions = defaultOptions; + this.InitializeUpdateOptionsMapTable(); + this.InitializeOptionsLabels(); + } public setDeploymentOptions() { for (let option in this.optionsLookup) { @@ -197,618 +318,166 @@ export class SchemaCompareOptionsModel { } public setSchemaCompareOptionUtil(label: string, value: boolean) { - switch (label) { - case loc.IgnoreTableOptions: - this.deploymentOptions.ignoreTableOptions = value; - break; - case loc.IgnoreSemicolonBetweenStatements: - this.deploymentOptions.ignoreSemicolonBetweenStatements = value; - break; - case loc.IgnoreRouteLifetime: - this.deploymentOptions.ignoreRouteLifetime = value; - break; - case loc.IgnoreRoleMembership: - this.deploymentOptions.ignoreRoleMembership = value; - break; - case loc.IgnoreQuotedIdentifiers: - this.deploymentOptions.ignoreQuotedIdentifiers = value; - break; - case loc.IgnorePermissions: - this.deploymentOptions.ignorePermissions = value; - break; - case loc.IgnorePartitionSchemes: - this.deploymentOptions.ignorePartitionSchemes = value; - break; - case loc.IgnoreObjectPlacementOnPartitionScheme: - this.deploymentOptions.ignoreObjectPlacementOnPartitionScheme = value; - break; - case loc.IgnoreNotForReplication: - this.deploymentOptions.ignoreNotForReplication = value; - break; - case loc.IgnoreLoginSids: - this.deploymentOptions.ignoreLoginSids = value; - break; - case loc.IgnoreLockHintsOnIndexes: - this.deploymentOptions.ignoreLockHintsOnIndexes = value; - break; - case loc.IgnoreKeywordCasing: - this.deploymentOptions.ignoreKeywordCasing = value; - break; - case loc.IgnoreIndexPadding: - this.deploymentOptions.ignoreIndexPadding = value; - break; - case loc.IgnoreIndexOptions: - this.deploymentOptions.ignoreIndexOptions = value; - break; - case loc.IgnoreIncrement: - this.deploymentOptions.ignoreIncrement = value; - break; - case loc.IgnoreIdentitySeed: - this.deploymentOptions.ignoreIdentitySeed = value; - break; - case loc.IgnoreUserSettingsObjects: - this.deploymentOptions.ignoreUserSettingsObjects = value; - break; - case loc.IgnoreFullTextCatalogFilePath: - this.deploymentOptions.ignoreFullTextCatalogFilePath = value; - break; - case loc.IgnoreWhitespace: - this.deploymentOptions.ignoreWhitespace = value; - break; - case loc.IgnoreWithNocheckOnForeignKeys: - this.deploymentOptions.ignoreWithNocheckOnForeignKeys = value; - break; - case loc.VerifyCollationCompatibility: - this.deploymentOptions.verifyCollationCompatibility = value; - break; - case loc.UnmodifiableObjectWarnings: - this.deploymentOptions.unmodifiableObjectWarnings = value; - break; - case loc.TreatVerificationErrorsAsWarnings: - this.deploymentOptions.treatVerificationErrorsAsWarnings = value; - break; - case loc.ScriptRefreshModule: - this.deploymentOptions.scriptRefreshModule = value; - break; - case loc.ScriptNewConstraintValidation: - this.deploymentOptions.scriptNewConstraintValidation = value; - break; - case loc.ScriptFileSize: - this.deploymentOptions.scriptFileSize = value; - break; - case loc.ScriptDeployStateChecks: - this.deploymentOptions.scriptDeployStateChecks = value; - break; - case loc.ScriptDatabaseOptions: - this.deploymentOptions.scriptDatabaseOptions = value; - break; - case loc.ScriptDatabaseCompatibility: - this.deploymentOptions.scriptDatabaseCompatibility = value; - break; - case loc.ScriptDatabaseCollation: - this.deploymentOptions.scriptDatabaseCollation = value; - break; - case loc.RunDeploymentPlanExecutors: - this.deploymentOptions.runDeploymentPlanExecutors = value; - break; - case loc.RegisterDataTierApplication: - this.deploymentOptions.registerDataTierApplication = value; - break; - case loc.PopulateFilesOnFileGroups: - this.deploymentOptions.populateFilesOnFileGroups = value; - break; - case loc.NoAlterStatementsToChangeClrTypes: - this.deploymentOptions.noAlterStatementsToChangeClrTypes = value; - break; - case loc.IncludeTransactionalScripts: - this.deploymentOptions.includeTransactionalScripts = value; - break; - case loc.IncludeCompositeObjects: - this.deploymentOptions.includeCompositeObjects = value; - break; - case loc.AllowUnsafeRowLevelSecurityDataMovement: - this.deploymentOptions.allowUnsafeRowLevelSecurityDataMovement = value; - break; - case loc.IgnoreWithNocheckOnCheckConstraints: - this.deploymentOptions.ignoreWithNocheckOnCheckConstraints = value; - break; - case loc.IgnoreFillFactor: - this.deploymentOptions.ignoreFillFactor = value; - break; - case loc.IgnoreFileSize: - this.deploymentOptions.ignoreFileSize = value; - break; - case loc.IgnoreFilegroupPlacement: - this.deploymentOptions.ignoreFilegroupPlacement = value; - break; - case loc.DoNotAlterReplicatedObjects: - this.deploymentOptions.doNotAlterReplicatedObjects = value; - break; - case loc.DoNotAlterChangeDataCaptureObjects: - this.deploymentOptions.doNotAlterChangeDataCaptureObjects = value; - break; - case loc.DisableAndReenableDdlTriggers: - this.deploymentOptions.disableAndReenableDdlTriggers = value; - break; - case loc.DeployDatabaseInSingleUserMode: - this.deploymentOptions.deployDatabaseInSingleUserMode = value; - break; - case loc.CreateNewDatabase: - this.deploymentOptions.createNewDatabase = value; - break; - case loc.CompareUsingTargetCollation: - this.deploymentOptions.compareUsingTargetCollation = value; - break; - case loc.CommentOutSetVarDeclarations: - this.deploymentOptions.commentOutSetVarDeclarations = value; - break; - case loc.BlockWhenDriftDetected: - this.deploymentOptions.blockWhenDriftDetected = value; - break; - case loc.BlockOnPossibleDataLoss: - this.deploymentOptions.blockOnPossibleDataLoss = value; - break; - case loc.BackupDatabaseBeforeChanges: - this.deploymentOptions.backupDatabaseBeforeChanges = value; - break; - case loc.AllowIncompatiblePlatform: - this.deploymentOptions.allowIncompatiblePlatform = value; - break; - case loc.AllowDropBlockingAssemblies: - this.deploymentOptions.allowDropBlockingAssemblies = value; - break; - case loc.DropConstraintsNotInSource: - this.deploymentOptions.dropConstraintsNotInSource = value; - break; - case loc.DropDmlTriggersNotInSource: - this.deploymentOptions.dropDmlTriggersNotInSource = value; - break; - case loc.DropExtendedPropertiesNotInSource: - this.deploymentOptions.dropExtendedPropertiesNotInSource = value; - break; - case loc.DropIndexesNotInSource: - this.deploymentOptions.dropIndexesNotInSource = value; - break; - case loc.IgnoreFileAndLogFilePath: - this.deploymentOptions.ignoreFileAndLogFilePath = value; - break; - case loc.IgnoreExtendedProperties: - this.deploymentOptions.ignoreExtendedProperties = value; - break; - case loc.IgnoreDmlTriggerState: - this.deploymentOptions.ignoreDmlTriggerState = value; - break; - case loc.IgnoreDmlTriggerOrder: - this.deploymentOptions.ignoreDmlTriggerOrder = value; - break; - case loc.IgnoreDefaultSchema: - this.deploymentOptions.ignoreDefaultSchema = value; - break; - case loc.IgnoreDdlTriggerState: - this.deploymentOptions.ignoreDdlTriggerState = value; - break; - case loc.IgnoreDdlTriggerOrder: - this.deploymentOptions.ignoreDdlTriggerOrder = value; - break; - case loc.IgnoreCryptographicProviderFilePath: - this.deploymentOptions.ignoreCryptographicProviderFilePath = value; - break; - case loc.VerifyDeployment: - this.deploymentOptions.verifyDeployment = value; - break; - case loc.IgnoreComments: - this.deploymentOptions.ignoreComments = value; - break; - case loc.IgnoreColumnCollation: - this.deploymentOptions.ignoreColumnCollation = value; - break; - case loc.IgnoreAuthorizer: - this.deploymentOptions.ignoreAuthorizer = value; - break; - case loc.IgnoreAnsiNulls: - this.deploymentOptions.ignoreAnsiNulls = value; - break; - case loc.GenerateSmartDefaults: - this.deploymentOptions.generateSmartDefaults = value; - break; - case loc.DropStatisticsNotInSource: - this.deploymentOptions.dropStatisticsNotInSource = value; - break; - case loc.DropRoleMembersNotInSource: - this.deploymentOptions.dropRoleMembersNotInSource = value; - break; - case loc.DropPermissionsNotInSource: - this.deploymentOptions.dropPermissionsNotInSource = value; - break; - case loc.DropObjectsNotInSource: - this.deploymentOptions.dropObjectsNotInSource = value; - break; - case loc.IgnoreColumnOrder: - this.deploymentOptions.ignoreColumnOrder = value; - break; - } + let optionProp = this.optionsMapTable.get(label); + optionProp.value = value; + return this.optionsMapTable.set(label, optionProp); } public getSchemaCompareOptionUtil(label): boolean { - switch (label) { - case loc.IgnoreTableOptions: - return this.deploymentOptions.ignoreTableOptions; + return this.optionsMapTable.get(label)?.value; + } - case loc.IgnoreSemicolonBetweenStatements: - return this.deploymentOptions.ignoreSemicolonBetweenStatements; - - case loc.IgnoreRouteLifetime: - return this.deploymentOptions.ignoreRouteLifetime; - - case loc.IgnoreRoleMembership: - return this.deploymentOptions.ignoreRoleMembership; - - case loc.IgnoreQuotedIdentifiers: - return this.deploymentOptions.ignoreQuotedIdentifiers; - - case loc.IgnorePermissions: - return this.deploymentOptions.ignorePermissions; - - case loc.IgnorePartitionSchemes: - return this.deploymentOptions.ignorePartitionSchemes; - - case loc.IgnoreObjectPlacementOnPartitionScheme: - return this.deploymentOptions.ignoreObjectPlacementOnPartitionScheme; - - case loc.IgnoreNotForReplication: - return this.deploymentOptions.ignoreNotForReplication; - - case loc.IgnoreLoginSids: - return this.deploymentOptions.ignoreLoginSids; - - case loc.IgnoreLockHintsOnIndexes: - return this.deploymentOptions.ignoreLockHintsOnIndexes; - - case loc.IgnoreKeywordCasing: - return this.deploymentOptions.ignoreKeywordCasing; - - case loc.IgnoreIndexPadding: - return this.deploymentOptions.ignoreIndexPadding; - - case loc.IgnoreIndexOptions: - return this.deploymentOptions.ignoreIndexOptions; - - case loc.IgnoreIncrement: - return this.deploymentOptions.ignoreIncrement; - - case loc.IgnoreIdentitySeed: - return this.deploymentOptions.ignoreIdentitySeed; - - case loc.IgnoreUserSettingsObjects: - return this.deploymentOptions.ignoreUserSettingsObjects; - - case loc.IgnoreFullTextCatalogFilePath: - return this.deploymentOptions.ignoreFullTextCatalogFilePath; - - case loc.IgnoreWhitespace: - return this.deploymentOptions.ignoreWhitespace; - - case loc.IgnoreWithNocheckOnForeignKeys: - return this.deploymentOptions.ignoreWithNocheckOnForeignKeys; - - case loc.VerifyCollationCompatibility: - return this.deploymentOptions.verifyCollationCompatibility; - - case loc.UnmodifiableObjectWarnings: - return this.deploymentOptions.unmodifiableObjectWarnings; - - case loc.TreatVerificationErrorsAsWarnings: - return this.deploymentOptions.treatVerificationErrorsAsWarnings; - - case loc.ScriptRefreshModule: - return this.deploymentOptions.scriptRefreshModule; - - case loc.ScriptNewConstraintValidation: - return this.deploymentOptions.scriptNewConstraintValidation; - - case loc.ScriptFileSize: - return this.deploymentOptions.scriptFileSize; - - case loc.ScriptDeployStateChecks: - return this.deploymentOptions.scriptDeployStateChecks; - - case loc.ScriptDatabaseOptions: - return this.deploymentOptions.scriptDatabaseOptions; - - case loc.ScriptDatabaseCompatibility: - return this.deploymentOptions.scriptDatabaseCompatibility; - - case loc.ScriptDatabaseCollation: - return this.deploymentOptions.scriptDatabaseCollation; - - case loc.RunDeploymentPlanExecutors: - return this.deploymentOptions.runDeploymentPlanExecutors; - - case loc.RegisterDataTierApplication: - return this.deploymentOptions.registerDataTierApplication; - - case loc.PopulateFilesOnFileGroups: - return this.deploymentOptions.populateFilesOnFileGroups; - - case loc.NoAlterStatementsToChangeClrTypes: - return this.deploymentOptions.noAlterStatementsToChangeClrTypes; - - case loc.IncludeTransactionalScripts: - return this.deploymentOptions.includeTransactionalScripts; - - case loc.IncludeCompositeObjects: - return this.deploymentOptions.includeCompositeObjects; - - case loc.AllowUnsafeRowLevelSecurityDataMovement: - return this.deploymentOptions.allowUnsafeRowLevelSecurityDataMovement; - - case loc.IgnoreWithNocheckOnCheckConstraints: - return this.deploymentOptions.ignoreWithNocheckOnCheckConstraints; - - case loc.IgnoreFillFactor: - return this.deploymentOptions.ignoreFillFactor; - - case loc.IgnoreFileSize: - return this.deploymentOptions.ignoreFileSize; - - case loc.IgnoreFilegroupPlacement: - return this.deploymentOptions.ignoreFilegroupPlacement; - - case loc.DoNotAlterReplicatedObjects: - return this.deploymentOptions.doNotAlterReplicatedObjects; - - case loc.DoNotAlterChangeDataCaptureObjects: - return this.deploymentOptions.doNotAlterChangeDataCaptureObjects; - - case loc.DisableAndReenableDdlTriggers: - return this.deploymentOptions.disableAndReenableDdlTriggers; - - case loc.DeployDatabaseInSingleUserMode: - return this.deploymentOptions.deployDatabaseInSingleUserMode; - - case loc.CreateNewDatabase: - return this.deploymentOptions.createNewDatabase; - - case loc.CompareUsingTargetCollation: - return this.deploymentOptions.compareUsingTargetCollation; - - case loc.CommentOutSetVarDeclarations: - return this.deploymentOptions.commentOutSetVarDeclarations; - - case loc.BlockWhenDriftDetected: - return this.deploymentOptions.blockWhenDriftDetected; - - case loc.BlockOnPossibleDataLoss: - return this.deploymentOptions.blockOnPossibleDataLoss; - - case loc.BackupDatabaseBeforeChanges: - return this.deploymentOptions.backupDatabaseBeforeChanges; - - case loc.AllowIncompatiblePlatform: - return this.deploymentOptions.allowIncompatiblePlatform; - - case loc.AllowDropBlockingAssemblies: - return this.deploymentOptions.allowDropBlockingAssemblies; - - case loc.DropConstraintsNotInSource: - return this.deploymentOptions.dropConstraintsNotInSource; - - case loc.DropDmlTriggersNotInSource: - return this.deploymentOptions.dropDmlTriggersNotInSource; - - case loc.DropExtendedPropertiesNotInSource: - return this.deploymentOptions.dropExtendedPropertiesNotInSource; - - case loc.DropIndexesNotInSource: - return this.deploymentOptions.dropIndexesNotInSource; - - case loc.IgnoreFileAndLogFilePath: - return this.deploymentOptions.ignoreFileAndLogFilePath; - - case loc.IgnoreExtendedProperties: - return this.deploymentOptions.ignoreExtendedProperties; - - case loc.IgnoreDmlTriggerState: - return this.deploymentOptions.ignoreDmlTriggerState; - - case loc.IgnoreDmlTriggerOrder: - return this.deploymentOptions.ignoreDmlTriggerOrder; - - case loc.IgnoreDefaultSchema: - return this.deploymentOptions.ignoreDefaultSchema; - - case loc.IgnoreDdlTriggerState: - return this.deploymentOptions.ignoreDdlTriggerState; - - case loc.IgnoreDdlTriggerOrder: - return this.deploymentOptions.ignoreDdlTriggerOrder; - - case loc.IgnoreCryptographicProviderFilePath: - return this.deploymentOptions.ignoreCryptographicProviderFilePath; - - case loc.VerifyDeployment: - return this.deploymentOptions.verifyDeployment; - - case loc.IgnoreComments: - return this.deploymentOptions.ignoreComments; - - case loc.IgnoreColumnCollation: - return this.deploymentOptions.ignoreColumnCollation; - - case loc.IgnoreAuthorizer: - return this.deploymentOptions.ignoreAuthorizer; - - case loc.IgnoreAnsiNulls: - return this.deploymentOptions.ignoreAnsiNulls; - - case loc.GenerateSmartDefaults: - return this.deploymentOptions.generateSmartDefaults; - - case loc.DropStatisticsNotInSource: - return this.deploymentOptions.dropStatisticsNotInSource; - - case loc.DropRoleMembersNotInSource: - return this.deploymentOptions.dropRoleMembersNotInSource; - - case loc.DropPermissionsNotInSource: - return this.deploymentOptions.dropPermissionsNotInSource; - - case loc.DropObjectsNotInSource: - return this.deploymentOptions.dropObjectsNotInSource; - - case loc.IgnoreColumnOrder: - return this.deploymentOptions.ignoreColumnOrder; - } - return false; + public getDescription(label: string): string { + return this.optionsMapTable.get(label)?.description; } public setObjectTypeOptions() { for (let option in this.objectsLookup) { this.setSchemaCompareIncludedObjectsUtil(option, this.objectsLookup[option]); } - this.deploymentOptions.excludeObjectTypes = this.excludedObjectTypes; + this.deploymentOptions.excludeObjectTypes.value = this.excludedObjectTypes; } public getSchemaCompareIncludedObjectsUtil(label): boolean { switch (label) { case loc.Aggregates: - return !isNullOrUndefined(this.deploymentOptions.excludeObjectTypes.find(x => x === mssql.SchemaObjectType.Aggregates)) ? false : true; + return !isNullOrUndefined(this.deploymentOptions.excludeObjectTypes.value.find(x => x === mssql.SchemaObjectType.Aggregates)) ? false : true; case loc.ApplicationRoles: - return (this.deploymentOptions.excludeObjectTypes.find(x => x === mssql.SchemaObjectType.ApplicationRoles)) ? false : true; + return (this.deploymentOptions.excludeObjectTypes.value.find(x => x === mssql.SchemaObjectType.ApplicationRoles)) ? false : true; case loc.Assemblies: - return (this.deploymentOptions.excludeObjectTypes.find(x => x === mssql.SchemaObjectType.Assemblies)) ? false : true; + return (this.deploymentOptions.excludeObjectTypes.value.find(x => x === mssql.SchemaObjectType.Assemblies)) ? false : true; case loc.AssemblyFiles: - return (this.deploymentOptions.excludeObjectTypes.find(x => x === mssql.SchemaObjectType.AssemblyFiles)) ? false : true; + return (this.deploymentOptions.excludeObjectTypes.value.find(x => x === mssql.SchemaObjectType.AssemblyFiles)) ? false : true; case loc.AsymmetricKeys: - return (this.deploymentOptions.excludeObjectTypes.find(x => x === mssql.SchemaObjectType.AsymmetricKeys)) ? false : true; + return (this.deploymentOptions.excludeObjectTypes.value.find(x => x === mssql.SchemaObjectType.AsymmetricKeys)) ? false : true; case loc.BrokerPriorities: - return (this.deploymentOptions.excludeObjectTypes.find(x => x === mssql.SchemaObjectType.BrokerPriorities)) ? false : true; + return (this.deploymentOptions.excludeObjectTypes.value.find(x => x === mssql.SchemaObjectType.BrokerPriorities)) ? false : true; case loc.Certificates: - return (this.deploymentOptions.excludeObjectTypes.find(x => x === mssql.SchemaObjectType.Certificates)) ? false : true; + return (this.deploymentOptions.excludeObjectTypes.value.find(x => x === mssql.SchemaObjectType.Certificates)) ? false : true; case loc.ColumnEncryptionKeys: - return (this.deploymentOptions.excludeObjectTypes.find(x => x === mssql.SchemaObjectType.ColumnEncryptionKeys)) ? false : true; + return (this.deploymentOptions.excludeObjectTypes.value.find(x => x === mssql.SchemaObjectType.ColumnEncryptionKeys)) ? false : true; case loc.ColumnMasterKeys: - return (this.deploymentOptions.excludeObjectTypes.find(x => x === mssql.SchemaObjectType.ColumnMasterKeys)) ? false : true; + return (this.deploymentOptions.excludeObjectTypes.value.find(x => x === mssql.SchemaObjectType.ColumnMasterKeys)) ? false : true; case loc.Contracts: - return (this.deploymentOptions.excludeObjectTypes.find(x => x === mssql.SchemaObjectType.Contracts)) ? false : true; + return (this.deploymentOptions.excludeObjectTypes.value.find(x => x === mssql.SchemaObjectType.Contracts)) ? false : true; case loc.DatabaseOptions: - return (this.deploymentOptions.excludeObjectTypes.find(x => x === mssql.SchemaObjectType.DatabaseOptions)) ? false : true; + return (this.deploymentOptions.excludeObjectTypes.value.find(x => x === mssql.SchemaObjectType.DatabaseOptions)) ? false : true; case loc.DatabaseRoles: - return (this.deploymentOptions.excludeObjectTypes.find(x => x === mssql.SchemaObjectType.DatabaseRoles)) ? false : true; + return (this.deploymentOptions.excludeObjectTypes.value.find(x => x === mssql.SchemaObjectType.DatabaseRoles)) ? false : true; case loc.DatabaseTriggers: - return (this.deploymentOptions.excludeObjectTypes.find(x => x === mssql.SchemaObjectType.DatabaseTriggers)) ? false : true; + return (this.deploymentOptions.excludeObjectTypes.value.find(x => x === mssql.SchemaObjectType.DatabaseTriggers)) ? false : true; case loc.Defaults: - return (this.deploymentOptions.excludeObjectTypes.find(x => x === mssql.SchemaObjectType.Defaults)) ? false : true; + return (this.deploymentOptions.excludeObjectTypes.value.find(x => x === mssql.SchemaObjectType.Defaults)) ? false : true; case loc.ExtendedProperties: - return (this.deploymentOptions.excludeObjectTypes.find(x => x === mssql.SchemaObjectType.ExtendedProperties)) ? false : true; + return (this.deploymentOptions.excludeObjectTypes.value.find(x => x === mssql.SchemaObjectType.ExtendedProperties)) ? false : true; case loc.ExternalDataSources: - return (this.deploymentOptions.excludeObjectTypes.find(x => x === mssql.SchemaObjectType.ExternalDataSources)) ? false : true; + return (this.deploymentOptions.excludeObjectTypes.value.find(x => x === mssql.SchemaObjectType.ExternalDataSources)) ? false : true; case loc.ExternalFileFormats: - return (this.deploymentOptions.excludeObjectTypes.find(x => x === mssql.SchemaObjectType.ExternalFileFormats)) ? false : true; + return (this.deploymentOptions.excludeObjectTypes.value.find(x => x === mssql.SchemaObjectType.ExternalFileFormats)) ? false : true; case loc.ExternalStreams: - return (this.deploymentOptions.excludeObjectTypes.find(x => x === mssql.SchemaObjectType.ExternalStreams)) ? false : true; + return (this.deploymentOptions.excludeObjectTypes.value.find(x => x === mssql.SchemaObjectType.ExternalStreams)) ? false : true; case loc.ExternalStreamingJobs: - return (this.deploymentOptions.excludeObjectTypes.find(x => x === mssql.SchemaObjectType.ExternalStreamingJobs)) ? false : true; + return (this.deploymentOptions.excludeObjectTypes.value.find(x => x === mssql.SchemaObjectType.ExternalStreamingJobs)) ? false : true; case loc.ExternalTables: - return (this.deploymentOptions.excludeObjectTypes.find(x => x === mssql.SchemaObjectType.ExternalTables)) ? false : true; + return (this.deploymentOptions.excludeObjectTypes.value.find(x => x === mssql.SchemaObjectType.ExternalTables)) ? false : true; case loc.Filegroups: - return (this.deploymentOptions.excludeObjectTypes.find(x => x === mssql.SchemaObjectType.Filegroups)) ? false : true; + return (this.deploymentOptions.excludeObjectTypes.value.find(x => x === mssql.SchemaObjectType.Filegroups)) ? false : true; case loc.Files: - return (this.deploymentOptions.excludeObjectTypes.find(x => x === mssql.SchemaObjectType.Files)) ? false : true; + return (this.deploymentOptions.excludeObjectTypes.value.find(x => x === mssql.SchemaObjectType.Files)) ? false : true; case loc.FileTables: - return (this.deploymentOptions.excludeObjectTypes.find(x => x === mssql.SchemaObjectType.FileTables)) ? false : true; + return (this.deploymentOptions.excludeObjectTypes.value.find(x => x === mssql.SchemaObjectType.FileTables)) ? false : true; case loc.FullTextCatalogs: - return (this.deploymentOptions.excludeObjectTypes.find(x => x === mssql.SchemaObjectType.FullTextCatalogs)) ? false : true; + return (this.deploymentOptions.excludeObjectTypes.value.find(x => x === mssql.SchemaObjectType.FullTextCatalogs)) ? false : true; case loc.FullTextStoplists: - return (this.deploymentOptions.excludeObjectTypes.find(x => x === mssql.SchemaObjectType.FullTextStoplists)) ? false : true; + return (this.deploymentOptions.excludeObjectTypes.value.find(x => x === mssql.SchemaObjectType.FullTextStoplists)) ? false : true; case loc.MessageTypes: - return (this.deploymentOptions.excludeObjectTypes.find(x => x === mssql.SchemaObjectType.MessageTypes)) ? false : true; + return (this.deploymentOptions.excludeObjectTypes.value.find(x => x === mssql.SchemaObjectType.MessageTypes)) ? false : true; case loc.PartitionFunctions: - return (this.deploymentOptions.excludeObjectTypes.find(x => x === mssql.SchemaObjectType.PartitionFunctions)) ? false : true; + return (this.deploymentOptions.excludeObjectTypes.value.find(x => x === mssql.SchemaObjectType.PartitionFunctions)) ? false : true; case loc.PartitionSchemes: - return (this.deploymentOptions.excludeObjectTypes.find(x => x === mssql.SchemaObjectType.PartitionSchemes)) ? false : true; + return (this.deploymentOptions.excludeObjectTypes.value.find(x => x === mssql.SchemaObjectType.PartitionSchemes)) ? false : true; case loc.Permissions: - return (this.deploymentOptions.excludeObjectTypes.find(x => x === mssql.SchemaObjectType.Permissions)) ? false : true; + return (this.deploymentOptions.excludeObjectTypes.value.find(x => x === mssql.SchemaObjectType.Permissions)) ? false : true; case loc.Queues: - return (this.deploymentOptions.excludeObjectTypes.find(x => x === mssql.SchemaObjectType.Queues)) ? false : true; + return (this.deploymentOptions.excludeObjectTypes.value.find(x => x === mssql.SchemaObjectType.Queues)) ? false : true; case loc.RemoteServiceBindings: - return (this.deploymentOptions.excludeObjectTypes.find(x => x === mssql.SchemaObjectType.RemoteServiceBindings)) ? false : true; + return (this.deploymentOptions.excludeObjectTypes.value.find(x => x === mssql.SchemaObjectType.RemoteServiceBindings)) ? false : true; case loc.RoleMembership: - return (this.deploymentOptions.excludeObjectTypes.find(x => x === mssql.SchemaObjectType.RoleMembership)) ? false : true; + return (this.deploymentOptions.excludeObjectTypes.value.find(x => x === mssql.SchemaObjectType.RoleMembership)) ? false : true; case loc.Rules: - return (this.deploymentOptions.excludeObjectTypes.find(x => x === mssql.SchemaObjectType.Rules)) ? false : true; + return (this.deploymentOptions.excludeObjectTypes.value.find(x => x === mssql.SchemaObjectType.Rules)) ? false : true; case loc.ScalarValuedFunctions: - return (this.deploymentOptions.excludeObjectTypes.find(x => x === mssql.SchemaObjectType.ScalarValuedFunctions)) ? false : true; + return (this.deploymentOptions.excludeObjectTypes.value.find(x => x === mssql.SchemaObjectType.ScalarValuedFunctions)) ? false : true; case loc.SearchPropertyLists: - return (this.deploymentOptions.excludeObjectTypes.find(x => x === mssql.SchemaObjectType.SearchPropertyLists)) ? false : true; + return (this.deploymentOptions.excludeObjectTypes.value.find(x => x === mssql.SchemaObjectType.SearchPropertyLists)) ? false : true; case loc.SecurityPolicies: - return (this.deploymentOptions.excludeObjectTypes.find(x => x === mssql.SchemaObjectType.SecurityPolicies)) ? false : true; + return (this.deploymentOptions.excludeObjectTypes.value.find(x => x === mssql.SchemaObjectType.SecurityPolicies)) ? false : true; case loc.Sequences: - return (this.deploymentOptions.excludeObjectTypes.find(x => x === mssql.SchemaObjectType.Sequences)) ? false : true; + return (this.deploymentOptions.excludeObjectTypes.value.find(x => x === mssql.SchemaObjectType.Sequences)) ? false : true; case loc.Services: - return (this.deploymentOptions.excludeObjectTypes.find(x => x === mssql.SchemaObjectType.Services)) ? false : true; + return (this.deploymentOptions.excludeObjectTypes.value.find(x => x === mssql.SchemaObjectType.Services)) ? false : true; case loc.Signatures: - return (this.deploymentOptions.excludeObjectTypes.find(x => x === mssql.SchemaObjectType.Signatures)) ? false : true; + return (this.deploymentOptions.excludeObjectTypes.value.find(x => x === mssql.SchemaObjectType.Signatures)) ? false : true; case loc.StoredProcedures: - return (this.deploymentOptions.excludeObjectTypes.find(x => x === mssql.SchemaObjectType.StoredProcedures)) ? false : true; + return (this.deploymentOptions.excludeObjectTypes.value.find(x => x === mssql.SchemaObjectType.StoredProcedures)) ? false : true; case loc.SymmetricKeys: - return (this.deploymentOptions.excludeObjectTypes.find(x => x === mssql.SchemaObjectType.SymmetricKeys)) ? false : true; + return (this.deploymentOptions.excludeObjectTypes.value.find(x => x === mssql.SchemaObjectType.SymmetricKeys)) ? false : true; case loc.Synonyms: - return (this.deploymentOptions.excludeObjectTypes.find(x => x === mssql.SchemaObjectType.Synonyms)) ? false : true; + return (this.deploymentOptions.excludeObjectTypes.value.find(x => x === mssql.SchemaObjectType.Synonyms)) ? false : true; case loc.Tables: - return (this.deploymentOptions.excludeObjectTypes.find(x => x === mssql.SchemaObjectType.Tables)) ? false : true; + return (this.deploymentOptions.excludeObjectTypes.value.find(x => x === mssql.SchemaObjectType.Tables)) ? false : true; case loc.TableValuedFunctions: - return (this.deploymentOptions.excludeObjectTypes.find(x => x === mssql.SchemaObjectType.TableValuedFunctions)) ? false : true; + return (this.deploymentOptions.excludeObjectTypes.value.find(x => x === mssql.SchemaObjectType.TableValuedFunctions)) ? false : true; case loc.UserDefinedDataTypes: - return (this.deploymentOptions.excludeObjectTypes.find(x => x === mssql.SchemaObjectType.UserDefinedDataTypes)) ? false : true; + return (this.deploymentOptions.excludeObjectTypes.value.find(x => x === mssql.SchemaObjectType.UserDefinedDataTypes)) ? false : true; case loc.UserDefinedTableTypes: - return (this.deploymentOptions.excludeObjectTypes.find(x => x === mssql.SchemaObjectType.UserDefinedTableTypes)) ? false : true; + return (this.deploymentOptions.excludeObjectTypes.value.find(x => x === mssql.SchemaObjectType.UserDefinedTableTypes)) ? false : true; case loc.ClrUserDefinedTypes: - return (this.deploymentOptions.excludeObjectTypes.find(x => x === mssql.SchemaObjectType.ClrUserDefinedTypes)) ? false : true; + return (this.deploymentOptions.excludeObjectTypes.value.find(x => x === mssql.SchemaObjectType.ClrUserDefinedTypes)) ? false : true; case loc.Users: - return (this.deploymentOptions.excludeObjectTypes.find(x => x === mssql.SchemaObjectType.Users)) ? false : true; + return (this.deploymentOptions.excludeObjectTypes.value.find(x => x === mssql.SchemaObjectType.Users)) ? false : true; case loc.Views: - return (this.deploymentOptions.excludeObjectTypes.find(x => x === mssql.SchemaObjectType.Views)) ? false : true; + return (this.deploymentOptions.excludeObjectTypes.value.find(x => x === mssql.SchemaObjectType.Views)) ? false : true; case loc.XmlSchemaCollections: - return (this.deploymentOptions.excludeObjectTypes.find(x => x === mssql.SchemaObjectType.XmlSchemaCollections)) ? false : true; + return (this.deploymentOptions.excludeObjectTypes.value.find(x => x === mssql.SchemaObjectType.XmlSchemaCollections)) ? false : true; case loc.Audits: - return (this.deploymentOptions.excludeObjectTypes.find(x => x === mssql.SchemaObjectType.Audits)) ? false : true; + return (this.deploymentOptions.excludeObjectTypes.value.find(x => x === mssql.SchemaObjectType.Audits)) ? false : true; case loc.Credentials: - return (this.deploymentOptions.excludeObjectTypes.find(x => x === mssql.SchemaObjectType.Credentials)) ? false : true; + return (this.deploymentOptions.excludeObjectTypes.value.find(x => x === mssql.SchemaObjectType.Credentials)) ? false : true; case loc.CryptographicProviders: - return (this.deploymentOptions.excludeObjectTypes.find(x => x === mssql.SchemaObjectType.CryptographicProviders)) ? false : true; + return (this.deploymentOptions.excludeObjectTypes.value.find(x => x === mssql.SchemaObjectType.CryptographicProviders)) ? false : true; case loc.DatabaseAuditSpecifications: - return (this.deploymentOptions.excludeObjectTypes.find(x => x === mssql.SchemaObjectType.DatabaseAuditSpecifications)) ? false : true; + return (this.deploymentOptions.excludeObjectTypes.value.find(x => x === mssql.SchemaObjectType.DatabaseAuditSpecifications)) ? false : true; case loc.DatabaseEncryptionKeys: - return (this.deploymentOptions.excludeObjectTypes.find(x => x === mssql.SchemaObjectType.DatabaseEncryptionKeys)) ? false : true; + return (this.deploymentOptions.excludeObjectTypes.value.find(x => x === mssql.SchemaObjectType.DatabaseEncryptionKeys)) ? false : true; case loc.DatabaseScopedCredentials: - return (this.deploymentOptions.excludeObjectTypes.find(x => x === mssql.SchemaObjectType.DatabaseScopedCredentials)) ? false : true; + return (this.deploymentOptions.excludeObjectTypes.value.find(x => x === mssql.SchemaObjectType.DatabaseScopedCredentials)) ? false : true; case loc.Endpoints: - return (this.deploymentOptions.excludeObjectTypes.find(x => x === mssql.SchemaObjectType.Endpoints)) ? false : true; + return (this.deploymentOptions.excludeObjectTypes.value.find(x => x === mssql.SchemaObjectType.Endpoints)) ? false : true; case loc.ErrorMessages: - return (this.deploymentOptions.excludeObjectTypes.find(x => x === mssql.SchemaObjectType.ErrorMessages)) ? false : true; + return (this.deploymentOptions.excludeObjectTypes.value.find(x => x === mssql.SchemaObjectType.ErrorMessages)) ? false : true; case loc.EventNotifications: - return (this.deploymentOptions.excludeObjectTypes.find(x => x === mssql.SchemaObjectType.EventNotifications)) ? false : true; + return (this.deploymentOptions.excludeObjectTypes.value.find(x => x === mssql.SchemaObjectType.EventNotifications)) ? false : true; case loc.EventSessions: - return (this.deploymentOptions.excludeObjectTypes.find(x => x === mssql.SchemaObjectType.EventSessions)) ? false : true; + return (this.deploymentOptions.excludeObjectTypes.value.find(x => x === mssql.SchemaObjectType.EventSessions)) ? false : true; case loc.LinkedServerLogins: - return (this.deploymentOptions.excludeObjectTypes.find(x => x === mssql.SchemaObjectType.LinkedServerLogins)) ? false : true; + return (this.deploymentOptions.excludeObjectTypes.value.find(x => x === mssql.SchemaObjectType.LinkedServerLogins)) ? false : true; case loc.LinkedServers: - return (this.deploymentOptions.excludeObjectTypes.find(x => x === mssql.SchemaObjectType.LinkedServers)) ? false : true; + return (this.deploymentOptions.excludeObjectTypes.value.find(x => x === mssql.SchemaObjectType.LinkedServers)) ? false : true; case loc.Logins: - return (this.deploymentOptions.excludeObjectTypes.find(x => x === mssql.SchemaObjectType.Logins)) ? false : true; + return (this.deploymentOptions.excludeObjectTypes.value.find(x => x === mssql.SchemaObjectType.Logins)) ? false : true; case loc.MasterKeys: - return (this.deploymentOptions.excludeObjectTypes.find(x => x === mssql.SchemaObjectType.MasterKeys)) ? false : true; + return (this.deploymentOptions.excludeObjectTypes.value.find(x => x === mssql.SchemaObjectType.MasterKeys)) ? false : true; case loc.Routes: - return (this.deploymentOptions.excludeObjectTypes.find(x => x === mssql.SchemaObjectType.Routes)) ? false : true; + return (this.deploymentOptions.excludeObjectTypes.value.find(x => x === mssql.SchemaObjectType.Routes)) ? false : true; case loc.ServerAuditSpecifications: - return (this.deploymentOptions.excludeObjectTypes.find(x => x === mssql.SchemaObjectType.ServerAuditSpecifications)) ? false : true; + return (this.deploymentOptions.excludeObjectTypes.value.find(x => x === mssql.SchemaObjectType.ServerAuditSpecifications)) ? false : true; case loc.ServerRoleMembership: - return (this.deploymentOptions.excludeObjectTypes.find(x => x === mssql.SchemaObjectType.ServerRoleMembership)) ? false : true; + return (this.deploymentOptions.excludeObjectTypes.value.find(x => x === mssql.SchemaObjectType.ServerRoleMembership)) ? false : true; case loc.ServerRoles: - return (this.deploymentOptions.excludeObjectTypes.find(x => x === mssql.SchemaObjectType.ServerRoles)) ? false : true; + return (this.deploymentOptions.excludeObjectTypes.value.find(x => x === mssql.SchemaObjectType.ServerRoles)) ? false : true; case loc.ServerTriggers: - return (this.deploymentOptions.excludeObjectTypes.find(x => x === mssql.SchemaObjectType.ServerTriggers)) ? false : true; + return (this.deploymentOptions.excludeObjectTypes.value.find(x => x === mssql.SchemaObjectType.ServerTriggers)) ? false : true; } return false; } @@ -1162,236 +831,4 @@ export class SchemaCompareOptionsModel { return; } } - - public getDescription(label: string): string { - switch (label) { - case loc.IgnoreTableOptions: - return loc.descriptionIgnoreTableOptions; - - case loc.IgnoreSemicolonBetweenStatements: - return loc.descriptionIgnoreSemicolonBetweenStatements; - - case loc.IgnoreRouteLifetime: - return loc.descriptionIgnoreRouteLifetime; - - case loc.IgnoreRoleMembership: - return loc.descriptionIgnoreRoleMembership; - - case loc.IgnoreQuotedIdentifiers: - return loc.descriptionIgnoreQuotedIdentifiers; - - case loc.IgnorePermissions: - return loc.descriptionIgnorePermissions; - - case loc.IgnorePartitionSchemes: - return loc.descriptionIgnorePartitionSchemes; - - case loc.IgnoreObjectPlacementOnPartitionScheme: - return loc.descriptionIgnoreObjectPlacementOnPartitionScheme; - - case loc.IgnoreNotForReplication: - return loc.descriptionIgnoreNotForReplication; - - case loc.IgnoreLoginSids: - return loc.descriptionIgnoreLoginSids; - - case loc.IgnoreLockHintsOnIndexes: - return loc.descriptionIgnoreLockHintsOnIndexes; - - case loc.IgnoreKeywordCasing: - return loc.descriptionIgnoreKeywordCasing; - - case loc.IgnoreIndexPadding: - return loc.descriptionIgnoreIndexPadding; - - case loc.IgnoreIndexOptions: - return loc.descriptionIgnoreIndexOptions; - - case loc.IgnoreIncrement: - return loc.descriptionIgnoreIncrement; - - case loc.IgnoreIdentitySeed: - return loc.descriptionIgnoreIdentitySeed; - - case loc.IgnoreUserSettingsObjects: - return loc.descriptionIgnoreUserSettingsObjects; - - case loc.IgnoreFullTextCatalogFilePath: - return loc.descriptionIgnoreFullTextCatalogFilePath; - - case loc.IgnoreWhitespace: - return loc.descriptionIgnoreWhitespace; - - case loc.IgnoreWithNocheckOnForeignKeys: - return loc.descriptionIgnoreWithNocheckOnForeignKeys; - - case loc.VerifyCollationCompatibility: - return loc.descriptionVerifyCollationCompatibility; - - case loc.UnmodifiableObjectWarnings: - return loc.descriptionUnmodifiableObjectWarnings; - - case loc.TreatVerificationErrorsAsWarnings: - return loc.descriptionTreatVerificationErrorsAsWarnings; - - case loc.ScriptRefreshModule: - return loc.descriptionScriptRefreshModule; - - case loc.ScriptNewConstraintValidation: - return loc.descriptionScriptNewConstraintValidation; - - case loc.ScriptFileSize: - return loc.descriptionScriptFileSize; - - case loc.ScriptDeployStateChecks: - return loc.descriptionScriptDeployStateChecks; - - case loc.ScriptDatabaseOptions: - return loc.descriptionScriptDatabaseOptions; - - case loc.ScriptDatabaseCompatibility: - return loc.descriptionScriptDatabaseCompatibility; - - case loc.ScriptDatabaseCollation: - return loc.descriptionScriptDatabaseCollation; - - case loc.RunDeploymentPlanExecutors: - return loc.descriptionRunDeploymentPlanExecutors; - - case loc.RegisterDataTierApplication: - return loc.descriptionRegisterDataTierApplication; - - case loc.PopulateFilesOnFileGroups: - return loc.descriptionPopulateFilesOnFileGroups; - - case loc.NoAlterStatementsToChangeClrTypes: - return loc.descriptionNoAlterStatementsToChangeClrTypes; - - case loc.IncludeTransactionalScripts: - return loc.descriptionIncludeTransactionalScripts; - - case loc.IncludeCompositeObjects: - return loc.descriptionIncludeCompositeObjects; - - case loc.AllowUnsafeRowLevelSecurityDataMovement: - return loc.descriptionAllowUnsafeRowLevelSecurityDataMovement; - - case loc.IgnoreWithNocheckOnCheckConstraints: - return loc.descriptionIgnoreWithNocheckOnCheckConstraints; - - case loc.IgnoreFillFactor: - return loc.descriptionIgnoreFillFactor; - - case loc.IgnoreFileSize: - return loc.descriptionIgnoreFileSize; - - case loc.IgnoreFilegroupPlacement: - return loc.descriptionIgnoreFilegroupPlacement; - - case loc.DoNotAlterReplicatedObjects: - return loc.descriptionDoNotAlterReplicatedObjects; - - case loc.DoNotAlterChangeDataCaptureObjects: - return loc.descriptionDoNotAlterChangeDataCaptureObjects; - - case loc.DisableAndReenableDdlTriggers: - return loc.descriptionDisableAndReenableDdlTriggers; - - case loc.DeployDatabaseInSingleUserMode: - return loc.descriptionDeployDatabaseInSingleUserMode; - - case loc.CreateNewDatabase: - return loc.descriptionCreateNewDatabase; - - case loc.CompareUsingTargetCollation: - return loc.descriptionCompareUsingTargetCollation; - - case loc.CommentOutSetVarDeclarations: - return loc.descriptionCommentOutSetVarDeclarations; - - case loc.BlockWhenDriftDetected: - return loc.descriptionBlockWhenDriftDetected; - - case loc.BlockOnPossibleDataLoss: - return loc.descriptionBlockOnPossibleDataLoss; - - case loc.BackupDatabaseBeforeChanges: - return loc.descriptionBackupDatabaseBeforeChanges; - - case loc.AllowIncompatiblePlatform: - return loc.descriptionAllowIncompatiblePlatform; - - case loc.AllowDropBlockingAssemblies: - return loc.descriptionAllowDropBlockingAssemblies; - - case loc.DropConstraintsNotInSource: - return loc.descriptionDropConstraintsNotInSource; - - case loc.DropDmlTriggersNotInSource: - return loc.descriptionDropDmlTriggersNotInSource; - - case loc.DropExtendedPropertiesNotInSource: - return loc.descriptionDropExtendedPropertiesNotInSource; - - case loc.DropIndexesNotInSource: - return loc.descriptionDropIndexesNotInSource; - - case loc.IgnoreFileAndLogFilePath: - return loc.descriptionIgnoreFileAndLogFilePath; - - case loc.IgnoreExtendedProperties: - return loc.descriptionIgnoreExtendedProperties; - - case loc.IgnoreDmlTriggerState: - return loc.descriptionIgnoreDmlTriggerState; - - case loc.IgnoreDmlTriggerOrder: - return loc.descriptionIgnoreDmlTriggerOrder; - - case loc.IgnoreDefaultSchema: - return loc.descriptionIgnoreDefaultSchema; - - case loc.IgnoreDdlTriggerState: - return loc.descriptionIgnoreDdlTriggerState; - - case loc.IgnoreDdlTriggerOrder: - return loc.descriptionIgnoreDdlTriggerOrder; - - case loc.IgnoreCryptographicProviderFilePath: - return loc.descriptionIgnoreCryptographicProviderFilePath; - - case loc.VerifyDeployment: - return loc.descriptionVerifyDeployment; - - case loc.IgnoreComments: - return loc.descriptionIgnoreComments; - - case loc.IgnoreColumnCollation: - return loc.descriptionIgnoreColumnCollation; - - case loc.IgnoreAuthorizer: - return loc.descriptionIgnoreAuthorizer; - - case loc.IgnoreAnsiNulls: - return loc.descriptionIgnoreAnsiNulls; - - case loc.GenerateSmartDefaults: - return loc.descriptionGenerateSmartDefaults; - - case loc.DropStatisticsNotInSource: - return loc.descriptionDropStatisticsNotInSource; - - case loc.DropRoleMembersNotInSource: - return loc.descriptionDropRoleMembersNotInSource; - - case loc.DropPermissionsNotInSource: - return loc.descriptionDropPermissionsNotInSource; - - case loc.DropObjectsNotInSource: - return loc.descriptionDropObjectsNotInSource; - - case loc.IgnoreColumnOrder: - return loc.descriptionIgnoreColumnOrder; - } - } } diff --git a/extensions/schema-compare/src/test/dialogs/schemaCompareOptionsDialog.test.ts b/extensions/schema-compare/src/test/dialogs/schemaCompareOptionsDialog.test.ts index 6733addaa1..b34c31221d 100644 --- a/extensions/schema-compare/src/test/dialogs/schemaCompareOptionsDialog.test.ts +++ b/extensions/schema-compare/src/test/dialogs/schemaCompareOptionsDialog.test.ts @@ -4,11 +4,12 @@ *--------------------------------------------------------------------------------------------*/ import * as should from 'should'; -import {SchemaCompareOptionsDialog} from '../../dialogs/schemaCompareOptionsDialog'; +import * as testUtils from '../testUtils'; +import { SchemaCompareOptionsDialog } from '../../dialogs/schemaCompareOptionsDialog'; describe('Schema Compare Options Dialog', () => { it('Should open dialog successfully ', async function (): Promise { - const optionsDialog = new SchemaCompareOptionsDialog(undefined, undefined); + const optionsDialog = new SchemaCompareOptionsDialog(testUtils.getDeploymentOptions(), undefined); await optionsDialog.openDialog(); should.notEqual(optionsDialog.dialog, undefined); }); diff --git a/extensions/schema-compare/src/test/models/schemaCompareOptionsModel.test.ts b/extensions/schema-compare/src/test/models/schemaCompareOptionsModel.test.ts index a9eb96b482..460cafe1a4 100644 --- a/extensions/schema-compare/src/test/models/schemaCompareOptionsModel.test.ts +++ b/extensions/schema-compare/src/test/models/schemaCompareOptionsModel.test.ts @@ -4,24 +4,24 @@ *--------------------------------------------------------------------------------------------*/ import * as should from 'should'; -import * as mssql from 'mssql'; +import * as testUtils from '../testUtils'; import { SchemaCompareOptionsModel } from '../../models/schemaCompareOptionsModel'; describe('Schema Compare Options Model', () => { it('Should create model and set options successfully', function (): void { - const model = new SchemaCompareOptionsModel(defaultOptions); + const model = new SchemaCompareOptionsModel(testUtils.getDeploymentOptions()); should.notEqual(model.getOptionsData(), undefined, 'Options shouldn\'t be undefined'); should.notEqual(model.getObjectsData(), undefined, 'Objects shouldn\'t be undefined'); should.doesNotThrow(() => model.setDeploymentOptions()); should.doesNotThrow(() => model.setObjectTypeOptions()); - should(model.getSchemaCompareOptionUtil('')).be.false('Should return false if an invalid option is passed in'); + should(model.getSchemaCompareOptionUtil('')).equal(undefined, 'Should return undefined if an invalid option is passed in'); should(model.getSchemaCompareIncludedObjectsUtil('')).be.false('Should return false if invalid object name is passed in'); }); it('Should exclude objects', function (): void { - const model = new SchemaCompareOptionsModel(defaultOptions); + const model = new SchemaCompareOptionsModel(testUtils.getDeploymentOptions()); should(model.excludedObjectTypes.length).be.equal(0, 'There should be no excluded objects'); model.objectTypeLabels.forEach(l => { @@ -32,90 +32,9 @@ describe('Schema Compare Options Model', () => { }); it('Should get descriptions', function (): void { - const model = new SchemaCompareOptionsModel(defaultOptions); + const model = new SchemaCompareOptionsModel(testUtils.getDeploymentOptions()); model.optionsLabels.forEach(l => { should(model.getDescription(l)).not.equal(undefined); }); }); }); - -const defaultOptions: mssql.DeploymentOptions = { - ignoreTableOptions: false, - ignoreSemicolonBetweenStatements: false, - ignoreRouteLifetime: false, - ignoreRoleMembership: false, - ignoreQuotedIdentifiers: false, - ignorePermissions: false, - ignorePartitionSchemes: false, - ignoreObjectPlacementOnPartitionScheme: false, - ignoreNotForReplication: false, - ignoreLoginSids: false, - ignoreLockHintsOnIndexes: false, - ignoreKeywordCasing: false, - ignoreIndexPadding: false, - ignoreIndexOptions: false, - ignoreIncrement: false, - ignoreIdentitySeed: false, - ignoreUserSettingsObjects: false, - ignoreFullTextCatalogFilePath: false, - ignoreWhitespace: false, - ignoreWithNocheckOnForeignKeys: false, - verifyCollationCompatibility: false, - unmodifiableObjectWarnings: false, - treatVerificationErrorsAsWarnings: false, - scriptRefreshModule: false, - scriptNewConstraintValidation: false, - scriptFileSize: false, - scriptDeployStateChecks: false, - scriptDatabaseOptions: false, - scriptDatabaseCompatibility: false, - scriptDatabaseCollation: false, - runDeploymentPlanExecutors: false, - registerDataTierApplication: false, - populateFilesOnFileGroups: false, - noAlterStatementsToChangeClrTypes: false, - includeTransactionalScripts: false, - includeCompositeObjects: false, - allowUnsafeRowLevelSecurityDataMovement: false, - ignoreWithNocheckOnCheckConstraints: false, - ignoreFillFactor: false, - ignoreFileSize: false, - ignoreFilegroupPlacement: false, - doNotAlterReplicatedObjects: false, - doNotAlterChangeDataCaptureObjects: false, - disableAndReenableDdlTriggers: false, - deployDatabaseInSingleUserMode: false, - createNewDatabase: false, - compareUsingTargetCollation: false, - commentOutSetVarDeclarations: false, - blockWhenDriftDetected: false, - blockOnPossibleDataLoss: false, - backupDatabaseBeforeChanges: false, - allowIncompatiblePlatform: false, - allowDropBlockingAssemblies: false, - dropConstraintsNotInSource: false, - dropDmlTriggersNotInSource: false, - dropExtendedPropertiesNotInSource: false, - dropIndexesNotInSource: false, - ignoreFileAndLogFilePath: false, - ignoreExtendedProperties: false, - ignoreDmlTriggerState: false, - ignoreDmlTriggerOrder: false, - ignoreDefaultSchema: false, - ignoreDdlTriggerState: false, - ignoreDdlTriggerOrder: false, - ignoreCryptographicProviderFilePath: false, - verifyDeployment: false, - ignoreComments: false, - ignoreColumnCollation: false, - ignoreAuthorizer: false, - ignoreAnsiNulls: false, - generateSmartDefaults: false, - dropStatisticsNotInSource: false, - dropRoleMembersNotInSource: false, - dropPermissionsNotInSource: false, - dropObjectsNotInSource: false, - ignoreColumnOrder: false, - doNotDropObjectTypes: [], - excludeObjectTypes: [mssql.SchemaObjectType.Tables] -}; diff --git a/extensions/schema-compare/src/test/testUtils.ts b/extensions/schema-compare/src/test/testUtils.ts index 6425b99d28..9caa286ce6 100644 --- a/extensions/schema-compare/src/test/testUtils.ts +++ b/extensions/schema-compare/src/test/testUtils.ts @@ -152,3 +152,103 @@ export function setDatabaseEndpointInfo(): mssql.SchemaCompareEndpointInfo { return endpointInfo; } + +export function getDeploymentOptions(): mssql.DeploymentOptions { + const sampleDesc = 'Sample Description text'; + const sampleName = 'Sample Display Name'; + return { + ignoreTableOptions: { value: false, description: sampleDesc, displayName: sampleName }, + ignoreSemicolonBetweenStatements: { value: false, description: sampleDesc, displayName: sampleName }, + ignoreRouteLifetime: { value: false, description: sampleDesc, displayName: sampleName }, + ignoreRoleMembership: { value: false, description: sampleDesc, displayName: sampleName }, + ignoreQuotedIdentifiers: { value: false, description: sampleDesc, displayName: sampleName }, + ignorePermissions: { value: false, description: sampleDesc, displayName: sampleName }, + ignorePartitionSchemes: { value: false, description: sampleDesc, displayName: sampleName }, + ignoreObjectPlacementOnPartitionScheme: { value: false, description: sampleDesc, displayName: sampleName }, + ignoreNotForReplication: { value: false, description: sampleDesc, displayName: sampleName }, + ignoreLoginSids: { value: false, description: sampleDesc, displayName: sampleName }, + ignoreLockHintsOnIndexes: { value: false, description: sampleDesc, displayName: sampleName }, + ignoreKeywordCasing: { value: false, description: sampleDesc, displayName: sampleName }, + ignoreIndexPadding: { value: false, description: sampleDesc, displayName: sampleName }, + ignoreIndexOptions: { value: false, description: sampleDesc, displayName: sampleName }, + ignoreIncrement: { value: false, description: sampleDesc, displayName: sampleName }, + ignoreIdentitySeed: { value: false, description: sampleDesc, displayName: sampleName }, + ignoreUserSettingsObjects: { value: false, description: sampleDesc, displayName: sampleName }, + ignoreFullTextCatalogFilePath: { value: false, description: sampleDesc, displayName: sampleName }, + ignoreWhitespace: { value: false, description: sampleDesc, displayName: sampleName }, + ignoreWithNocheckOnForeignKeys: { value: false, description: sampleDesc, displayName: sampleName }, + verifyCollationCompatibility: { value: false, description: sampleDesc, displayName: sampleName }, + unmodifiableObjectWarnings: { value: false, description: sampleDesc, displayName: sampleName }, + treatVerificationErrorsAsWarnings: { value: false, description: sampleDesc, displayName: sampleName }, + scriptRefreshModule: { value: false, description: sampleDesc, displayName: sampleName }, + scriptNewConstraintValidation: { value: false, description: sampleDesc, displayName: sampleName }, + scriptFileSize: { value: false, description: sampleDesc, displayName: sampleName }, + scriptDeployStateChecks: { value: false, description: sampleDesc, displayName: sampleName }, + scriptDatabaseOptions: { value: false, description: sampleDesc, displayName: sampleName }, + scriptDatabaseCompatibility: { value: false, description: sampleDesc, displayName: sampleName }, + scriptDatabaseCollation: { value: false, description: sampleDesc, displayName: sampleName }, + runDeploymentPlanExecutors: { value: false, description: sampleDesc, displayName: sampleName }, + registerDataTierApplication: { value: false, description: sampleDesc, displayName: sampleName }, + populateFilesOnFileGroups: { value: false, description: sampleDesc, displayName: sampleName }, + noAlterStatementsToChangeClrTypes: { value: false, description: sampleDesc, displayName: sampleName }, + includeTransactionalScripts: { value: false, description: sampleDesc, displayName: sampleName }, + includeCompositeObjects: { value: false, description: sampleDesc, displayName: sampleName }, + allowUnsafeRowLevelSecurityDataMovement: { value: false, description: sampleDesc, displayName: sampleName }, + ignoreWithNocheckOnCheckConstraints: { value: false, description: sampleDesc, displayName: sampleName }, + ignoreFillFactor: { value: false, description: sampleDesc, displayName: sampleName }, + ignoreFileSize: { value: false, description: sampleDesc, displayName: sampleName }, + ignoreFilegroupPlacement: { value: false, description: sampleDesc, displayName: sampleName }, + doNotAlterReplicatedObjects: { value: false, description: sampleDesc, displayName: sampleName }, + doNotAlterChangeDataCaptureObjects: { value: false, description: sampleDesc, displayName: sampleName }, + disableAndReenableDdlTriggers: { value: false, description: sampleDesc, displayName: sampleName }, + deployDatabaseInSingleUserMode: { value: false, description: sampleDesc, displayName: sampleName }, + createNewDatabase: { value: false, description: sampleDesc, displayName: sampleName }, + compareUsingTargetCollation: { value: false, description: sampleDesc, displayName: sampleName }, + commentOutSetVarDeclarations: { value: false, description: sampleDesc, displayName: sampleName }, + blockWhenDriftDetected: { value: false, description: sampleDesc, displayName: sampleName }, + blockOnPossibleDataLoss: { value: false, description: sampleDesc, displayName: sampleName }, + backupDatabaseBeforeChanges: { value: false, description: sampleDesc, displayName: sampleName }, + allowIncompatiblePlatform: { value: false, description: sampleDesc, displayName: sampleName }, + allowDropBlockingAssemblies: { value: false, description: sampleDesc, displayName: sampleName }, + dropConstraintsNotInSource: { value: false, description: sampleDesc, displayName: sampleName }, + dropDmlTriggersNotInSource: { value: false, description: sampleDesc, displayName: sampleName }, + dropExtendedPropertiesNotInSource: { value: false, description: sampleDesc, displayName: sampleName }, + dropIndexesNotInSource: { value: false, description: sampleDesc, displayName: sampleName }, + ignoreFileAndLogFilePath: { value: false, description: sampleDesc, displayName: sampleName }, + ignoreExtendedProperties: { value: false, description: sampleDesc, displayName: sampleName }, + ignoreDmlTriggerState: { value: false, description: sampleDesc, displayName: sampleName }, + ignoreDmlTriggerOrder: { value: false, description: sampleDesc, displayName: sampleName }, + ignoreDefaultSchema: { value: false, description: sampleDesc, displayName: sampleName }, + ignoreDdlTriggerState: { value: false, description: sampleDesc, displayName: sampleName }, + ignoreDdlTriggerOrder: { value: false, description: sampleDesc, displayName: sampleName }, + ignoreCryptographicProviderFilePath: { value: false, description: sampleDesc, displayName: sampleName }, + verifyDeployment: { value: false, description: sampleDesc, displayName: sampleName }, + ignoreComments: { value: false, description: sampleDesc, displayName: sampleName }, + ignoreColumnCollation: { value: false, description: sampleDesc, displayName: sampleName }, + ignoreAuthorizer: { value: false, description: sampleDesc, displayName: sampleName }, + ignoreAnsiNulls: { value: false, description: sampleDesc, displayName: sampleName }, + generateSmartDefaults: { value: false, description: sampleDesc, displayName: sampleName }, + dropStatisticsNotInSource: { value: false, description: sampleDesc, displayName: sampleName }, + dropRoleMembersNotInSource: { value: false, description: sampleDesc, displayName: sampleName }, + dropPermissionsNotInSource: { value: false, description: sampleDesc, displayName: sampleName }, + dropObjectsNotInSource: { value: false, description: sampleDesc, displayName: sampleName }, + ignoreColumnOrder: { value: false, description: sampleDesc, displayName: sampleName }, + doNotDropObjectTypes: { value: [], description: sampleDesc, displayName: sampleName }, + excludeObjectTypes: { value: [], description: sampleDesc, displayName: sampleName }, + ignoreTablePartitionOptions: { value: false, description: sampleDesc, displayName: sampleName }, + doNotEvaluateSqlCmdVariables: { value: false, description: sampleDesc, displayName: sampleName }, + disableParallelismForEnablingIndexes: { value: false, description: sampleDesc, displayName: sampleName }, + disableIndexesForDataPhase: { value: false, description: sampleDesc, displayName: sampleName }, + restoreSequenceCurrentValue: { value: false, description: sampleDesc, displayName: sampleName }, + rebuildIndexesOfflineForDataPhase: { value: false, description: sampleDesc, displayName: sampleName }, + isAlwaysEncryptedParameterizationEnabled: { value: false, description: sampleDesc, displayName: sampleName }, + preserveIdentityLastValues: { value: false, description: sampleDesc, displayName: sampleName }, + allowExternalLibraryPaths: { value: false, description: sampleDesc, displayName: sampleName }, + allowExternalLanguagePaths: { value: false, description: sampleDesc, displayName: sampleName }, + hashObjectNamesInLogs: { value: false, description: sampleDesc, displayName: sampleName }, + doNotDropWorkloadClassifiers: { value: false, description: sampleDesc, displayName: sampleName }, + ignoreWorkloadClassifiers: { value: false, description: sampleDesc, displayName: sampleName }, + ignoreDatabaseWorkloadGroups: { value: false, description: sampleDesc, displayName: sampleName }, + doNotDropDatabaseWorkloadGroups: { value: false, description: sampleDesc, displayName: sampleName } + }; +} diff --git a/extensions/sql-database-projects/src/common/utils.ts b/extensions/sql-database-projects/src/common/utils.ts index 80fdccd1eb..73ad055be3 100644 --- a/extensions/sql-database-projects/src/common/utils.ts +++ b/extensions/sql-database-projects/src/common/utils.ts @@ -328,14 +328,14 @@ export async function getDefaultPublishDeploymentOptions(project: Project): Prom const deploymentOptions = result.defaultDeploymentOptions; // re-include database-scoped credentials if (getAzdataApi()) { - deploymentOptions.excludeObjectTypes = (deploymentOptions as mssql.DeploymentOptions).excludeObjectTypes.filter(x => x !== mssql.SchemaObjectType.DatabaseScopedCredentials); + deploymentOptions.excludeObjectTypes.value = (deploymentOptions as mssql.DeploymentOptions).excludeObjectTypes.value?.filter(x => x !== mssql.SchemaObjectType.DatabaseScopedCredentials); } else { - deploymentOptions.excludeObjectTypes = (deploymentOptions as vscodeMssql.DeploymentOptions).excludeObjectTypes.filter(x => x !== vscodeMssql.SchemaObjectType.DatabaseScopedCredentials); + deploymentOptions.excludeObjectTypes.value = (deploymentOptions 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) { - deploymentOptions.includeCompositeObjects = true; + deploymentOptions.includeCompositeObjects.value = true; } return result.defaultDeploymentOptions; } diff --git a/extensions/sql-database-projects/src/test/testContext.ts b/extensions/sql-database-projects/src/test/testContext.ts index de840a5f73..5962c7065e 100644 --- a/extensions/sql-database-projects/src/test/testContext.ts +++ b/extensions/sql-database-projects/src/test/testContext.ts @@ -22,89 +22,112 @@ export const mockDacFxResult = { report: '' }; +/* Get the deployment options sample model */ +export function getDeploymentOptions(): mssql.DeploymentOptions { + const sampleDesc = 'Sample Description text'; + const sampleName = 'Sample Display Name'; + const defaultOptions: mssql.DeploymentOptions = { + ignoreTableOptions: { value: false, description: sampleDesc, displayName: sampleName }, + ignoreSemicolonBetweenStatements: { value: false, description: sampleDesc, displayName: sampleName }, + ignoreRouteLifetime: { value: false, description: sampleDesc, displayName: sampleName }, + ignoreRoleMembership: { value: false, description: sampleDesc, displayName: sampleName }, + ignoreQuotedIdentifiers: { value: false, description: sampleDesc, displayName: sampleName }, + ignorePermissions: { value: false, description: sampleDesc, displayName: sampleName }, + ignorePartitionSchemes: { value: false, description: sampleDesc, displayName: sampleName }, + ignoreObjectPlacementOnPartitionScheme: { value: false, description: sampleDesc, displayName: sampleName }, + ignoreNotForReplication: { value: false, description: sampleDesc, displayName: sampleName }, + ignoreLoginSids: { value: false, description: sampleDesc, displayName: sampleName }, + ignoreLockHintsOnIndexes: { value: false, description: sampleDesc, displayName: sampleName }, + ignoreKeywordCasing: { value: false, description: sampleDesc, displayName: sampleName }, + ignoreIndexPadding: { value: false, description: sampleDesc, displayName: sampleName }, + ignoreIndexOptions: { value: false, description: sampleDesc, displayName: sampleName }, + ignoreIncrement: { value: false, description: sampleDesc, displayName: sampleName }, + ignoreIdentitySeed: { value: false, description: sampleDesc, displayName: sampleName }, + ignoreUserSettingsObjects: { value: false, description: sampleDesc, displayName: sampleName }, + ignoreFullTextCatalogFilePath: { value: false, description: sampleDesc, displayName: sampleName }, + ignoreWhitespace: { value: false, description: sampleDesc, displayName: sampleName }, + ignoreWithNocheckOnForeignKeys: { value: false, description: sampleDesc, displayName: sampleName }, + verifyCollationCompatibility: { value: false, description: sampleDesc, displayName: sampleName }, + unmodifiableObjectWarnings: { value: false, description: sampleDesc, displayName: sampleName }, + treatVerificationErrorsAsWarnings: { value: false, description: sampleDesc, displayName: sampleName }, + scriptRefreshModule: { value: false, description: sampleDesc, displayName: sampleName }, + scriptNewConstraintValidation: { value: false, description: sampleDesc, displayName: sampleName }, + scriptFileSize: { value: false, description: sampleDesc, displayName: sampleName }, + scriptDeployStateChecks: { value: false, description: sampleDesc, displayName: sampleName }, + scriptDatabaseOptions: { value: false, description: sampleDesc, displayName: sampleName }, + scriptDatabaseCompatibility: { value: false, description: sampleDesc, displayName: sampleName }, + scriptDatabaseCollation: { value: false, description: sampleDesc, displayName: sampleName }, + runDeploymentPlanExecutors: { value: false, description: sampleDesc, displayName: sampleName }, + registerDataTierApplication: { value: false, description: sampleDesc, displayName: sampleName }, + populateFilesOnFileGroups: { value: false, description: sampleDesc, displayName: sampleName }, + noAlterStatementsToChangeClrTypes: { value: false, description: sampleDesc, displayName: sampleName }, + includeTransactionalScripts: { value: false, description: sampleDesc, displayName: sampleName }, + includeCompositeObjects: { value: false, description: sampleDesc, displayName: sampleName }, + allowUnsafeRowLevelSecurityDataMovement: { value: false, description: sampleDesc, displayName: sampleName }, + ignoreWithNocheckOnCheckConstraints: { value: false, description: sampleDesc, displayName: sampleName }, + ignoreFillFactor: { value: false, description: sampleDesc, displayName: sampleName }, + ignoreFileSize: { value: false, description: sampleDesc, displayName: sampleName }, + ignoreFilegroupPlacement: { value: false, description: sampleDesc, displayName: sampleName }, + doNotAlterReplicatedObjects: { value: false, description: sampleDesc, displayName: sampleName }, + doNotAlterChangeDataCaptureObjects: { value: false, description: sampleDesc, displayName: sampleName }, + disableAndReenableDdlTriggers: { value: false, description: sampleDesc, displayName: sampleName }, + deployDatabaseInSingleUserMode: { value: false, description: sampleDesc, displayName: sampleName }, + createNewDatabase: { value: false, description: sampleDesc, displayName: sampleName }, + compareUsingTargetCollation: { value: false, description: sampleDesc, displayName: sampleName }, + commentOutSetVarDeclarations: { value: false, description: sampleDesc, displayName: sampleName }, + blockWhenDriftDetected: { value: false, description: sampleDesc, displayName: sampleName }, + blockOnPossibleDataLoss: { value: false, description: sampleDesc, displayName: sampleName }, + backupDatabaseBeforeChanges: { value: false, description: sampleDesc, displayName: sampleName }, + allowIncompatiblePlatform: { value: false, description: sampleDesc, displayName: sampleName }, + allowDropBlockingAssemblies: { value: false, description: sampleDesc, displayName: sampleName }, + dropConstraintsNotInSource: { value: false, description: sampleDesc, displayName: sampleName }, + dropDmlTriggersNotInSource: { value: false, description: sampleDesc, displayName: sampleName }, + dropExtendedPropertiesNotInSource: { value: false, description: sampleDesc, displayName: sampleName }, + dropIndexesNotInSource: { value: false, description: sampleDesc, displayName: sampleName }, + ignoreFileAndLogFilePath: { value: false, description: sampleDesc, displayName: sampleName }, + ignoreExtendedProperties: { value: false, description: sampleDesc, displayName: sampleName }, + ignoreDmlTriggerState: { value: false, description: sampleDesc, displayName: sampleName }, + ignoreDmlTriggerOrder: { value: false, description: sampleDesc, displayName: sampleName }, + ignoreDefaultSchema: { value: false, description: sampleDesc, displayName: sampleName }, + ignoreDdlTriggerState: { value: false, description: sampleDesc, displayName: sampleName }, + ignoreDdlTriggerOrder: { value: false, description: sampleDesc, displayName: sampleName }, + ignoreCryptographicProviderFilePath: { value: false, description: sampleDesc, displayName: sampleName }, + verifyDeployment: { value: false, description: sampleDesc, displayName: sampleName }, + ignoreComments: { value: false, description: sampleDesc, displayName: sampleName }, + ignoreColumnCollation: { value: false, description: sampleDesc, displayName: sampleName }, + ignoreAuthorizer: { value: false, description: sampleDesc, displayName: sampleName }, + ignoreAnsiNulls: { value: false, description: sampleDesc, displayName: sampleName }, + generateSmartDefaults: { value: false, description: sampleDesc, displayName: sampleName }, + dropStatisticsNotInSource: { value: false, description: sampleDesc, displayName: sampleName }, + dropRoleMembersNotInSource: { value: false, description: sampleDesc, displayName: sampleName }, + dropPermissionsNotInSource: { value: false, description: sampleDesc, displayName: sampleName }, + dropObjectsNotInSource: { value: false, description: sampleDesc, displayName: sampleName }, + ignoreColumnOrder: { value: false, description: sampleDesc, displayName: sampleName }, + doNotDropObjectTypes: { value: [], description: sampleDesc, displayName: sampleName }, + excludeObjectTypes: { value: [], description: sampleDesc, displayName: sampleName }, + ignoreTablePartitionOptions: { value: false, description: sampleDesc, displayName: sampleName }, + doNotEvaluateSqlCmdVariables: { value: false, description: sampleDesc, displayName: sampleName }, + disableParallelismForEnablingIndexes: { value: false, description: sampleDesc, displayName: sampleName }, + disableIndexesForDataPhase: { value: false, description: sampleDesc, displayName: sampleName }, + restoreSequenceCurrentValue: { value: false, description: sampleDesc, displayName: sampleName }, + rebuildIndexesOfflineForDataPhase: { value: false, description: sampleDesc, displayName: sampleName }, + isAlwaysEncryptedParameterizationEnabled: { value: false, description: sampleDesc, displayName: sampleName }, + preserveIdentityLastValues: { value: false, description: sampleDesc, displayName: sampleName }, + allowExternalLibraryPaths: { value: false, description: sampleDesc, displayName: sampleName }, + allowExternalLanguagePaths: { value: false, description: sampleDesc, displayName: sampleName }, + hashObjectNamesInLogs: { value: false, description: sampleDesc, displayName: sampleName }, + doNotDropWorkloadClassifiers: { value: false, description: sampleDesc, displayName: sampleName }, + ignoreWorkloadClassifiers: { value: false, description: sampleDesc, displayName: sampleName }, + ignoreDatabaseWorkloadGroups: { value: false, description: sampleDesc, displayName: sampleName }, + doNotDropDatabaseWorkloadGroups: { value: false, description: sampleDesc, displayName: sampleName } + }; + return defaultOptions; +} + export const mockDacFxOptionsResult: mssql.DacFxOptionsResult = { success: true, errorMessage: '', - deploymentOptions: { - ignoreTableOptions: false, - ignoreSemicolonBetweenStatements: false, - ignoreRouteLifetime: false, - ignoreRoleMembership: false, - ignoreQuotedIdentifiers: false, - ignorePermissions: false, - ignorePartitionSchemes: false, - ignoreObjectPlacementOnPartitionScheme: false, - ignoreNotForReplication: false, - ignoreLoginSids: false, - ignoreLockHintsOnIndexes: false, - ignoreKeywordCasing: false, - ignoreIndexPadding: false, - ignoreIndexOptions: false, - ignoreIncrement: false, - ignoreIdentitySeed: false, - ignoreUserSettingsObjects: false, - ignoreFullTextCatalogFilePath: false, - ignoreWhitespace: false, - ignoreWithNocheckOnForeignKeys: false, - verifyCollationCompatibility: false, - unmodifiableObjectWarnings: false, - treatVerificationErrorsAsWarnings: false, - scriptRefreshModule: false, - scriptNewConstraintValidation: false, - scriptFileSize: false, - scriptDeployStateChecks: false, - scriptDatabaseOptions: false, - scriptDatabaseCompatibility: false, - scriptDatabaseCollation: false, - runDeploymentPlanExecutors: false, - registerDataTierApplication: false, - populateFilesOnFileGroups: false, - noAlterStatementsToChangeClrTypes: false, - includeTransactionalScripts: false, - includeCompositeObjects: false, - allowUnsafeRowLevelSecurityDataMovement: false, - ignoreWithNocheckOnCheckConstraints: false, - ignoreFillFactor: false, - ignoreFileSize: false, - ignoreFilegroupPlacement: false, - doNotAlterReplicatedObjects: false, - doNotAlterChangeDataCaptureObjects: false, - disableAndReenableDdlTriggers: false, - deployDatabaseInSingleUserMode: false, - createNewDatabase: false, - compareUsingTargetCollation: false, - commentOutSetVarDeclarations: false, - blockWhenDriftDetected: false, - blockOnPossibleDataLoss: false, - backupDatabaseBeforeChanges: false, - allowIncompatiblePlatform: false, - allowDropBlockingAssemblies: false, - dropConstraintsNotInSource: false, - dropDmlTriggersNotInSource: false, - dropExtendedPropertiesNotInSource: false, - dropIndexesNotInSource: false, - ignoreFileAndLogFilePath: false, - ignoreExtendedProperties: false, - ignoreDmlTriggerState: false, - ignoreDmlTriggerOrder: false, - ignoreDefaultSchema: false, - ignoreDdlTriggerState: false, - ignoreDdlTriggerOrder: false, - ignoreCryptographicProviderFilePath: false, - verifyDeployment: false, - ignoreComments: false, - ignoreColumnCollation: false, - ignoreAuthorizer: false, - ignoreAnsiNulls: false, - generateSmartDefaults: false, - dropStatisticsNotInSource: false, - dropRoleMembersNotInSource: false, - dropPermissionsNotInSource: false, - dropObjectsNotInSource: false, - ignoreColumnOrder: false, - doNotDropObjectTypes: [], - excludeObjectTypes: [] - } + deploymentOptions: getDeploymentOptions() }; export class MockDacFxService implements mssql.IDacFxService { diff --git a/extensions/types/vscode-mssql.d.ts b/extensions/types/vscode-mssql.d.ts index feb5d5ae7b..f62707729b 100644 --- a/extensions/types/vscode-mssql.d.ts +++ b/extensions/types/vscode-mssql.d.ts @@ -489,85 +489,112 @@ declare module 'vscode-mssql' { executeAndScript = 2 } + export interface DacDeployOptionPropertyBoolean { + value: boolean; + description: string; + displayName: string; + } + + export interface DacDeployOptionPropertyObject { + value: SchemaObjectType[]; + description: string; + displayName: string; + } + 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[]; + ignoreTableOptions: DacDeployOptionPropertyBoolean; + ignoreSemicolonBetweenStatements: DacDeployOptionPropertyBoolean; + ignoreRouteLifetime: DacDeployOptionPropertyBoolean; + ignoreRoleMembership: DacDeployOptionPropertyBoolean; + ignoreQuotedIdentifiers: DacDeployOptionPropertyBoolean; + ignorePermissions: DacDeployOptionPropertyBoolean; + ignorePartitionSchemes: DacDeployOptionPropertyBoolean; + ignoreObjectPlacementOnPartitionScheme: DacDeployOptionPropertyBoolean; + ignoreNotForReplication: DacDeployOptionPropertyBoolean; + ignoreLoginSids: DacDeployOptionPropertyBoolean; + ignoreLockHintsOnIndexes: DacDeployOptionPropertyBoolean; + ignoreKeywordCasing: DacDeployOptionPropertyBoolean; + ignoreIndexPadding: DacDeployOptionPropertyBoolean; + ignoreIndexOptions: DacDeployOptionPropertyBoolean; + ignoreIncrement: DacDeployOptionPropertyBoolean; + ignoreIdentitySeed: DacDeployOptionPropertyBoolean; + ignoreUserSettingsObjects: DacDeployOptionPropertyBoolean; + ignoreFullTextCatalogFilePath: DacDeployOptionPropertyBoolean; + ignoreWhitespace: DacDeployOptionPropertyBoolean; + ignoreWithNocheckOnForeignKeys: DacDeployOptionPropertyBoolean; + verifyCollationCompatibility: DacDeployOptionPropertyBoolean; + unmodifiableObjectWarnings: DacDeployOptionPropertyBoolean; + treatVerificationErrorsAsWarnings: DacDeployOptionPropertyBoolean; + scriptRefreshModule: DacDeployOptionPropertyBoolean; + scriptNewConstraintValidation: DacDeployOptionPropertyBoolean; + scriptFileSize: DacDeployOptionPropertyBoolean; + scriptDeployStateChecks: DacDeployOptionPropertyBoolean; + scriptDatabaseOptions: DacDeployOptionPropertyBoolean; + scriptDatabaseCompatibility: DacDeployOptionPropertyBoolean; + scriptDatabaseCollation: DacDeployOptionPropertyBoolean; + runDeploymentPlanExecutors: DacDeployOptionPropertyBoolean; + registerDataTierApplication: DacDeployOptionPropertyBoolean; + populateFilesOnFileGroups: DacDeployOptionPropertyBoolean; + noAlterStatementsToChangeClrTypes: DacDeployOptionPropertyBoolean; + includeTransactionalScripts: DacDeployOptionPropertyBoolean; + includeCompositeObjects: DacDeployOptionPropertyBoolean; + allowUnsafeRowLevelSecurityDataMovement: DacDeployOptionPropertyBoolean; + ignoreWithNocheckOnCheckConstraints: DacDeployOptionPropertyBoolean; + ignoreFillFactor: DacDeployOptionPropertyBoolean; + ignoreFileSize: DacDeployOptionPropertyBoolean; + ignoreFilegroupPlacement: DacDeployOptionPropertyBoolean; + doNotAlterReplicatedObjects: DacDeployOptionPropertyBoolean; + doNotAlterChangeDataCaptureObjects: DacDeployOptionPropertyBoolean; + disableAndReenableDdlTriggers: DacDeployOptionPropertyBoolean; + deployDatabaseInSingleUserMode: DacDeployOptionPropertyBoolean; + createNewDatabase: DacDeployOptionPropertyBoolean; + compareUsingTargetCollation: DacDeployOptionPropertyBoolean; + commentOutSetVarDeclarations: DacDeployOptionPropertyBoolean; + blockWhenDriftDetected: DacDeployOptionPropertyBoolean; + blockOnPossibleDataLoss: DacDeployOptionPropertyBoolean; + backupDatabaseBeforeChanges: DacDeployOptionPropertyBoolean; + allowIncompatiblePlatform: DacDeployOptionPropertyBoolean; + allowDropBlockingAssemblies: DacDeployOptionPropertyBoolean; + dropConstraintsNotInSource: DacDeployOptionPropertyBoolean; + dropDmlTriggersNotInSource: DacDeployOptionPropertyBoolean; + dropExtendedPropertiesNotInSource: DacDeployOptionPropertyBoolean; + dropIndexesNotInSource: DacDeployOptionPropertyBoolean; + ignoreFileAndLogFilePath: DacDeployOptionPropertyBoolean; + ignoreExtendedProperties: DacDeployOptionPropertyBoolean; + ignoreDmlTriggerState: DacDeployOptionPropertyBoolean; + ignoreDmlTriggerOrder: DacDeployOptionPropertyBoolean; + ignoreDefaultSchema: DacDeployOptionPropertyBoolean; + ignoreDdlTriggerState: DacDeployOptionPropertyBoolean; + ignoreDdlTriggerOrder: DacDeployOptionPropertyBoolean; + ignoreCryptographicProviderFilePath: DacDeployOptionPropertyBoolean; + verifyDeployment: DacDeployOptionPropertyBoolean; + ignoreComments: DacDeployOptionPropertyBoolean; + ignoreColumnCollation: DacDeployOptionPropertyBoolean; + ignoreAuthorizer: DacDeployOptionPropertyBoolean; + ignoreAnsiNulls: DacDeployOptionPropertyBoolean; + generateSmartDefaults: DacDeployOptionPropertyBoolean; + dropStatisticsNotInSource: DacDeployOptionPropertyBoolean; + dropRoleMembersNotInSource: DacDeployOptionPropertyBoolean; + dropPermissionsNotInSource: DacDeployOptionPropertyBoolean; + dropObjectsNotInSource: DacDeployOptionPropertyBoolean; + ignoreColumnOrder: DacDeployOptionPropertyBoolean; + doNotDropObjectTypes: DacDeployOptionPropertyObject; + excludeObjectTypes: DacDeployOptionPropertyObject; + ignoreTablePartitionOptions: DacDeployOptionPropertyBoolean; + doNotEvaluateSqlCmdVariables: DacDeployOptionPropertyBoolean; + disableParallelismForEnablingIndexes: DacDeployOptionPropertyBoolean; + disableIndexesForDataPhase: DacDeployOptionPropertyBoolean; + restoreSequenceCurrentValue: DacDeployOptionPropertyBoolean; + rebuildIndexesOfflineForDataPhase: DacDeployOptionPropertyBoolean; + isAlwaysEncryptedParameterizationEnabled: DacDeployOptionPropertyBoolean; + preserveIdentityLastValues: DacDeployOptionPropertyBoolean; + allowExternalLibraryPaths: DacDeployOptionPropertyBoolean; + allowExternalLanguagePaths: DacDeployOptionPropertyBoolean; + hashObjectNamesInLogs: DacDeployOptionPropertyBoolean; + doNotDropWorkloadClassifiers: DacDeployOptionPropertyBoolean; + ignoreWorkloadClassifiers: DacDeployOptionPropertyBoolean; + ignoreDatabaseWorkloadGroups: DacDeployOptionPropertyBoolean; + doNotDropDatabaseWorkloadGroups: DacDeployOptionPropertyBoolean; } /**