- Notifications
You must be signed in to change notification settings - Fork102
"after" in migration configuration should use VCS history if VCS enabled#298
-
Right now, it seems like the In our project, the files are named like If Alternatively, a configuration option to use migration numbers would be nice, which could potentially take some kind of DSL to convert filenames to migration numbers (perhaps a sed command). |
BetaWas this translation helpful?Give feedback.
All reactions
Replies: 2 comments 2 replies
-
As it stands, we just use this make target, which works well enough: # Only lint migrations after 172, since we can't change old ones, and# 172-forward lint without errors currently.LINTED_MIGRATIONS :=$(shell fd . 'data/db/proxy/migrations' \--extension sql \--max-depth 1 \--format {/} \--exec bash -c '[[ "{/}" > "0172" ]] && echo {}')# Lint db migrations. Note that the DB must be running for this check.db-lint: .make/db-lint.PHONY: db-lint.make/db-lint:$(LINTED_MIGRATIONS) | .makeif [["$?" ]];thenpostgrestools check$?fitouch .make/db-lint |
BetaWas this translation helpful?Give feedback.
All reactions
-
Thanks for the feedback! Did you see this part in the docs?
Stil, I will test this on the weekend, because I am quite sure we don't care about timestamps and simply parse the number. So maybe there is just a bug here and your case should work. |
BetaWas this translation helpful?Give feedback.
All reactions
-
@mplanchard in the next release, |
BetaWas this translation helpful?Give feedback.
All reactions
-
That's great, thanks! Re: the |
BetaWas this translation helpful?Give feedback.
All reactions
👍 1