Check for missing migrations in CI #13179
rrelmy
started this conversation in
Feature Requests & Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
TLDR: Can we add a command to check for migrations that are not yet created?
Situation
When working with PostgreSQL and requiring migrations, having push mode locally but migrations during deployments. I know I will forget to create the migrations at some point, or with breaking changes, like in version 3.44.
To prevent this, I've built a CI job that checks for it.
My current workaround
My solution runs
migrate:create
with a specific name and checks whether a migration file gets created:Using basic
ls
to avoid requiringgit
in the pipeline.It works, but it feels hacky and prone to fail at some point.
My question / proposal
Would you be interested in accepting a change that implements a dedicated method to check for missing migrations?
I'm not sure about the approach yet, having a flag or a separate command. And would like to have a discussion first before implementing it.
payload migrate:check-missing payload migrate:complete payload migrate:?? payload migrate:status --fail-if-missing payload migrate:create --some-obscure-flag
Beta Was this translation helpful? Give feedback.
All reactions