Skip to content

Commit

Permalink
fix: model migration not null breaks upgrade (#170)
Browse files Browse the repository at this point in the history
  • Loading branch information
bozerkins authored Aug 15, 2023
1 parent 58fac9d commit a71fd2c
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions cmd/argo-watcher/state/state_models/task_model.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@ import (
type TaskModel struct {
Id uuid.UUID `gorm:"column:id;type:uuid;default:gen_random_uuid()"`
Created time.Time `gorm:"column:created;autoCreateTime;not null;index;"`
Updated time.Time `gorm:"column:updated;autoUpdateTime;not null;"`
Updated time.Time `gorm:"column:updated;autoUpdateTime;"`
Images datatypes.JSONSlice[models.Image] `gorm:"column:images;not null;"`
Status string `gorm:"column:status;type:VARCHAR(20);not null;index;"`
ApplicationName sql.NullString `gorm:"column:app;type:VARCHAR(255);not null;"`
Author sql.NullString `gorm:"column:author;type:VARCHAR(255);not null;"`
Project sql.NullString `gorm:"column:project;type:VARCHAR(255);not null;"`
StatusReason sql.NullString `gorm:"column:status_reason;default:''"`
ApplicationName sql.NullString `gorm:"column:app;type:VARCHAR(255);"`
Author sql.NullString `gorm:"column:author;type:VARCHAR(255);"`
Project sql.NullString `gorm:"column:project;type:VARCHAR(255);"`
StatusReason sql.NullString `gorm:"column:status_reason;"`
}

func (TaskModel) TableName() string {
Expand Down

0 comments on commit a71fd2c

Please sign in to comment.