From 959ccdca35632fe47986979a54138c1e3b76c6c6 Mon Sep 17 00:00:00 2001 From: Frederick Holland Date: Wed, 27 May 2026 13:50:29 +1000 Subject: [PATCH] Added unique index to DBAmendment --- models/amendment.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/models/amendment.go b/models/amendment.go index 37e7753..a336b06 100644 --- a/models/amendment.go +++ b/models/amendment.go @@ -17,8 +17,8 @@ import "time" // Indexes: Id, ConversationId, RequestedAt type DBAmendment struct { Id int `gorm:"primaryKey;autoIncrement"` - ConversationId string `gorm:"index"` - AmendmentColumn string + ConversationId string `gorm:"uniqueIndex:idx_amendment_conv_column"` + AmendmentColumn string `gorm:"uniqueIndex:idx_amendment_conv_column"` AmendmentValue string Requestor string RequestedAt time.Time `gorm:"index"`