[SQL Migration] [Bugfix] Not able to migrate few of the assessed DBs, it always selects all assessed. #25012
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Bug : Bug 2824863: We are not able to migrate few of the assessed DBs, it always selects all assessed.
Fix: Change1 : remove
await this._body.treeComponent.initialize(this.migrationStateModel);
fromexecutechange
method &change
const selectedDbs = this._dbNames.filter(db => this.model._databasesForAssessments.includes(db));
toconst selectedDbs = this._dbNames.filter(db => this.model._databasesForMigration.includes(db));
Change 2: Due to above change, when a tde enabled db is selected, tde info container was not showing up.
Fix: Update
this.model._databasesForMigration = this.selectedDbs();
whenever any db is selected or unselected. This require pass ofmigrationstatemodel
to treecomponent.Change 3: Update select db count whenever a db is selected or unselected.
this._databaseCount.value = constants.DATABASES(selectedDbs.length, this.model._databasesForAssessment?.length)
Change2 & change3 are done to accomodate bugfix change