modulepackage
0.0.1
Repository: https://github.com/limoli/dbshift-cli-mysql.git
Documentation: pkg.go.dev
# README
DbShift Client for MySQL
It provides simple and light logic for the management of database-schema migrations through the implementation of Dbshit Core.
You will be able to create migrations, check the current db status, decide to upgrade or downgrade easily.
Install
go get github.com/limoli/dbshift-cli-mysql
Commands
See Dbshit Core.
Configuration
Key | Description | Value example |
---|---|---|
Core configuration | See Dbshit Core. | |
DBSHIFT_CLI_MYSQL_TABLE | Table used by dbshift to manage migrations logics. | dbshift |
DBSHIFT_CLI_MYSQL_USERNAME | Database username | See mysql drive |
DBSHIFT_CLI_MYSQL_PASSWORD | Database password | See mysql drive |
DBSHIFT_CLI_MYSQL_DATABASE | Database name | See mysql drive |
DBSHIFT_CLI_MYSQL_ADDRESS | Database protocol and address | See mysql drive |
DBSHIFT_CLI_MYSQL_OPTION_IS_MULTI_STATEMENT | Table used by dbshift to manage migrations logics. | true /false See mysql drive |
Exit codes
Flag | Description |
---|---|
110 | When database name is not provided via environment. |
115 | When the option isMultiStatement is badly set. |
130 | When table-name value is missing (env var is not provided). |
150 | When db connection gets an error. |
160 | When core gets an error on initialisation. |