Opened 6 years ago

Last modified 6 years ago

#30351 closed Bug

Migration auth.0011_update_proxy_permissions from Django 2.2 fails to apply — at Initial Version

Reported by: Julien Enselme Owned by: nobody
Component: contrib.auth Version: 2.2
Severity: Release blocker Keywords:
Cc: Simon Charette, Arthur Rio, Antoine Catton Triage Stage: Accepted
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

I am trying to update my project to Django 2.2. When I launch python manage.py migrate, I get this error message when migration auth.0011_update_proxy_permissions is applying (full stacktrace is available here):
django.db.utils.IntegrityError: duplicate key value violates unique constraint "idx_18141_auth_permission_content_type_id_01ab375a_uniq" DETAIL: Key (content_type_id, codename)=(12, add_agency) already exists.

It looks like the migration is trying to re-create already existing entries in the auth_permission table. At first I though it cloud because we recently renamed a model. But after digging and deleting the entries associated with the renamed model from our database in the auth_permission table, the problem still occurs with other proxy models.

I tried to update directly from 2.0.13 and 2.1.8. The issues appeared each time. I also deleted my venv and recreated it without an effect.

I searched for a ticket about this on the bug tracker but found nothing. I also posted this on django-users and was asked to report this here.

Change History (0)

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