Skip to content

Commit

Permalink
Adapted SpatialiteGeometryColumns model to spatialite >= 4
Browse files Browse the repository at this point in the history
  • Loading branch information
claudep committed Jul 23, 2014
1 parent 731f313 commit 19d8f2e
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion django/contrib/gis/db/backends/spatialite/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,10 @@ class SpatialiteGeometryColumns(models.Model):
"""
f_table_name = models.CharField(max_length=256)
f_geometry_column = models.CharField(max_length=256)
type = models.CharField(max_length=30)
if connection.ops.spatial_version[0] >= 4:
type = models.IntegerField(db_column='geometry_type')
else:
type = models.CharField(max_length=30)
coord_dimension = models.IntegerField()
srid = models.IntegerField(primary_key=True)
spatial_index_enabled = models.IntegerField()
Expand Down

0 comments on commit 19d8f2e

Please sign in to comment.