处理postgre启动报错问题

Signed-off-by: infnan <38274826+infnan@users.noreply.github.com>
This commit is contained in:
infnan
2022-08-18 16:50:54 +08:00
parent 483ec2bf3e
commit 0993173b1f
6 changed files with 25 additions and 11 deletions
+4
View File
@@ -13,6 +13,10 @@ import (
func InitDb(db *gorm.DB) (err error) {
filePath := "config/db.sql"
if global.Driver == "postgres" {
filePath := "config/db.sql"
if err = ExecSql(db, filePath); err != nil {
return err
}
filePath = "config/pg.sql"
err = ExecSql(db, filePath)
} else if global.Driver == "mysql" {