<NME> 0008_localconfig.py
<BEF> # Generated by Django 1.9.5 on 2016-06-15 18:12
from django.db import migrations, models
import django.db.models.deletion
import jsonfield.fields


import jsonfield.fields


def create_local_config(apps, schema_editor):
    """Create local config entry."""
    Site = apps.get_model("sites", "Site")
    LocalConfig = apps.get_model("core", "LocalConfig")
    LocalConfig.objects.create(site=Site.objects.get_current())


class Migration(migrations.Migration):

    dependencies = [

    operations = [
        migrations.CreateModel(
            name='LocalConfig',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('api_pk', models.PositiveIntegerField(null=True)),
                ('api_versions', jsonfield.fields.JSONField()),
                ('site', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='sites.Site')),
            ],
        ),
                ('site', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='sites.Site')),
            ],
        ),
        migrations.RunPython(create_local_config),
    ]

<MSG> Move local config creation.

see #890

<DFF> @@ -7,13 +7,6 @@ import django.db.models.deletion
 import jsonfield.fields
 
 
-def create_local_config(apps, schema_editor):
-    """Create local config entry."""
-    Site = apps.get_model("sites", "Site")
-    LocalConfig = apps.get_model("core", "LocalConfig")
-    LocalConfig.objects.create(site=Site.objects.get_current())
-
-
 class Migration(migrations.Migration):
 
     dependencies = [
@@ -31,5 +24,4 @@ class Migration(migrations.Migration):
                 ('site', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='sites.Site')),
             ],
         ),
-        migrations.RunPython(create_local_config),
     ]

Move local config creation.