#34608: Migrations generates code that it can't execute -------------------------------+-------------------------------------- Reporter: Michael | Owner: nobody Type: Uncategorized | Status: closed Component: Migrations | Version: 5.0 Severity: Normal | Resolution: invalid 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 Sarah Boyce):
* resolution: => invalid * status: new => closed Comment: Hi Micheal, thank you for providing more information here. Django does generate migrations that cannot be applied. The generated migration file usually reflects what you have asked Django to do and it can only apply successfully if it is "valid". Here `User` is dependant on `PermissionsMixin` (it is possible that `PermissionsMixin` has some fields defined on it for example) and `PermissionsMixin` is dependant on your locals as this is an output of a function ran at startup. IMO you can simplify your code to have a valid migration generated. If you need any support with your project, please use one of our support channels such as the [https://forum.djangoproject.com/c/users/6 Django forum]. It is recommended to go there first and confirm with others if there is agreement that this is either a bug in Django or something new Django should support. -- Ticket URL: <https://code.djangoproject.com/ticket/34608#comment:7> 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 django-updates+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/django-updates/0107018f4ce9b7be-cef9b5a3-64a7-43ee-8d41-d1fee8f26038-000000%40eu-central-1.amazonses.com.