      compiler_module = "django.db.backends.mysql.compiler"
  
      # MySQL stores positive fields as UNSIGNED ints.
      integer_field_ranges = dict(BaseDatabaseOperations.integer_field_ranges,
          PositiveSmallIntegerField=(0, 4294967295),
          PositiveIntegerField=(0, 18446744073709551615),
      )
  
      def date_extract_sql(self, lookup_type, field_name):
          # http://dev.mysql.com/doc/mysql/en/date-and-time-functions.html
          if lookup_type == 'week_day':
 
</s> remove         field = self.model._meta.get_field('value')
        internal_type = field.get_internal_type()
        min_value, max_value = connection.ops.integer_field_range(internal_type)
 </s> add         min_value, max_value = self.backend_range
        PositiveSmallIntegerField=(0, 65535),
        PositiveIntegerField=(0, 4294967295),
      compiler_module = "django.db.backends.mysql.compiler"
  
      # MySQL stores positive fields as UNSIGNED ints.
      integer_field_ranges = dict(BaseDatabaseOperations.integer_field_ranges,
        PositiveSmallIntegerField=(0, 65535),
        PositiveIntegerField=(0, 4294967295),
        PositiveSmallIntegerField=(0, 65535),
        PositiveIntegerField=(0, 4294967295),
      )
  
      def date_extract_sql(self, lookup_type, field_name):
          # http://dev.mysql.com/doc/mysql/en/date-and-time-functions.html
          if lookup_type == 'week_day':
keep keep keep keep replace replace keep keep keep keep keep
 Fixed #25767 -- Fixed data truncation possibility with Positive(Small)IntegerField on MySQL. 
django/db/backends/mysql/operations.py