shinkan-jinkendo/backend/migrations
Lars d0e9b9b764
Some checks failed
Deploy Development / deploy (push) Successful in 35s
Test Suite / lint-backend (push) Successful in 0s
Test Suite / build-frontend (push) Successful in 5s
Test Suite / playwright-tests (push) Failing after 1m54s
fix: Make migration 007 idempotent (IF NOT EXISTS + ON CONFLICT)
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.
2026-04-23 08:10:44 +02:00
..
001_auth_membership.sql feat: Complete MVP setup - Docker, Frontend, Migrations, CI/CD 2026-04-21 14:36:52 +02:00
002_organization.sql feat: Complete MVP setup - Docker, Frontend, Migrations, CI/CD 2026-04-21 14:36:52 +02:00
003_catalogs.sql feat: Complete MVP setup - Docker, Frontend, Migrations, CI/CD 2026-04-21 14:36:52 +02:00
004_add_auth_columns.sql fix: Add missing auth columns to profiles table 2026-04-21 21:07:52 +02:00
005_exercises.sql fix: Add lucide-react dependency for navigation icons 2026-04-22 16:40:05 +02:00
006_training_planning.sql feat: Training Planning (core feature) complete 2026-04-22 16:54:34 +02:00
007_exercise_catalogs.sql fix: Make migration 007 idempotent (IF NOT EXISTS + ON CONFLICT) 2026-04-23 08:10:44 +02:00