mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2024-11-09 11:21:19 +01:00
0585ac3ac6
`golangci-lint` [deprecated](https://github.com/golangci/golangci-lint/issues/1841) a bunch of linters, removed them.
30 lines
762 B
Go
30 lines
762 B
Go
// Copyright 2022 The Gitea Authors. All rights reserved.
|
|
// SPDX-License-Identifier: MIT
|
|
|
|
package v1_17 //nolint
|
|
|
|
import (
|
|
"time"
|
|
|
|
"code.gitea.io/gitea/models/repo"
|
|
"code.gitea.io/gitea/modules/timeutil"
|
|
|
|
"xorm.io/xorm"
|
|
)
|
|
|
|
func AddSyncOnCommitColForPushMirror(x *xorm.Engine) error {
|
|
type PushMirror struct {
|
|
ID int64 `xorm:"pk autoincr"`
|
|
RepoID int64 `xorm:"INDEX"`
|
|
Repo *repo.Repository `xorm:"-"`
|
|
RemoteName string
|
|
|
|
SyncOnCommit bool `xorm:"NOT NULL DEFAULT true"`
|
|
Interval time.Duration
|
|
CreatedUnix timeutil.TimeStamp `xorm:"created"`
|
|
LastUpdateUnix timeutil.TimeStamp `xorm:"INDEX last_update"`
|
|
LastError string `xorm:"text"`
|
|
}
|
|
|
|
return x.Sync2(new(PushMirror))
|
|
}
|