Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: model migration not null breaks upgrade #170

Merged
merged 3 commits into from
Aug 15, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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