diff --git a/internal/database/attachment.go b/internal/database/attachment.go index 19b16126b..716d6e9c2 100644 --- a/internal/database/attachment.go +++ b/internal/database/attachment.go @@ -19,7 +19,7 @@ import ( // Attachment represent a attachment of issue/comment/release. type Attachment struct { ID int64 - UUID string `gorm:"column:uuid;uniqueIndex"` + UUID string `gorm:"column:uuid;type:varchar(191);uniqueIndex"` IssueID int64 `gorm:"index"` CommentID int64 ReleaseID int64 `gorm:"index"` diff --git a/internal/database/issue.go b/internal/database/issue.go index 737877b4b..6c8c43ce1 100644 --- a/internal/database/issue.go +++ b/internal/database/issue.go @@ -1201,16 +1201,6 @@ const ( FilterModeMention FilterMode = "mentioned" ) -func parseCountResult(results []map[string][]byte) int64 { - if len(results) == 0 { - return 0 - } - for _, result := range results[0] { - return com.StrTo(string(result)).MustInt64() - } - return 0 -} - type IssueStatsOptions struct { RepoID int64 UserID int64