-
Notifications
You must be signed in to change notification settings - Fork 59
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
Using --git-commit-id option does not find uncommitted migrations #205
Comments
This also might be a duplicate of #168 but it's a slightly different focus. |
Yes, that's not easy to add I think 🤔 At least, git does not provide these options as far as I know. Maybe some workaround can be enough here? By using the |
I had the same issue, but because MIGRATION_LINTER_OPTIONS = {
'project_root_path': str(REPO_PATH),
} |
I think there's a fairly easy workaround here, since staged files are taken into account, you just need to @David-Wobrock would this be fixed by just appending the output of |
manage.py makemigrations
that adds a new non-null column (which would fail the migration)lintmigrations --git-commit-id $some-sha
I know that this is likely a limitation of what information we can get (heh) from the git process:
django-migration-linter/django_migration_linter/migration_linter.py
Lines 360 to 362 in 8e56562
Is there a different command we could use to also consider untracked and staged files in this calculation? Another use case this would come up is if you want to include this migration linter as a pre-commit hook which would operate off of the files in the stage (index).
The text was updated successfully, but these errors were encountered: