add most tables

This commit is contained in:
Lunny Xiao
2022-05-05 00:39:20 +08:00
committed by Jason Song
parent 5a479bb034
commit 2c4f6fd42f
25 changed files with 598 additions and 1466 deletions

View File

@ -5,9 +5,6 @@
package migrations
import (
"code.gitea.io/gitea/models/db"
"code.gitea.io/gitea/modules/timeutil"
"xorm.io/xorm"
)
@ -29,7 +26,7 @@ func addBotTables(x *xorm.Engine) error {
Created timeutil.TimeStamp `xorm:"created"`
}
type BotsTask struct {
type BotsBuild struct {
ID int64
Title string
UUID string `xorm:"CHAR(36)"`
@ -55,7 +52,7 @@ func addBotTables(x *xorm.Engine) error {
NumClosedBuilds int `xorm:"NOT NULL DEFAULT 0"`
}
type BuildIndex db.ResourceIndex
type BotsBuildIndex db.ResourceIndex
return x.Sync2(new(BotsRunner), new(BotsTask), new(Repository), new(BuildIndex))
return x.Sync2(new(BotsRunner), new(BotsBuild), new(Repository), new(BotsBuildIndex))
}