code.gitea.io/gitea@v1.21.7/models/migrations/v1_20/v257.go (about) 1 // Copyright 2023 The Gitea Authors. All rights reserved. 2 // SPDX-License-Identifier: MIT 3 4 package v1_20 //nolint 5 6 import ( 7 "code.gitea.io/gitea/modules/timeutil" 8 9 "xorm.io/xorm" 10 ) 11 12 func CreateActionArtifactTable(x *xorm.Engine) error { 13 // ActionArtifact is a file that is stored in the artifact storage. 14 type ActionArtifact struct { 15 ID int64 `xorm:"pk autoincr"` 16 RunID int64 `xorm:"index UNIQUE(runid_name)"` // The run id of the artifact 17 RunnerID int64 18 RepoID int64 `xorm:"index"` 19 OwnerID int64 20 CommitSHA string 21 StoragePath string // The path to the artifact in the storage 22 FileSize int64 // The size of the artifact in bytes 23 FileCompressedSize int64 // The size of the artifact in bytes after gzip compression 24 ContentEncoding string // The content encoding of the artifact 25 ArtifactPath string // The path to the artifact when runner uploads it 26 ArtifactName string `xorm:"UNIQUE(runid_name)"` // The name of the artifact when runner uploads it 27 Status int64 `xorm:"index"` // The status of the artifact 28 CreatedUnix timeutil.TimeStamp `xorm:"created"` 29 UpdatedUnix timeutil.TimeStamp `xorm:"updated index"` 30 } 31 32 return x.Sync(new(ActionArtifact)) 33 }