Support ignoring unknown Praefect migrations
This commit adds an -ignore-unknown
flag to the praefect sql-migrate
command to make it possible to bypass the unknown migration check. This emulates the behavior of Rails.
We had a canary deployment that ran praefect sql-migrate
on a binary
that was more recent that the one that was being deployed in
production. As a result, the older binary going to production failed in
the praefect sql-migrate
because it detected a new but unknown
migration. This halted the deploy, and we worked around this by rolling
back the newly-added tables.
Note that we don't do this by default because the documentation warns that this flag should be used sparingly, and it remains to be seen whether using this mode is a flaw with our deployment process.
Closes #2644 (closed)