mirror of https://github.com/django/django.git
Fixed #1819 -- inspectdb no longer puts null=True for TextField and CharField. Thanks, mir@noris.de
git-svn-id: http://code.djangoproject.com/svn/django/trunk@2872 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
6341b43dfb
commit
c63372f3c4
|
@ -760,7 +760,7 @@ def inspectdb():
|
||||||
# table description.
|
# table description.
|
||||||
if row[6]: # If it's NULL...
|
if row[6]: # If it's NULL...
|
||||||
extra_params['blank'] = True
|
extra_params['blank'] = True
|
||||||
if not field_type in ('TextField', 'CharField'):
|
if not field_type in ('TextField(', 'CharField('):
|
||||||
extra_params['null'] = True
|
extra_params['null'] = True
|
||||||
|
|
||||||
field_desc = '%s = models.%s' % (att_name, field_type)
|
field_desc = '%s = models.%s' % (att_name, field_type)
|
||||||
|
|
Loading…
Reference in New Issue