forked from go-gitea/gitea
-
Notifications
You must be signed in to change notification settings - Fork 5
/
v29.go
34 lines (28 loc) · 939 Bytes
/
v29.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
// Copyright 2017 The Gogs Authors. All rights reserved.
// Use of this source code is governed by a MIT-style
// license that can be found in the LICENSE file.
package migrations
import (
"fmt"
"github.com/go-xorm/xorm"
)
// CommitStatus see models/status.go
type CommitStatus struct {
ID int64 `xorm:"pk autoincr"`
Index int64 `xorm:"INDEX UNIQUE(repo_sha_index)"`
RepoID int64 `xorm:"INDEX UNIQUE(repo_sha_index)"`
State string `xorm:"VARCHAR(7) NOT NULL"`
SHA string `xorm:"VARCHAR(64) NOT NULL INDEX UNIQUE(repo_sha_index)"`
TargetURL string `xorm:"TEXT"`
Description string `xorm:"TEXT"`
Context string `xorm:"TEXT"`
CreatorID int64 `xorm:"INDEX"`
CreatedUnix int64 `xorm:"INDEX"`
UpdatedUnix int64 `xorm:"INDEX"`
}
func addCommitStatus(x *xorm.Engine) error {
if err := x.Sync2(new(CommitStatus)); err != nil {
return fmt.Errorf("Sync2: %v", err)
}
return nil
}