mirror of
https://github.com/go-gitea/gitea.git
synced 2026-05-23 05:42:33 +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>
26 lines
494 B
Go
26 lines
494 B
Go
// Copyright 2026 The Gitea Authors. All rights reserved.
|
|
// SPDX-License-Identifier: MIT
|
|
|
|
package v1_27
|
|
|
|
import (
|
|
"code.gitea.io/gitea/models/db"
|
|
|
|
"xorm.io/xorm"
|
|
)
|
|
|
|
type mirrorWithLastSyncUnix struct {
|
|
LastSyncUnix int64 `xorm:"INDEX"`
|
|
}
|
|
|
|
func (mirrorWithLastSyncUnix) TableName() string {
|
|
return "mirror"
|
|
}
|
|
|
|
func AddLastSyncUnixToMirror(x db.EngineMigration) error {
|
|
_, err := x.SyncWithOptions(xorm.SyncOptions{
|
|
IgnoreDropIndices: true,
|
|
}, new(mirrorWithLastSyncUnix))
|
|
return err
|
|
}
|