Skip to content

Commit 9426189

Browse files
committed
修复dms收藏SQL唯一索引问题
1 parent beea828 commit 9426189

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

goinsight/internal/das/models/favorites.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ import (
66

77
type InsightDASFavorites struct {
88
*models.Model
9-
Username string `gorm:"type:varchar(128);not null;comment:执行的用户;index:idx_username" json:"username"`
10-
Title string `gorm:"type:varchar(256);not null;default:'';comment:标题;uniqueIndex" json:"title"`
9+
Username string `gorm:"type:varchar(128);not null;comment:执行的用户;uniqueIndex:uniq_username_title" json:"username"`
10+
Title string `gorm:"type:varchar(256);not null;default:'';comment:标题;uniqueIndex:uniq_username_title" json:"title"`
1111
Sqltext string `gorm:"type:text;null;default:null;comment:用户收藏的SQL" json:"sqltext"`
1212
}
1313

0 commit comments

Comments
 (0)