summaryrefslogtreecommitdiff
path: root/tests/postgres_tests/models.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/postgres_tests/models.py')
-rw-r--r--tests/postgres_tests/models.py18
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/postgres_tests/models.py b/tests/postgres_tests/models.py
index f698d56a58..b53eda4cca 100644
--- a/tests/postgres_tests/models.py
+++ b/tests/postgres_tests/models.py
@@ -62,3 +62,21 @@ else:
class ArrayFieldSubclass(ArrayField):
def __init__(self, *args, **kwargs):
super(ArrayFieldSubclass, self).__init__(models.IntegerField())
+
+
+class AggregateTestModel(models.Model):
+ """
+ To test postgres-specific general aggregation functions
+ """
+ char_field = models.CharField(max_length=30, blank=True)
+ integer_field = models.IntegerField(null=True)
+ boolean_field = models.NullBooleanField()
+
+
+class StatTestModel(models.Model):
+ """
+ To test postgres-specific aggregation functions for statistics
+ """
+ int1 = models.IntegerField()
+ int2 = models.IntegerField()
+ related_field = models.ForeignKey(AggregateTestModel, null=True)