Skip to content

Commit

Permalink
Force full rescan when adding multi-genres
Browse files Browse the repository at this point in the history
  • Loading branch information
deluan committed Jul 20, 2021
1 parent 3a35649 commit e223377
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion db/migration/20210715151153_add_genre_tables.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ func init() {
}

func upAddGenreTables(tx *sql.Tx) error {
notice(tx, "A full rescan will be performed to import multiple genres!")
_, err := tx.Exec(`
create table if not exists genre
(
Expand Down Expand Up @@ -56,7 +57,10 @@ create table if not exists artist_genres
unique (artist_id, genre_id)
);
`)
return err
if err != nil {
return err
}
return forceFullRescan(tx)
}

func downAddGenreTables(tx *sql.Tx) error {
Expand Down

0 comments on commit e223377

Please sign in to comment.