Open Seerden opened 2 years ago
Keep in mind that we don't want to delete exercises completely when a workout is deleted. Currently, exercises are bound 1:1 to workouts, but in the near future, this'll change -- exercises should be able to be part of multiple workouts. Implementing workout deletion functionality without completely breaking exercises will require changes in both the backend and the database.
A new way to relate workouts to exercises would probably be an intermediate table of containing workout_id
and exercise_id
(with the combination of these two being unique, but a workout can have any number of exercise_ids
, and an exercise_id
can relate to any number of workout_ids
). Implementing a table like this removes the exercise.workout_id
field, which means we also have to adjust some client-side code.
There's no workout overview page yet, so for now I'll be implementing a delete button in the Workouts workout cards. Once workout overview pages are implemented, this button (along with workout update functionality, history, session details, etc.) will be implemented in that component, instead.
See title.