feat: [US-001] Add automatic Alembic migrations at backend startup
- Add alembic.ini config for data_entry module - Add migrations.py helper with: - run_migrations(): runs pending migrations at startup (returns True/False) - get_current_revision(): returns current schema version for /health - Integrate migrations in main.py startup_event() BEFORE init_data_entry_db() - Add data_entry_schema_version to /health endpoint If migrations fail, backend continues with WARNING (not crash). Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -23,6 +23,8 @@
|
||||
"Bash(ruff format*)",
|
||||
"Bash(mypy*)",
|
||||
"Bash(pip install*)",
|
||||
"Bash(cd backend && alembic*)",
|
||||
"Bash(python -m py_compile*)",
|
||||
"Bash(git checkout*)",
|
||||
"Bash(git status)",
|
||||
"Bash(git diff*)",
|
||||
|
||||
Reference in New Issue
Block a user