chore: add database migration prompt
Some checks failed
Publish Docker image (amd64, English) / Push Docker image to multiple registries (push) Has been cancelled
Publish Docker image (amd64) / Push Docker image to multiple registries (push) Has been cancelled
Publish Docker image (arm64) / Push Docker image to multiple registries (push) Has been cancelled
Linux Release / release (push) Has been cancelled
macOS Release / release (push) Has been cancelled
Windows Release / release (push) Has been cancelled

This commit is contained in:
JustSong 2023-10-02 12:13:30 +08:00
parent 4701897e2e
commit cbd62011b8

View File

@ -81,6 +81,7 @@ func InitDB() (err error) {
if !common.IsMasterNode { if !common.IsMasterNode {
return nil return nil
} }
common.SysLog("database migration started")
err = db.AutoMigrate(&Channel{}) err = db.AutoMigrate(&Channel{})
if err != nil { if err != nil {
return err return err