gitea源码

v267.go 577B

123456789101112131415161718192021222324
  1. // Copyright 2023 The Gitea Authors. All rights reserved.
  2. // SPDX-License-Identifier: MIT
  3. package v1_21
  4. import (
  5. "code.gitea.io/gitea/modules/timeutil"
  6. "xorm.io/xorm"
  7. )
  8. func CreateActionTasksVersionTable(x *xorm.Engine) error {
  9. type ActionTasksVersion struct {
  10. ID int64 `xorm:"pk autoincr"`
  11. OwnerID int64 `xorm:"UNIQUE(owner_repo)"`
  12. RepoID int64 `xorm:"INDEX UNIQUE(owner_repo)"`
  13. Version int64
  14. CreatedUnix timeutil.TimeStamp `xorm:"created"`
  15. UpdatedUnix timeutil.TimeStamp `xorm:"updated"`
  16. }
  17. return x.Sync(new(ActionTasksVersion))
  18. }