-
Notifications
You must be signed in to change notification settings - Fork 0
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
Added development db for Sanctuary #78
Conversation
Problem We need to create a database for Sanctuary Solution - added script to db container to create sanctuary db - modified alembic to have one central alembic folder that contains folders for each db we want migrations for - modified docker-compose.yaml and Makefile to run migrations for both databases - modified Intakes.py to be added to sanctuary db with BaseSanctuary - added UserMedical and UserSantuary class that inherit from user class. TODOs: - Create separate user and pass for accessing sanctuary db - Write intstructions for adding a new database in README - Rename all instances of "example" db to "medical" - Tested that users and encounters can still be added to Medical db through api Ticket URL https://mediform.atlassian.net/browse/MEDI-30 Documentation https://docs.google.com/document/d/10Pz324rr6zxEArmOlQne0Kwj9Ow61iKnUfkfU9OH8tY/edit Tests Run make clean && make all && make env -> creates the database make automig -> generates appropriate revisions make mig -> applies appropriate revisions to appropriate database
Code quality is excellent! I tested your branch locally and there is an issue. I followed your test instructions and I noticed some odd behaviour: If I do In the Makefile, the
Whenever I run anything but Also if I run
|
It should be fixed. Issue was that some services rely on migs. Those services weren't passing DB_NAME. I changed it to make another service for migssanctuary. I didn't make the other services rely on it. I think we can worry about including sanctuary migrations for production environment later. |
I pulled your changes and when I do |
Done |
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.
you did it!
This reverts commit 50b0d9b.
This reverts commit 50b0d9b. Problem The new migrations are not working in production as expected.
* Revert "added --name=medical to dockerfile.prod" This reverts commit d4828b9. * Revert "fixing github actions failure (again) (#80)" This reverts commit ba5a515. * Revert "Resolving Github actions failure (#79)" This reverts commit 82e27da. * Revert "Added development db for Sanctuary (#78)" This reverts commit 50b0d9b. Problem The new migrations are not working in production as expected.
Problem
We need to create a database for Sanctuary
Solution
TODOs:
Ticket URL
https://mediform.atlassian.net/browse/MEDI-30
Documentation
https://docs.google.com/document/d/10Pz324rr6zxEArmOlQne0Kwj9Ow61iKnUfkfU9OH8tY/edit
Tests Run
make clean && make all && make env -> creates the database make automig -> generates appropriate revisions
make mig -> applies appropriate revisions to appropriate database