mirror of
https://github.com/django/django.git
synced 2025-10-24 14:16:09 +00:00
Fixed #14286 -- Added models.BigAutoField.
This commit is contained in:
committed by
Tim Graham
parent
a1d0c60fa0
commit
2a7ce34600
@@ -6,7 +6,7 @@ from django.db import connection
|
||||
from django.db.utils import DatabaseError
|
||||
from django.test import TransactionTestCase, mock, skipUnlessDBFeature
|
||||
|
||||
from .models import Article, Reporter
|
||||
from .models import Article, City, Reporter
|
||||
|
||||
|
||||
class IntrospectionTests(TransactionTestCase):
|
||||
@@ -103,6 +103,12 @@ class IntrospectionTests(TransactionTestCase):
|
||||
[False, nullable_by_backend, nullable_by_backend, nullable_by_backend, True, True, False]
|
||||
)
|
||||
|
||||
@skipUnlessDBFeature('can_introspect_autofield')
|
||||
def test_bigautofield(self):
|
||||
with connection.cursor() as cursor:
|
||||
desc = connection.introspection.get_table_description(cursor, City._meta.db_table)
|
||||
self.assertIn('BigAutoField', [datatype(r[1], r) for r in desc])
|
||||
|
||||
# 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