You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

v29.go 928B

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