refactor: add db index on bucket/key

This commit is contained in:
Derrick Hammer 2024-03-01 20:44:55 -05:00
parent 454deeae21
commit a28bd6b11e
Signed by: pcfreak30
GPG Key ID: C997C339BE476FF2
1 changed files with 2 additions and 2 deletions

View File

@ -9,6 +9,6 @@ func init() {
type S3Upload struct {
gorm.Model
UploadID string `gorm:"unique;not null"`
Bucket string `gorm:"not null"`
Key string `gorm:"not null"`
Bucket string `gorm:"not null;index:idx_bucket_key"`
Key string `gorm:"not null;index:idx_bucket_key"`
}