diff --git a/conf/app.conf b/conf/app.conf index cc43c3d7..f53c1ce8 100644 --- a/conf/app.conf +++ b/conf/app.conf @@ -6,6 +6,7 @@ copyrequestbody = true driverName = mysql dataSourceName = root:123456@tcp(localhost:3306)/ dbName = casdoor +showSql = false redisEndpoint = defaultStorageProvider = isCloudIntranet = false diff --git a/object/adapter.go b/object/adapter.go index 16b4165b..f1160704 100644 --- a/object/adapter.go +++ b/object/adapter.go @@ -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)