def add_spatial_version_related_fields(sender, **kwargs):
    if connection_created.disconnect(add_spatial_version_related_fields, sender=DatabaseWrapper):
        spatial_version = connection.ops.spatial_version[0]
        if spatial_version >= 4:
            SpatialiteSpatialRefSys.add_to_class('srtext', models.CharField(max_length=2048))
            SpatialiteGeometryColumns.add_to_class('type', models.IntegerField(db_column='geometry_type'))
        else:
            SpatialiteGeometryColumns.add_to_class('type', models.CharField(max_length=30))
#13794 --- An inline model with a to_field to a related field of a
dataset/ETHPy150Open django/django/django/contrib/gis/db/backends/spatialite/models.py/add_spatial_version_related_fields--crossover with--dataset/ETHPy150Open cloudera/hue/desktop/core/ext-py/Django-1.6.10/tests/model_formsets_regress/tests.py/InlineFormsetTests.test_inline_model_with_to_field_to_rel