Refs #12400 -- Added supports_geometry_field_unique_index GIS db feature.
This commit is contained in:
parent
bda408f60b
commit
1b8d7eff3b
|
@ -40,6 +40,9 @@ class BaseSpatialFeatures(object):
|
||||||
# Does the database have raster support?
|
# Does the database have raster support?
|
||||||
supports_raster = False
|
supports_raster = False
|
||||||
|
|
||||||
|
# Does the database support a unique index on geometry fields?
|
||||||
|
supports_geometry_field_unique_index = True
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def supports_bbcontains_lookup(self):
|
def supports_bbcontains_lookup(self):
|
||||||
return 'bbcontains' in self.connection.ops.gis_operators
|
return 'bbcontains' in self.connection.ops.gis_operators
|
||||||
|
|
|
@ -6,3 +6,4 @@ from django.db.backends.oracle.features import \
|
||||||
class DatabaseFeatures(BaseSpatialFeatures, OracleDatabaseFeatures):
|
class DatabaseFeatures(BaseSpatialFeatures, OracleDatabaseFeatures):
|
||||||
supports_add_srs_entry = False
|
supports_add_srs_entry = False
|
||||||
supports_geometry_field_introspection = False
|
supports_geometry_field_introspection = False
|
||||||
|
supports_geometry_field_unique_index = False
|
||||||
|
|
|
@ -63,7 +63,7 @@ class MultiFields(NamedModel):
|
||||||
|
|
||||||
class Meta:
|
class Meta:
|
||||||
unique_together = ('city', 'point')
|
unique_together = ('city', 'point')
|
||||||
required_db_features = ['gis_enabled']
|
required_db_features = ['gis_enabled', 'supports_geometry_field_unique_index']
|
||||||
|
|
||||||
|
|
||||||
class Truth(models.Model):
|
class Truth(models.Model):
|
||||||
|
|
Loading…
Reference in New Issue