code.gitea.io/gitea@v1.21.7/models/migrations/v1_16/v197.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  	"xorm.io/xorm"
     8  )
     9  
    10  func AddRenamedBranchTable(x *xorm.Engine) error {
    11  	type RenamedBranch struct {
    12  		ID          int64 `xorm:"pk autoincr"`
    13  		RepoID      int64 `xorm:"INDEX NOT NULL"`
    14  		From        string
    15  		To          string
    16  		CreatedUnix int64 `xorm:"created"`
    17  	}
    18  	return x.Sync(new(RenamedBranch))
    19  }