mirror of
https://github.com/go-gitea/gitea.git
synced 2026-05-25 16:08:46 +09:00
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: wxiaoguang <2114189+wxiaoguang@users.noreply.github.com> Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
21 lines
399 B
Go
21 lines
399 B
Go
// Copyright 2024 The Gitea Authors. All rights reserved.
|
|
// SPDX-License-Identifier: MIT
|
|
|
|
package v1_23
|
|
|
|
import (
|
|
"code.gitea.io/gitea/models/db"
|
|
|
|
"xorm.io/xorm"
|
|
)
|
|
|
|
func AddIndexForReleaseSha1(x db.EngineMigration) error {
|
|
type Release struct {
|
|
Sha1 string `xorm:"INDEX VARCHAR(64)"`
|
|
}
|
|
_, err := x.SyncWithOptions(xorm.SyncOptions{
|
|
IgnoreDropIndices: true,
|
|
}, new(Release))
|
|
return err
|
|
}
|