﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
34974	makemigrations --check does not show diff as documented	Oliver Ford	nobody	"The [docs](https://docs.djangoproject.com/en/4.2/ref/django-admin/#django-admin-makemigrations) say:

>--check¶
>Makes makemigrations exit with a non-zero status when model changes without migrations are detected. **Implies --dry-run**.

which:
>--dry-run¶
>**Shows what migrations would be made** without actually writing any migrations files to disk. Using this option along with --verbosity 3 will also show the complete migrations files that would be written.

emphasis mine.

In CI, would be very useful to have a single command which both renders the missing/problematic migration and also exits non-zero; I think this should be `makemigrations --check`, as it's already documented as doing.

Alternatively, maybe `--check` should _not_ imply `--dry-run` at all in any sense - i.e. it should write to disk if `--dry-run` not given. I'm not sure I like that though, I think it makes sense that 'check' is idempotent.

Black for example has `--diff` rather than `--dry-run`, and both prevent writing to disk, but can be combined for an exit code as well as the change printed:

>--check                         Don't write the files back, just return the
                                  status. Return code 0 means nothing would
                                  change. Return code 1 means some files would
                                  be reformatted. Return code 123 means there
                                  was an internal error.

>--diff                          Don't write the files back, just output a
                                 diff for each file on stdout.

(can't figure out this formatting...)"	Uncategorized	closed	Uncategorized	4.2	Normal	duplicate			Unreviewed	0	0	0	0	0	0
