mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-19 01:25:36 -05:00
[SQLDB-Migration] Collation Validation (#21572)
Adding collation validation in target database selection page. collecting source database info including state, size, collation etc in the step 1 (select databases to assess and migrate) comparing source database collation and target database collation in target selection page. image
This commit is contained in:
@@ -11,7 +11,7 @@ import * as constants from '../constants/strings';
|
||||
import { debounce } from '../api/utils';
|
||||
import * as styles from '../constants/styles';
|
||||
import { IconPathHelper } from '../constants/iconPathHelper';
|
||||
import { getDatabasesList, excludeDatabases } from '../api/sqlUtils';
|
||||
import { getDatabasesList, excludeDatabases, SourceDatabaseInfo } from '../api/sqlUtils';
|
||||
|
||||
export class DatabaseSelectorPage extends MigrationWizardPage {
|
||||
private _view!: azdata.ModelView;
|
||||
@@ -236,10 +236,12 @@ export class DatabaseSelectorPage extends MigrationWizardPage {
|
||||
|
||||
databaseList.sort((a, b) => a.options.name.localeCompare(b.options.name));
|
||||
this._dbNames = [];
|
||||
stateMachine._databaseInfosForMigration = [];
|
||||
|
||||
this._databaseTableValues = databaseList.map(database => {
|
||||
const databaseName = database.options.name;
|
||||
this._dbNames.push(databaseName);
|
||||
stateMachine._databaseInfosForMigration.push(this.getSourceDatabaseInfo(database));
|
||||
return [
|
||||
selectedDatabases?.indexOf(databaseName) > -1,
|
||||
<azdata.IconColumnCellValue>{
|
||||
@@ -271,4 +273,13 @@ export class DatabaseSelectorPage extends MigrationWizardPage {
|
||||
});
|
||||
this.migrationStateModel._databasesForAssessment = selectedDatabases;
|
||||
}
|
||||
|
||||
private getSourceDatabaseInfo(database: azdata.DatabaseInfo): SourceDatabaseInfo {
|
||||
return {
|
||||
databaseName: database.options.name,
|
||||
databaseCollation: database.options.collation,
|
||||
databaseSizeInMB: database.options.sizeInMB,
|
||||
databaseState: database.options.state
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user