mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-05 17:23:51 -05:00
Remove dacfx and schema compare from the azdata api (#6684)
* refactor mssql extension to directly expose dacfx and schema compare * remove more code * fix compile errors
This commit is contained in:
301
src/sql/azdata.d.ts
vendored
301
src/sql/azdata.d.ts
vendored
@@ -41,10 +41,6 @@ declare module 'azdata' {
|
||||
|
||||
export function registerCapabilitiesServiceProvider(provider: CapabilitiesProvider): vscode.Disposable;
|
||||
|
||||
export function registerDacFxServicesProvider(provider: DacFxServicesProvider): vscode.Disposable;
|
||||
|
||||
export function registerSchemaCompareServicesProvider(provider: SchemaCompareServicesProvider): vscode.Disposable;
|
||||
|
||||
/**
|
||||
* An [event](#Event) which fires when the specific flavor of a language used in DMP
|
||||
* connections has changed. And example is for a SQL connection, the flavor changes
|
||||
@@ -1691,302 +1687,7 @@ declare module 'azdata' {
|
||||
}
|
||||
|
||||
// DacFx interfaces -----------------------------------------------------------------------
|
||||
export interface DacFxResult extends ResultStatus {
|
||||
operationId: string;
|
||||
}
|
||||
|
||||
export interface GenerateDeployPlanResult extends DacFxResult {
|
||||
report: string;
|
||||
}
|
||||
|
||||
export interface ExportParams {
|
||||
databaseName: string;
|
||||
packageFilePath: string;
|
||||
ownerUri: string;
|
||||
taskExecutionMode: TaskExecutionMode;
|
||||
}
|
||||
|
||||
export interface ImportParams {
|
||||
packageFilePath: string;
|
||||
databaseName: string;
|
||||
ownerUri: string;
|
||||
taskExecutionMode: TaskExecutionMode;
|
||||
}
|
||||
|
||||
export interface ExtractParams {
|
||||
databaseName: string;
|
||||
packageFilePath: string;
|
||||
applicationName: string;
|
||||
applicationVersion: string;
|
||||
ownerUri: string;
|
||||
taskExecutionMode: TaskExecutionMode;
|
||||
}
|
||||
|
||||
export interface DeployParams {
|
||||
packageFilePath: string;
|
||||
databaseName: string;
|
||||
upgradeExisting: boolean;
|
||||
ownerUri: string;
|
||||
taskExecutionMode: TaskExecutionMode;
|
||||
}
|
||||
|
||||
export interface GenerateDeployScriptParams {
|
||||
packageFilePath: string;
|
||||
databaseName: string;
|
||||
ownerUri: string;
|
||||
taskExecutionMode: TaskExecutionMode;
|
||||
}
|
||||
|
||||
export interface GenerateDeployPlan {
|
||||
packageFilePath: string;
|
||||
databaseName: string;
|
||||
ownerUri: string;
|
||||
taskExecutionMode: TaskExecutionMode;
|
||||
}
|
||||
|
||||
export interface DacFxServicesProvider extends DataProvider {
|
||||
exportBacpac(databaseName: string, packageFilePath: string, ownerUri: string, taskExecutionMode: TaskExecutionMode): Thenable<DacFxResult>;
|
||||
importBacpac(packageFilePath: string, databaseName: string, ownerUri: string, taskExecutionMode: TaskExecutionMode): Thenable<DacFxResult>;
|
||||
extractDacpac(databaseName: string, packageFilePath: string, applicationName: string, applicationVersion: string, ownerUri: string, taskExecutionMode: TaskExecutionMode): Thenable<DacFxResult>;
|
||||
deployDacpac(packageFilePath: string, databaseName: string, upgradeExisting: boolean, ownerUri: string, taskExecutionMode: TaskExecutionMode): Thenable<DacFxResult>;
|
||||
generateDeployScript(packageFilePath: string, databaseName: string, ownerUri: string, taskExecutionMode: TaskExecutionMode): Thenable<DacFxResult>;
|
||||
generateDeployPlan(packageFilePath: string, databaseName: string, ownerUri: string, taskExecutionMode: TaskExecutionMode): Thenable<GenerateDeployPlanResult>;
|
||||
}
|
||||
|
||||
// Schema Compare interfaces -----------------------------------------------------------------------
|
||||
export interface SchemaCompareResult extends ResultStatus {
|
||||
operationId: string;
|
||||
areEqual: boolean;
|
||||
differences: DiffEntry[];
|
||||
}
|
||||
|
||||
export interface SchemaCompareCompletionResult extends ResultStatus {
|
||||
operationId: string;
|
||||
areEqual: boolean;
|
||||
differences: DiffEntry[];
|
||||
}
|
||||
|
||||
export interface DiffEntry {
|
||||
updateAction: SchemaUpdateAction;
|
||||
differenceType: SchemaDifferenceType;
|
||||
name: string;
|
||||
sourceValue: string[];
|
||||
targetValue: string[];
|
||||
parent: DiffEntry;
|
||||
children: DiffEntry[];
|
||||
sourceScript: string;
|
||||
targetScript: string;
|
||||
}
|
||||
|
||||
export enum SchemaUpdateAction {
|
||||
Delete = 0,
|
||||
Change = 1,
|
||||
Add = 2
|
||||
}
|
||||
|
||||
export enum SchemaDifferenceType {
|
||||
Object = 0,
|
||||
Property = 1
|
||||
}
|
||||
export enum SchemaCompareEndpointType {
|
||||
Database = 0,
|
||||
Dacpac = 1
|
||||
}
|
||||
export interface SchemaCompareEndpointInfo {
|
||||
endpointType: SchemaCompareEndpointType;
|
||||
packageFilePath: string;
|
||||
serverDisplayName: string;
|
||||
serverName: string;
|
||||
databaseName: string;
|
||||
ownerUri: string;
|
||||
connectionDetails: ConnectionInfo;
|
||||
}
|
||||
|
||||
export interface SchemaCompareObjectId {
|
||||
nameParts: string[];
|
||||
sqlObjectType: string;
|
||||
}
|
||||
|
||||
export interface SchemaCompareOptionsResult extends ResultStatus {
|
||||
defaultDeploymentOptions: DeploymentOptions;
|
||||
}
|
||||
|
||||
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[];
|
||||
}
|
||||
|
||||
export enum SchemaObjectType {
|
||||
Aggregates = 0,
|
||||
ApplicationRoles = 1,
|
||||
Assemblies = 2,
|
||||
AssemblyFiles = 3,
|
||||
AsymmetricKeys = 4,
|
||||
BrokerPriorities = 5,
|
||||
Certificates = 6,
|
||||
ColumnEncryptionKeys = 7,
|
||||
ColumnMasterKeys = 8,
|
||||
Contracts = 9,
|
||||
DatabaseOptions = 10,
|
||||
DatabaseRoles = 11,
|
||||
DatabaseTriggers = 12,
|
||||
Defaults = 13,
|
||||
ExtendedProperties = 14,
|
||||
ExternalDataSources = 15,
|
||||
ExternalFileFormats = 16,
|
||||
ExternalTables = 17,
|
||||
Filegroups = 18,
|
||||
Files = 19,
|
||||
FileTables = 20,
|
||||
FullTextCatalogs = 21,
|
||||
FullTextStoplists = 22,
|
||||
MessageTypes = 23,
|
||||
PartitionFunctions = 24,
|
||||
PartitionSchemes = 25,
|
||||
Permissions = 26,
|
||||
Queues = 27,
|
||||
RemoteServiceBindings = 28,
|
||||
RoleMembership = 29,
|
||||
Rules = 30,
|
||||
ScalarValuedFunctions = 31,
|
||||
SearchPropertyLists = 32,
|
||||
SecurityPolicies = 33,
|
||||
Sequences = 34,
|
||||
Services = 35,
|
||||
Signatures = 36,
|
||||
StoredProcedures = 37,
|
||||
SymmetricKeys = 38,
|
||||
Synonyms = 39,
|
||||
Tables = 40,
|
||||
TableValuedFunctions = 41,
|
||||
UserDefinedDataTypes = 42,
|
||||
UserDefinedTableTypes = 43,
|
||||
ClrUserDefinedTypes = 44,
|
||||
Users = 45,
|
||||
Views = 46,
|
||||
XmlSchemaCollections = 47,
|
||||
Audits = 48,
|
||||
Credentials = 49,
|
||||
CryptographicProviders = 50,
|
||||
DatabaseAuditSpecifications = 51,
|
||||
DatabaseEncryptionKeys = 52,
|
||||
DatabaseScopedCredentials = 53,
|
||||
Endpoints = 54,
|
||||
ErrorMessages = 55,
|
||||
EventNotifications = 56,
|
||||
EventSessions = 57,
|
||||
LinkedServerLogins = 58,
|
||||
LinkedServers = 59,
|
||||
Logins = 60,
|
||||
MasterKeys = 61,
|
||||
Routes = 62,
|
||||
ServerAuditSpecifications = 63,
|
||||
ServerRoleMembership = 64,
|
||||
ServerRoles = 65,
|
||||
ServerTriggers = 66
|
||||
}
|
||||
|
||||
export interface SchemaCompareObjectId {
|
||||
nameParts: string[];
|
||||
sqlObjectType: string;
|
||||
}
|
||||
|
||||
export interface SchemaCompareOpenScmpResult extends ResultStatus {
|
||||
sourceEndpointInfo: SchemaCompareEndpointInfo;
|
||||
targetEndpointInfo: SchemaCompareEndpointInfo;
|
||||
originalTargetName: string;
|
||||
originalConnectionString: string;
|
||||
deploymentOptions: DeploymentOptions;
|
||||
excludedSourceElements: SchemaCompareObjectId[];
|
||||
excludedTargetElements: SchemaCompareObjectId[];
|
||||
}
|
||||
|
||||
export interface SchemaCompareServicesProvider extends DataProvider {
|
||||
schemaCompare(operationId: string, sourceEndpointInfo: SchemaCompareEndpointInfo, targetEndpointInfo: SchemaCompareEndpointInfo, taskExecutionMode: TaskExecutionMode, deploymentOptions: DeploymentOptions): Thenable<SchemaCompareResult>;
|
||||
schemaCompareGenerateScript(operationId: string, targetServerName: string, targetDatabaseName: string, taskExecutionMode: TaskExecutionMode): Thenable<ResultStatus>;
|
||||
schemaComparePublishChanges(operationId: string, targetServerName: string, targetDatabaseName: string, taskExecutionMode: TaskExecutionMode): Thenable<ResultStatus>;
|
||||
schemaCompareGetDefaultOptions(): Thenable<SchemaCompareOptionsResult>;
|
||||
schemaCompareIncludeExcludeNode(operationId: string, diffEntry: DiffEntry, IncludeRequest: boolean, taskExecutionMode: TaskExecutionMode): Thenable<ResultStatus>;
|
||||
schemaCompareOpenScmp(filePath: string): Thenable<SchemaCompareOpenScmpResult>;
|
||||
schemaCompareSaveScmp(sourceEndpointInfo: SchemaCompareEndpointInfo, targetEndpointInfo: SchemaCompareEndpointInfo, taskExecutionMode: TaskExecutionMode, deploymentOptions: DeploymentOptions, scmpFilePath: string, excludedSourceObjects: SchemaCompareObjectId[], excludedTargetObjects: SchemaCompareObjectId[]): Thenable<ResultStatus>;
|
||||
schemaCompareCancel(operationId: string): Thenable<ResultStatus>;
|
||||
}
|
||||
|
||||
// Security service interfaces ------------------------------------------------------------------------
|
||||
export interface CredentialInfo {
|
||||
@@ -4116,8 +3817,6 @@ declare module 'azdata' {
|
||||
AdminServicesProvider = 'AdminServicesProvider',
|
||||
AgentServicesProvider = 'AgentServicesProvider',
|
||||
CapabilitiesProvider = 'CapabilitiesProvider',
|
||||
DacFxServicesProvider = 'DacFxServicesProvider',
|
||||
SchemaCompareServicesProvider = 'SchemaCompareServicesProvider',
|
||||
ObjectExplorerNodeProvider = 'ObjectExplorerNodeProvider',
|
||||
IconProvider = 'IconProvider',
|
||||
SerializationProvider = 'SerializationProvider'
|
||||
|
||||
Reference in New Issue
Block a user