We add an uniqueIndex constraint on the WorkoutID column, to ensure it remains a 1-1 relation. Since there may already be duplicate records in the table, we need to perform a pre-migration cleanup. This may happen before the table is even created (first run), so we need to check if the table exists.
We also update our tests, since they seemed to add extra records!
We add an uniqueIndex constraint on the WorkoutID column, to ensure it remains a 1-1 relation. Since there may already be duplicate records in the table, we need to perform a pre-migration cleanup. This may happen before the table is even created (first run), so we need to check if the table exists.
We also update our tests, since they seemed to add extra records!