From 2e9694149b3a002b97f728c855ae98579dc22d25 Mon Sep 17 00:00:00 2001 From: Derrick Hammer Date: Sat, 2 Mar 2024 06:19:31 -0500 Subject: [PATCH] fix: wrong tag option for unique index --- db/models/upload.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/db/models/upload.go b/db/models/upload.go index b272b89..7ce0ddb 100644 --- a/db/models/upload.go +++ b/db/models/upload.go @@ -9,7 +9,7 @@ func init() { type Upload struct { gorm.Model UserID uint - Hash []byte `gorm:"type:binary(32);unique_index"` + Hash []byte `gorm:"type:binary(32);uniqueIndex"` MimeType string Protocol string User User