Fixed #34370 -- Added integer fields validation as 64-bit on SQLite.
This commit is contained in:
parent
2396933ca9
commit
32d4b61c31
@ -382,8 +382,15 @@ class DatabaseOperations(BaseDatabaseOperations):
|
|||||||
return "django_format_dtdelta(%s)" % ", ".join(fn_params)
|
return "django_format_dtdelta(%s)" % ", ".join(fn_params)
|
||||||
|
|
||||||
def integer_field_range(self, internal_type):
|
def integer_field_range(self, internal_type):
|
||||||
# SQLite doesn't enforce any integer constraints
|
# SQLite doesn't enforce any integer constraints, but sqlite3 supports
|
||||||
return (None, None)
|
# integers up to 64 bits.
|
||||||
|
if internal_type in [
|
||||||
|
"PositiveBigIntegerField",
|
||||||
|
"PositiveIntegerField",
|
||||||
|
"PositiveSmallIntegerField",
|
||||||
|
]:
|
||||||
|
return (0, 9223372036854775807)
|
||||||
|
return (-9223372036854775808, 9223372036854775807)
|
||||||
|
|
||||||
def subtract_temporals(self, internal_type, lhs, rhs):
|
def subtract_temporals(self, internal_type, lhs, rhs):
|
||||||
lhs_sql, lhs_params = lhs
|
lhs_sql, lhs_params = lhs
|
||||||
|
@ -279,6 +279,9 @@ Miscellaneous
|
|||||||
|
|
||||||
* The undocumented ``django.contrib.admin.helpers.checkbox`` is removed.
|
* The undocumented ``django.contrib.admin.helpers.checkbox`` is removed.
|
||||||
|
|
||||||
|
* Integer fields are now validated as 64-bit integers on SQLite to match the
|
||||||
|
behavior of ``sqlite3``.
|
||||||
|
|
||||||
.. _deprecated-features-5.0:
|
.. _deprecated-features-5.0:
|
||||||
|
|
||||||
Features deprecated in 5.0
|
Features deprecated in 5.0
|
||||||
|
Loading…
x
Reference in New Issue
Block a user