add 'DEFAULT NULL' to point

添加默认值为null 转换成指针类型
This commit is contained in:
谢小军
2020-06-23 12:10:08 +08:00
parent 19b39a0b41
commit 0706dd0747
9 changed files with 39 additions and 27 deletions

View File

@@ -2,7 +2,6 @@ package cmd
import (
"os"
"strings"
"github.com/xxjwxc/public/mylog"
@@ -21,7 +20,6 @@ var foreignKey bool
var funcKey bool
var ui bool
var urlTag string
var outFileName string
var rootCmd = &cobra.Command{
Use: "main",
@@ -73,8 +71,6 @@ func init() {
rootCmd.PersistentFlags().StringVarP(&urlTag, "url", "l", "", "url标签(json,url)")
rootCmd.MarkFlagRequired("url tag")
rootCmd.Flags().StringVar(&outFileName, "outfilename", "", "输出文件名,默认以数据库名称命名")
rootCmd.Flags().IntVar(&mysqlInfo.Port, "port", 3306, "端口号")
}
@@ -114,12 +110,6 @@ func MergeMysqlDbInfo() {
if len(urlTag) > 0 {
config.SetURLTag(urlTag)
}
if len(outFileName) > 0 {
if !strings.HasSuffix(outFileName, ".go") {
outFileName += ".go"
}
config.SetOutFileName(outFileName)
}
config.SetMysqlDbInfo(&tmp)