shinkan-jinkendo/backend/migrations/038_training_unit_lead_trainer.sql
Lars 0748990328
Some checks failed
Deploy Development / deploy (push) Successful in 34s
Test Suite / lint-backend (push) Successful in 0s
Test Suite / build-frontend (push) Successful in 6s
Test Suite / playwright-tests (push) Failing after 40s
feat: update version and enhance training unit management features
- Bumped application version to 0.8.11 and updated database schema version.
- Added new API features for training units, including filtering by club and assigned trainer.
- Enhanced the TrainingPlanningPage with options to filter training units by club and assigned trainer, improving user experience.
- Implemented lead trainer assignment functionality, allowing users to take lead on training units.
- Updated changelog with new version details and changes.
2026-05-05 15:40:29 +02:00

12 lines
631 B
SQL

-- Migration 038: Optionale verantwortliche Person pro Trainingstermin (Vertretung)
-- Für Vereins-/Trainerübersicht: COALESCE(tu.lead_trainer_profile_id, tg.trainer_id) = wirksamer Leitungstrainer.
ALTER TABLE training_units
ADD COLUMN IF NOT EXISTS lead_trainer_profile_id INT REFERENCES profiles(id) ON DELETE SET NULL;
COMMENT ON COLUMN training_units.lead_trainer_profile_id IS 'Vertretung / expliziter Leiter dieses Terms; NULL = Standard (Haupttrainer der Gruppe)';
CREATE INDEX IF NOT EXISTS idx_training_units_lead_trainer
ON training_units(lead_trainer_profile_id)
WHERE lead_trainer_profile_id IS NOT NULL;