-
Notifications
You must be signed in to change notification settings - Fork 1
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
Schema check on startup #168
base: main
Are you sure you want to change the base?
Conversation
c76979d
to
535a3d4
Compare
2517424
to
322400a
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #168 +/- ##
==========================================
- Coverage 97.21% 97.19% -0.03%
==========================================
Files 30 30
Lines 1328 1354 +26
==========================================
+ Hits 1291 1316 +25
- Misses 37 38 +1 ☔ View full report in Codecov by Sentry. |
@cbrinson-rise8 it looks like the smoke tests are failing, does the new verify function work in the docker compose environment? I'm wondering if we need to somehow check this with all 4 databases? |
Description
On application startup, verify that database tables match the ORM.
Related Issues
closes #143
Additional Notes
Acceptance Criteria
Details / Tasks
On application startup, the database tables are optionally created. That is, they are only created if they don't exist. It's possible thought that the columns don't align to the ORM state. Enhance the startup procedure to verify that the database columns, name and type, match those specified of the ORM, if there is a mismatch raise a SQLAlchemyError with mismatch details.
Background / Context
Take a look at sqlalchemy.inspect for getting table information.
<--------------------- REMOVE THE LINES BELOW BEFORE MERGING --------------------->
Checklist
Please review and complete the following checklist before submitting your pull request:
Checklist for Reviewers
Please review and complete the following checklist during the review process: