Documentation
¶
Index ¶
Constants ¶
View Source
const ( CONNECTION = "MIG_CONNECTION" MIGRATIONS = "MIG_MIGRATIONS" )
View Source
const (
DEF_MIG_DIR = "./migrations"
)
View Source
const (
MIGRC = ".migrc"
)
Variables ¶
This section is empty.
Functions ¶
func SetEnvFromConfigFile ¶
Check the current working directory of the process for a .migrc file. If the file is found then read the contents and set it as environment variables. Existing environment variables are not overwritten in this manner. If a file isn't found in the current directory then check the parent directory. This repeats until reaching the root directory.
Types ¶
type MigConfig ¶
type MigConfig struct {
Connection string // DB connection string
Migrations string // migrations directory, e.g. ./migrations
MigRcPath string // override path to config file
OutputJson bool // stdout should be valid JSON
}
func GetConfigFromEnvVars ¶
Click to show internal directories.
Click to hide internal directories.