diff --git a/django/contrib/gis/db/backends/postgis/models.py b/django/contrib/gis/db/backends/postgis/models.py index 84ead6807c..ddb3be1e5e 100644 --- a/django/contrib/gis/db/backends/postgis/models.py +++ b/django/contrib/gis/db/backends/postgis/models.py @@ -9,9 +9,8 @@ from django.utils.encoding import python_2_unicode_compatible @python_2_unicode_compatible class PostGISGeometryColumns(models.Model): """ - The 'geometry_columns' table from the PostGIS. See the PostGIS + The 'geometry_columns' view from PostGIS. See the PostGIS documentation at Ch. 4.3.2. - On PostGIS 2, this is a view. """ f_table_catalog = models.CharField(max_length=256) f_table_schema = models.CharField(max_length=256) diff --git a/django/contrib/gis/db/backends/postgis/schema.py b/django/contrib/gis/db/backends/postgis/schema.py index 8b4444b213..c75b65c5f0 100644 --- a/django/contrib/gis/db/backends/postgis/schema.py +++ b/django/contrib/gis/db/backends/postgis/schema.py @@ -7,7 +7,6 @@ class PostGISSchemaEditor(DatabaseSchemaEditor): rast_index_wrapper = 'ST_ConvexHull(%s)' sql_add_spatial_index = "CREATE INDEX %(index)s ON %(table)s USING %(index_type)s (%(column)s %(ops)s)" - sql_clear_geometry_columns = "DELETE FROM geometry_columns WHERE f_table_name = %(table)s" def __init__(self, *args, **kwargs): super(PostGISSchemaEditor, self).__init__(*args, **kwargs) @@ -59,12 +58,6 @@ class PostGISSchemaEditor(DatabaseSchemaEditor): self.execute(sql) self.geometry_sql = [] - def delete_model(self, model): - super(PostGISSchemaEditor, self).delete_model(model) - self.execute(self.sql_clear_geometry_columns % { - "table": self.geo_quote_name(model._meta.db_table), - }) - def add_field(self, model, field): super(PostGISSchemaEditor, self).add_field(model, field) # Create geometry columns