Quite often I'm searching through my sqitch directories for a particular thing, such as "when did that table name get changed?" However, grep doesn't know anything about the sqitch.plan, so my results aren't sorted in a useful way. So I hacked together a quick sqitch grep command.
It allows to do things like:
sqitch grep --type deploy -i ALTER TABLE
And the results will be show in the order they appear in the plan, with the caveat that deploy always appears before verify which always appears before revert.
I have an (untested) proof of concept at this gist.
The code is a bit of a hack as I threw it together quickly. There's a lot more which could probably be done with it (including better docs).
Quite often I'm searching through my sqitch directories for a particular thing, such as "when did that table name get changed?" However,
grepdoesn't know anything about thesqitch.plan, so my results aren't sorted in a useful way. So I hacked together a quicksqitch grepcommand.It allows to do things like:
And the results will be show in the order they appear in the plan, with the caveat that
deployalways appears beforeverifywhich always appears beforerevert.I have an (untested) proof of concept at this gist.
The code is a bit of a hack as I threw it together quickly. There's a lot more which could probably be done with it (including better docs).