#24100: Make `post_migrate` dispatch the migration plan.
-----------------------------+-------------------------------------
Reporter: charettes | Owner: charettes
Type: New feature | Status: new
Component: Migrations | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 1
Needs tests: 1 | Patch needs improvement: 1
Easy pickings: 0 | UI/UX: 0
-----------------------------+-------------------------------------
Changes (by MarkusH):
* cc: info+coding@… (added)
* needs_better_patch: 0 => 1
* needs_tests: 0 => 1
* needs_docs: 0 => 1
Comment:
As already mentioned on the PR, I'm not sure the current API is stable
enough (in terms of "Django doesn't crash", not in terms of "We change a
function signature") for public usage. I'd like to have the alpha and beta
for tests. Tim noted on IRC that changing the API after beta isn't really
a thing we should do which I do understand.
A workaround we could also simply backport to 1.7 (and add `plan` and
`state` in 1.9), is a check for the respective first migrations being
applied:
In `django.contrib.contenttypes.management`:
{{{#!python
def update_contenttypes(...):
from django.db.migration.loader import MigrationLoader
loader = MigrationLoader(connection)
loader.load_disk()
if not ('contenttypes', '0001_initial') in loader.applied_migrations:
return
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/24100#comment:2>
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/067.82907bc3e5e27a15c745e67d5136c607%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.