moved AddSizeLimitOnRepo migration to v1_19 package

This commit is contained in:
DmitryFrolovTri
2022-12-04 06:53:08 +00:00
parent d9ab187078
commit 31359b4721
2 changed files with 6 additions and 4 deletions
+1 -1
View File
@@ -443,7 +443,7 @@ var migrations = []Migration{
// v235 -> v236
NewMigration("Add index for access_token", v1_19.AddIndexForAccessToken),
// to modify later
NewMigration("add size limit on repository", addSizeLimitOnRepo),
NewMigration("add size limit on repository", v1_19.AddSizeLimitOnRepo),
}
// GetCurrentDBVersion returns the current db version
@@ -1,11 +1,13 @@
// Copyright 2022 The Gitea Authors. All rights reserved.
// SPDX-License-Identifier: MIT
package migrations
package v1_19 // nolint
import "xorm.io/xorm"
import (
"xorm.io/xorm"
)
func addSizeLimitOnRepo(x *xorm.Engine) error {
func AddSizeLimitOnRepo(x *xorm.Engine) error {
type Repository struct {
ID int64 `xorm:"pk autoincr"`
SizeLimit int64 `xorm:"NOT NULL DEFAULT 0"`