Opened 10 years ago

Closed 10 years ago

Last modified 10 years ago

#23975 closed Bug (fixed)

No pre_migrate signal emitted if all installed apps have migrations

Reported by: Mikhail Podgurskiy Owned by: Tim Graham
Component: Migrations Version: 1.7
Severity: Release blocker Keywords: signals
Cc: Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

The sync_db() function is the only place where pre_migrate signal is emitted. And it's called only in case if there is apps without migrations.

https://github.com/django/django/blob/bac7664f274be834a09e037331889959f04a75e7/django/core/management/commands/migrate.py#L156
https://github.com/django/django/blob/bac7664f274be834a09e037331889959f04a75e7/django/core/management/commands/migrate.py#L252

If all installed applications have migrations, no pre_migrate signal happens.

Change History (5)

comment:1 by Tim Graham, 10 years ago

Owner: changed from nobody to Tim Graham
Severity: NormalRelease blocker
Status: newassigned
Triage Stage: UnreviewedAccepted

comment:2 by Tim Graham, 10 years ago

Has patch: set

comment:3 by Tim Graham, 10 years ago

Summary: No pre migrate signal emmited if all installed apps have migrationsNo pre_migrate signal emitted if all installed apps have migrations

comment:4 by Tim Graham <timograham@…>, 10 years ago

Resolution: fixed
Status: assignedclosed

In d2ff8a7241b621b8013c7ec1631e95ae4445f76d:

Fixed #23975 -- Restored pre_migrate signal if all apps have migrations.

Thanks kmmbvnr for the report.

comment:5 by Tim Graham <timograham@…>, 10 years ago

In c085bea6c34979b9acc3108afd018cb391557002:

[1.7.x] Fixed #23975 -- Restored pre_migrate signal if all apps have migrations.

Thanks kmmbvnr for the report.

Backport of d2ff8a7241b621b8013c7ec1631e95ae4445f76d from master

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