gitea/models/migrations/v1_23/v304.go
Lunny Xiao c24f4b3d29
Add migrations tests (#34456)
Fix #34455

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2025-05-15 16:28:31 +00:00

17 lines
363 B
Go

// Copyright 2024 The Gitea Authors. All rights reserved.
// SPDX-License-Identifier: MIT
package v1_23 //nolint
import "xorm.io/xorm"
func AddIndexForReleaseSha1(x *xorm.Engine) error {
type Release struct {
Sha1 string `xorm:"INDEX VARCHAR(64)"`
}
_, err := x.SyncWithOptions(xorm.SyncOptions{
IgnoreDropIndices: true,
}, new(Release))
return err
}