# Generated by Django 3.1.4 on 2020-12-14 14:08

from django.conf import settings
import django.contrib.gis.db.models.fields
from django.db import migrations, models
import django.db.models.deletion


class Migration(migrations.Migration):

    dependencies = [
        ('outdoor', '0002_practice_sitepractice'),
    ]

    operations = [
        migrations.AlterModelOptions(
            name='site',
            options={'ordering': ('name',), 'verbose_name': 'Outdoor site', 'verbose_name_plural': 'Outdoor sites'},
        ),
        migrations.SeparateDatabaseAndState(
            database_operations=[
                migrations.RunSQL('ALTER TABLE "outdoor_site" ALTER COLUMN "geom" TYPE geometry(GeometryCollection,2154) USING ST_ForceCollection(geom);')
            ],
            state_operations=[
                migrations.AlterField(
                    model_name='site',
                    name='geom',
                    field=django.contrib.gis.db.models.fields.GeometryCollectionField(srid=settings.SRID, verbose_name='Location'),
                ),
            ]
        ),
        migrations.AlterField(
            model_name='sitepractice',
            name='site',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='site_practices', to='outdoor.site', verbose_name='Outdoor site'),
        ),
    ]

# Generated by Django 3.1.4 on 2020-12-14 14:08

from django.conf import settings
import django.contrib.gis.db.models.fields
from django.db import migrations, models
import django.db.models.deletion


class Migration(migrations.Migration):

    dependencies = [
        ('outdoor', '0002_practice_sitepractice'),
    ]

    operations = [
        migrations.AlterModelOptions(
            name='site',
            options={'ordering': ('name',), 'verbose_name': 'Outdoor site', 'verbose_name_plural': 'Outdoor sites'},
        ),
        migrations.AlterField(
            model_name='site',
            name='geom',
            field=django.contrib.gis.db.models.fields.GeometryCollectionField(srid=settings.SRID, verbose_name='Location'),
        ),
        migrations.AlterField(
            model_name='sitepractice',
            name='site',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='site_practices', to='outdoor.site', verbose_name='Outdoor site'),
        ),
    ]

--- 
+++ 
@@ -17,10 +17,17 @@
             name='site',
             options={'ordering': ('name',), 'verbose_name': 'Outdoor site', 'verbose_name_plural': 'Outdoor sites'},
         ),
-        migrations.AlterField(
-            model_name='site',
-            name='geom',
-            field=django.contrib.gis.db.models.fields.GeometryCollectionField(srid=settings.SRID, verbose_name='Location'),
+        migrations.SeparateDatabaseAndState(
+            database_operations=[
+                migrations.RunSQL('ALTER TABLE "outdoor_site" ALTER COLUMN "geom" TYPE geometry(GeometryCollection,2154) USING ST_ForceCollection(geom);')
+            ],
+            state_operations=[
+                migrations.AlterField(
+                    model_name='site',
+                    name='geom',
+                    field=django.contrib.gis.db.models.fields.GeometryCollectionField(srid=settings.SRID, verbose_name='Location'),
+                ),
+            ]
         ),
         migrations.AlterField(
             model_name='sitepractice',
Fix migration Site geom to GeometryCollection
