Skip to content

Migration setup for database#294

Merged
semohr merged 13 commits into
release/2.0.0from
db_migrations
Apr 14, 2026
Merged

Migration setup for database#294
semohr merged 13 commits into
release/2.0.0from
db_migrations

Conversation

@semohr
Copy link
Copy Markdown
Collaborator

@semohr semohr commented Apr 9, 2026

We are in need for a bit of a database migration setup 🙃 Should simplify future feature additions and changes, especially since new beets versions might require us to refactor our database state serialization logic.

This PR adds Alembic as a dependency and creates a minimal setup that runs migrations whenever the container is started. This should be enough for our current use case.

Changes

  • Added Alembic as a dependency
  • Implemented initial migration scripts
  • Configured automatic migration execution on container startup
  • Added runtime validation for migration state
  • Removed obsolete database initialization scripts
  • Added documentation around migrations
  • Added unit tests for migration functionality

To review it might be helpful to check singular commits in order. They should be pretty digestible.

@github-actions

This comment was marked as resolved.

@semohr semohr merged commit 62e63bd into release/2.0.0 Apr 14, 2026
2 checks passed
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.

2 participants