Skip to content

Commit

Permalink
reverted changing Crontab table name
Browse files Browse the repository at this point in the history
  • Loading branch information
CommanderStorm committed Aug 23, 2024
1 parent 6d3d6fb commit db2ab5f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion server/backend/migration/20240824000000.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ type wrongTableName struct {
}

var wrongTableNames = []wrongTableName{
{"crontab", "crontabs"},
//{"crontab", "crontabs"}, <- too much work for now
{"kino", "movies"},
{"cafeteria", "canteens"},
{"canteen_head_count", "canteen_head_counts"},
Expand Down
5 changes: 5 additions & 0 deletions server/model/crontab.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,8 @@ type Crontab struct {
Type null.String `gorm:"column:type;type:enum ('news','mensa','ticketsale','alarm','fileDownload','canteenHeadCount','iosNotifications','iosActivityReset','newExamResultsHook','movie','feedbackEmail','dishNameDownload','scrapeStudentClubs');" json:"type"`
ID null.Int `gorm:"column:id;type:int;" json:"id"`
}

// TableName sets the insert table name for this struct type
func (n *Crontab) TableName() string {
return "crontab"
}

0 comments on commit db2ab5f

Please sign in to comment.