mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-14 01:25:37 -05:00
Replace literal with constant (#12848)
* Include database-scoped credentials when deploying with default options * Changing int literal to constant * replace int literal with named const
This commit is contained in:
@@ -11,7 +11,7 @@ import * as utils from '../common/utils';
|
||||
import { Project } from '../models/project';
|
||||
import { SqlConnectionDataSource } from '../models/dataSources/sqlConnectionStringSource';
|
||||
import { IPublishSettings, IGenerateScriptSettings } from '../models/IPublishSettings';
|
||||
import { DeploymentOptions } from '../../../mssql/src/mssql';
|
||||
import { DeploymentOptions, SchemaObjectType } from '../../../mssql/src/mssql';
|
||||
import { IconPathHelper } from '../common/iconHelper';
|
||||
import { cssStyles } from '../common/uiConstants';
|
||||
|
||||
@@ -216,8 +216,7 @@ export class PublishDatabaseDialog {
|
||||
this.deploymentOptions = await utils.GetDefaultDeploymentOptions();
|
||||
|
||||
// re-include database-scoped credentials
|
||||
// 53 comes from $\DacFx_Preview_Dev\Product\Source\DeploymentApi\ObjectTypes.cs (exact value from decompiled metadata)
|
||||
this.deploymentOptions.excludeObjectTypes = this.deploymentOptions.excludeObjectTypes.filter(x => x !== 53);
|
||||
this.deploymentOptions.excludeObjectTypes = this.deploymentOptions.excludeObjectTypes.filter(x => x !== SchemaObjectType.DatabaseScopedCredentials);
|
||||
|
||||
// this option needs to be true for same database references validation to work
|
||||
if (this.project.databaseReferences.length > 0) {
|
||||
|
||||
Reference in New Issue
Block a user