fix: set ON DELETE SET NULL to artists.guessed_folder_id removing folders
This commit is contained in:
@@ -49,7 +49,7 @@ type Artist struct {
|
|||||||
Albums []*Album `gorm:"foreignkey:TagArtistID"`
|
Albums []*Album `gorm:"foreignkey:TagArtistID"`
|
||||||
AlbumCount int `sql:"-"`
|
AlbumCount int `sql:"-"`
|
||||||
GuessedFolder *Album
|
GuessedFolder *Album
|
||||||
GuessedFolderID int `sql:"default: null; type:int REFERENCES albums(id)"`
|
GuessedFolderID int `sql:"default: null; type:int REFERENCES albums(id) ON DELETE SET NULL"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func (a *Artist) SID() *specid.ID {
|
func (a *Artist) SID() *specid.ID {
|
||||||
|
|||||||
Reference in New Issue
Block a user