mirror of https://github.com/django/django.git
Fixed some queries tests when primary key values are large.
On CockroachDB, primary key values stored in these fields are larger than they accept. Fixes: queries.test_bulk_update.BulkUpdateNoteTests.test_multiple_fields, queries.test_bulk_update.BulkUpdateNoteTests.test_inherited_fields, and queries.tests.RelatedLookupTypeTests.test_values_queryset_lookup.
This commit is contained in:
parent
73be11a266
commit
49ece89702
|
@ -40,7 +40,7 @@ class Tag(models.Model):
|
||||||
|
|
||||||
class Note(models.Model):
|
class Note(models.Model):
|
||||||
note = models.CharField(max_length=100)
|
note = models.CharField(max_length=100)
|
||||||
misc = models.CharField(max_length=10)
|
misc = models.CharField(max_length=25)
|
||||||
tag = models.ForeignKey(Tag, models.SET_NULL, blank=True, null=True)
|
tag = models.ForeignKey(Tag, models.SET_NULL, blank=True, null=True)
|
||||||
negate = models.BooleanField(default=True)
|
negate = models.BooleanField(default=True)
|
||||||
|
|
||||||
|
@ -408,7 +408,7 @@ class ChildObjectA(ObjectA):
|
||||||
class ObjectB(models.Model):
|
class ObjectB(models.Model):
|
||||||
name = models.CharField(max_length=50)
|
name = models.CharField(max_length=50)
|
||||||
objecta = models.ForeignKey(ObjectA, models.CASCADE)
|
objecta = models.ForeignKey(ObjectA, models.CASCADE)
|
||||||
num = models.PositiveSmallIntegerField()
|
num = models.PositiveIntegerField()
|
||||||
|
|
||||||
def __str__(self):
|
def __str__(self):
|
||||||
return self.name
|
return self.name
|
||||||
|
@ -430,14 +430,14 @@ class ObjectC(models.Model):
|
||||||
|
|
||||||
|
|
||||||
class SimpleCategory(models.Model):
|
class SimpleCategory(models.Model):
|
||||||
name = models.CharField(max_length=15)
|
name = models.CharField(max_length=25)
|
||||||
|
|
||||||
def __str__(self):
|
def __str__(self):
|
||||||
return self.name
|
return self.name
|
||||||
|
|
||||||
|
|
||||||
class SpecialCategory(SimpleCategory):
|
class SpecialCategory(SimpleCategory):
|
||||||
special_name = models.CharField(max_length=15)
|
special_name = models.CharField(max_length=35)
|
||||||
|
|
||||||
def __str__(self):
|
def __str__(self):
|
||||||
return self.name + " " + self.special_name
|
return self.name + " " + self.special_name
|
||||||
|
|
Loading…
Reference in New Issue