quintodrome/db/migration/20200710211442_add_playlist_path.go

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

28 lines
419 B
Go
Raw Normal View History

package migrations
2020-07-10 17:44:40 -08:00
import (
"database/sql"
2023-04-04 05:57:00 -08:00
"github.com/pressly/goose/v3"
2020-07-10 17:44:40 -08:00
)
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
}