#23581: Migration shouldn't generate "DROP DEFAULT" SQL if no database changes are required --------------------------------------+------------------------------------ Reporter: john_scott | Owner: nobody Type: Cleanup/optimization | Status: new Component: Migrations | Version: 1.7 Severity: Normal | Resolution: Keywords: | Triage Stage: Accepted Has patch: 0 | Needs documentation: 0 Needs tests: 0 | Patch needs improvement: 0 Easy pickings: 0 | UI/UX: 0 --------------------------------------+------------------------------------
Comment (by andrewgodwin): I agree it's a pain but there's not much of a way round this; the alternative is to then break fields inside data migrations, at which point someone else will come and tell me how much of a pain it is. If choices is genuinely not important to ANYTHING, then they should just use a custom field subclass that omits it from the deconstruct response (deconstruct is an official API now and everything). It's not that django-cms did anything wrong, it's just that we had to tighten up a few previously-loose things to get migrations working properly. South had these same issues, it's just that it decided to abandon choices completely (which itself caused a few bugs where people got angry as they were using choices to populate database columns and stuff). There's no "core developer approved" method of how to do this stuff; we're not all-powerful or all-knowledgeable, and I personally at least have not run into this case (this is why we had such a long alpha and beta period to get feedback, and changed quite a lot of stuff during it). I can give suggestions, but ultimately it's up to the community to work out good solutions and/or write code to support them. If you want to revert to the old South way of always throwing away choices, that's just a small patch to django-cms away. -- Ticket URL: <https://code.djangoproject.com/ticket/23581#comment:15> 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 post to this group, send email to django-updates@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/django-updates/068.99c3209adaa426510405faa16cc5ac2e%40djangoproject.com. For more options, visit https://groups.google.com/d/optout.