summaryrefslogtreecommitdiffstats
path: root/models
diff options
context:
space:
mode:
Diffstat (limited to 'models')
-rw-r--r--models/migrations/v64.go1
-rw-r--r--models/migrations/v67.go9
2 files changed, 9 insertions, 1 deletions
diff --git a/models/migrations/v64.go b/models/migrations/v64.go
index 5958cd8f82..5bc7e36b51 100644
--- a/models/migrations/v64.go
+++ b/models/migrations/v64.go
@@ -26,7 +26,6 @@ func addMultipleAssignees(x *xorm.Engine) error {
IsClosed bool `xorm:"INDEX"`
IsPull bool `xorm:"INDEX"` // Indicates whether is a pull request or not.
NumComments int
- Ref string
DeadlineUnix util.TimeStamp `xorm:"INDEX"`
CreatedUnix util.TimeStamp `xorm:"INDEX created"`
diff --git a/models/migrations/v67.go b/models/migrations/v67.go
index 2782219191..d4a7497ec9 100644
--- a/models/migrations/v67.go
+++ b/models/migrations/v67.go
@@ -5,6 +5,8 @@
package migrations
import (
+ "fmt"
+
"code.gitea.io/gitea/modules/setting"
"github.com/go-xorm/xorm"
@@ -70,6 +72,13 @@ func removeStaleWatches(x *xorm.Engine) error {
return err
}
+ var issueWatch IssueWatch
+ if exist, err := sess.IsTableExist(&issueWatch); err != nil {
+ return fmt.Errorf("IsExist IssueWatch: %v", err)
+ } else if !exist {
+ return nil
+ }
+
repoCache := make(map[int64]*Repository)
err := x.BufferSize(setting.IterateBufferSize).Iterate(new(Watch),
func(idx int, bean interface{}) error {