github.com/duskeagle/pop@v4.10.1-0.20190417200916-92f2b794aab5+incompatible/soda/cmd/migrate_status.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 migrateStatusCmd = &cobra.Command{
    10  	Use:   "status",
    11  	Short: "Displays the status of all 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.Status()
    18  	},
    19  }
    20  
    21  func init() {
    22  	migrateCmd.AddCommand(migrateStatusCmd)
    23  }