2020-08-01 22:49:01 +02:00
|
|
|
package migrations
|
2020-07-11 03:44:40 +02:00
|
|
|
|
|
|
|
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
|
|
|
|
}
|