models/db.go
@@ -10,9 +10,9 @@ func InitDb() { dbUrl := beego.AppConfig.String("dbUrl") rootPath := util.GetAppRootPath() dbPath := rootPath + dbUrl dbPath := rootPath +"/"+ dbUrl orm.RegisterDriver("sqlite", orm.DRSqlite) _ = orm.RegisterDataBase("default", "sqlite3", dbPath) orm.RegisterModel(new(User), new(UserCar), new(SysUpgrade)) orm.RegisterModel(new(User), new(UserCar), new(SysUpgrade), new(UserClient), new(Restriction)) _ = orm.RunSyncdb("default", false, true) }