revert guessed artist folder changes
there seems to be a performance issue somewhere
This commit is contained in:
@@ -37,7 +37,6 @@ func (db *DB) Migrate(ctx MigrationContext) error {
|
||||
construct(ctx, "202102191448", migratePodcastAutoDownload),
|
||||
construct(ctx, "202110041330", migrateAlbumCreatedAt),
|
||||
construct(ctx, "202111021951", migrateAlbumRootDir),
|
||||
construct(ctx, "202201042236", migrateArtistGuessedFolder),
|
||||
}
|
||||
|
||||
return gormigrate.
|
||||
@@ -307,7 +306,3 @@ func migrateAlbumRootDir(tx *gorm.DB, ctx MigrationContext) error {
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func migrateArtistGuessedFolder(tx *gorm.DB, ctx MigrationContext) error {
|
||||
return tx.AutoMigrate(Artist{}).Error
|
||||
}
|
||||
|
||||
@@ -43,13 +43,11 @@ func joinInt(in []int, sep string) string {
|
||||
}
|
||||
|
||||
type Artist struct {
|
||||
ID int `gorm:"primary_key"`
|
||||
Name string `gorm:"not null; unique_index"`
|
||||
NameUDec string `sql:"default: null"`
|
||||
Albums []*Album `gorm:"foreignkey:TagArtistID"`
|
||||
AlbumCount int `sql:"-"`
|
||||
GuessedFolder *Album
|
||||
GuessedFolderID int `sql:"default: null; type:int REFERENCES albums(id) ON DELETE SET NULL"`
|
||||
ID int `gorm:"primary_key"`
|
||||
Name string `gorm:"not null; unique_index"`
|
||||
NameUDec string `sql:"default: null"`
|
||||
Albums []*Album `gorm:"foreignkey:TagArtistID"`
|
||||
AlbumCount int `sql:"-"`
|
||||
}
|
||||
|
||||
func (a *Artist) SID() *specid.ID {
|
||||
|
||||
Reference in New Issue
Block a user