Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Commands = []cli.Command{ { Name: "list", ArgsUsage: "", Usage: "Lists all schema migration versions", Description: "Produces a newline-delimited list of all available schema migration versions", Action: ListMigrations, }, { Name: "run", ArgsUsage: "[version]", Usage: "Runs schema migrations", Description: "Runs one or all pending schema migrations", Action: RunMigrations, }, { Name: "version", ArgsUsage: "", Usage: "See the current schema version", Description: "See the current schema version", Action: ShowVersions, }, }
Commands is the data structure which describes the command hierarchy for volmigrate.
View Source
var GlobalFlags = []cli.Flag{ cli.BoolFlag{ Name: "silent", Usage: "disables prompting before running migrations", }, cli.StringFlag{ Name: "prefix", Usage: "prefix key used in etcd for namespacing", Value: "/volplugin", }, cli.StringSliceFlag{ Name: "etcd", Usage: "URL for etcd", Value: &cli.StringSlice{"http://localhost:2379"}, }, }
GlobalFlags are required global flags for the operation of volmigrate.
Functions ¶
func ListMigrations ¶
ListMigrations returns a newline-delimited list of migration versions and their descriptions.
func RunMigrations ¶
RunMigrations runs either a single pending migration or all pending migrations. If no migrations need to be run, a message will state that nothing was performed.
func ShowVersions ¶
ShowVersions prints the current schema version and the newest version that's available.
Types ¶
Click to show internal directories.
Click to hide internal directories.