github.com/duskeagle/pop@v4.10.1-0.20190417200916-92f2b794aab5+incompatible/soda/cmd/migrate_up.go (about) 1 package cmd 2 3 import ( 4 "github.com/gobuffalo/pop" 5 "github.com/pkg/errors" 6 "github.com/spf13/cobra" 7 ) 8 9 var migrateUpCmd = &cobra.Command{ 10 Use: "up", 11 Short: "Apply all of the 'up' migrations.", 12 RunE: func(cmd *cobra.Command, args []string) error { 13 mig, err := pop.NewFileMigrator(migrationPath, getConn()) 14 if err != nil { 15 return errors.WithStack(err) 16 } 17 return mig.Up() 18 }, 19 } 20 21 func init() { 22 migrateCmd.AddCommand(migrateUpCmd) 23 }