summaryrefslogtreecommitdiff
path: root/django
diff options
context:
space:
mode:
authorTim Graham <timograham@gmail.com>2020-10-19 06:41:52 -0400
committerGitHub <noreply@github.com>2020-10-19 12:41:52 +0200
commit0eee5c1b9c2e306aa2c2807daf146ee88676bc97 (patch)
tree16d3fe42872d0ba4f5bd34f679ba9dee556e2b7f /django
parentc7c7615d005b1454e6958a4ee35a3a976d12319e (diff)
Added DatabaseFeatures.can_alter_geometry_field.
Diffstat (limited to 'django')
-rw-r--r--django/contrib/gis/db/backends/base/features.py3
-rw-r--r--django/contrib/gis/db/backends/spatialite/features.py1
2 files changed, 4 insertions, 0 deletions
diff --git a/django/contrib/gis/db/backends/base/features.py b/django/contrib/gis/db/backends/base/features.py
index 019b118765..ff16701795 100644
--- a/django/contrib/gis/db/backends/base/features.py
+++ b/django/contrib/gis/db/backends/base/features.py
@@ -46,6 +46,9 @@ class BaseSpatialFeatures:
# Does the database support a unique index on geometry fields?
supports_geometry_field_unique_index = True
+ # Can SchemaEditor alter geometry fields?
+ can_alter_geometry_field = True
+
@property
def supports_bbcontains_lookup(self):
return 'bbcontains' in self.connection.ops.gis_operators
diff --git a/django/contrib/gis/db/backends/spatialite/features.py b/django/contrib/gis/db/backends/spatialite/features.py
index d29e7876ae..6e5bd95179 100644
--- a/django/contrib/gis/db/backends/spatialite/features.py
+++ b/django/contrib/gis/db/backends/spatialite/features.py
@@ -6,6 +6,7 @@ from django.utils.functional import cached_property
class DatabaseFeatures(BaseSpatialFeatures, SQLiteDatabaseFeatures):
+ can_alter_geometry_field = False # Not implemented
supports_3d_storage = True
@cached_property