-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
chore: add foreign keys on all tables #3311
Conversation
Ready for review @asbiin |
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.
Great job! Really.
See my comments ...
I'm a little concerned about the performance here. The migration took ~6 sec on the build pipeline, on an empty database. |
It took 4 minutes on my machine with a database of the same size as the one in production. |
Things that remain to be done
|
…onicahq/monica into 2019-12-16-add-foreign-keys-everywhere
Ready for a new review @asbiin |
On account reset, could we consider delete the default data populated with Also, I think you could add a foreign key on |
Why? We don't need to touch the default populated fields during the reset account process.
Excellent point! |
@asbiin another review ;-) |
OK for me, go for it! |
This pull request has been automatically locked since there |
This finishes the job of #2280 and will close #2280 too.
This adds foreign keys to all tables in Monica.
I also have written two new services:
which makes the Settings controller a little bit lighter and cleaner. We don't need the old way of resetting and deleting accounts with the foreign keys everywhere.