feat: enhance database migration handling and media asset tags
Deploy Development / deploy (push) Successful in 36s
Test Suite / pytest-backend (push) Successful in 29s
Test Suite / lint-backend (push) Successful in 0s
Test Suite / build-frontend (push) Successful in 7s
Test Suite / playwright-tests (push) Successful in 30s
Test Suite / pytest-backend (pull_request) Successful in 23s
Test Suite / lint-backend (pull_request) Successful in 0s
Test Suite / build-frontend (pull_request) Successful in 6s
Test Suite / playwright-tests (pull_request) Successful in 23s

- Updated migration scripts to ensure idempotency and safe execution of SQL statements, preventing errors on repeated runs.
- Improved documentation in migration files to clarify the execution order and idempotent practices for database migrations.
- Added a comment in main.py to explain the migration process and its conditional execution based on the SKIP_DB_MIGRATE environment variable.
This commit is contained in:
Lars committed 2026-05-07 16:28:25 +02:00
1 parent a8667f4757
commit 4f64cb105b
3 files changed
+16 -2

No files matched your search

@@ -1,4 +1,8 @@
-- Migration 046: Schlagwörter (tags) für media_assets — Suche & Filter in der Medienbibliothek.
--
-- Einordnung: läuft nach 045 (media_assets existiert). Idempotent:
-- • wird pro Umgebung höchstens einmal über schema_migrations ausgeführt;
-- • dieselben Statements sind bei Wiederholung harmlos (IF NOT EXISTS).
ALTER TABLE media_assets
ADD COLUMN IF NOT EXISTS tags TEXT[] NOT NULL DEFAULT '{}';