code.gitea.io/gitea@v1.21.7/models/migrations/v1_21/v267.go (about)

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