mirror of
https://github.com/go-gitea/gitea.git
synced 2026-08-07 10:52:17 +00:00
ac49dbe1a2
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
26 lines
468 B
Go
26 lines
468 B
Go
// Copyright 2023 The Gitea Authors. All rights reserved.
|
|
// SPDX-License-Identifier: MIT
|
|
|
|
package v1_22
|
|
|
|
import (
|
|
"context"
|
|
"time"
|
|
|
|
"gitea.dev/modelmigration/base"
|
|
|
|
"xorm.io/xorm"
|
|
)
|
|
|
|
func AddPreviousDurationToActionRun(_ context.Context, x base.EngineMigration) error {
|
|
type ActionRun struct {
|
|
PreviousDuration time.Duration
|
|
}
|
|
|
|
_, err := x.SyncWithOptions(xorm.SyncOptions{
|
|
IgnoreIndices: true,
|
|
IgnoreConstrains: true,
|
|
}, &ActionRun{})
|
|
return err
|
|
}
|