feat: Add migrate (#1419)

* Add migrate

* Remove unused module

* refactor filename

* rename refactor to migrate

Co-authored-by: anqiansong <anqiansong@bytedance.com>
This commit is contained in:
anqiansong
2022-01-06 18:48:34 +08:00
committed by GitHub
parent 892f93a716
commit 9d67fc4cfb
7 changed files with 317 additions and 3 deletions

View File

@@ -23,6 +23,7 @@ import (
"github.com/tal-tech/go-zero/tools/goctl/internal/errorx"
"github.com/tal-tech/go-zero/tools/goctl/internal/version"
"github.com/tal-tech/go-zero/tools/goctl/kube"
"github.com/tal-tech/go-zero/tools/goctl/migrate"
"github.com/tal-tech/go-zero/tools/goctl/model/mongo"
model "github.com/tal-tech/go-zero/tools/goctl/model/sql/command"
"github.com/tal-tech/go-zero/tools/goctl/plugin"
@@ -45,6 +46,22 @@ var commands = []cli.Command{
Usage: "upgrade goctl to latest version",
Action: upgrade.Upgrade,
},
{
Name: "migrate",
Usage: "migrate from tal-tech to zeromicro",
Description: "migrate is a transition command to help users migrate their projects from tal-tech to zeromicro version",
Action: migrate.Migrate,
Flags: []cli.Flag{
cli.BoolFlag{
Name: "verbose, v",
Usage: "verbose enables extra logging",
},
cli.StringFlag{
Name: "version",
Usage: "the target release version of github.com/zeromicro/go-zero to refactor",
},
},
},
{
Name: "api",
Usage: "generate api related files",