mirror of
https://github.com/go-gitea/gitea.git
synced 2026-08-07 08:32:16 +00:00
ac49dbe1a2
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
25 lines
578 B
Go
25 lines
578 B
Go
// Copyright 2024 The Gitea Authors. All rights reserved.
|
|
// SPDX-License-Identifier: MIT
|
|
|
|
package v1_23
|
|
|
|
import (
|
|
"context"
|
|
|
|
"gitea.dev/modelmigration/base"
|
|
"gitea.dev/modules/timeutil"
|
|
|
|
"xorm.io/xorm"
|
|
)
|
|
|
|
func AddIndexToActionTaskStoppedLogExpired(_ context.Context, x base.EngineMigration) error {
|
|
type ActionTask struct {
|
|
Stopped timeutil.TimeStamp `xorm:"index(stopped_log_expired)"`
|
|
LogExpired bool `xorm:"index(stopped_log_expired)"`
|
|
}
|
|
_, err := x.SyncWithOptions(xorm.SyncOptions{
|
|
IgnoreDropIndices: true,
|
|
}, new(ActionTask))
|
|
return err
|
|
}
|