1
0
mirror of https://github.com/django/django.git synced 2025-10-31 09:41:08 +00:00

[1.9.x] Fixed #25767 -- Fixed data truncation possibility with Positive(Small)IntegerField on MySQL.

Backport of 710e11d076 from master
This commit is contained in:
George Marshall
2015-11-16 22:28:03 -08:00
committed by Tim Graham
parent 7fccc6e8fa
commit 11d54e8f0d
3 changed files with 36 additions and 5 deletions

View File

@@ -13,8 +13,8 @@ class DatabaseOperations(BaseDatabaseOperations):
# MySQL stores positive fields as UNSIGNED ints.
integer_field_ranges = dict(BaseDatabaseOperations.integer_field_ranges,
PositiveSmallIntegerField=(0, 4294967295),
PositiveIntegerField=(0, 18446744073709551615),
PositiveSmallIntegerField=(0, 65535),
PositiveIntegerField=(0, 4294967295),
)
def date_extract_sql(self, lookup_type, field_name):