Re: [Django] #34546: Failed migration yields to unmigratable app: "OperationalError: (1050, "Table '<name>' already exists")"

19 views
Skip to first unread message

Django

unread,
May 8, 2023, 1:31:00 PM5/8/23
to django-...@googlegroups.com
#34546: Failed migration yields to unmigratable app: "OperationalError: (1050,
"Table '<name>' already exists")"
--------------------------------+--------------------------------------
Reporter: Natalia Bidart | Owner: nobody
Type: Bug | Status: new
Component: Migrations | Version: 4.2
Severity: Normal | Resolution:
Keywords: | Triage Stage: Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
--------------------------------+--------------------------------------

Comment (by Simon Charette):

I'm afraid there's little that can be done here on MySQL which doesn't
support transactional DDL.

If you have a migration with multiple operations and one of them happen to
fail Django has no way to know which operations are applied and which
aren't so re-running the migration requires attempting the whole sequence
of operations again.

[https://docs.djangoproject.com/en/4.2/topics/migrations/#mysql This is a
documented] limitation of MySQL.

--
Ticket URL: <https://code.djangoproject.com/ticket/34546#comment:2>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Reply all
Reply to author
Forward
0 new messages