fix: Add the configuration of whether to print SQL. The default value is false (#429)

This commit is contained in:
hanpeng
2022-01-19 16:58:45 +08:00
committed by GitHub
parent 9fd175eefd
commit a111fd672c
2 changed files with 4 additions and 0 deletions

View File

@ -110,6 +110,9 @@ func (a *Adapter) close() {
}
func (a *Adapter) createTable() {
showSql, _ := beego.AppConfig.Bool("showSql")
a.Engine.ShowSQL(showSql)
err := a.Engine.Sync2(new(Organization))
if err != nil {
panic(err)