code.gitea.io/gitea@v1.21.7/models/migrations/v1_15/v186.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  	"code.gitea.io/gitea/modules/timeutil"
     8  
     9  	"xorm.io/xorm"
    10  )
    11  
    12  func CreateProtectedTagTable(x *xorm.Engine) error {
    13  	type ProtectedTag struct {
    14  		ID               int64 `xorm:"pk autoincr"`
    15  		RepoID           int64
    16  		NamePattern      string
    17  		AllowlistUserIDs []int64 `xorm:"JSON TEXT"`
    18  		AllowlistTeamIDs []int64 `xorm:"JSON TEXT"`
    19  
    20  		CreatedUnix timeutil.TimeStamp `xorm:"created"`
    21  		UpdatedUnix timeutil.TimeStamp `xorm:"updated"`
    22  	}
    23  
    24  	return x.Sync(new(ProtectedTag))
    25  }