feat: add mimetype column to tus_upload and upload

This commit is contained in:
Derrick Hammer 2024-01-25 18:58:56 -05:00
parent 541fcff779
commit 00a58a3b98
Signed by: pcfreak30
GPG Key ID: C997C339BE476FF2
2 changed files with 2 additions and 0 deletions

View File

@ -5,6 +5,7 @@ import "gorm.io/gorm"
type TusUpload struct { type TusUpload struct {
gorm.Model gorm.Model
Hash string `gorm:"uniqueIndex:idx_hash_deleted"` Hash string `gorm:"uniqueIndex:idx_hash_deleted"`
MimeType string
UploadID string `gorm:"uniqueIndex"` UploadID string `gorm:"uniqueIndex"`
UploaderID uint UploaderID uint
UploaderIP string UploaderIP string

View File

@ -6,6 +6,7 @@ type Upload struct {
gorm.Model gorm.Model
UserID uint UserID uint
Hash string Hash string
MimeType string
Protocol string Protocol string
User User User User
UploaderIP string UploaderIP string