graphile / migrate

Opinionated SQL-powered productive roll-forward migration tool for PostgreSQL.
MIT License
751 stars 58 forks source link

check if current.sql is empty without being connection to a database #38

Closed mathroc closed 4 years ago

mathroc commented 4 years ago

on CI I'd like to check that current.sql is empty, I noticed graphile-migrate status returns a status code I could use but it requires to be connected to a running database.

would you consider adding a --current flag to the status command to check only the current.sql status? (returning a 2 status code if it's not empty and 0 otherwise)

benjie commented 4 years ago

Let’s go with --current-only but yes 👍

Actually maybe we should go with --no-db because it expresses the intent better, and allows for other future checks that don’t need db access such as that the signature chain is valid.