Refs #12400 -- Added supports_geometry_field_unique_index GIS db feature.

This commit is contained in:
Jani Tiainen 2015-08-19 21:37:31 +03:00 committed by Tim Graham
parent bda408f60b
commit 1b8d7eff3b
3 changed files with 5 additions and 1 deletions

View File

@ -40,6 +40,9 @@ class BaseSpatialFeatures(object):
# Does the database have raster support?
supports_raster = False
# Does the database support a unique index on geometry fields?
supports_geometry_field_unique_index = True
@property
def supports_bbcontains_lookup(self):
return 'bbcontains' in self.connection.ops.gis_operators

View File

@ -6,3 +6,4 @@ from django.db.backends.oracle.features import \
class DatabaseFeatures(BaseSpatialFeatures, OracleDatabaseFeatures):
supports_add_srs_entry = False
supports_geometry_field_introspection = False
supports_geometry_field_unique_index = False

View File

@ -63,7 +63,7 @@ class MultiFields(NamedModel):
class Meta:
unique_together = ('city', 'point')
required_db_features = ['gis_enabled']
required_db_features = ['gis_enabled', 'supports_geometry_field_unique_index']
class Truth(models.Model):