You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
eecavanna
changed the title
Migrations: Implement bookkeeping so database tells us what schema version it thinks it conforms to
Migrations: Implement bookkeeping so database tells us which schema it conforms to
Jan 20, 2024
I plan to implement this as part of the standard code run by the Python notebooks used for migration. The notebooks could create a document at the beginning of the migration process; something like: { "from": __, "to": __, "start_time": "...", "end_time": null }. Then, at the end of the migration process, the notebook could update the document to have a non-null end_time. To determine the current schema version, a user could sort the documents by their end_time (the to value of the document having the latest end_time would be the schema version the database is "at").
Alternatively (or in addition), the notebook could also update some single/global nmdc_schema_version field to indicate the schema version to which the database was updated most recently. Then, a user could check that single nmdc_schema_version field as a quick way of checking (effectively) what schema version the database is "at".
Sprint planning note: There's a chance that this will be done on Friday afternoon, but I think it's more likely that it will spill over into next sprint.
In other words, the database would "know" (tell us) what migrations have been applied to it; or at least which one was applied to it most recently.
The text was updated successfully, but these errors were encountered: