Extending the `dbmate status` command with the ability to set an exit code or quiet output, for use in scripts.
Flag names were copied from `git diff` command.
✨ When using dbmate as a container, since the base image is distroless, we can't do `dbmate up && dbmate wait`, which makes config a bit more cumbersome (e.g. in kubernetes an extra initContainer).
Closes#111Closes#112
Currently the `dbmate wait` command fails if the `postgres` system database does not exist (which is common on DigitalOcean, and perhaps other hosting providers).
This command is intended to verify that the postgres server is available, and not whether or not the user's database exists. Therefore, we will update this command to simply ignore the `database "foo" does not exist` error and treat this as the server being ready.
Fixes#78
When MySQL password included special chars such as exclamation point or @ (at), MySQL backend errored out (invalid password).
url.userinfo.String() (which gets called inside url.String()) returns %-encoded strings and MySQL interprets it as an actual password. Now the function percent-decodes it first before returning.
Closes#57
Since Postgres 9.6.8, at the top of the output of `pg_dump` it adds the line:
```sql
SELECT pg_catalog.set_config('search_path', '', false);
```
We must provide an absolute table reference to avoid errors when importing schema.sql.
Adds `dbmate dump` command to write the database schema to a file.
The intent is for this file to be checked in to the codebase, similar to Rails' `schema.rb` (or `structure.sql`) file. This allows developers to share a single file documenting the database schema, and makes it considerably easier to review PRs which add (or change) migrations.
The existing `up`, `migrate`, and `rollback` commands will automatically trigger a schema dump, unless `--no-dump-schema` is passed.
Closes https://github.com/amacneil/dbmate/issues/5