Opened 6 months ago

Closed 6 months ago

Last modified 6 months ago

#34935 closed Cleanup/optimization (duplicate)

makemigrations --check no longer reports pending migrations

Reported by: Adam Johnson Owned by: nobody
Component: Migrations Version: 4.2
Severity: Normal Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description (last modified by Adam Johnson)

Before #34051 (Django 4.2), you’d use this invocation to check for pending migrations:

$ ./ makemigrations --dry-run --check
Migrations for 'example':
    - Alter field name on author

$ echo $?

The to-be-generated migrations were reported.

#34051 changed so that migratinos aren’t generated when using only --check. But that means, with or without --dry-run, the migration operations are no longer output:

$ ./ makemigrations --dry-run --check

$ echo $?

Thus, to see the pending migrations, the only option is to run again without --check and actually write them out. If you run makemigrations --check in CI, a failure requires an extra run, perhaps locally, before you can start to debug.

-v 0 can (and could) always be used to mute the output if desired.

Change History (4)

comment:1 by Adam Johnson, 6 months ago

Description: modified (diff)

comment:2 by Adam Johnson, 6 months ago

Summary: makemigrations --check no longer reports missing migrationsmakemigrations --check no longer reports pending migrations

It seems the output removal was accidental - not discussed on the previous ticket or PR.

comment:3 by Jacob Walls, 6 months ago

Resolution: duplicate
Severity: Release blockerNormal
Status: newclosed
Type: BugCleanup/optimization

Hi Adam. This was proposed before in #34632 and wontfixed, but I'd be open to reconsidering. #34051 did muse that other commands with --check do a bit of logging, so it doesn't seem inconsistent to me to let makemigrations --check log, too.

Would you be willing to sound this out on the forum?

(There was #34457, too, going further and arguing for a total reversion.)

Version 0, edited 6 months ago by Jacob Walls (next)

comment:4 by Adam Johnson, 6 months ago

Thanks for pointing to the other ticket. Sorry I did not search for it.

I’ve just posted on the forum.

Note: See TracTickets for help on using tickets.
Back to Top