diff --git a/models/repo_statistic.go b/models/repo_statistic.go index 9863c331a..adef672e0 100755 --- a/models/repo_statistic.go +++ b/models/repo_statistic.go @@ -9,8 +9,10 @@ import ( // RepoStatistic statistic info of all repository type RepoStatistic struct { - ID int64 `xorm:"pk autoincr"` - RepoID int64 `xorm:"unique(s) NOT NULL"` + ID int64 `xorm:"pk autoincr"` + RepoID int64 `xorm:"unique(s) NOT NULL"` + Name string `xorm:"INDEX"` + IsPrivate bool Date string `xorm:"unique(s) NOT NULL"` NumWatches int64 `xorm:"NOT NULL DEFAULT 0"` NumWatchesAdded int64 `xorm:"NOT NULL DEFAULT 0"` diff --git a/routers/repo/repo_statistic.go b/routers/repo/repo_statistic.go index 9bc70eaff..2de22a1ee 100755 --- a/routers/repo/repo_statistic.go +++ b/routers/repo/repo_statistic.go @@ -89,6 +89,8 @@ func RepoStatisticDaily(date string) { repoStat := models.RepoStatistic{ RepoID: repo.ID, Date: date, + Name: repo.Name, + IsPrivate: repo.IsPrivate, NumWatches: int64(repo.NumWatches), NumStars: int64(repo.NumStars), NumDownloads: repo.CloneCnt,