1
1
mirror of https://github.com/go-gitea/gitea synced 2025-10-27 17:38:25 +00:00

chore: fix token format

This commit is contained in:
Jason Song
2022-11-15 13:24:51 +08:00
parent 140d57aecb
commit 7b2f1f5a91
2 changed files with 8 additions and 5 deletions

View File

@@ -21,7 +21,11 @@ func addBotTables(x *xorm.Engine) error {
Description string `xorm:"TEXT"`
Base int // 0 native 1 docker 2 virtual machine
RepoRange string // glob match which repositories could use this runner
Token string `xorm:"CHAR(36) UNIQUE"`
Token string `xorm:"-"`
TokenHash string `xorm:"UNIQUE"` // sha256 of token
TokenSalt string
// TokenLastEight string `xorm:"token_last_eight"` // it's unnecessary because we don't find runners by token
// instance status (idle, active, offline)
Status int32
@@ -38,7 +42,7 @@ func addBotTables(x *xorm.Engine) error {
type BotsRunnerToken struct {
ID int64
Token string `xorm:"CHAR(36) UNIQUE"`
Token string `xorm:"UNIQUE"`
OwnerID int64 `xorm:"index"` // org level runner, 0 means system
RepoID int64 `xorm:"index"` // repo level runner, if orgid also is zero, then it's a global
IsActive bool