mirror of
https://github.com/go-gitea/gitea.git
synced 2026-08-06 19:08:57 +09:00
ac49dbe1a2
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
28 lines
527 B
Go
28 lines
527 B
Go
// Copyright 2026 The Gitea Authors. All rights reserved.
|
|
// SPDX-License-Identifier: MIT
|
|
|
|
package v1_27
|
|
|
|
import (
|
|
"context"
|
|
|
|
"gitea.dev/modelmigration/base"
|
|
|
|
"xorm.io/xorm"
|
|
)
|
|
|
|
type mirrorWithLastSyncUnix struct {
|
|
LastSyncUnix int64 `xorm:"INDEX"`
|
|
}
|
|
|
|
func (mirrorWithLastSyncUnix) TableName() string {
|
|
return "mirror"
|
|
}
|
|
|
|
func AddLastSyncUnixToMirror(_ context.Context, x base.EngineMigration) error {
|
|
_, err := x.SyncWithOptions(xorm.SyncOptions{
|
|
IgnoreDropIndices: true,
|
|
}, new(mirrorWithLastSyncUnix))
|
|
return err
|
|
}
|