mirror of
https://github.com/django/django.git
synced 2025-10-24 14:16:09 +00:00
Fixed #7783 -- Made introspection of nullable columns more robust with Postgres.
Thanks bthomas AT ncorcle DOT com for the report and initial patch, and Claude Paroz for the final, complete patch. git-svn-id: http://code.djangoproject.com/svn/django/trunk@17508 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
@@ -78,6 +78,14 @@ class IntrospectionTests(TestCase):
|
||||
['IntegerField', 'CharField', 'CharField', 'CharField', 'BigIntegerField']
|
||||
)
|
||||
|
||||
def test_get_table_description_nullable(self):
|
||||
cursor = connection.cursor()
|
||||
desc = connection.introspection.get_table_description(cursor, Reporter._meta.db_table)
|
||||
self.assertEqual(
|
||||
[r[6] for r in desc],
|
||||
[False, False, False, False, True]
|
||||
)
|
||||
|
||||
# Regression test for #9991 - 'real' types in postgres
|
||||
@skipUnlessDBFeature('has_real_datatype')
|
||||
def test_postgresql_real_type(self):
|
||||
|
||||
Reference in New Issue
Block a user