code.gitea.io/gitea@v1.21.7/models/migrations/v1_17/v214.go (about) 1 // Copyright 2022 The Gitea Authors. All rights reserved. 2 // SPDX-License-Identifier: MIT 3 4 package v1_17 //nolint 5 6 import ( 7 "xorm.io/xorm" 8 ) 9 10 func AddAutoMergeTable(x *xorm.Engine) error { 11 type MergeStyle string 12 type PullAutoMerge struct { 13 ID int64 `xorm:"pk autoincr"` 14 PullID int64 `xorm:"UNIQUE"` 15 DoerID int64 `xorm:"NOT NULL"` 16 MergeStyle MergeStyle `xorm:"varchar(30)"` 17 Message string `xorm:"LONGTEXT"` 18 CreatedUnix int64 `xorm:"created"` 19 } 20 21 return x.Sync(&PullAutoMerge{}) 22 }