Open remimd opened 1 week ago
I think that's a good idea.
With piccolo migrations check
it tells you if any existing migrations haven't run, but it always returns an exit code of 0.
If you want to find out if any changes require a new migration, you need piccolo migrations new all --auto
. But then like you say, you don't know if it actually did anything based on the exit code.
We could add a flag to one of these existing commands, or add a new command.
I'd like to be able to use:
piccolo migrations check
in a GitHub Action. Would it be possible to have an equivalent to the Django command:python manage.py makemigrations --dry-run --check
that returns a status other than 0 when there are migrations to generate?