Production Release: RestDays Widget + Trainingstyp Fix #16
17
backend/migrations/011_allow_multiple_rest_days_per_date.sql
Normal file
17
backend/migrations/011_allow_multiple_rest_days_per_date.sql
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
-- Migration 011: Allow Multiple Rest Days per Date
|
||||
-- v9d Phase 2a: Support for multi-dimensional rest (development routes)
|
||||
-- Date: 2026-03-22
|
||||
|
||||
-- Remove UNIQUE constraint to allow multiple rest day types per date
|
||||
-- Use Case: Muscle recovery + Mental rest on same day
|
||||
-- Future: Development routes (Conditioning, Strength, Coordination, Mental, Mobility, Technique)
|
||||
|
||||
ALTER TABLE rest_days
|
||||
DROP CONSTRAINT IF EXISTS unique_rest_day_per_profile;
|
||||
|
||||
-- Add index for efficient queries (profile_id, date)
|
||||
CREATE INDEX IF NOT EXISTS idx_rest_days_profile_date_multi
|
||||
ON rest_days(profile_id, date DESC);
|
||||
|
||||
-- Comment for documentation
|
||||
COMMENT ON TABLE rest_days IS 'v9d Phase 2a: Multi-dimensional rest days - multiple entries per date allowed for different development routes (muscle, cardio, mental, coordination, technique)';
|
||||
|
|
@ -62,11 +62,11 @@ const PRESETS = [
|
|||
]
|
||||
|
||||
const FOCUS_LABELS = {
|
||||
muscle_recovery: '💪 Muskelregeneration',
|
||||
cardio_recovery: '🏃 Cardio-Erholung',
|
||||
mental_rest: '🧘 Mentale Erholung',
|
||||
deload: '📉 Deload',
|
||||
injury: '🩹 Verletzungspause',
|
||||
muscle_recovery: 'Muskelregeneration',
|
||||
cardio_recovery: 'Cardio-Erholung',
|
||||
mental_rest: 'Mentale Erholung',
|
||||
deload: 'Deload',
|
||||
injury: 'Verletzungspause',
|
||||
}
|
||||
|
||||
export default function RestDaysPage() {
|
||||
|
|
@ -434,7 +434,8 @@ export default function RestDaysPage() {
|
|||
color: preset?.color || '#888',
|
||||
marginBottom: day.note ? 8 : 0,
|
||||
}}>
|
||||
{preset?.icon || '📅'} {FOCUS_LABELS[focus] || focus}
|
||||
<span style={{ fontSize: 14 }}>{preset?.icon || '📅'}</span>
|
||||
{FOCUS_LABELS[focus] || focus}
|
||||
</div>
|
||||
|
||||
{/* Note */}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user