github.com/rjgonzale/pop/v5@v5.1.3-dev/soda/cmd/migrate_status.go (about)

     1  package cmd
     2  
     3  import (
     4  	"github.com/gobuffalo/pop/v5"
     5  	"github.com/spf13/cobra"
     6  	"os"
     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 err
    16  		}
    17  		return mig.Status(os.Stdout)
    18  	},
    19  }
    20  
    21  func init() {
    22  	migrateCmd.AddCommand(migrateStatusCmd)
    23  }