mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-25 17:23:10 -05:00
update extension to use new offlineConfiguratin and offline property names (#17316)
This commit is contained in:
@@ -289,7 +289,7 @@ export async function getMigrationStatus(account: azdata.Account, subscription:
|
||||
if (migration.properties) {
|
||||
migrationUpdate.properties.sourceDatabaseName = migration.properties.sourceDatabaseName;
|
||||
migrationUpdate.properties.backupConfiguration = migration.properties.backupConfiguration;
|
||||
migrationUpdate.properties.autoCutoverConfiguration = migration.properties.autoCutoverConfiguration;
|
||||
migrationUpdate.properties.offlineConfiguration = migration.properties.offlineConfiguration;
|
||||
}
|
||||
|
||||
return migrationUpdate;
|
||||
@@ -423,7 +423,7 @@ export interface StartDatabaseMigrationRequest {
|
||||
password: string
|
||||
},
|
||||
scope: string,
|
||||
autoCutoverConfiguration: AutoCutoverConfiguration,
|
||||
offlineConfiguration: OfflineConfiguration,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -453,7 +453,7 @@ export interface DatabaseMigrationProperties {
|
||||
migrationService: string;
|
||||
migrationOperationId: string;
|
||||
backupConfiguration: BackupConfiguration;
|
||||
autoCutoverConfiguration: AutoCutoverConfiguration;
|
||||
offlineConfiguration: OfflineConfiguration;
|
||||
migrationFailureError: ErrorInfo;
|
||||
}
|
||||
export interface MigrationStatusDetails {
|
||||
@@ -487,8 +487,8 @@ export interface BackupConfiguration {
|
||||
targetLocation?: TargetLocation;
|
||||
}
|
||||
|
||||
export interface AutoCutoverConfiguration {
|
||||
autoCutover: boolean;
|
||||
export interface OfflineConfiguration {
|
||||
offline: boolean;
|
||||
lastBackupName?: string;
|
||||
}
|
||||
|
||||
|
||||
@@ -23,5 +23,5 @@ export function getMigrationTargetType(migration: MigrationContext): string {
|
||||
}
|
||||
|
||||
export function getMigrationMode(migration: MigrationContext): string {
|
||||
return migration.migrationContext.properties.autoCutoverConfiguration?.autoCutover?.valueOf() ? loc.OFFLINE : loc.OFFLINE;
|
||||
return migration.migrationContext.properties.offlineConfiguration?.offline?.valueOf() ? loc.OFFLINE : loc.OFFLINE;
|
||||
}
|
||||
|
||||
@@ -802,7 +802,7 @@ export class MigrationCutoverDialog {
|
||||
}
|
||||
|
||||
private _isOnlineMigration(): boolean {
|
||||
return this._model._migration.migrationContext.properties.autoCutoverConfiguration?.autoCutover?.valueOf() ? false : true;
|
||||
return this._model._migration.migrationContext.properties.offlineConfiguration?.offline?.valueOf() ? false : true;
|
||||
}
|
||||
|
||||
private _shouldDisplayBackupFileTable(): boolean {
|
||||
|
||||
@@ -911,8 +911,8 @@ export class MigrationStateModel implements Model, vscode.Disposable {
|
||||
password: this._sqlServerPassword
|
||||
},
|
||||
scope: this._targetServerInstance.id,
|
||||
autoCutoverConfiguration: {
|
||||
autoCutover: isOfflineMigration
|
||||
offlineConfiguration: {
|
||||
offline: isOfflineMigration
|
||||
}
|
||||
}
|
||||
};
|
||||
@@ -933,8 +933,8 @@ export class MigrationStateModel implements Model, vscode.Disposable {
|
||||
};
|
||||
|
||||
if (isOfflineMigration) {
|
||||
requestBody.properties.autoCutoverConfiguration = {
|
||||
autoCutover: isOfflineMigration,
|
||||
requestBody.properties.offlineConfiguration = {
|
||||
offline: isOfflineMigration,
|
||||
lastBackupName: this._databaseBackup.blobs[i]?.lastBackupFile
|
||||
};
|
||||
}
|
||||
@@ -967,7 +967,7 @@ export class MigrationStateModel implements Model, vscode.Disposable {
|
||||
);
|
||||
response.databaseMigration.properties.sourceDatabaseName = this._migrationDbs[i];
|
||||
response.databaseMigration.properties.backupConfiguration = requestBody.properties.backupConfiguration!;
|
||||
response.databaseMigration.properties.autoCutoverConfiguration = requestBody.properties.autoCutoverConfiguration!;
|
||||
response.databaseMigration.properties.offlineConfiguration = requestBody.properties.offlineConfiguration!;
|
||||
|
||||
if (response.status === 201 || response.status === 200) {
|
||||
sendSqlMigrationActionEvent(
|
||||
|
||||
Reference in New Issue
Block a user