Closed michaelbrooks closed 11 years ago
Yes. Good. Off with their code_types.
I think this addresses your comments on the code_type issue. I created issue #59 to figure out how to track changes in the coding scheme.
Considering this approved, at least for merging into code-categories
(not master yet). Next thing to do will be update all of the code using the old schema.
This is not merging into master, but into code-categories (currently at the same place as master)
This includes significant changes to how we store codes in separate schemata and in a hierarchy.
Roughly, here are the changes:
coding_codes
table becomes justcodes
.coding_schemata
table becomescategories
.coding_relationships
table is merged intocodes
as aparent_id
field.code_type
field is removed fromcoding_codes
and is converted into categories. This all seems to work fine for the data we have currently but we'll have to change the names and move some codes around eventually.This does not include any changes to the code that uses these tables. We can build those changes up in branches off of code-categories and then when it all works we can merge it into master.
If you are testing this on a current copy of the data, migrating up should work, and migrating back down to the current version will also work. However it won't produce an exact copy of the data because information about code_type has been lost in the transition. What were previously code types in the same schema will now be in different schemas. Just a warning - if you are using this you may want to have a backup copy of the data on hand to restore before you work on something else.
@geosoco and @katiek to review.