Fix performance and precision of TopSongs

This commit is contained in:
Deluan
2020-10-21 14:05:06 -04:00
parent a45b5a037f
commit 075c28d2e5
2 changed files with 48 additions and 14 deletions
@@ -0,0 +1,23 @@
package migration
import (
"database/sql"
"github.com/pressly/goose"
)
func init() {
goose.AddMigration(Up20201021135455, Down20201021135455)
}
func Up20201021135455(tx *sql.Tx) error {
_, err := tx.Exec(`
create index if not exists media_file_artist_id
on media_file (artist_id);
`)
return err
}
func Down20201021135455(tx *sql.Tx) error {
return nil
}