Cwiczenia: usuniecie martwego pola trudnosc z katalogu (trudnosc pozostaje tylko jako ocena cwiczacego per seria 1-5; migracja DROP kolumny Exercise.difficulty)

This commit is contained in:
tisachi
2026-10-17 08:51:12 +02:00
parent 03e0ace10a
commit 4001aab977
16 changed files with 15 additions and 455 deletions

View File

@@ -9,7 +9,6 @@ export interface ExerciseInput {
description?: string | null;
howTo?: string | null;
commonMistakes?: string | null;
difficulty?: number;
/** Equipment ids to link (replaces the current set when provided). */
equipmentIds?: string[];
hasReps?: boolean;
@@ -86,7 +85,6 @@ export async function createExercise(prisma: PrismaClient, data: ExerciseInput)
description: data.description ?? null,
howTo: data.howTo ?? null,
commonMistakes: data.commonMistakes ?? null,
difficulty: data.difficulty ?? 3,
source: 'BUILTIN',
// undefined → Prisma default (has* pozostają przy domyślnych kombinacjach)
hasReps: data.hasReps,
@@ -125,7 +123,6 @@ export async function updateExercise(
description: data.description,
howTo: data.howTo,
commonMistakes: data.commonMistakes,
difficulty: data.difficulty,
hasReps: data.hasReps,
hasLoad: data.hasLoad,
hasRest: data.hasRest,