We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0690cb0 commit 8a4c2eaCopy full SHA for 8a4c2ea
models/activities/notification.go
@@ -18,6 +18,7 @@ import (
18
"code.gitea.io/gitea/modules/timeutil"
19
20
"xorm.io/builder"
21
+ "xorm.io/xorm/schemas"
22
)
23
24
type (
@@ -71,6 +72,15 @@ type Notification struct {
71
72
UpdatedUnix timeutil.TimeStamp `xorm:"updated INDEX NOT NULL"`
73
}
74
75
+// TableIndices implements xorm's TableIndices interface
76
+func (n *Notification) TableIndices() []*schemas.Index {
77
+ usuuIndex := schemas.NewIndex("u_s_uu", schemas.IndexType)
78
+ usuuIndex.AddColumn("user_id", "status", "updated_unix")
79
+ indices := []*schemas.Index{usuuIndex}
80
+
81
+ return indices
82
+}
83
84
func init() {
85
db.RegisterModel(new(Notification))
86
0 commit comments