fix: set ON DELETE SET NULL to artists.guessed_folder_id removing folders

This commit is contained in:
sentriz
2022-01-18 22:59:05 +00:00
parent b280e8d256
commit 24d64e2125

View File

@@ -49,7 +49,7 @@ type Artist struct {
Albums []*Album `gorm:"foreignkey:TagArtistID"`
AlbumCount int `sql:"-"`
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 {