Kaydet (Commit) 19d8f2eb authored tarafından Claude Paroz's avatar Claude Paroz

Adapted SpatialiteGeometryColumns model to spatialite >= 4

See also:
https://www.gaia-gis.it/fossil/libspatialite/wiki?name=switching-to-4.0
üst 731f313d
...@@ -13,7 +13,10 @@ class SpatialiteGeometryColumns(models.Model): ...@@ -13,7 +13,10 @@ class SpatialiteGeometryColumns(models.Model):
""" """
f_table_name = models.CharField(max_length=256) f_table_name = models.CharField(max_length=256)
f_geometry_column = 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() coord_dimension = models.IntegerField()
srid = models.IntegerField(primary_key=True) srid = models.IntegerField(primary_key=True)
spatial_index_enabled = models.IntegerField() spatial_index_enabled = models.IntegerField()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment