-
Notifications
You must be signed in to change notification settings - Fork 1
DB Optimizations #36
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
base: qa
Are you sure you want to change the base?
DB Optimizations #36
Conversation
|
This looks good so far. One question: in the migration 013_shrink_db_size.sql, you add three lookup tables for event type, agent and object, and you create foreign key constraints in premis_events pointing to the lookup tables. Where/when do you actually populate the lookup tables? If the lookup tables aren't populated, it seems the migration will fail as the foreign keys aren't there. |
Correct, I have not added those INSERT statements to populate the lookup tables just yet. Will do. |
|
This looks good. Two minor questions/issues:
|
diamondap
left a comment
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.
The db migration starts with number 013. There's another db migration in the authy removal or MFA branch that also has a migration starting with 013. Registry applies the migrations in order, so you may want to renumber one of these 013 migrations and be sure they don't conflict with each other. Hopefully, they can be applied in any order without stepping on each other.
This PR is a draft. There are known issues and tests may not pass.
This PR provides a combination of DB migrations and code changes to help address the rising size and cost of the Registry RDS database.
The migrations are separated simply to make them easier to run on the large production database, and also in the service of separation of concerns.
Numerous changes were necessary in Registry and Preservation Services to accommodate these database changes.
Manual testing: