Skip to content
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

Run Alembic migrations on Hyperion startup #312

Merged
merged 26 commits into from
Feb 4, 2024
Merged

Conversation

Rotheem
Copy link
Member

@Rotheem Rotheem commented Dec 19, 2023

Description

Before this pull request we only created missing tables on Hyperion startup. The developer had to run migrations files mannually when a table was modified.

With this PR, Hyperion:

  • create an up to date database and stamp it as "head" when the database was never initialized
  • upgrade the database to "head" by asking alembic to run migration files

@armanddidierjean armanddidierjean marked this pull request as draft December 20, 2023 08:52
@Rotheem Rotheem force-pushed the full-migration-setup branch from dac7717 to 442a0bd Compare January 9, 2024 09:47
@armanddidierjean
Copy link
Member

armanddidierjean commented Jan 20, 2024

Copy link

codecov bot commented Jan 21, 2024

Codecov Report

Attention: 7 lines in your changes are missing coverage. Please review.

Comparison is base (7302d11) 78.14% compared to head (c39b121) 78.88%.
Report is 3 commits behind head on main.

Files Patch % Lines
app/app.py 80.00% 7 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #312      +/-   ##
==========================================
+ Coverage   78.14%   78.88%   +0.74%     
==========================================
  Files          77       77              
  Lines        5400     5528     +128     
==========================================
+ Hits         4220     4361     +141     
+ Misses       1180     1167      -13     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@armanddidierjean armanddidierjean changed the title Remove database auto-generation Run Alembic migrations on Hyperion startup Jan 21, 2024
@Rotheem Rotheem force-pushed the full-migration-setup branch from b8caab1 to 27d7ccf Compare January 29, 2024 13:08
@Rotheem Rotheem added ready for review This PR is ready to be reviewed and removed don't merge labels Jan 29, 2024
@armanddidierjean armanddidierjean marked this pull request as ready for review January 29, 2024 13:10
@Petitoto Petitoto merged commit 520faaf into main Feb 4, 2024
11 checks passed
@Petitoto Petitoto deleted the full-migration-setup branch February 4, 2024 20:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core ready for review This PR is ready to be reviewed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants