mirror of
				https://github.com/go-gitea/gitea.git
				synced 2025-11-03 21:16:26 +01: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"`
 | 
			
		||||
	CommitSHA         string     `xorm:"index"`
 | 
			
		||||
	IsForkPullRequest bool
 | 
			
		||||
	Name              string
 | 
			
		||||
	Name              string `xorm:"VARCHAR(255)"`
 | 
			
		||||
	Attempt           int64
 | 
			
		||||
	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"`
 | 
			
		||||
	RunsOn            []string `xorm:"JSON TEXT"`
 | 
			
		||||
	TaskID            int64    // the latest task of the job
 | 
			
		||||
 | 
			
		||||
@ -23,7 +23,7 @@ import (
 | 
			
		||||
type ActionRunner struct {
 | 
			
		||||
	ID          int64
 | 
			
		||||
	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
 | 
			
		||||
	Owner       *user_model.User       `xorm:"-"`
 | 
			
		||||
	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
 | 
			
		||||
type ActionTaskStep struct {
 | 
			
		||||
	ID        int64
 | 
			
		||||
	Name      string
 | 
			
		||||
	Name      string `xorm:"VARCHAR(255)"`
 | 
			
		||||
	TaskID    int64  `xorm:"index unique(task_number)"`
 | 
			
		||||
	Number    int64  `xorm:"index unique(task_number)"`
 | 
			
		||||
	RepoID    int64  `xorm:"index"`
 | 
			
		||||
 | 
			
		||||
@ -14,7 +14,7 @@ func AddActionsTables(x *xorm.Engine) error {
 | 
			
		||||
	type ActionRunner struct {
 | 
			
		||||
		ID          int64
 | 
			
		||||
		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
 | 
			
		||||
		RepoID      int64  `xorm:"index"` // repo level runner, if orgid also is zero, then it's a global
 | 
			
		||||
		Description string `xorm:"TEXT"`
 | 
			
		||||
@ -78,10 +78,10 @@ func AddActionsTables(x *xorm.Engine) error {
 | 
			
		||||
		OwnerID           int64  `xorm:"index"`
 | 
			
		||||
		CommitSHA         string `xorm:"index"`
 | 
			
		||||
		IsForkPullRequest bool
 | 
			
		||||
		Name              string
 | 
			
		||||
		Name              string `xorm:"VARCHAR(255)"`
 | 
			
		||||
		Attempt           int64
 | 
			
		||||
		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"`
 | 
			
		||||
		RunsOn            []string `xorm:"JSON TEXT"`
 | 
			
		||||
		TaskID            int64    // the latest task of the job
 | 
			
		||||
@ -130,11 +130,11 @@ func AddActionsTables(x *xorm.Engine) error {
 | 
			
		||||
 | 
			
		||||
	type ActionTaskStep struct {
 | 
			
		||||
		ID        int64
 | 
			
		||||
		Name      string
 | 
			
		||||
		TaskID    int64 `xorm:"index unique(task_number)"`
 | 
			
		||||
		Number    int64 `xorm:"index unique(task_number)"`
 | 
			
		||||
		RepoID    int64 `xorm:"index"`
 | 
			
		||||
		Status    int   `xorm:"index"`
 | 
			
		||||
		Name      string `xorm:"VARCHAR(255)"`
 | 
			
		||||
		TaskID    int64  `xorm:"index unique(task_number)"`
 | 
			
		||||
		Number    int64  `xorm:"index unique(task_number)"`
 | 
			
		||||
		RepoID    int64  `xorm:"index"`
 | 
			
		||||
		Status    int    `xorm:"index"`
 | 
			
		||||
		LogIndex  int64
 | 
			
		||||
		LogLength int64
 | 
			
		||||
		Started   timeutil.TimeStamp
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user