Skip to content

FIX: Alembic Hotfix#68

Merged
zdomke merged 1 commit intomainfrom
zdomke/alembic-hotfix
Mar 31, 2026
Merged

FIX: Alembic Hotfix#68
zdomke merged 1 commit intomainfrom
zdomke/alembic-hotfix

Conversation

@zdomke
Copy link
Copy Markdown
Contributor

@zdomke zdomke commented Mar 31, 2026

Description

Fix alembic versioning. #44 accidentally introduced 2 alembic heads.

Just fixing the versioning wasn't enough though as #56 was still preventing the backend from starting up properly. Temporarily remove the auto-updating for alembic.

Users will need to run docker exec squirrel-api alembic upgrade head on a fresh backend build again.

Motivation

Some Alembic issue introduced in #44 & #56.

@zdomke zdomke requested a review from a team March 31, 2026 18:13
@zdomke zdomke self-assigned this Mar 31, 2026
@zdomke zdomke added the bug Something isn't working label Mar 31, 2026
@shilorigins
Copy link
Copy Markdown
Contributor

Does fresh backend build include removing volumnes with docker compose down -v?

@zdomke
Copy link
Copy Markdown
Contributor Author

zdomke commented Mar 31, 2026

Does fresh backend build include removing volumnes with docker compose down -v?

Yes, any time the volumes are removed the users will need to run alembic upgrade again

@shilorigins
Copy link
Copy Markdown
Contributor

Does fresh backend build include removing volumnes with docker compose down -v?

Yes, any time the volumes are removed the users will need to run alembic upgrade again

Ah, I misunderstood. I thought you meant "for this PR to work then a fresh backend must be built", not "if a fresh backend is built, alembic has to be run"

@shilorigins
Copy link
Copy Markdown
Contributor

For clarity, I ran docker compose down && docker compose up -d --build on my existing instance and it's working without issue.

Copy link
Copy Markdown
Contributor

@shilorigins shilorigins left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems to work for me, so let's get it merged in.

@zdomke zdomke merged commit e0f2a2e into main Mar 31, 2026
2 checks passed
@zdomke zdomke deleted the zdomke/alembic-hotfix branch March 31, 2026 18:25
@zdomke
Copy link
Copy Markdown
Contributor Author

zdomke commented Mar 31, 2026

Realizing that I shouldn't have manually changed the values for Revises and down_revision. I should have instead run alembic merge heads and committed the merge revision. This is good to know for future use.

I may also want to spend some time learning how to properly use alembic.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants