#22983: Invalid import in a squashed migration of migrations having RunPython
-------------------------------+--------------------
Reporter: riklaunim | Owner: nobody
Type: Uncategorized | Status: new
Component: Migrations | Version: 1.6
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------+--------------------
I've squashed migrations in one of my apps and I've noticed that every
migration that had a custom function on RunPython resulted in an invalid
import in the squashed migration like:
{{{
import my_app.migrations.0010_clean_propertyindex
}}}
and then it tries to use it:
{{{
migrations.RunPython(
code=my_app.migrations.0010_clean_propertyindex.delete_indexes,
reverse_code=None,
atomic=True,
),
}}}
It's either a bug or all functions should not be in a file that starts
with a digit. Either way squash should fail if it would have to make such
import.
--
Ticket URL: <https://code.djangoproject.com/ticket/22983>
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 post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/052.917de3046968b44eba3860cc7d7d6246%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.