-
-
Notifications
You must be signed in to change notification settings - Fork 7
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
Resolve database issues reported by database_consistency
gem
#2588
Comments
It has a tool to generate migrations to fix this (
Do you think it's important to resolve this @katjam? It looks like about 90% of migrations run - we could potentially just merge those ones for now? |
I think yes, we should fix this. Running the good ones sounds like a great idea. If we leave it, the problem will get more and more difficult to fix. I wonder if we also want to do some kind of manual audit of the production DB and clean up stuff but I appreciate this is a big can of worms. |
I think there have been a lot of manual commands run on the DB over the years which has probably left it in a bit of a state. |
So the migrations that are failing seem to be a lot of ones where the column state is currently Chucked it on the next milestone anyway. I think we can add a CI step to stop it getting any worse as well. |
Only 5 not running actually. Not bad at all.
Rubocop is complaning about some of the migrations being irreversable, though so I can't check it in:
Do we care about this @katjam? I can rewrite them to be reversible but i dont know what a good use of my time that is? My pref would prob be to just have rubocop ignore the database migrations directory, its autogenerated for the most part and feels like one library fighting another. |
I do tend to make reversible migrations so they can be tested, deployed and stepped back incrementally. It's the only way to maintain integrity if something unexpected happens, especially when working across environs with different data sets populating them. Not providing down method relies on assumption that nothing will go wrong and that probably is not a sensible assumption. Having said that - under our current circumstances with very few users actually depending on the service and nothing critical, it may be a use of our time right now. Though I think increasingly, we do have a responsibility to Trans Dimension and Tipping Point audiences. |
Totally fair enough. It prob won't take that long, prob just being lazy here. And you're right if it fucks up when deploying fixing it would be an even bigger headache. |
We have about 1,000 visitors a month atm across transdim+placecal so i don't think it's fair to say we have very few users any more as well! |
database_consistency
gemdatabase_consistency
gem
Description
I wondered if there was any missing indexes that might be slowing down the responses and discovered Database Consistency gem.
This is reporting quite a list to address:
Motivation
Database inconsistencies slow down responses and make our database less robust.
Acceptance criteria
The text was updated successfully, but these errors were encountered: