mirror of https://github.com/django/django.git
Fixed PostGIS remove_field implementation
Fixed bad code introduced in 2f9d1576e8
.
This commit is contained in:
parent
2f9d1576e8
commit
1667e736a7
|
@ -92,9 +92,9 @@ class PostGISSchemaEditor(DatabaseSchemaEditor):
|
|||
|
||||
def remove_field(self, model, field):
|
||||
from django.contrib.gis.db.models.fields import GeometryField
|
||||
if not isinstance(field, GeometryField) or self.connection.ops.spatial_version < (2, 0):
|
||||
if not isinstance(field, GeometryField) or self.connection.ops.spatial_version > (2, 0):
|
||||
super(PostGISSchemaEditor, self).remove_field(model, field)
|
||||
|
||||
else:
|
||||
self.execute(
|
||||
self.sql_drop_geometry_column % {
|
||||
"table": self.geo_quote_name(model._meta.db_table),
|
||||
|
|
Loading…
Reference in New Issue