Add path to playlist

This commit is contained in:
Deluan
2020-07-10 21:44:40 -04:00
committed by Deluan Quintão
parent 3239be4a4d
commit 35114be5f7
2 changed files with 29 additions and 0 deletions
@@ -0,0 +1,27 @@
package migration
import (
"database/sql"
"github.com/pressly/goose"
)
func init() {
goose.AddMigration(upAddPlaylistPath, downAddPlaylistPath)
}
func upAddPlaylistPath(tx *sql.Tx) error {
_, err := tx.Exec(`
alter table playlist
add path string default '' not null;
alter table playlist
add sync bool default false not null;
`)
return err
}
func downAddPlaylistPath(tx *sql.Tx) error {
return nil
}