Details
-
Type:
Story
-
Status: Done
-
Resolution: Done
-
Fix Version/s: None
-
Component/s: daf_butler
-
Labels:
-
Story Points:6
-
Team:Architecture
-
Urgent?:No
Description
In DM-30186 a migration script is being written to convert Postgres registries from integer IDs to UUIDs.
That work indicated that sqlite wouldn't support the same approach. Given that sqlite is file-based a much easier scheme is to migrate by creating an entirely new cloned registry with the UUIDs.
This can be implemented as something like:
- Retrieve dimensions config
- Export dataset type / collections / dimension records
- Create new repo with same configuration and same dimensions config
- Import the definitions.
- Run Butler.transfer_from to migrate all the datasets
- Deal with calibration and tagged collection membership.
Andy Salnikov, Jim Bosch I've made an initial attempt at this in a draft pull request. It seems to work although there are some questions. Can you give it a quick pre-review to see if I've missed anything obvious. I'm not sure how to easily check that the two sqlite registries are the same (ignoring the dataset_id) since some tables have different names.
We probably should consider whether there is code here and in execution butler pipe_base that we should move to daf_butler.
I assume this subcommand should be moved to daf_butler_migrate.