Skip to content

Commit

Permalink
feat: bcs-task mysql store add uniqueIndex
Browse files Browse the repository at this point in the history
  • Loading branch information
ifooth committed Sep 2, 2024
1 parent cc5df86 commit b1c2ae8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions bcs-common/common/task/stores/mysql/table.go
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,8 @@ func (t *TaskRecord) BeforeUpdate(tx *gorm.DB) error {
// StepRecord 步骤记录
type StepRecord struct {
gorm.Model
TaskID string `json:"taskID" gorm:"type:varchar(255);index:idx_task_id"` // 索引
Name string `json:"name" gorm:"type:varchar(255)"`
TaskID string `json:"taskID" gorm:"type:varchar(255);index:idx_task_id;uniqueIndex:idx_task_id_step_name"` // nolint
Name string `json:"name" gorm:"type:varchar(255);uniqueIndex:idx_task_id_step_name"`
Alias string `json:"alias" gorm:"type:varchar(255)"`
Executor string `json:"executor" gorm:"type:varchar(255)"`
Params map[string]string `json:"input" gorm:"type:text;serializer:json"`
Expand Down

0 comments on commit b1c2ae8

Please sign in to comment.