mirror of
https://github.com/mindoc-org/mindoc.git
synced 2025-09-20 02:37:59 +08:00
修复在sqlite数据库下项目成员切换权限错误的BUG
This commit is contained in:
@@ -15,6 +15,7 @@ import (
|
||||
"github.com/lifei6671/godoc/models"
|
||||
"strings"
|
||||
"github.com/lifei6671/godoc/commands/migrate"
|
||||
"path/filepath"
|
||||
)
|
||||
|
||||
|
||||
@@ -43,6 +44,8 @@ func RegisterDataBase() {
|
||||
}
|
||||
}else if adapter == "sqlite3" {
|
||||
database := beego.AppConfig.String("db_database")
|
||||
dbPath := filepath.Dir(database)
|
||||
os.MkdirAll(dbPath,0777)
|
||||
|
||||
orm.RegisterDataBase("default", "sqlite3", database)
|
||||
}
|
||||
|
Reference in New Issue
Block a user