#34052 closed Bug (fixed)

migrate --check still emits signals if database is up to date

Reported by: Jacob Walls Owned by: JunKi Yoon
Component: Migrations Version: dev
Severity: Normal Keywords:
Cc: Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: yes UI/UX: no

Description (last modified by Jacob Walls)

pre_migrate and post_migrate signals are emitted for migrate --check, but only if the database is up-to-date.

A related side effect is that the logs also look like a like a real run, as it says "Operations to perform:" and "Running migrations:". The last sentence clarifies that nothing has been applied, but there is still the potential for a half-second of "what have I just done?".

% python manage.py migrate --check          
Operations to perform:
  Apply all migrations: admin, auth, contenttypes, sessions, social_django
Running migrations:
  No migrations to apply.

Change History (8)

comment:1 by Mariusz Felisiak, 20 months ago

Triage Stage: UnreviewedAccepted

in reply to:  description comment:2 by JunKi Yoon, 20 months ago

Replying to Jacob Walls:

Can I try this ticket?

comment:3 by JunKi Yoon, 20 months ago

Owner: changed from nobody to JunKi Yoon
Status: newassigned

comment:4 by JunKi Yoon, 20 months ago

Has patch: set

I added patch :)
PR

comment:5 by Mariusz Felisiak, 20 months ago

Needs tests: set
Patch needs improvement: set

comment:6 by Jacob Walls, 20 months ago

Description: modified (diff)

comment:7 by Mariusz Felisiak, 20 months ago

Needs tests: unset
Patch needs improvement: unset
Triage Stage: AcceptedReady for checkin

comment:8 by Mariusz Felisiak <felisiak.mariusz@…>, 20 months ago

Resolution: fixed
Status: assignedclosed

In 1a7b690:

Fixed #34052 -- Made migrate --check don't emit signals and output when up to date.

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