feat: Adds Audio Channel Metadata - #1036

This commit is contained in:
Miguel A. Arroyo
2021-08-20 17:35:59 -07:00
committed by Deluan Quintão
parent 0079a9b938
commit e12a14a87d
14 changed files with 115 additions and 12 deletions
@@ -0,0 +1,30 @@
package migrations
import (
"database/sql"
"github.com/pressly/goose"
)
func init() {
goose.AddMigration(upAddMediafileChannels, downAddMediafileChannels)
}
func upAddMediafileChannels(tx *sql.Tx) error {
_, err := tx.Exec(`
alter table media_file
add channels integer;
create index if not exists media_file_channels
on media_file (channels);
`)
if err != nil {
return err
}
notice(tx, "A full rescan needs to be performed to import more tags")
return forceFullRescan(tx)
}
func downAddMediafileChannels(tx *sql.Tx) error {
return nil
}