处理postgre启动报错问题
Signed-off-by: infnan <38274826+infnan@users.noreply.github.com>
This commit is contained in:
1 parent
483ec2bf3e
commit
0993173b1f
6 files changed
+25
-11
No files matched your search
@@ -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" {
|
||||
|
||||
Reference in new issue
Block a user