navidrome/db/migration/20230115103212_create_internet_radio.go
2023-04-04 10:05:31 -04:00

30 lines
571 B
Go

package migrations
import (
"database/sql"
"github.com/pressly/goose/v3"
)
func init() {
goose.AddMigration(upCreateInternetRadio, downCreateInternetRadio)
}
func upCreateInternetRadio(tx *sql.Tx) error {
_, err := tx.Exec(`
create table if not exists radio
(
id varchar(255) not null primary key,
name varchar not null unique,
stream_url varchar not null,
home_page_url varchar default '' not null,
created_at datetime,
updated_at datetime
);
`)
return err
}
func downCreateInternetRadio(tx *sql.Tx) error {
return nil
}