Skip to content

Commit

Permalink
bug: update deleted at to use uniqueIndex composite idx_deleted
Browse files Browse the repository at this point in the history
  • Loading branch information
Wil Simpson committed Dec 7, 2024
1 parent fb18a1f commit 0641c1c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/model/model.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ type Model struct {
Id *uuid.UUID `gorm:"type:uuid;default:gen_random_uuid()"`
CreatedAt time.Time
UpdatedAt time.Time
DeletedAt gorm.DeletedAt `gorm:"index:idx_deleted,unique"`
DeletedAt gorm.DeletedAt `gorm:"uniqueIndex:idx_deleted"`
}

func (m *Model) IsCreated() bool {
Expand Down

0 comments on commit 0641c1c

Please sign in to comment.