chore: update versioning and enhance training framework features
- Incremented APP_VERSION to 0.8.10 and DB_SCHEMA_VERSION to 20260505037. - Updated project status and domain model documentation to reflect recent changes. - Enhanced training framework program handling with new slot-blueprint structure. - Introduced API endpoint for creating training units from framework slots. - Improved documentation for training planning and governance concepts.
This commit is contained in:
1 parent
7e21b44604
commit
c4fbabd8f6
12 files changed
+940
-1070
No files matched your search
@@ -1,8 +1,8 @@
|
||||
# Shinkan Jinkendo - Datenbank-Schema (Technisch)
|
||||
|
||||
**Version:** 0.5.1
|
||||
**Version:** 0.5.2
|
||||
**Stand:** 2026-05-05
|
||||
**Hinweis:** Produktiver Deploy sollte mindestens bis Migration **035** (Trainingsrahmenprogramm + Vorlagen-`visibility`) geführt sein — Details siehe `backend/version.py` (`DB_SCHEMA_VERSION`).
|
||||
**Hinweis:** Produktiver Deploy sollte mindestens bis Migration **037** (Rahmen‑Slot‑Blueprints in `training_units`; Entfall `training_framework_slot_exercises`) geführt sein — Details siehe `backend/version.py` (`DB_SCHEMA_VERSION`).
|
||||
|
||||
---
|
||||
|
||||
@@ -44,7 +44,9 @@ Dieses Dokument beschreibt die **technische Datenbankstruktur** von Shinkan Jink
|
||||
| **032** | **2026-04-30** | **Progressionsgraph Übung→Übung:** `exercise_progression_graphs`, `exercise_progression_edges` | ✅ |
|
||||
| **033** | **2026-04-30** | **`exercise_progression_edges.notes`** | ✅ |
|
||||
| **034** | **2026-04-30** | **Kanten-Endpunkte optional `exercise_variants`; UNIQUE/CHECK** | ✅ |
|
||||
| **035** | **2026-05-05** | **Rahmenprogramm:** `training_framework_programs` (+ Ziele, Slots, Slot-Übungen); **`training_plan_templates.visibility`** (Backfill `club`) — siehe `TRAINING_FRAMEWORK_SPEC.md` | ✅ |
|
||||
| **035** | **2026-05-05** | **Rahmenprogramm:** `training_framework_programs` (+ Ziele, Slots, früher `training_framework_slot_exercises`); **`training_plan_templates.visibility`** (Backfill `club`) — siehe `TRAINING_FRAMEWORK_SPEC.md` | ✅ |
|
||||
| **036** | **2026-05-05** | **Rahmen nur Bibliothek:** Kopf mit `focus_area_id`, `style_direction_id`, M:N Trainingsarten/Zielgruppen; Entfall `plan_mode`, `group_id`; Slot‑`training_unit_id` geleert — siehe `036_framework_program_context_only_library.sql` | ✅ |
|
||||
| **037** | **2026-05-05** | **Slot‑Blueprint:** `training_units.framework_slot_id` (+ CHECK Blueprint vs. Kalender), `origin_framework_slot_id`; Migration Slot‑Übungen → `training_unit_sections`/`training_unit_section_items`; **`DROP training_framework_slot_exercises`** | ✅ |
|
||||
|
||||
---
|
||||
|
||||
@@ -270,14 +272,51 @@ exercise_variants (id, exercise_id, name, description, ...)
|
||||
exercise_media (id, exercise_id, type, url, title, description, ...)
|
||||
```
|
||||
|
||||
### Training Planning
|
||||
### Trainingsrahmenprogramm Bibliothek (Migrationen **035–036**)
|
||||
|
||||
Kopf ohne Gruppenbindung (`training_framework_programs`), Ziele, Slots. Slot‑spezifischer Ablauf liegt nach **037** nicht mehr in eigener Übungstabelle, sondern in **`training_units`** mit **`framework_slot_id`** — siehe nächster Abschnitt.
|
||||
|
||||
```sql
|
||||
training_units (id, group_id, date, title, description, ...)
|
||||
training_unit_exercises (
|
||||
training_unit_id, exercise_id, sort_order,
|
||||
exercise_variant_id -- FK exercise_variants(id) ON DELETE SET NULL (Migration 030)
|
||||
training_framework_programs (… focus_area_id, style_direction_id, visibility, club_id, created_by …)
|
||||
training_framework_goals (framework_program_id, sort_order, title, notes)
|
||||
training_framework_slots (framework_program_id, sort_order, title, notes, training_unit_id -- ungenutzt)
|
||||
training_framework_program_training_types (framework_program_id, training_type_id)
|
||||
training_framework_program_target_groups (framework_program_id, target_group_id)
|
||||
```
|
||||
|
||||
### Training Planning & Rahmen‑Blueprint (Migrationen 006, 031, **037**)
|
||||
|
||||
Geplante Einheit und **Rahmen‑Slot‑Blueprint** teilen sich **`training_units`** und den strukturierten Ablauf über **Sektionen** (031). Blueprint‑Zeilen haben **`framework_slot_id`** gesetzt (genau eine Zeile pro Slot); Kalender‑Zeilen haben **`framework_slot_id IS NULL`** und **`group_id` / `planned_date`** gesetzt. Kopien aus dem Rahmen können **`origin_framework_slot_id`** setzen.
|
||||
|
||||
```sql
|
||||
training_units (
|
||||
id,
|
||||
group_id INT NULL REFERENCES training_groups(id), -- Pflicht für Kalender‑Zeilen (CHECK)
|
||||
planned_date DATE NULL, -- Pflicht für Kalender‑Zeilen (CHECK)
|
||||
planned_time_start, planned_time_end, planned_focus,
|
||||
actual_date, actual_time_start, actual_time_end, attendance_count,
|
||||
status, notes, trainer_notes,
|
||||
created_by, plan_template_id REFERENCES training_plan_templates(id),
|
||||
framework_slot_id INT NULL REFERENCES training_framework_slots(id) ON DELETE CASCADE,
|
||||
origin_framework_slot_id INT NULL REFERENCES training_framework_slots(id) ON DELETE SET NULL,
|
||||
…
|
||||
)
|
||||
training_unit_sections (
|
||||
training_unit_id, order_index, title, guidance_notes,
|
||||
source_template_section_id REFERENCES training_plan_template_sections(id)
|
||||
)
|
||||
training_unit_section_items (
|
||||
section_id, order_index, item_type CHECK ('exercise'|'note'),
|
||||
exercise_id, exercise_variant_id, planned_duration_min, actual_duration_min,
|
||||
notes, modifications, note_body
|
||||
)
|
||||
```
|
||||
|
||||
**Legacy (Migration 006, für ältere Codepfade noch referenzierbar):** `training_unit_exercises`; produktiver Standardablauf liegt in **Sections/Items**.
|
||||
|
||||
**Trainingsvorlagen (031):** `training_plan_templates`, `training_plan_template_sections`.
|
||||
|
||||
```sql
|
||||
exercise_blocks (id, name, description, created_by, club_id, ...) -- Migration 017
|
||||
```
|
||||
|
||||
|
||||
Reference in new issue
Block a user