@@ -43,6 +43,7 @@ func (db *DB) Migrate(ctx MigrationContext) error {
|
||||
construct(ctx, "202202241218", migratePublicPlaylist),
|
||||
construct(ctx, "202204270903", migratePodcastDropUserID),
|
||||
construct(ctx, "202206011628", migrateInternetRadioStations),
|
||||
construct(ctx, "202206101425", migrateUser),
|
||||
}
|
||||
|
||||
return gormigrate.
|
||||
@@ -363,3 +364,10 @@ func migrateInternetRadioStations(tx *gorm.DB, _ MigrationContext) error {
|
||||
).
|
||||
Error
|
||||
}
|
||||
|
||||
func migrateUser(tx *gorm.DB, _ MigrationContext) error {
|
||||
return tx.AutoMigrate(
|
||||
User{},
|
||||
).
|
||||
Error
|
||||
}
|
||||
|
||||
@@ -172,6 +172,7 @@ type User struct {
|
||||
ListenBrainzURL string `sql:"default: null"`
|
||||
ListenBrainzToken string `sql:"default: null"`
|
||||
IsAdmin bool `sql:"default: null"`
|
||||
Avatar []byte `sql:"default: null"`
|
||||
}
|
||||
|
||||
type Setting struct {
|
||||
@@ -398,10 +399,10 @@ type Bookmark struct {
|
||||
}
|
||||
|
||||
type InternetRadioStation struct {
|
||||
ID int `gorm:"primary_key"`
|
||||
StreamURL string
|
||||
Name string
|
||||
HomepageURL string
|
||||
ID int `gorm:"primary_key"`
|
||||
StreamURL string
|
||||
Name string
|
||||
HomepageURL string
|
||||
}
|
||||
|
||||
func (ir *InternetRadioStation) SID() *specid.ID {
|
||||
|
||||
Reference in New Issue
Block a user