Replies: 1 comment
-
After yesterday's meeting, we can go with option one. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
About a month ago, I devised a new data insertion script using straight SQL instead of the slightly convoluted way I was once doing this. This also means any new data dumps we get from DataScribe will be more easily handled by the new insertion script (bomr still handles the transformation from wide table to long table and has also been updated). There also exists new initialize up statements to create the initial table structures.
This should be more sustainable (and self explanatory), and depreciates the old
updater
Go script I wrote a while back, as well as removing any need on my end to fiddle with the database itself which I occasionally had to do. Local testing on my database indicates this all works fine. I'm documenting this here for any discussion before I move ahead with these changes.There are two ways I think we can proceed, but I'm happy to hear ideas if there's something I've not thought of.
initialize.up.sql
. The new insert data script should work seamlessly with this. The data is already in a state that can be inserted, so any downtime should be minimal. I know @jmotis wants to complete some data/math checks before doing something this drastic, but on the other hand if we go this route we can have all available data in the databases (we're still behind on getting Bodleian updates in; this process would resolve that).ALTER TABLE
statements we would need to do this, which I'll include below in an appendix. This still carries a possibility of minimal downtime. Local testing against the old DDLs and these commands all succeed.In all cases, there are also a couple of changes that need to happen in Apiary to reflect these updates. I'm already proceeding with the appropriate updates in a branch that we can merge the moment the database changes are complete.
See also #146, #165
Appendix: ALTER Table
The following SQL commands would mean following option 2 above and must be applied in the order that they appear here in order to avoid any
CONSTRAINT
violations (years; weeks; parishes; causes_of_death; bill_of_mortality).Update the years table:
Update the weeks table:
Update the parishes table:
Update the causes of death table:
Update the bill of mortality table:
Beta Was this translation helpful? Give feedback.
All reactions