Closed kheal closed 1 month ago
@brynnz22, can you help out with the migration script?
@kheal There is a migrator that does a similar thing you can look at here: https://github.com/microbiomedata/berkeley-schema-fy24/pull/59. This might help you get started.
@brynnz22 - excellent, I'll give it a go.
Before you try this, I'd recommend checking Mongo to see if any collections are actually impacted by this schema change. If not, it won't require a migration. It looks like it would only require a migration if the value is one of the enums with Activity
in the name. I know that the failure categorization is a new group of slots and so it has not been used a whole lot
It looks like it will - Some of them have OmicsProcessing
instead of DataGeneration
And by some - It looks like its just one record in all of mongo that uses it - part of the read_qc_analysis_set
with id
: nmdc:wfrqc-11-tvnq1669.1
. Should be an easy migrator to write!
I have a different view about the necessity of a migrator. I want migrators to exist whenever there is the potential that valid data become invalid when the schema changes. That is as opposed to it being only if there is current data that would become invalid. The reason is that I don't know what the database will contain at the time the migrators get run.
@eecavanna That makes sense, thanks for the clarification!
Enum values do not reflect refactored classes.
This will require a migration.