code.gitea.io/gitea@v1.21.7/models/migrations/v1_15/v185.go (about) 1 // Copyright 2021 The Gitea Authors. All rights reserved. 2 // SPDX-License-Identifier: MIT 3 4 package v1_15 //nolint 5 6 import ( 7 "xorm.io/xorm" 8 ) 9 10 func AddRepoArchiver(x *xorm.Engine) error { 11 // RepoArchiver represents all archivers 12 type RepoArchiver struct { 13 ID int64 `xorm:"pk autoincr"` 14 RepoID int64 `xorm:"index unique(s)"` 15 Type int `xorm:"unique(s)"` 16 Status int 17 CommitID string `xorm:"VARCHAR(40) unique(s)"` 18 CreatedUnix int64 `xorm:"INDEX NOT NULL created"` 19 } 20 return x.Sync(new(RepoArchiver)) 21 }