mirror of
https://github.com/navidrome/navidrome.git
synced 2025-04-03 20:47:35 +03:00
32 lines
550 B
Go
32 lines
550 B
Go
package migrations
|
|
|
|
import (
|
|
"database/sql"
|
|
|
|
"github.com/pressly/goose/v3"
|
|
)
|
|
|
|
func init() {
|
|
goose.AddMigration(Up20201110205344, Down20201110205344)
|
|
}
|
|
|
|
func Up20201110205344(tx *sql.Tx) error {
|
|
_, err := tx.Exec(`
|
|
alter table media_file
|
|
add comment varchar;
|
|
alter table media_file
|
|
add lyrics varchar;
|
|
|
|
alter table album
|
|
add comment varchar;
|
|
`)
|
|
if err != nil {
|
|
return err
|
|
}
|
|
notice(tx, "A full rescan will be performed to import comments and lyrics")
|
|
return forceFullRescan(tx)
|
|
}
|
|
|
|
func Down20201110205344(tx *sql.Tx) error {
|
|
return nil
|
|
}
|