CRITICAL FIX: Migration 007 failed beim Startup wegen existierendem Index Problem: - Migration 007 wurde teilweise angewendet (Spalten + Indexes erstellt) - Bei erneutem Versuch: 'idx_skills_category already exists' → Abbruch - Tabellen (training_styles, training_characters, etc.) nicht erstellt - Katalog-Endpoints → 500 Error (UndefinedTable) Lösung: - Alle CREATE TABLE → CREATE TABLE IF NOT EXISTS - Alle CREATE INDEX → CREATE INDEX IF NOT EXISTS - ALTER TABLE → DO $$ BEGIN IF NOT EXISTS ... END $$ - Alle INSERT → ON CONFLICT (name) DO NOTHING Migration kann jetzt beliebig oft ausgeführt werden ohne Fehler. |
||
|---|---|---|
| .. | ||
| 001_auth_membership.sql | ||
| 002_organization.sql | ||
| 003_catalogs.sql | ||
| 004_add_auth_columns.sql | ||
| 005_exercises.sql | ||
| 006_training_planning.sql | ||
| 007_exercise_catalogs.sql | ||