feat: enhance database migration handling and health check endpoint
Deploy Development / deploy (push) Successful in 37s
Test Suite / lint-backend (push) Successful in 0s
Test Suite / build-frontend (push) Successful in 6s
Test Suite / playwright-tests (push) Failing after 1m55s

- Updated migration logic in main.py to allow skipping migrations during local development with SKIP_DB_MIGRATE environment variable.
- Improved error handling for migration failures, ensuring the application does not start if migrations are incomplete.
- Added a new health check endpoint (/api/health/ready) to verify database connection and essential tables, aiding in production debugging.
- Enhanced run_migrations.py to support ordered execution of migration files and improved transaction handling.
- Updated requirements.txt to include sqlparse for SQL statement parsing when psql is unavailable.
This commit is contained in:
Lars committed 2026-04-29 12:29:39 +02:00
1 parent 159ac8fb71
commit 1f2c8ea0f1
6 files changed
+341 -88

No files matched your search

+1
View File
@@ -10,3 +10,4 @@ slowapi==0.1.9
psycopg2-binary==2.9.9
python-dateutil==2.9.0
tzdata>=2024.1 # ZoneInfo (Europe/Berlin) auch unter Windows
sqlparse>=0.5.0 # Migrationen: Statements splitten (Fallback ohne psql)