#24086: No pre_migrate signal is emitted if rolling back the migration history
------------------------------------+--------------------------------------
Reporter: andrewhayes1979 | Owner: nobody
Type: Bug | Status: new
Component: Migrations | Version: 1.7
Severity: Normal | Resolution:
Keywords: pre_migrate signal | Triage Stage: Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
------------------------------------+--------------------------------------
Changes (by andrewhayes1979):
* needs_better_patch: => 0
* needs_tests: => 0
* needs_docs: => 0
Comment:
Addendum, the actual behaviour is slightly more confusing than first
reported, try this:
myapp + MyModel, generate initial migration 0001, migrate:
- pre_migrate and post_migrate fired
add field to MyModel, makemigrations to generate 0002, migrate:
- pre_migrate and post_migrate fired
migrate back to 0001:
- only post_migrate fired ''(as reported above)''
migrate forwards to 0002:
- only post_migrate fired ''(expected this to work the same as case #2,
forwards migration from 0001 -> 0002)''
add another field to MyModel, makemigrations to generate 003, migrate
- pre_migrate, post_migrate are fired (as expected)
...the current behaviour is slightly confusing...
--
Ticket URL: <https://code.djangoproject.com/ticket/24086#comment:1>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/073.51006c10071ae4a2b0fe5aa462afb828%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.