mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-17 09:35:37 -05:00
OptionsMapTable logic to replace the deployment hardcoded values final (#19789)
* OptionsMapTable logic to replace the deployment hardcoded values final * Test modifiaction * OptionsMApTable updates with STS and review commetns * comments added and option string moved to constants file * Reverting the options button css related change and will put in other PR * converted optionsMapTable to custom type and references. * Options prop changes and model updates * Reset btn event method name fixed * removed local booleanOptionDict var and using the existing one * updated code with removed local vars * Update to booleanOptionsDictionary name * merged two variable to one * Refactoring code and updating variables * separated lookup and data array and refactor * missing visibility * reset logic revised and no other edgecases found * variable names updated to meaningful * vbump here to test the checks, sending new vbump PR separately
This commit is contained in:
committed by
GitHub
parent
84a15ea91d
commit
89816c9ff3
@@ -153,7 +153,7 @@ export const ResetButton: string = localize('reset', "Reset");
|
||||
export const OptionDescription: string = localize('optionDescription', "Option Description");
|
||||
export const OptionName: string = localize('optionName', "Option Name");
|
||||
export const OptionInclude: string = localize('Include', "Include");
|
||||
|
||||
export function OptionNotFoundWarningMessage(label: string) { return localize('OptionNotFoundWarningMessage', "label: {0} does not exist in the options value name lookup", label); }
|
||||
|
||||
// Deploy
|
||||
export const SqlServerName = 'SQL server';
|
||||
|
||||
@@ -325,17 +325,16 @@ export async function defaultAzureAccountServiceFactory(): Promise<vscodeMssql.I
|
||||
export async function getDefaultPublishDeploymentOptions(project: ISqlProject): Promise<mssql.DeploymentOptions | vscodeMssql.DeploymentOptions> {
|
||||
const schemaCompareService = await getSchemaCompareService();
|
||||
const result = await schemaCompareService.schemaCompareGetDefaultOptions();
|
||||
const deploymentOptions = result.defaultDeploymentOptions;
|
||||
// re-include database-scoped credentials
|
||||
if (getAzdataApi()) {
|
||||
deploymentOptions.excludeObjectTypes.value = (deploymentOptions as mssql.DeploymentOptions).excludeObjectTypes.value?.filter(x => x !== mssql.SchemaObjectType.DatabaseScopedCredentials);
|
||||
result.defaultDeploymentOptions.excludeObjectTypes.value = (result.defaultDeploymentOptions as mssql.DeploymentOptions).excludeObjectTypes.value?.filter(x => x !== mssql.SchemaObjectType.DatabaseScopedCredentials);
|
||||
} else {
|
||||
deploymentOptions.excludeObjectTypes.value = (deploymentOptions as vscodeMssql.DeploymentOptions).excludeObjectTypes.value?.filter(x => x !== vscodeMssql.SchemaObjectType.DatabaseScopedCredentials);
|
||||
result.defaultDeploymentOptions.excludeObjectTypes.value = (result.defaultDeploymentOptions as vscodeMssql.DeploymentOptions).excludeObjectTypes.value?.filter(x => x !== vscodeMssql.SchemaObjectType.DatabaseScopedCredentials);
|
||||
}
|
||||
|
||||
// this option needs to be true for same database references validation to work
|
||||
if (project.databaseReferences.length > 0 && deploymentOptions.includeCompositeObjects !== undefined) {
|
||||
deploymentOptions.includeCompositeObjects.value = true;
|
||||
if (project.databaseReferences.length > 0) {
|
||||
result.defaultDeploymentOptions.booleanOptionsDictionary.includeCompositeObjects.value = true;
|
||||
}
|
||||
return result.defaultDeploymentOptions;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user