fix: need create a compound index on hash and deleted at
This commit is contained in:
parent
d86e0e0105
commit
dd857650e0
|
@ -4,10 +4,11 @@ import "gorm.io/gorm"
|
|||
|
||||
type TusUpload struct {
|
||||
gorm.Model
|
||||
Hash string `gorm:"uniqueIndex"`
|
||||
Hash string `gorm:"uniqueIndex:idx_hash_deleted"`
|
||||
UploadID string `gorm:"uniqueIndex"`
|
||||
UploaderID uint
|
||||
UploaderIP string
|
||||
Uploader User `gorm:"foreignKey:UploaderID"`
|
||||
Protocol string
|
||||
DeletedAt gorm.DeletedAt `gorm:"uniqueIndex:idx_hash_deleted"`
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue