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

DB Migration via Alembic #365

Open
LeonWehrhahn opened this issue Nov 29, 2024 · 0 comments
Open

DB Migration via Alembic #365

LeonWehrhahn opened this issue Nov 29, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@LeonWehrhahn
Copy link
Contributor

LeonWehrhahn commented Nov 29, 2024

Is your feature request related to a problem?

Currently Athena lacks a robust mechanism for handling database schema changes. As Athena evolves, changes to the database schema are inevitable. Without a proper migration tool, this will lead to schema inconsistencies, deployment issues, and synchronization problems across different environments.

Describe the solution you'd like

Integrate Alembic into Athena to manage database migrations effectively. Alembic is a lightweight database migration tool for SQLAlchemy-supported databases. It can help us version control our database schema changes and apply migrations smoothly across different instances of Athena services.

Two possible approaches:

  • Option A: Integrate Alembic directly into the athena package. The challenge here is ensuring that when multiple services (modules) start, we prevent race conditions where multiple instances attempt to run migrations simultaneously.
  • Option B: Create a separate service dedicated to running migrations before the other modules start. This could be a good production solution but complicates local testing and development since locally we create a SQLite db separately in every module.
@LeonWehrhahn LeonWehrhahn added the enhancement New feature or request label Nov 29, 2024
@maximiliansoelch maximiliansoelch moved this to Backlog in Athena Dec 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: Backlog
Development

No branches or pull requests

1 participant