https://github.com/limoli/dbshift-cli-mysql
MySQL implementation using Dbshift Core.
https://github.com/limoli/dbshift-cli-mysql
command-line-tool db-migration migration-tool migrations
Last synced: 5 months ago
JSON representation
MySQL implementation using Dbshift Core.
- Host: GitHub
- URL: https://github.com/limoli/dbshift-cli-mysql
- Owner: limoli
- License: mit
- Created: 2019-09-30T10:23:40.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2021-05-19T13:53:09.000Z (about 5 years ago)
- Last Synced: 2024-06-20T10:08:11.652Z (almost 2 years ago)
- Topics: command-line-tool, db-migration, migration-tool, migrations
- Language: Go
- Homepage:
- Size: 19.5 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: Readme.md
- License: LICENSE
Awesome Lists containing this project
README
# DbShift Client for MySQL
It provides simple and light logic for the management of **database-schema migrations** through the implementation of [Dbshit Core](https://github.com/limoli/dbshift-core).
You will be able to create migrations, check the current db status, decide to upgrade or downgrade easily.
[](https://godoc.org/github.com/limoli/dbshift-cli-mysql)
[](https://travis-ci.org/limoli/dbshift-cli-mysql)
[](https://goreportcard.com/report/github.com/limoli/dbshift-cli-mysql)
[](https://codeclimate.com/github/limoli/dbshift-cli-mysql/maintainability)
[](https://codeclimate.com/github/limoli/dbshift-cli-mysql/test_coverage)
[](https://raw.githubusercontent.com/github.com/limoli/dbshift-cli-mysql/LICENSE)
## Install
`go get github.com/limoli/dbshift-cli-mysql`
## Commands
See [Dbshit Core](https://github.com/limoli/dbshift-core).
## Configuration
| Key | Description | Value example |
|--- |--- |--- |
| Core configuration | See [Dbshit Core](https://github.com/limoli/dbshift-core). | |
|`DBSHIFT_CLI_MYSQL_TABLE` | Table used by dbshift to manage migrations logics. | `dbshift` |
|`DBSHIFT_CLI_MYSQL_USERNAME` | Database username | See [mysql drive](https://github.com/go-sql-driver/mysql) |
|`DBSHIFT_CLI_MYSQL_PASSWORD` | Database password | See [mysql drive](https://github.com/go-sql-driver/mysql) |
|`DBSHIFT_CLI_MYSQL_DATABASE` | Database name | See [mysql drive](https://github.com/go-sql-driver/mysql) |
|`DBSHIFT_CLI_MYSQL_ADDRESS` | Database protocol and address | See [mysql drive](https://github.com/go-sql-driver/mysql) |
|`DBSHIFT_CLI_MYSQL_OPTION_IS_MULTI_STATEMENT` | Table used by dbshift to manage migrations logics. | `true`/`false` See [mysql drive](https://github.com/go-sql-driver/mysql) |
## 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. |