github.com/royge/pop@v4.13.1+incompatible/soda/cmd/migrate_status.go (about) 1 package cmd 2 3 import ( 4 "github.com/gobuffalo/pop" 5 "github.com/spf13/cobra" 6 ) 7 8 var migrateStatusCmd = &cobra.Command{ 9 Use: "status", 10 Short: "Displays the status of all migrations.", 11 RunE: func(cmd *cobra.Command, args []string) error { 12 mig, err := pop.NewFileMigrator(migrationPath, getConn()) 13 if err != nil { 14 return err 15 } 16 return mig.Status() 17 }, 18 } 19 20 func init() { 21 migrateCmd.AddCommand(migrateStatusCmd) 22 }