refactor: ensure key is unique
This commit is contained in:
parent
41a6772c9f
commit
593d8ea381
|
@ -5,6 +5,6 @@ import "gorm.io/gorm"
|
|||
type PublicKey struct {
|
||||
gorm.Model
|
||||
UserID uint
|
||||
Key string
|
||||
Key string `gorm:"unique;not null"`
|
||||
User User
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue