Re: can_introspect_default feature

2017-04-25 Thread Maximiliano Robaina
Hi Shai, El martes, 25 de abril de 2017, 18:28:57 (UTC-3), Shai Berger escribió: > > Hi Maxi, > > On Tuesday 25 April 2017 20:21:47 Maximiliano Robaina wrote: > > Hi, > > > > Sorry but a need to return to this > > > > El jueves, 20 de octubre de 2016, 9:53:23 (UTC-3), Tim Graham escribió:

Re: can_introspect_default feature

2017-04-25 Thread Shai Berger
Hi Maxi, On Tuesday 25 April 2017 20:21:47 Maximiliano Robaina wrote: > Hi, > > Sorry but a need to return to this > > El jueves, 20 de octubre de 2016, 9:53:23 (UTC-3), Tim Graham escribió: > > The 'default' model field option is used in Python rather than in the > > database. SchemaEditor

Re: can_introspect_default feature

2017-04-25 Thread Maximiliano Robaina
Hi, Sorry but a need to return to this El jueves, 20 de octubre de 2016, 9:53:23 (UTC-3), Tim Graham escribió: > > The 'default' model field option is used in Python rather than in the > database. SchemaEditor might set a column default to ease populating a > value on existing rows but that

Re: can_introspect_default feature

2016-10-25 Thread Tim Graham
It isn't always possible to transform arbitrary Python defaults (particularly callables) into SQL. A search query would help you answer a question like this. I typed "django database column defaults site:code.djangoproject.com" into Google and found https://code.djangoproject.com/ticket/470

Re: can_introspect_default feature

2016-10-25 Thread Chris Foresman
Out of curiosity, why isn't this added as part of the column definition? Isn't it better to enforce the default at the DB layer? Or is it to account for differences across database types? (This trips me up a lot because we have a lot of different apps/processes which have to touch the database

Re: can_introspect_default feature

2016-10-20 Thread Tim Graham
The 'default' model field option is used in Python rather than in the database. SchemaEditor might set a column default to ease populating a value on existing rows but that default shouldn't be left in the column's definition. self.assertIsNone(field.default) means that the column doesn't have

Re: can_introspect_default feature

2016-10-20 Thread Maximiliano Robaina
Hi Tim, Thanks for response. El martes, 18 de octubre de 2016, 12:07:34 (UTC-3), Tim Graham escribió: > > Hi Maxi, > > Did you take a look at the relevant commit that introduced the flag? > > https://github.com/django/django/commit/75303b01a9cc900eebf1f27ba0bc6508334242fc > Yes, I was looking

Re: can_introspect_default feature

2016-10-18 Thread Tim Graham
Hi Maxi, Did you take a look at the relevant commit that introduced the flag? https://github.com/django/django/commit/75303b01a9cc900eebf1f27ba0bc6508334242fc On Tuesday, October 18, 2016 at 9:51:46 AM UTC-4, Maximiliano Robaina wrote: > > Hi, > > How supposed to can_introspect_default must

can_introspect_default feature

2016-10-18 Thread Maximiliano Robaina
Hi, How supposed to can_introspect_default must work? I'm working on django firebird backend and I'm trying to figured out how this feature works, but the schema tests fails. This default is at database level or django level? If I define a field with a default value, and do a metadata