Handle migration creation without db params

pull/13/head
Preston Pham 2016-11-05 14:10:59 -05:00
parent 1efa079859
commit 8dcbd69b12
1 changed files with 8 additions and 0 deletions

View File

@ -25,6 +25,14 @@ func main() {
flags.Parse(os.Args[1:])
args := flags.Args()
if len(args) > 1 && args[0] == "create" {
if err := goose.Run("create", nil, *dir, args[1:]...); err != nil {
log.Fatalf("goose run: %v", err)
}
return
}
if len(args) < 3 {
flags.Usage()
return