mirror of
https://github.com/navidrome/navidrome.git
synced 2025-04-03 20:47:35 +03:00
33 lines
703 B
Go
33 lines
703 B
Go
package migrations
|
|
|
|
import (
|
|
"database/sql"
|
|
|
|
"github.com/pressly/goose/v3"
|
|
)
|
|
|
|
func init() {
|
|
goose.AddMigration(upAddAlbumInfo, downAddAlbumInfo)
|
|
}
|
|
|
|
func upAddAlbumInfo(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
|
|
}
|
|
|
|
func downAddAlbumInfo(tx *sql.Tx) error {
|
|
return nil
|
|
}
|