microbiomedata / nmdc-schema

National Microbiome Data Collaborative (NMDC) unified data model
https://microbiomedata.github.io/nmdc-schema/
Creative Commons Zero v1.0 Universal
27 stars 8 forks source link

vPrev->vCurrent nmdc:Database migration script on each release if needed #1019

Open dwinston opened 1 year ago

dwinston commented 1 year ago

given that a principal use case of our schema-as-software (the importable nmdc_schema package) is to support the maintenance of schema-conformant databases (e.g. nmdc:Database JSON), it seems reasonable for each schema-as-software release to include migration code from the previous release if appropriate.

@turbomam what do you think?

This even seems like something that could be supported at the linkml level...

turbomam commented 1 year ago

I agree. There are some pre-alpha LInkML tools for this kind of thing, but I think we should assume it will be our responsibility to write in either a specific or general way for the time being.

turbomam commented 1 year ago

https://github.com/linkml/linkml-transformer

eecavanna commented 5 months ago

We have been doing something like this for the past few non-patch releases. See: https://github.com/microbiomedata/nmdc-schema/tree/main/nmdc_schema/migrators