diff options
Diffstat (limited to 'tests/postgres_tests/models.py')
| -rw-r--r-- | tests/postgres_tests/models.py | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/postgres_tests/models.py b/tests/postgres_tests/models.py index 329a91c951..bef77b7b21 100644 --- a/tests/postgres_tests/models.py +++ b/tests/postgres_tests/models.py @@ -60,11 +60,23 @@ if connection.vendor == 'postgresql' and connection.pg_version >= 90200: floats = FloatRangeField(blank=True, null=True) timestamps = DateTimeRangeField(blank=True, null=True) dates = DateRangeField(blank=True, null=True) + + class RangeLookupsModel(PostgreSQLModel): + parent = models.ForeignKey(RangesModel, blank=True, null=True) + integer = models.IntegerField(blank=True, null=True) + big_integer = models.BigIntegerField(blank=True, null=True) + float = models.FloatField(blank=True, null=True) + timestamp = models.DateTimeField(blank=True, null=True) + date = models.DateField(blank=True, null=True) + else: # create an object with this name so we don't have failing imports class RangesModel(object): pass + class RangeLookupsModel(object): + pass + # Only create this model for postgres >= 9.4 if connection.vendor == 'postgresql' and connection.pg_version >= 90400: |
