#31021: migration doesn't work on multi database environment
----------------------------------------+------------------------
Reporter: haudoing | Owner: nobody
Type: Bug | Status: new
Component: contrib.auth | Version: 2.2
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 0
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
----------------------------------------+------------------------
The tutorial said that we can omit to set the default database if default
doesn't makes sense
https://docs.djangoproject.com/en/2.2/topics/db/multi-db/#defining-your-
databases
But the following script brake it
https://github.com/django/django/blob/stable/2.2.x/django/contrib/auth/migrations/0011_update_proxy_permissions.py
on line 42, it use
{{{
with transaction.atomic():
Permission.objects.filter(
permissions_query,
content_type=old_content_type,
).update(content_type=new_content_type)
}}}
This will brake the migration if default database doesn't set
--
Ticket URL: <https://code.djangoproject.com/ticket/31021>
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 view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/051.acbdd66110cc2c3fab0078515a0e34fc%40djangoproject.com.