From 00a58a3b9834968998dad791f36de5ebd4ebdc7a Mon Sep 17 00:00:00 2001 From: Derrick Hammer Date: Thu, 25 Jan 2024 18:58:56 -0500 Subject: [PATCH] feat: add mimetype column to tus_upload and upload --- db/models/tus_upload.go | 1 + db/models/upload.go | 1 + 2 files changed, 2 insertions(+) diff --git a/db/models/tus_upload.go b/db/models/tus_upload.go index 7402ead..83d76ca 100644 --- a/db/models/tus_upload.go +++ b/db/models/tus_upload.go @@ -5,6 +5,7 @@ import "gorm.io/gorm" type TusUpload struct { gorm.Model Hash string `gorm:"uniqueIndex:idx_hash_deleted"` + MimeType string UploadID string `gorm:"uniqueIndex"` UploaderID uint UploaderIP string diff --git a/db/models/upload.go b/db/models/upload.go index 940468e..d3c9208 100644 --- a/db/models/upload.go +++ b/db/models/upload.go @@ -6,6 +6,7 @@ type Upload struct { gorm.Model UserID uint Hash string + MimeType string Protocol string User User UploaderIP string