Implement migrator that consolidates PlannedProcess
grandchild collections
#196
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.
In this branch, I implemented a migrator that accommodates the schema changes made in PR #195.
This migrator deals with collections representing grandchild classes and child classes of the
PlannedProcess
class. For each child class, this migrator moves all documents from the collections representing that child's child classes (i.e. the grandchild classes of thePlannedProcess
class) into their "parent" collection (i.e. the collection representing the child class of thePlannedProcess
class); then, deletes those "grandchild" collections.This migrator creates a collection for each "parent" class (there are 7 of them). Whether that collection will contain any documents depends upon whether it or any of its "child" collections contain any when this migrator is run.
This migrator was designed to run after all currently-implemented migrators run (as indicated by its name, it was designed to run on a database that has been migrated "to PR104" already).
Merging this PR branch will fix microbiomedata#2045.