Fix tree structure issues due to an old WorkBench bug #5366
+22
−0
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.
Fixes #5131
This came up again from a user that was self-hosted so I thought this could be a more meaningful fix.
This fixes an issue due to a bug in the WorkBench prior to 7.9.0 that did not set accepted nodes to IsAccepted = 1 when they were not synonyms.
This was done on all hosted databases, but self-hosted users are still potentially facing bad tree structure errors due to this.
The migration is also fully reversible.
Testing instructions
I made this hard since I fixed all cases on hosted databases and on the test panel... but the scope of this is pretty small. These testing instructions are overkill.
Essentially, this is running the following SQL statement:
UPDATE taxon t1 SET IsAccepted = TRUE WHERE t1.IsAccepted = 0 AND t1.AcceptedId IS NULL
Before running the migration:
production
, manually modifytaxon
records (via SQL) to setIsAccepted
to0
(false) in cases where that record is not a synonymAfter running the migration:
issue-5131
, try to create a child under that node in Specify (should no longer see a "bad tree structure" errortaxon
record now is shown as accepted (IsAccepted
=1
(true)) in all cases where it is not a synonym.taxon
records that are synonyms are not now accepted.