mirror of
https://github.com/go-gitea/gitea.git
synced 2025-05-18 00:49:09 -04:00
fix: add restraints for models
This commit is contained in:
parent
7f6a803d24
commit
2c686e8826
@ -25,10 +25,10 @@ type ActionRunJob struct {
|
|||||||
OwnerID int64 `xorm:"index"`
|
OwnerID int64 `xorm:"index"`
|
||||||
CommitSHA string `xorm:"index"`
|
CommitSHA string `xorm:"index"`
|
||||||
IsForkPullRequest bool
|
IsForkPullRequest bool
|
||||||
Name string
|
Name string `xorm:"VARCHAR(255)"`
|
||||||
Attempt int64
|
Attempt int64
|
||||||
WorkflowPayload []byte
|
WorkflowPayload []byte
|
||||||
JobID string // job id in workflow, not job's id
|
JobID string `xorm:"VARCHAR(255)"` // job id in workflow, not job's id
|
||||||
Needs []string `xorm:"JSON TEXT"`
|
Needs []string `xorm:"JSON TEXT"`
|
||||||
RunsOn []string `xorm:"JSON TEXT"`
|
RunsOn []string `xorm:"JSON TEXT"`
|
||||||
TaskID int64 // the latest task of the job
|
TaskID int64 // the latest task of the job
|
||||||
|
@ -23,7 +23,7 @@ import (
|
|||||||
type ActionRunner struct {
|
type ActionRunner struct {
|
||||||
ID int64
|
ID int64
|
||||||
UUID string `xorm:"CHAR(36) UNIQUE"`
|
UUID string `xorm:"CHAR(36) UNIQUE"`
|
||||||
Name string `xorm:"VARCHAR(32)"`
|
Name string `xorm:"VARCHAR(255)"`
|
||||||
OwnerID int64 `xorm:"index"` // org level runner, 0 means system
|
OwnerID int64 `xorm:"index"` // org level runner, 0 means system
|
||||||
Owner *user_model.User `xorm:"-"`
|
Owner *user_model.User `xorm:"-"`
|
||||||
RepoID int64 `xorm:"index"` // repo level runner, if orgid also is zero, then it's a global
|
RepoID int64 `xorm:"index"` // repo level runner, if orgid also is zero, then it's a global
|
||||||
|
@ -14,7 +14,7 @@ import (
|
|||||||
// ActionTaskStep represents a step of ActionTask
|
// ActionTaskStep represents a step of ActionTask
|
||||||
type ActionTaskStep struct {
|
type ActionTaskStep struct {
|
||||||
ID int64
|
ID int64
|
||||||
Name string
|
Name string `xorm:"VARCHAR(255)"`
|
||||||
TaskID int64 `xorm:"index unique(task_number)"`
|
TaskID int64 `xorm:"index unique(task_number)"`
|
||||||
Number int64 `xorm:"index unique(task_number)"`
|
Number int64 `xorm:"index unique(task_number)"`
|
||||||
RepoID int64 `xorm:"index"`
|
RepoID int64 `xorm:"index"`
|
||||||
|
@ -14,7 +14,7 @@ func AddActionsTables(x *xorm.Engine) error {
|
|||||||
type ActionRunner struct {
|
type ActionRunner struct {
|
||||||
ID int64
|
ID int64
|
||||||
UUID string `xorm:"CHAR(36) UNIQUE"`
|
UUID string `xorm:"CHAR(36) UNIQUE"`
|
||||||
Name string `xorm:"VARCHAR(32)"`
|
Name string `xorm:"VARCHAR(255)"`
|
||||||
OwnerID int64 `xorm:"index"` // org level runner, 0 means system
|
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
|
RepoID int64 `xorm:"index"` // repo level runner, if orgid also is zero, then it's a global
|
||||||
Description string `xorm:"TEXT"`
|
Description string `xorm:"TEXT"`
|
||||||
@ -78,10 +78,10 @@ func AddActionsTables(x *xorm.Engine) error {
|
|||||||
OwnerID int64 `xorm:"index"`
|
OwnerID int64 `xorm:"index"`
|
||||||
CommitSHA string `xorm:"index"`
|
CommitSHA string `xorm:"index"`
|
||||||
IsForkPullRequest bool
|
IsForkPullRequest bool
|
||||||
Name string
|
Name string `xorm:"VARCHAR(255)"`
|
||||||
Attempt int64
|
Attempt int64
|
||||||
WorkflowPayload []byte
|
WorkflowPayload []byte
|
||||||
JobID string // job id in workflow, not job's id
|
JobID string `xorm:"VARCHAR(255)"` // job id in workflow, not job's id
|
||||||
Needs []string `xorm:"JSON TEXT"`
|
Needs []string `xorm:"JSON TEXT"`
|
||||||
RunsOn []string `xorm:"JSON TEXT"`
|
RunsOn []string `xorm:"JSON TEXT"`
|
||||||
TaskID int64 // the latest task of the job
|
TaskID int64 // the latest task of the job
|
||||||
@ -130,11 +130,11 @@ func AddActionsTables(x *xorm.Engine) error {
|
|||||||
|
|
||||||
type ActionTaskStep struct {
|
type ActionTaskStep struct {
|
||||||
ID int64
|
ID int64
|
||||||
Name string
|
Name string `xorm:"VARCHAR(255)"`
|
||||||
TaskID int64 `xorm:"index unique(task_number)"`
|
TaskID int64 `xorm:"index unique(task_number)"`
|
||||||
Number int64 `xorm:"index unique(task_number)"`
|
Number int64 `xorm:"index unique(task_number)"`
|
||||||
RepoID int64 `xorm:"index"`
|
RepoID int64 `xorm:"index"`
|
||||||
Status int `xorm:"index"`
|
Status int `xorm:"index"`
|
||||||
LogIndex int64
|
LogIndex int64
|
||||||
LogLength int64
|
LogLength int64
|
||||||
Started timeutil.TimeStamp
|
Started timeutil.TimeStamp
|
||||||
|
Loading…
x
Reference in New Issue
Block a user