shinkan-jinkendo/backend/migrations/027_maturity_bindings_focus_training.sql
Lars f2c007cc68
Some checks failed
Deploy Development / deploy (push) Successful in 36s
Test Suite / lint-backend (push) Successful in 0s
Test Suite / build-frontend (push) Successful in 5s
Test Suite / playwright-tests (push) Failing after 1m59s
feat: update version to 0.7.4 and enhance maturity model functionality
- Incremented application version to 0.7.4 and updated database schema version to 20260427027.
- Enhanced maturity model context bindings to support new filtering options for training styles.
- Introduced new API endpoints for importing and exporting maturity model bundles.
- Updated frontend components to include a matrix view and improved admin UI for managing maturity models.
- Documented changes in the changelog for version 0.7.4, detailing new features and improvements.
2026-04-27 12:48:22 +02:00

18 lines
902 B
SQL
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

-- Migration 027: Kontext-Bindings Fokus + Trainingsstil ohne Stilrichtung (z. B. Karate + Breitensport)
-- Ersetzt die alte CHECK-Constraint-Kette; partielle Unique-Indizes für alle vier Kombinationen.
-- Datum: 2026-04-27
ALTER TABLE maturity_model_context_bindings DROP CONSTRAINT IF EXISTS chk_mcb_tier;
DROP INDEX IF EXISTS uq_mmcb_focus_style_ttype;
-- Fokus + Stilrichtung + Trainingsstil (alle drei gesetzt)
CREATE UNIQUE INDEX IF NOT EXISTS uq_mmcb_focus_style_training
ON maturity_model_context_bindings (focus_area_id, style_direction_id, training_type_id)
WHERE style_direction_id IS NOT NULL AND training_type_id IS NOT NULL;
-- Fokus + Trainingsstil (ohne Stilrichtung)
CREATE UNIQUE INDEX IF NOT EXISTS uq_mmcb_focus_training
ON maturity_model_context_bindings (focus_area_id, training_type_id)
WHERE style_direction_id IS NULL AND training_type_id IS NOT NULL;