Skip to content

Commit

Permalink
Merge pull request #119 from WhyAsh5114/117-fix-incorrect-bodyweight
Browse files Browse the repository at this point in the history
fix: update bodyweight type to include decimals as well
  • Loading branch information
WhyAsh5114 authored Oct 15, 2024
2 parents 3d516b3 + ac34343 commit 0e6f441
Show file tree
Hide file tree
Showing 5 changed files with 101 additions and 28 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
/*
Warnings:
- Changed the type of `userBodyweight` on the `Workout` table. No cast exists, the column would be dropped and recreated, which cannot be done if there is data, since the column is required.
*/

-- Step 1: Add a new column with the DECIMAL type
BEGIN;
ALTER TABLE "Workout"
ADD COLUMN "newUserBodyweight" DECIMAL(5, 2);
COMMIT;

-- Step 2: Migrate the existing data from the old column to the new one
BEGIN;
UPDATE "Workout"
SET "newUserBodyweight" = CAST("userBodyweight" AS DECIMAL(5, 2));
COMMIT;

-- Step 3: Ensure no null values exist in the new column before making it required
BEGIN;
ALTER TABLE "Workout"
ALTER COLUMN "newUserBodyweight" SET NOT NULL;
COMMIT;

-- Step 4: Drop the old column
BEGIN;
ALTER TABLE "Workout"
DROP COLUMN "userBodyweight";
COMMIT;

-- Step 5: Rename the new column to the original name
BEGIN;
ALTER TABLE "Workout"
RENAME COLUMN "newUserBodyweight" TO "userBodyweight";
COMMIT;
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
/*
Warnings:
- Changed the type of `userBodyweight` on the `Workout` table. No cast exists, the column would be dropped and recreated, which cannot be done if there is data, since the column is required.
*/

-- Step 1: Add a new column with the FLOAT type
BEGIN;
ALTER TABLE "Workout"
ADD COLUMN "tempUserBodyweight" FLOAT;
COMMIT;

-- Step 2: Migrate the existing data from DECIMAL(5, 2) to FLOAT
BEGIN;
UPDATE "Workout"
SET "tempUserBodyweight" = "userBodyweight";
COMMIT;

-- Step 3: Ensure no null values exist in the new column before making it required
BEGIN;
ALTER TABLE "Workout"
ALTER COLUMN "tempUserBodyweight" SET NOT NULL;
COMMIT;

-- Step 4: Drop the DECIMAL column
BEGIN;
ALTER TABLE "Workout"
DROP COLUMN "userBodyweight";
COMMIT;

-- Step 5: Rename the new column to the original name
BEGIN;
ALTER TABLE "Workout"
RENAME COLUMN "tempUserBodyweight" TO "userBodyweight";
COMMIT;

2 changes: 1 addition & 1 deletion prisma/schema/workout.prisma
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ model Workout {
id String @id @default(cuid()) /// @zod.string.cuid2()
user User @relation(fields: [userId], references: [id], onDelete: Cascade)
workoutOfMesocycle WorkoutOfMesocycle?
userBodyweight Int
userBodyweight Float
startedAt DateTime
endedAt DateTime
workoutExercises WorkoutExercise[]
Expand Down
2 changes: 1 addition & 1 deletion src/lib/trpc/routes/workouts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ export const workouts = t.router({
}
}
});
const lastBodyweight = data?.workoutsOfMesocycle.map((v) => v.workout.userBodyweight).filter((b) => b !== null)[0];
const lastBodyweight = data?.workoutsOfMesocycle.map((wm) => wm.workout.userBodyweight)[0];
const userBodyweight = lastBodyweight ?? null;

