File tree Expand file tree Collapse file tree 2 files changed +15
-2
lines changed Expand file tree Collapse file tree 2 files changed +15
-2
lines changed Original file line number Diff line number Diff line change @@ -6,14 +6,27 @@ package migrations
6
6
7
7
import (
8
8
"fmt"
9
+ "time"
9
10
11
+ "code.gitea.io/gitea/models/repo"
12
+ "code.gitea.io/gitea/modules/timeutil"
10
13
"xorm.io/xorm"
11
14
)
12
15
13
16
func addKeypairToPushMirror (x * xorm.Engine ) error {
14
17
type PushMirror struct {
18
+ ID int64 `xorm:"pk autoincr"`
19
+ RepoID int64 `xorm:"INDEX"`
20
+ Repo * repo.Repository `xorm:"-"`
21
+ RemoteName string
22
+
15
23
PublicKey string
16
- PrivateKey string
24
+ PrivateKey string `xorm:"VARCHAR(400)"`
25
+
26
+ Interval time.Duration
27
+ CreatedUnix timeutil.TimeStamp `xorm:"created"`
28
+ LastUpdateUnix timeutil.TimeStamp `xorm:"INDEX last_update"`
29
+ LastError string `xorm:"text"`
17
30
}
18
31
19
32
if err := x .Sync2 (new (PushMirror )); err != nil {
Original file line number Diff line number Diff line change @@ -27,7 +27,7 @@ type PushMirror struct {
27
27
28
28
// A keypair formatted in OpenSSH format.
29
29
PublicKey string
30
- PrivateKey string
30
+ PrivateKey string `xorm:"VARCHAR(400)"`
31
31
32
32
Interval time.Duration
33
33
CreatedUnix timeutil.TimeStamp `xorm:"created"`
You can’t perform that action at this time.
0 commit comments