#32742: Running migrations when updating default_auto_field only updates primary
key.
----------------------------+--------------------------------------
Reporter: greemo | Owner: nobody
Type: Bug | Status: closed
Component: Migrations | Version: 3.2
Severity: Normal | Resolution: needsinfo
Keywords: | Triage Stage: Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
----------------------------+--------------------------------------
Changes (by Mariusz Felisiak):
* status: new => closed
* resolution: => needsinfo
Comment:
Replying to [comment:3 Dan Dyer]:
> I've just encountered the same error migrating a project from Django
2.2.24 to 3.2.7. I am not using django-polymorphic. In my case the foreign
key that was causing the problem was a reference back to the same model
(e.g. {{{ parent = models.ForeignKey('self')}}}).
>
> I am using MySQL.
> I had set {{{ DEFAULT_AUTO_FIELD = 'django.db.models.BigAutoField'}}} in
{{{ settings.py }}}
> The migration failed with a warning about truncation.
>
> I just switched to using {{{AutoField}}} since my existing columns were
that size already, but there does appear to be a problem to be fixed.
Thanks, however it seems to be a different issue. The original report
doesn't mention `ForeignKey('self')`, uses `django-polymorphic`, and
describes an error not warning. Please open a separate ticket with a
sample project to reproduce or a minimal set of models.
--
Ticket URL: <https://code.djangoproject.com/ticket/32742#comment:4>
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/064.e241d86d6f00451db8b7a1429421f5d7%40djangoproject.com.