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

Stamp alembic head when recreating tables #521

Merged
merged 3 commits into from
Feb 24, 2024

Conversation

evroon
Copy link
Owner

@evroon evroon commented Feb 24, 2024

fix #520

After initializing the database, we don't want/need to run any migrations, so we just tell alembic we're on the latest revision.

@evroon evroon self-assigned this Feb 24, 2024
Copy link

vercel bot commented Feb 24, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
bracket ✅ Ready (Inspect) Visit Preview 💬 Add feedback Feb 24, 2024 11:27am

Copy link

codecov bot commented Feb 24, 2024

Codecov Report

Attention: Patch coverage is 75.00000% with 4 lines in your changes are missing coverage. Please review.

Project coverage is 90.23%. Comparing base (d016e50) to head (3aa7f61).

Files Patch % Lines
backend/bracket/utils/alembic.py 81.81% 2 Missing ⚠️
backend/bracket/app.py 50.00% 1 Missing ⚠️
backend/bracket/utils/db_init.py 66.66% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #521      +/-   ##
==========================================
- Coverage   92.36%   90.23%   -2.13%     
==========================================
  Files         106      121      +15     
  Lines        3639     3880     +241     
==========================================
+ Hits         3361     3501     +140     
- Misses        278      379     +101     

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

@evroon
Copy link
Owner Author

evroon commented Feb 24, 2024

When I delete the alembic_version table, and then run ./cli.py create-dev-db, it successfully creates the alembic_version table, sets the head revision, and the tool runs normally without running migrations.

@evroon evroon merged commit 873953d into master Feb 24, 2024
9 checks passed
@evroon evroon deleted the stamp-alembic-head-when-recreating-tables branch February 24, 2024 11:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Issue in first time databse creation
1 participant