From bb28d41319d0b6af07ad4129b5272e8a9c6ce2bb Mon Sep 17 00:00:00 2001 From: Bartosz Szar Date: Tue, 12 Nov 2024 09:00:31 +0100 Subject: [PATCH] remove unique constraint from investor and location name --- models/investorModel.go | 2 +- models/locationModel.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/models/investorModel.go b/models/investorModel.go index f049d47..7e6f9af 100644 --- a/models/investorModel.go +++ b/models/investorModel.go @@ -7,7 +7,7 @@ type Investor struct { AddressID uint `json:"addressId"` Address Address `gorm:"foreignKey:AddressID" json:"address"` - Name string `gorm:"unique" json:"name"` + Name string `json:"name"` ContactPerson string `json:"contactPerson"` Email string `json:"email"` Phone string `json:"phone"` diff --git a/models/locationModel.go b/models/locationModel.go index 31d7949..3a47654 100644 --- a/models/locationModel.go +++ b/models/locationModel.go @@ -18,7 +18,7 @@ type Location struct { Application Application `json:"application"` Notes []Note `json:"notes"` - Name string `gorm:"unique" json:"name"` + Name string `json:"name"` IssueDate *time.Time `json:"issueDate"` InspectionDate *time.Time `json:"inspectionDate"` DecisionDate *time.Time `json:"decisionDate"`