Implement notebook that migrates database from schema v11.1.0 to v11.2.0 #813
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 did two main things: (a) I implemented a migration notebook for the December NMDC release and (b) I moved all the migration-related code to a different directory in the repo.
Details
The migration notebook can be used to migrate the Mongo database from conforming to
nmdc-schema
version11.1.0
to conforming tonmdc-schema
version11.2.0
.I moved all the migration-related code from
demo/metadata_migration/notebooks
todb/migrations/notebooks
(db
is a new top-level directory—a name inspired by Ruby on Rails).Related issue(s)
Fixes #808
Related subsystem(s)
docs
directory)Testing
The destination schema has not been released yet. I'll test this once it has. The notebook is a copy/paste of the previous notebook, with a couple cells removed and a couple strings updated.
Documentation
docs
directory)Maintainability
study_id: str
)# TODO
or# FIXME
black
to format all the Python files I created/modified