Commit 7422e0b0 authored by 贾浩@五瓣科技's avatar 贾浩@五瓣科技

update

parent 6281e57d
Pipeline #756 canceled with stages
......@@ -52,11 +52,9 @@ func New(_c *config.Config) (dao *Dao, err error) {
sqlDB.SetMaxOpenConns(_c.Mysql.MaxConn)
sqlDB.SetMaxIdleConns(_c.Mysql.MaxIdleConn)
sqlDB.SetConnMaxIdleTime(time.Hour)
if _c.Mysql.Migrate {
err = dao.db.AutoMigrate(&dbmodel.Height{}, &dbmodel.Record{})
if err != nil {
return
}
panic(err)
}
return dao, nil
......
......@@ -22,7 +22,7 @@ services:
command:
- "/bin/sh"
- "-c"
- "/usr/bin/sync -c /config.toml --migrate"
- "/usr/bin/sync -c /config.toml"
restart:
unless-stopped
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment