Working on install page
This commit is contained in:
parent
5344a03003
commit
0fd754bbe0
6 changed files with 56 additions and 37 deletions
|
@ -34,7 +34,7 @@ func LoadModelsConfig() {
|
|||
DbCfg.Path = base.Cfg.MustValue("database", "PATH", "data/gogs.db")
|
||||
}
|
||||
|
||||
func setEngine() {
|
||||
func SetEngine() {
|
||||
var err error
|
||||
switch DbCfg.Type {
|
||||
case "mysql":
|
||||
|
@ -70,7 +70,7 @@ func setEngine() {
|
|||
}
|
||||
|
||||
func NewEngine() {
|
||||
setEngine()
|
||||
SetEngine()
|
||||
if err := orm.Sync(new(User), new(PublicKey), new(Repository), new(Watch),
|
||||
new(Action), new(Access), new(Issue), new(Comment)); err != nil {
|
||||
fmt.Printf("sync database struct error: %v\n", err)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue