Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ApplyFlags are the flags used in Apply command. ApplyFlags struct { DSN string File string Web bool } // ApplyCmd represents the apply command. ApplyCmd = &cobra.Command{ Use: "apply", Short: "Apply an atlas schema to a data source", Run: CmdApplyRun, Example: ` atlas schema apply -d "mysql://user:pass@tcp(localhost:3306)/dbname" -f atlas.hcl atlas schema apply -d "mariadb://user:pass@tcp(localhost:3306)/dbname" -f atlas.hcl atlas schema apply --dsn "postgres://user:pass@host:port/dbname" -f atlas.hcl atlas schema apply -d "sqlite://file:ex1.db?_fk=1" -f atlas.hcl`, } )
View Source
var ( // InspectFlags are the flags used in Inspect command. InspectFlags struct { DSN string Web bool } // InspectCmd represents the inspect command. InspectCmd = &cobra.Command{ Use: "inspect", Short: "Inspect an atlas schema", Run: CmdInspectRun, Example: ` atlas schema inspect -d "mysql://user:pass@tcp(localhost:3306)/dbname" atlas schema inspect -d "mariadb://user:pass@tcp(localhost:3306)/dbname" atlas schema inspect --dsn "postgres://user:pass@host:port/dbname" atlas schema inspect -d "sqlite://file:ex1.db?_fk=1"`, } )
View Source
var RootCmd = &cobra.Command{
Use: "atlas",
Short: "A database toolkit.",
}
RootCmd represents the base command when called without any subcommands
Functions ¶
func CmdApplyRun ¶
CmdApplyRun is the command used when running CLI.
func CmdInspectRun ¶
CmdInspectRun is the command used when running CLI.
func SchemaNameFromDSN ¶
SchemaNameFromDSN parses the dsn the returns schema name
Types ¶
type Driver ¶
type Driver struct { migrate.Driver schemaspec.Marshaler schemaspec.Unmarshaler }
Driver implements the Atlas interface.
Source Files ¶
Click to show internal directories.
Click to hide internal directories.