From cfc7cd6513a72b8c5898c264d04bdf49f897a1de Mon Sep 17 00:00:00 2001 From: David-Wobrock Date: Fri, 23 Oct 2020 23:56:12 +0200 Subject: Fixed #32132 -- Fixed column types in m2m intermediary tables for Positive(Big/Small)IntegerFields. --- tests/model_fields/test_integerfield.py | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'tests/model_fields') diff --git a/tests/model_fields/test_integerfield.py b/tests/model_fields/test_integerfield.py index bc370f18e2..13b18d967c 100644 --- a/tests/model_fields/test_integerfield.py +++ b/tests/model_fields/test_integerfield.py @@ -176,6 +176,11 @@ class BigIntegerFieldTests(IntegerFieldTests): class PositiveSmallIntegerFieldTests(IntegerFieldTests): model = PositiveSmallIntegerModel documented_range = (0, 32767) + rel_db_type_class = ( + models.PositiveSmallIntegerField + if connection.features.related_fields_match_type + else models.SmallIntegerField + ) class PositiveIntegerFieldTests(IntegerFieldTests): @@ -198,6 +203,11 @@ class PositiveIntegerFieldTests(IntegerFieldTests): class PositiveBigIntegerFieldTests(IntegerFieldTests): model = PositiveBigIntegerModel documented_range = (0, 9223372036854775807) + rel_db_type_class = ( + models.PositiveBigIntegerField + if connection.features.related_fields_match_type + else models.BigIntegerField + ) class ValidationTests(SimpleTestCase): -- cgit v1.3