On Fri, Oct 31, 2014 at 6:48 AM, Shai Berger <s...@platonix.com> wrote: > Peter, you said you're "interested in getting database migrations to support > setting database-level default values", but you haven't said why; unless > there's a convincing use-case, I'm going to be -1 on this (per the new rules, > this is no longer a veto, but still).
I am not the original poster, but, FWIW, I too would benefit from this feature. My Django application interacts with an existing Legacy application and database. These two applications share the existing database. Parts of the Legacy application have been ported to Django, other parts haven't. The existing Legacy application and legacy scripts relied on these database defaults to handle some data. I've made an effort to shape the database and Legacy application to the "Django way", but sometimes it is inconvenient given the existing Legacy compatibility. For my particular use case, just handling "primitave" values would be sufficient: True, False, numbers, text. I understand arbitrary Python functions can't be easily represeted by databases in a cross platform way, but that is already beyond the common case. Those functions would need to be implemented by the Legacy application already. As far as I'm concerned, Django's ORM doesn't even need to rely on these defaults when creating objects, but if the migration system _created_ them (and kept them up to date) it would be very helpful to people in my situation. Cheers, Jon -- You received this message because you are subscribed to the Google Groups "Django developers (Contributions to Django itself)" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-developers+unsubscr...@googlegroups.com. To post to this group, send email to django-developers@googlegroups.com. Visit this group at http://groups.google.com/group/django-developers. To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/CADhq2b7wNsZfoY9Gnq2QejigOCCO08uzQtmo7ZK8AX1whHnSRg%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.