Finish upgrade the gorm framework.

This commit is contained in:
lishuang
2022-03-15 02:17:26 +08:00
parent 69412300b6
commit 161096fbb2
19 changed files with 167 additions and 187 deletions

View File

@ -4,6 +4,7 @@ import (
"github.com/eyebluecn/tank/code/core"
"github.com/eyebluecn/tank/code/tool/util"
"github.com/json-iterator/go"
"gorm.io/gorm/schema"
"io/ioutil"
"os"
"time"
@ -178,6 +179,14 @@ func (this *TankConfig) MatterPath() string {
return this.matterPath
}
//matter path
func (this *TankConfig) NamingStrategy() schema.NamingStrategy {
return schema.NamingStrategy{
TablePrefix: core.TABLE_PREFIX,
SingularTable: true,
}
}
//Finish the installation. Write config to tank.json
func (this *TankConfig) FinishInstall(mysqlPort int, mysqlHost string, mysqlSchema string, mysqlUsername string, mysqlPassword string, mysqlCharset string) {