Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make migration check usable in a GitHub Action #1124

Open
remimd opened this issue Nov 3, 2024 · 1 comment
Open

Make migration check usable in a GitHub Action #1124

remimd opened this issue Nov 3, 2024 · 1 comment

Comments

@remimd
Copy link

remimd commented Nov 3, 2024

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?

@dantownsend
Copy link
Member

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants