Fixed #29876 -- MySQL does not support SPATIAL fields in unique indices.

This commit is contained in:
Florian Apolloner 2018-10-22 13:36:48 +02:00
parent c53af56613
commit 4269648c0f
1 changed files with 5 additions and 0 deletions

View File

@ -19,3 +19,8 @@ class DatabaseFeatures(BaseSpatialFeatures, MySQLDatabaseFeatures):
@cached_property
def supports_empty_geometry_collection(self):
return self.connection.mysql_version >= (5, 7, 5)
@cached_property
def supports_geometry_field_unique_index(self):
# Not supported in MySQL since https://dev.mysql.com/worklog/task/?id=11808
return self.connection.mysql_is_mariadb