Add indiecies
This commit is contained in:
parent
cdab0c9a60
commit
303307da4e
|
@ -24,9 +24,9 @@ import (
|
|||
|
||||
type subscriptions20210209204715 struct {
|
||||
ID int64 `xorm:"autoincr not null unique pk" json:"id"`
|
||||
EntityType int `xorm:"not null" json:"-"`
|
||||
EntityID int64 `xorm:"bigint not null" json:"entity_id"`
|
||||
UserID int64 `xorm:"bigint not null" json:"-"`
|
||||
EntityType int `xorm:"index not null" json:"-"`
|
||||
EntityID int64 `xorm:"bigint index not null" json:"entity_id"`
|
||||
UserID int64 `xorm:"bigint index not null" json:"-"`
|
||||
Created time.Time `xorm:"created not null" json:"created"`
|
||||
}
|
||||
|
||||
|
|
|
@ -38,14 +38,14 @@ type Subscription struct {
|
|||
// The numeric ID of the subscription
|
||||
ID int64 `xorm:"autoincr not null unique pk" json:"id"`
|
||||
|
||||
EntityType SubscriptionEntityType `xorm:"not null" json:"-"`
|
||||
EntityType SubscriptionEntityType `xorm:"index not null" json:"-"`
|
||||
Entity string `xorm:"-" json:"-" param:"entity"`
|
||||
// The id of the entity to subscribe to.
|
||||
EntityID int64 `xorm:"bigint not null" json:"entity_id"`
|
||||
EntityID int64 `xorm:"bigint index not null" json:"entity_id"`
|
||||
|
||||
// The user who made this subscription
|
||||
User *user.User `xorm:"-" json:"user"`
|
||||
UserID int64 `xorm:"bigint not null" json:"-"`
|
||||
UserID int64 `xorm:"bigint index not null" json:"-"`
|
||||
|
||||
// A timestamp when this subscription was created. You cannot change this value.
|
||||
Created time.Time `xorm:"created not null" json:"created"`
|
||||
|
|
Loading…
Reference in New Issue