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.

v83.go 801B

12345678910111213141516171819202122232425262728
  1. // Copyright 2019 The Gitea 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. "code.gitea.io/gitea/modules/timeutil"
  7. "github.com/go-xorm/xorm"
  8. )
  9. func addUploaderIDForAttachment(x *xorm.Engine) error {
  10. type Attachment struct {
  11. ID int64 `xorm:"pk autoincr"`
  12. UUID string `xorm:"uuid UNIQUE"`
  13. IssueID int64 `xorm:"INDEX"`
  14. ReleaseID int64 `xorm:"INDEX"`
  15. UploaderID int64 `xorm:"INDEX DEFAULT 0"`
  16. CommentID int64
  17. Name string
  18. DownloadCount int64 `xorm:"DEFAULT 0"`
  19. Size int64 `xorm:"DEFAULT 0"`
  20. CreatedUnix timeutil.TimeStamp `xorm:"created"`
  21. }
  22. return x.Sync2(new(Attachment))
  23. }