Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var DumpCmd = &cobra.Command{ Use: "dump", Short: "Dumps out the schema of the selected database", RunE: func(cmd *cobra.Command, args []string) error { c, err := pop.Connect(dumpOptions.env) if err != nil { return err } var out io.Writer if dumpOptions.output == "-" { out = os.Stdout } else { err = os.MkdirAll(filepath.Dir(dumpOptions.output), 0755) if err != nil { return err } out, err = os.Create(dumpOptions.output) if err != nil { return err } } err = c.Dialect.DumpSchema(out) if err != nil { return err } return nil }, }
View Source
var LoadCmd = &cobra.Command{ Use: "load", Short: "Load a schema.sql file into a database", RunE: func(cmd *cobra.Command, args []string) error { f, err := os.Open(loadOptions.input) if err != nil { return err } c, err := pop.Connect(loadOptions.env) if err != nil { return err } defer c.Close() err = c.Dialect.LoadSchema(f) if err != nil { return err } return nil }, }
Functions ¶
This section is empty.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.