My bad, I should have read the documentation more thoroughly before. However, when I set DEFAULT_AUTO_FIELD to BigAutoField and run the migration, I get errors like the following. This was what troubled me in the first place:
django.db.utils.IntegrityError: (1452, 'Cannot add or update a child row: a foreign key constraint fails (`djpat`.`#sql-bb7_1e84`, CONSTRAINT `myapp_logentry_extension_id_8856aeec_fk` FOREIGN KEY (`extension_id`) REFERENCES `myapp_extension` (`id`))') Caram Le jeu. 25 mars 2021 à 18:07, Mariusz Felisiak <felisiak.mari...@gmail.com> a écrit : > Caram, I don't see any issue here. As far as I'm aware you're using the > auto-created primary key. If you want to get rid of warnings and avoid > unwanted migrations in the future, set DEFAULT_AUTO_FIELD > <https://docs.djangoproject.com/en/3.2/ref/settings/#std:setting-DEFAULT_AUTO_FIELD> > to AutoField > <https://docs.djangoproject.com/en/3.2/ref/models/fields/#django.db.models.AutoField> > . > > See release notes > <https://docs.djangoproject.com/en/3.2/releases/3.2/#customizing-type-of-auto-created-primary-keys> > for more details. > > #32367 is about inherited PKs, so it's not related with your report. > > Best, > Mariusz > > -- > You received this message because you are subscribed to a topic in the > Google Groups "Django developers (Contributions to Django itself)" group. > To unsubscribe from this topic, visit > https://groups.google.com/d/topic/django-developers/bwP-ft6aXdI/unsubscribe > . > To unsubscribe from this group and all its topics, send an email to > django-developers+unsubscr...@googlegroups.com. > To view this discussion on the web visit > https://groups.google.com/d/msgid/django-developers/475b0c2d-14f8-4a1e-8889-87783557cdc2n%40googlegroups.com > <https://groups.google.com/d/msgid/django-developers/475b0c2d-14f8-4a1e-8889-87783557cdc2n%40googlegroups.com?utm_medium=email&utm_source=footer> > . > -- You received this message because you are subscribed to the Google Groups "Django developers (Contributions to Django itself)" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-developers+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/CAMApSx2poMnBe_MjS%3D6MCMNhaKi4sDKe-2A-x6jfbrizxSUVPw%40mail.gmail.com.