thoughtbot / parity

Shell commands for development, staging, and production parity for Heroku apps
https://thoughtbot.com
MIT License
889 stars 57 forks source link

Use `--if-exists` option with `dropdb` #139

Closed geoffharcourt closed 6 years ago

geoffharcourt commented 6 years ago

This change adds a flag to the dropdb command so that we don't issue an error if the local development database doesn't exist when we try to drop it. A notice is issued by PG, but execution will continue.

PG docs: https://www.postgresql.org/docs/9.3/static/app-dropdb.html

cc: #137

geoffharcourt commented 6 years ago

Yeah, I would love to build an "integration" suite that ran these commands against a fake shell that recorded the results. I have to run the utility against a real database before I release to have confidence that everything's in order.