From e72acd5e5b2d043fcf0a0182a1eedaed8120c155 Mon Sep 17 00:00:00 2001 From: Lunny Xiao Date: Wed, 2 Nov 2022 16:54:36 +0800 Subject: Split migrations folder (#21549) There are too many files in `models/migrations` folder so that I split them into sub folders. --- models/migrations/v1_17/v214.go | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 models/migrations/v1_17/v214.go (limited to 'models/migrations/v1_17/v214.go') diff --git a/models/migrations/v1_17/v214.go b/models/migrations/v1_17/v214.go new file mode 100644 index 0000000000..e6fa53d4b8 --- /dev/null +++ b/models/migrations/v1_17/v214.go @@ -0,0 +1,23 @@ +// Copyright 2022 The Gitea Authors. All rights reserved. +// Use of this source code is governed by a MIT-style +// license that can be found in the LICENSE file. + +package v1_17 // nolint + +import ( + "xorm.io/xorm" +) + +func AddAutoMergeTable(x *xorm.Engine) error { + type MergeStyle string + type PullAutoMerge struct { + ID int64 `xorm:"pk autoincr"` + PullID int64 `xorm:"UNIQUE"` + DoerID int64 `xorm:"NOT NULL"` + MergeStyle MergeStyle `xorm:"varchar(30)"` + Message string `xorm:"LONGTEXT"` + CreatedUnix int64 `xorm:"created"` + } + + return x.Sync2(&PullAutoMerge{}) +} -- cgit v1.2.3