fix primary_ket in genre model

should write a migration next
This commit is contained in:
sentriz
2020-06-06 14:58:03 +01:00
parent c64346635e
commit 07e1c53d69

View File

@@ -54,7 +54,7 @@ func (a *Artist) IndexName() string {
}
type Genre struct {
ID int `gorm:"primary_ket"`
ID int `gorm:"primary_key"`
Name string `gorm:"not null; unique_index"`
Albums []*Album `gorm:"foreignkey:TagGenreID"`
AlbumCount int `sql:"-"`