feat: reseed workout_kinds with the fixed 7-type running taxonomy

- Add migration 0004_workout_taxonomy.sql to reset workout_kinds table
  with exactly 7 fixed named kinds (Easy Run, Long Run, Threshold 30',
  Threshold 60', Tempo, Interval, MAS Test), each with a never-matching
  placeholder rule
- Add test TestWorkoutTaxonomy_SeededWithSevenFixedTypes to verify all
  7 kinds are seeded and active
- Update TestKindAssignment_AppendOnlyHistoryAndCurrentView to use a
  unique kind name to avoid conflict with seeded kinds

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
2026-07-17 18:48:04 +02:00
parent cfd315e132
commit 69cb117eab
3 changed files with 54 additions and 1 deletions

View File

@@ -96,7 +96,7 @@ func TestKindAssignment_AppendOnlyHistoryAndCurrentView(t *testing.T) {
}
kindID, err := db.CreateWorkoutKind(ctx, WorkoutKind{
Name: "Tempo",
Name: "Test Assignment Custom",
RuleJSON: `{"match":"all","conditions":[]}`,
IsActive: true,
})