#33710: RenameIndex() crashes when unnamed index is moving backward and forward.
-------------------------------------+-------------------------------------
Reporter: Mariusz Felisiak | Owner: David
| Wobrock
Type: Bug | Status: assigned
Component: Migrations | Version: dev
Severity: Release blocker | 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 Mariusz Felisiak):
Replying to [comment:1 David Wobrock]:
> I understand the issue that arises when one reverses a `RenameIndex`,
but it was made "on purpose" somehow.
> In https://code.djangoproject.com/ticket/27064,
> > For backwards operations with unnamed old indexes, RenameIndex is a
noop.
>
> From my understanding, when an unnamed index becomes "named", the idea
was that it remained "named" even when reversing the operation.
Yes, sorry, I should predict that this is going to cause naming issues.
> I guess the implementation is not entirely correct, since it doesn't
allow idempotency of the operation when applying/un-applying it.
>
> I'll try to find a fix
We should be able to find the old name with
`SchemaEditor._create_index_name()`.
--
Ticket URL: <https://code.djangoproject.com/ticket/33710#comment:2>
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/01070180cbde24b5-f6287607-a60a-4a60-86f7-fd4289d77b05-000000%40eu-central-1.amazonses.com.