Skip to content

Commit

Permalink
Merge pull request #232 from jovandeginste/remove-legacy
Browse files Browse the repository at this point in the history
chore: remove legacy attributes
  • Loading branch information
jovandeginste authored Aug 4, 2024
2 parents aa26877 + 3e839ea commit e8ce84f
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 76 deletions.
3 changes: 2 additions & 1 deletion pkg/database/gorm.go
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,8 @@ func preMigrationActions(db *gorm.DB) error {
}

func postMigrationActions(db *gorm.DB) error {
return convertWorkouts(db)
// Nothing to do for now
return nil
}

func setUserAPIKeys(db *gorm.DB) error {
Expand Down
68 changes: 0 additions & 68 deletions pkg/database/gorm_convert.go

This file was deleted.

5 changes: 0 additions & 5 deletions pkg/database/workouts.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,6 @@ type Workout struct {
Data *MapData `json:",omitempty"` // The map data associated with the workout
GPX *GPXData `json:",omitempty"` // The file data associated with the workout
Equipment []Equipment `json:",omitempty" gorm:"many2many:workout_equipment"` // Which equipment is used for this workout

MapData *MapData `gorm:"serializer:json;column:data" json:"-"` // To be removed
GPXData []byte `gorm:"type:text" json:"-"` // To be removed
Filename string `json:"-"` // To be removed
Checksum []byte `gorm:"default:'legacy'" json:"-"` // To be removed
}

type GPXData struct {
Expand Down
2 changes: 0 additions & 2 deletions pkg/database/workouts_map.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,6 @@ type MapData struct {
Details *MapDataDetails `json:",omitempty"` // The details of the workout
TotalRepetitions int // The number of repetitions of the workout
TotalWeight float64 // The weight of the workout

Points []MapPoint `gorm:"serializer:json" json:"-"` // To be removed
}

type MapDataDetails struct {
Expand Down

0 comments on commit e8ce84f

Please sign in to comment.