navidrome/db/migrations/20230117180400_add_album_in...

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

35 lines
759 B
Go
Raw Normal View History

package migrations
import (
2023-11-27 20:46:44 +01:00
"context"
"database/sql"
2023-04-04 15:57:00 +02:00
"github.com/pressly/goose/v3"
)
func init() {
2023-11-27 20:46:44 +01:00
goose.AddMigrationContext(upAddAlbumInfo, downAddAlbumInfo)
}
2023-11-27 20:46:44 +01:00
func upAddAlbumInfo(_ context.Context, tx *sql.Tx) error {
_, err := tx.Exec(`
alter table album
add description varchar(255) default '' not null;
alter table album
add small_image_url varchar(255) default '' not null;
alter table album
add medium_image_url varchar(255) default '' not null;
alter table album
add large_image_url varchar(255) default '' not null;
alter table album
add external_url varchar(255) default '' not null;
alter table album
add external_info_updated_at datetime;
`)
return err
}
2023-11-27 20:46:44 +01:00
func downAddAlbumInfo(_ context.Context, tx *sql.Tx) error {
return nil
}