mirror of
https://github.com/wgh136/nysoure.git
synced 2025-09-27 04:17:23 +00:00
Add composite index on Activity Type and RefID fields
This commit is contained in:
@@ -17,8 +17,8 @@ const (
|
|||||||
type Activity struct {
|
type Activity struct {
|
||||||
gorm.Model
|
gorm.Model
|
||||||
UserID uint `gorm:"not null"`
|
UserID uint `gorm:"not null"`
|
||||||
Type ActivityType `gorm:"not null"`
|
Type ActivityType `gorm:"not null;index:idx_type_refid"`
|
||||||
RefID uint `gorm:"not null"` // Reference ID for the resource or comment
|
RefID uint `gorm:"not null;index:idx_type_refid"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type ActivityView struct {
|
type ActivityView struct {
|
||||||
|
Reference in New Issue
Block a user