code.gitea.io/gitea@v1.21.7/models/migrations/v1_11/v113.go (about)

     1  // Copyright 2019 The Gitea Authors. All rights reserved.
     2  // SPDX-License-Identifier: MIT
     3  
     4  package v1_11 //nolint
     5  
     6  import (
     7  	"fmt"
     8  
     9  	"xorm.io/xorm"
    10  )
    11  
    12  func FeatureChangeTargetBranch(x *xorm.Engine) error {
    13  	type Comment struct {
    14  		OldRef string
    15  		NewRef string
    16  	}
    17  
    18  	if err := x.Sync(new(Comment)); err != nil {
    19  		return fmt.Errorf("Sync: %w", err)
    20  	}
    21  	return nil
    22  }