const todaysWorkoutData: TodaysWorkoutData = {
Expand Down
52 changes: 26 additions & 26 deletions src/lib/zodSchemas/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,7 @@ export type WorkoutOfMesocycle = z.infer<typeof WorkoutOfMesocycleSchema>

export const WorkoutSchema = z.object({
id: z.string().cuid2(),
userBodyweight: z.number().int(),
userBodyweight: z.number(),
startedAt: z.coerce.date(),
endedAt: z.coerce.date(),
userId: z.string(),
Expand Down Expand Up @@ -1791,7 +1791,7 @@ export const WorkoutWhereInputSchema: z.ZodType<Prisma.WorkoutWhereInput> = z.ob
OR: z.lazy(() => WorkoutWhereInputSchema).array().optional(),
NOT: z.union([ z.lazy(() => WorkoutWhereInputSchema),z.lazy(() => WorkoutWhereInputSchema).array() ]).optional(),
id: z.union([ z.lazy(() => StringFilterSchema),z.string() ]).optional(),
userBodyweight: z.union([ z.lazy(() => IntFilterSchema),z.number() ]).optional(),
userBodyweight: z.union([ z.lazy(() => FloatFilterSchema),z.number() ]).optional(),
startedAt: z.union([ z.lazy(() => DateTimeFilterSchema),z.coerce.date() ]).optional(),
endedAt: z.union([ z.lazy(() => DateTimeFilterSchema),z.coerce.date() ]).optional(),
userId: z.union([ z.lazy(() => StringFilterSchema),z.string() ]).optional(),
Expand Down Expand Up @@ -1819,7 +1819,7 @@ export const WorkoutWhereUniqueInputSchema: z.ZodType<Prisma.WorkoutWhereUniqueI
AND: z.union([ z.lazy(() => WorkoutWhereInputSchema),z.lazy(() => WorkoutWhereInputSchema).array() ]).optional(),
OR: z.lazy(() => WorkoutWhereInputSchema).array().optional(),
NOT: z.union([ z.lazy(() => WorkoutWhereInputSchema),z.lazy(() => WorkoutWhereInputSchema).array() ]).optional(),
userBodyweight: z.union([ z.lazy(() => IntFilterSchema),z.number().int() ]).optional(),
userBodyweight: z.union([ z.lazy(() => FloatFilterSchema),z.number() ]).optional(),
startedAt: z.union([ z.lazy(() => DateTimeFilterSchema),z.coerce.date() ]).optional(),
endedAt: z.union([ z.lazy(() => DateTimeFilterSchema),z.coerce.date() ]).optional(),
userId: z.union([ z.lazy(() => StringFilterSchema),z.string() ]).optional(),
Expand All @@ -1846,7 +1846,7 @@ export const WorkoutScalarWhereWithAggregatesInputSchema: z.ZodType<Prisma.Worko
OR: z.lazy(() => WorkoutScalarWhereWithAggregatesInputSchema).array().optional(),
NOT: z.union([ z.lazy(() => WorkoutScalarWhereWithAggregatesInputSchema),z.lazy(() => WorkoutScalarWhereWithAggregatesInputSchema).array() ]).optional(),
id: z.union([ z.lazy(() => StringWithAggregatesFilterSchema),z.string() ]).optional(),
userBodyweight: z.union([ z.lazy(() => IntWithAggregatesFilterSchema),z.number() ]).optional(),
userBodyweight: z.union([ z.lazy(() => FloatWithAggregatesFilterSchema),z.number() ]).optional(),
startedAt: z.union([ z.lazy(() => DateTimeWithAggregatesFilterSchema),z.coerce.date() ]).optional(),
endedAt: z.union([ z.lazy(() => DateTimeWithAggregatesFilterSchema),z.coerce.date() ]).optional(),
userId: z.union([ z.lazy(() => StringWithAggregatesFilterSchema),z.string() ]).optional(),
Expand Down Expand Up @@ -3061,7 +3061,7 @@ export const WorkoutOfMesocycleUncheckedUpdateManyInputSchema: z.ZodType<Prisma.

export const WorkoutCreateInputSchema: z.ZodType<Prisma.WorkoutCreateInput> = z.object({
id: z.string().cuid2().optional(),
userBodyweight: z.number().int(),
userBodyweight: z.number(),
startedAt: z.coerce.date(),
endedAt: z.coerce.date(),
user: z.lazy(() => UserCreateNestedOneWithoutWorkoutsInputSchema),
Expand All @@ -3071,7 +3071,7 @@ export const WorkoutCreateInputSchema: z.ZodType<Prisma.WorkoutCreateInput> = z.

export const WorkoutUncheckedCreateInputSchema: z.ZodType<Prisma.WorkoutUncheckedCreateInput> = z.object({
id: z.string().cuid2().optional(),
userBodyweight: z.number().int(),
userBodyweight: z.number(),
startedAt: z.coerce.date(),
endedAt: z.coerce.date(),
userId: z.string(),
Expand All @@ -3081,7 +3081,7 @@ export const WorkoutUncheckedCreateInputSchema: z.ZodType<Prisma.WorkoutUnchecke

export const WorkoutUpdateInputSchema: z.ZodType<Prisma.WorkoutUpdateInput> = z.object({
id: z.union([ z.string().cuid2(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(),
userBodyweight: z.union([ z.number().int(),z.lazy(() => IntFieldUpdateOperationsInputSchema) ]).optional(),
userBodyweight: z.union([ z.number(),z.lazy(() => FloatFieldUpdateOperationsInputSchema) ]).optional(),
startedAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(),
endedAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(),
user: z.lazy(() => UserUpdateOneRequiredWithoutWorkoutsNestedInputSchema).optional(),
Expand All @@ -3091,7 +3091,7 @@ export const WorkoutUpdateInputSchema: z.ZodType<Prisma.WorkoutUpdateInput> = z.

export const WorkoutUncheckedUpdateInputSchema: z.ZodType<Prisma.WorkoutUncheckedUpdateInput> = z.object({
id: z.union([ z.string().cuid2(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(),
userBodyweight: z.union([ z.number().int(),z.lazy(() => IntFieldUpdateOperationsInputSchema) ]).optional(),
userBodyweight: z.union([ z.number(),z.lazy(() => FloatFieldUpdateOperationsInputSchema) ]).optional(),
startedAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(),
endedAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(),
userId: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(),
Expand All @@ -3101,22 +3101,22 @@ export const WorkoutUncheckedUpdateInputSchema: z.ZodType<Prisma.WorkoutUnchecke

export const WorkoutCreateManyInputSchema: z.ZodType<Prisma.WorkoutCreateManyInput> = z.object({
id: z.string().cuid2().optional(),
userBodyweight: z.number().int(),
userBodyweight: z.number(),
startedAt: z.coerce.date(),
endedAt: z.coerce.date(),
userId: z.string()
}).strict();

export const WorkoutUpdateManyMutationInputSchema: z.ZodType<Prisma.WorkoutUpdateManyMutationInput> = z.object({
id: z.union([ z.string().cuid2(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(),
userBodyweight: z.union([ z.number().int(),z.lazy(() => IntFieldUpdateOperationsInputSchema) ]).optional(),
userBodyweight: z.union([ z.number(),z.lazy(() => FloatFieldUpdateOperationsInputSchema) ]).optional(),
startedAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(),
endedAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(),
}).strict();

export const WorkoutUncheckedUpdateManyInputSchema: z.ZodType<Prisma.WorkoutUncheckedUpdateManyInput> = z.object({
id: z.union([ z.string().cuid2(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(),
userBodyweight: z.union([ z.number().int(),z.lazy(() => IntFieldUpdateOperationsInputSchema) ]).optional(),
userBodyweight: z.union([ z.number(),z.lazy(() => FloatFieldUpdateOperationsInputSchema) ]).optional(),
startedAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(),
endedAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(),
userId: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(),
Expand Down Expand Up @@ -6950,7 +6950,7 @@ export const MesocycleCreateManyUserInputEnvelopeSchema: z.ZodType<Prisma.Mesocy

export const WorkoutCreateWithoutUserInputSchema: z.ZodType<Prisma.WorkoutCreateWithoutUserInput> = z.object({
id: z.string().cuid2().optional(),
userBodyweight: z.number().int(),
userBodyweight: z.number(),
startedAt: z.coerce.date(),
endedAt: z.coerce.date(),
workoutOfMesocycle: z.lazy(() => WorkoutOfMesocycleCreateNestedOneWithoutWorkoutInputSchema).optional(),
Expand All @@ -6959,7 +6959,7 @@ export const WorkoutCreateWithoutUserInputSchema: z.ZodType<Prisma.WorkoutCreate

export const WorkoutUncheckedCreateWithoutUserInputSchema: z.ZodType<Prisma.WorkoutUncheckedCreateWithoutUserInput> = z.object({
id: z.string().cuid2().optional(),
userBodyweight: z.number().int(),
userBodyweight: z.number(),
startedAt: z.coerce.date(),
endedAt: z.coerce.date(),
workoutOfMesocycle: z.lazy(() => WorkoutOfMesocycleUncheckedCreateNestedOneWithoutWorkoutInputSchema).optional(),
Expand Down Expand Up @@ -7100,7 +7100,7 @@ export const WorkoutScalarWhereInputSchema: z.ZodType<Prisma.WorkoutScalarWhereI
OR: z.lazy(() => WorkoutScalarWhereInputSchema).array().optional(),
NOT: z.union([ z.lazy(() => WorkoutScalarWhereInputSchema),z.lazy(() => WorkoutScalarWhereInputSchema).array() ]).optional(),
id: z.union([ z.lazy(() => StringFilterSchema),z.string() ]).optional(),
userBodyweight: z.union([ z.lazy(() => IntFilterSchema),z.number() ]).optional(),
userBodyweight: z.union([ z.lazy(() => FloatFilterSchema),z.number() ]).optional(),
startedAt: z.union([ z.lazy(() => DateTimeFilterSchema),z.coerce.date() ]).optional(),
endedAt: z.union([ z.lazy(() => DateTimeFilterSchema),z.coerce.date() ]).optional(),
userId: z.union([ z.lazy(() => StringFilterSchema),z.string() ]).optional(),
Expand Down Expand Up @@ -7252,7 +7252,7 @@ export const UserUncheckedUpdateWithoutSessionsInputSchema: z.ZodType<Prisma.Use

export const WorkoutCreateWithoutWorkoutOfMesocycleInputSchema: z.ZodType<Prisma.WorkoutCreateWithoutWorkoutOfMesocycleInput> = z.object({
id: z.string().cuid2().optional(),
userBodyweight: z.number().int(),
userBodyweight: z.number(),
startedAt: z.coerce.date(),
endedAt: z.coerce.date(),
user: z.lazy(() => UserCreateNestedOneWithoutWorkoutsInputSchema),
Expand All @@ -7261,7 +7261,7 @@ export const WorkoutCreateWithoutWorkoutOfMesocycleInputSchema: z.ZodType<Prisma

export const WorkoutUncheckedCreateWithoutWorkoutOfMesocycleInputSchema: z.ZodType<Prisma.WorkoutUncheckedCreateWithoutWorkoutOfMesocycleInput> = z.object({
id: z.string().cuid2().optional(),
userBodyweight: z.number().int(),
userBodyweight: z.number(),
startedAt: z.coerce.date(),
endedAt: z.coerce.date(),
userId: z.string(),
Expand Down Expand Up @@ -7321,7 +7321,7 @@ export const WorkoutUpdateToOneWithWhereWithoutWorkoutOfMesocycleInputSchema: z.

export const WorkoutUpdateWithoutWorkoutOfMesocycleInputSchema: z.ZodType<Prisma.WorkoutUpdateWithoutWorkoutOfMesocycleInput> = z.object({
id: z.union([ z.string().cuid2(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(),
userBodyweight: z.union([ z.number().int(),z.lazy(() => IntFieldUpdateOperationsInputSchema) ]).optional(),
userBodyweight: z.union([ z.number(),z.lazy(() => FloatFieldUpdateOperationsInputSchema) ]).optional(),
startedAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(),
endedAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(),
user: z.lazy(() => UserUpdateOneRequiredWithoutWorkoutsNestedInputSchema).optional(),
Expand All @@ -7330,7 +7330,7 @@ export const WorkoutUpdateWithoutWorkoutOfMesocycleInputSchema: z.ZodType<Prisma

export const WorkoutUncheckedUpdateWithoutWorkoutOfMesocycleInputSchema: z.ZodType<Prisma.WorkoutUncheckedUpdateWithoutWorkoutOfMesocycleInput> = z.object({
id: z.union([ z.string().cuid2(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(),
userBodyweight: z.union([ z.number().int(),z.lazy(() => IntFieldUpdateOperationsInputSchema) ]).optional(),
userBodyweight: z.union([ z.number(),z.lazy(() => FloatFieldUpdateOperationsInputSchema) ]).optional(),
startedAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(),
endedAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(),
userId: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(),
Expand Down Expand Up @@ -7585,7 +7585,7 @@ export const WorkoutExerciseScalarWhereInputSchema: z.ZodType<Prisma.WorkoutExer

export const WorkoutCreateWithoutWorkoutExercisesInputSchema: z.ZodType<Prisma.WorkoutCreateWithoutWorkoutExercisesInput> = z.object({
id: z.string().cuid2().optional(),
userBodyweight: z.number().int(),
userBodyweight: z.number(),
startedAt: z.coerce.date(),
endedAt: z.coerce.date(),
user: z.lazy(() => UserCreateNestedOneWithoutWorkoutsInputSchema),
Expand All @@ -7594,7 +7594,7 @@ export const WorkoutCreateWithoutWorkoutExercisesInputSchema: z.ZodType<Prisma.W

export const WorkoutUncheckedCreateWithoutWorkoutExercisesInputSchema: z.ZodType<Prisma.WorkoutUncheckedCreateWithoutWorkoutExercisesInput> = z.object({
id: z.string().cuid2().optional(),
userBodyweight: z.number().int(),
userBodyweight: z.number(),
startedAt: z.coerce.date(),
endedAt: z.coerce.date(),
userId: z.string(),
Expand Down Expand Up @@ -7649,7 +7649,7 @@ export const WorkoutUpdateToOneWithWhereWithoutWorkoutExercisesInputSchema: z.Zo

export const WorkoutUpdateWithoutWorkoutExercisesInputSchema: z.ZodType<Prisma.WorkoutUpdateWithoutWorkoutExercisesInput> = z.object({
id: z.union([ z.string().cuid2(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(),
userBodyweight: z.union([ z.number().int(),z.lazy(() => IntFieldUpdateOperationsInputSchema) ]).optional(),
userBodyweight: z.union([ z.number(),z.lazy(() => FloatFieldUpdateOperationsInputSchema) ]).optional(),
startedAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(),
endedAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(),
user: z.lazy(() => UserUpdateOneRequiredWithoutWorkoutsNestedInputSchema).optional(),
Expand All @@ -7658,7 +7658,7 @@ export const WorkoutUpdateWithoutWorkoutExercisesInputSchema: z.ZodType<Prisma.W

export const WorkoutUncheckedUpdateWithoutWorkoutExercisesInputSchema: z.ZodType<Prisma.WorkoutUncheckedUpdateWithoutWorkoutExercisesInput> = z.object({
id: z.union([ z.string().cuid2(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(),
userBodyweight: z.union([ z.number().int(),z.lazy(() => IntFieldUpdateOperationsInputSchema) ]).optional(),
userBodyweight: z.union([ z.number(),z.lazy(() => FloatFieldUpdateOperationsInputSchema) ]).optional(),
startedAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(),
endedAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(),
userId: z.union([ z.string(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(),
Expand Down Expand Up @@ -8259,7 +8259,7 @@ export const MesocycleCreateManyUserInputSchema: z.ZodType<Prisma.MesocycleCreat

export const WorkoutCreateManyUserInputSchema: z.ZodType<Prisma.WorkoutCreateManyUserInput> = z.object({
id: z.string().cuid2().optional(),
userBodyweight: z.number().int(),
userBodyweight: z.number(),
startedAt: z.coerce.date(),
endedAt: z.coerce.date()
}).strict();
Expand Down Expand Up @@ -8393,7 +8393,7 @@ export const MesocycleUncheckedUpdateManyWithoutUserInputSchema: z.ZodType<Prism

export const WorkoutUpdateWithoutUserInputSchema: z.ZodType<Prisma.WorkoutUpdateWithoutUserInput> = z.object({
id: z.union([ z.string().cuid2(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(),
userBodyweight: z.union([ z.number().int(),z.lazy(() => IntFieldUpdateOperationsInputSchema) ]).optional(),
userBodyweight: z.union([ z.number(),z.lazy(() => FloatFieldUpdateOperationsInputSchema) ]).optional(),
startedAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(),
endedAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(),
workoutOfMesocycle: z.lazy(() => WorkoutOfMesocycleUpdateOneWithoutWorkoutNestedInputSchema).optional(),
Expand All @@ -8402,7 +8402,7 @@ export const WorkoutUpdateWithoutUserInputSchema: z.ZodType<Prisma.WorkoutUpdate

export const WorkoutUncheckedUpdateWithoutUserInputSchema: z.ZodType<Prisma.WorkoutUncheckedUpdateWithoutUserInput> = z.object({
id: z.union([ z.string().cuid2(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(),
userBodyweight: z.union([ z.number().int(),z.lazy(() => IntFieldUpdateOperationsInputSchema) ]).optional(),
userBodyweight: z.union([ z.number(),z.lazy(() => FloatFieldUpdateOperationsInputSchema) ]).optional(),
startedAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(),
endedAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(),
workoutOfMesocycle: z.lazy(() => WorkoutOfMesocycleUncheckedUpdateOneWithoutWorkoutNestedInputSchema).optional(),
Expand All @@ -8411,7 +8411,7 @@ export const WorkoutUncheckedUpdateWithoutUserInputSchema: z.ZodType<Prisma.Work

export const WorkoutUncheckedUpdateManyWithoutUserInputSchema: z.ZodType<Prisma.WorkoutUncheckedUpdateManyWithoutUserInput> = z.object({
id: z.union([ z.string().cuid2(),z.lazy(() => StringFieldUpdateOperationsInputSchema) ]).optional(),
userBodyweight: z.union([ z.number().int(),z.lazy(() => IntFieldUpdateOperationsInputSchema) ]).optional(),
userBodyweight: z.union([ z.number(),z.lazy(() => FloatFieldUpdateOperationsInputSchema) ]).optional(),
startedAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(),
endedAt: z.union([ z.coerce.date(),z.lazy(() => DateTimeFieldUpdateOperationsInputSchema) ]).optional(),
}).strict();
Expand Down

0 comments on commit 0e6f441

Please sign in to comment.