code.gitea.io/gitea@v1.21.7/models/migrations/v1_16/v190.go (about)

     1  // Copyright 2021 The Gitea Authors. All rights reserved.
     2  // SPDX-License-Identifier: MIT
     3  
     4  package v1_16 //nolint
     5  
     6  import (
     7  	"fmt"
     8  
     9  	"xorm.io/xorm"
    10  )
    11  
    12  func AddAgitFlowPullRequest(x *xorm.Engine) error {
    13  	type PullRequestFlow int
    14  
    15  	type PullRequest struct {
    16  		Flow PullRequestFlow `xorm:"NOT NULL DEFAULT 0"`
    17  	}
    18  
    19  	if err := x.Sync(new(PullRequest)); err != nil {
    20  		return fmt.Errorf("sync2: %w", err)
    21  	}
    22  	return nil
    23  }