support sync database structure when starting web server

This commit is contained in:
MaysWind
2020-12-03 23:22:01 +08:00
parent 50f56ccf3d
commit 1f6922c9e5
4 changed files with 76 additions and 6 deletions
+9
View File
@@ -44,6 +44,15 @@ func startWebServer(c *cli.Context) error {
log.BootInfof("[server.startWebServer] static root path is %s", config.StaticRootPath)
if config.AutoUpdateDatabase {
err = updateAllDatabaseTablesStructure()
if err != nil {
log.BootErrorf("[server.startWebServer] update database table structure failed, because %s", err.Error())
return err
}
}
err = requestid.InitializeRequestIdGenerator(config)
if err != nil {