Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
D
django
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
Batuhan Osman TASKAYA
django
Commits
f8b98f0e
Kaydet (Commit)
f8b98f0e
authored
Mar 16, 2018
tarafından
Tim Graham
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Removed DatabaseFeatures.can_introspect_null.
The only known usage is in the unmaintained django-pymssql project.
üst
362813d6
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
2 additions
and
13 deletions
+2
-13
features.py
django/db/backends/base/features.py
+1
-8
tests.py
tests/inspectdb/tests.py
+1
-4
tests.py
tests/introspection/tests.py
+0
-1
No files found.
django/db/backends/base/features.py
Dosyayı görüntüle @
f8b98f0e
...
...
@@ -109,13 +109,6 @@ class BaseDatabaseFeatures:
# Does the backend reset sequences between tests?
supports_sequence_reset
=
True
# Can the backend determine reliably if a field is nullable?
# Note that this is separate from interprets_empty_strings_as_nulls,
# although the latter feature, when true, interferes with correct
# setting (and introspection) of CharFields' nullability.
# This is True for all core backends.
can_introspect_null
=
True
# Can the backend introspect the default value of a column?
can_introspect_default
=
True
...
...
@@ -286,6 +279,6 @@ class BaseDatabaseFeatures:
introspection results; it should provide expectations, not run an
introspection itself.
"""
if
self
.
can_introspect_null
and
field
and
field
.
null
:
if
field
and
field
.
null
:
return
'NullBooleanField'
return
'BooleanField'
tests/inspectdb/tests.py
Dosyayı görüntüle @
f8b98f0e
...
...
@@ -104,10 +104,7 @@ class InspectDBTestCase(TestCase):
if
'BooleanField'
in
null_bool_field_type
:
assertFieldType
(
'null_bool_field'
,
"models.{}()"
.
format
(
null_bool_field_type
))
else
:
if
connection
.
features
.
can_introspect_null
:
assertFieldType
(
'null_bool_field'
,
"models.{}(blank=True, null=True)"
.
format
(
null_bool_field_type
))
else
:
assertFieldType
(
'null_bool_field'
,
"models.{}()"
.
format
(
null_bool_field_type
))
assertFieldType
(
'null_bool_field'
,
"models.{}(blank=True, null=True)"
.
format
(
null_bool_field_type
))
if
connection
.
features
.
can_introspect_decimal_field
:
assertFieldType
(
'decimal_field'
,
"models.DecimalField(max_digits=6, decimal_places=1)"
)
...
...
tests/introspection/tests.py
Dosyayı görüntüle @
f8b98f0e
...
...
@@ -92,7 +92,6 @@ class IntrospectionTests(TransactionTestCase):
[
30
,
30
,
254
]
)
@skipUnlessDBFeature
(
'can_introspect_null'
)
def
test_get_table_description_nullable
(
self
):
with
connection
.
cursor
()
as
cursor
:
desc
=
connection
.
introspection
.
get_table_description
(
cursor
,
Reporter
.
_meta
.
db_table
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment