-
-
Notifications
You must be signed in to change notification settings - Fork 26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for archiving DB to SQLite #1104
base: main
Are you sure you want to change the base?
Conversation
b721a65
to
6709928
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Need to come back around and actually get this done. Now that we’ve upgraded to Rails 8 there are some useful builtins and some code can be deleted.
Happy to discover I already imported all the sheet-based significant annotations to the DB after starting this PR (over a year ago, ugh): edgi-govdata-archiving/web-monitoring-processing#853 So I just need to test this a bit more, but it should basically be ready to go. |
Work in progress! This adds a rake command to export the contents of the DB into a SQLite file for public archiving. It's *mostly* a pretty straightforward copy of every table/row, but we skip tables that are irrelevant for a public data set (administrative things like GoodJob tables, users, imports, etc.), drop columns with user data, and do some basic conversions. Part of edgi-govdata-archiving/web-monitoring#170
This adds a rake command to export the contents of the DB into a SQLite file for public archiving. It's mostly a pretty straightforward copy of every table/row, but we skip tables that are irrelevant for a public data set (administrative things like GoodJob tables, users, imports, etc.), drop columns with user data, and do some basic conversions.
Part of edgi-govdata-archiving/web-monitoring#170
For changes/annotations, we probably want to just select relevant annotations, like the important changes (make sure we have them all in the DB first, see https://github.com/edgi-govdata-archiving/web-monitoring-processing/blob/main/web_monitoring/cli/annotations_import.py), and only import those and the changes they apply to.