mirror of
https://github.com/mayswind/ezbookkeeping.git
synced 2026-05-17 16:24:25 +08:00
support sync database structure when starting web server
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user