У меня есть код миграции на Django:
Он создает данные в базе данных

```
from django.db import migrations, models
import django.db.models.deletion
from django.contrib.auth import get_user_model
from django.contrib.contenttypes.models import ContentType

from KRSK_WorkSheets import models as krsk_models


User = get_user_model()


COUNTERPARTYS = [
    {
        'counterparty'      : 'Командор-Розница',
        'slug'              : '%D0%9A%D0%BE%D0%BC%D0%B0%D0%BD%D0%B4%D0%BE%D1%80-%D0%A0%D0%BE%D0%B7%D0%BD%D0%B8%D1%86%D0%B0',
        'shop'              : krsk_models.KShop,
        'shop_user'         : krsk_models.KShopUser,
        'worksheets'        : krsk_models.KWorkSheets,
        'timesheets'        : krsk_models.KTimeSheets,
        'export_4_payment'  : krsk_models.KExport4Payment,
        'workers'           : krsk_models.KWorkers,
        'type_of_work'      : krsk_models.KTypeOfWork,
    },
    {
        'counterparty'      : 'Командор-СК',
        'slug'              : '%D0%9A%D0%BE%D0%BC%D0%B0%D0%BD%D0%B4%D0%BE%D1%80-%D0%A1%D0%9A',
        'shop'              : krsk_models.KShop,
        'shop_user'         : krsk_models.KShopUser,
        'worksheets'        : krsk_models.SSWorkSheets,
        'timesheets'        : krsk_models.SSTimeSheets,
        'export_4_payment'  : krsk_models.SSExport4Payment,
        'workers'           : krsk_models.SSWorkers,
        'type_of_work'      : krsk_models.SSTypeOfWork,
    },
    {
        'counterparty'      : 'Разгуляй',
        'slug'              : '%D0%A0%D0%B0%D0%B7%D0%B3%D1%83%D0%BB%D1%8F%D0%B9',
        'shop'              : krsk_models.RazgulayShop,
        'shop_user'         : krsk_models.RazgulayShopUser,
        'worksheets'        : krsk_models.RazgulayWorkSheets,
        'timesheets'        : krsk_models.RazgulayTimeSheets,
        'export_4_payment'  : krsk_models.RazgulayExport4Payment,
        'workers'           : krsk_models.RazgulayWorkers,
        'type_of_work'      : krsk_models.RazgulayTypeOfWork,
    },
    {
        'counterparty'      : 'РОНДО',
        'slug'              : '%D0%A0%D0%9E%D0%9D%D0%94%D0%9E',
        'shop'              : krsk_models.RondoShop,
        'shop_user'         : krsk_models.RondoShopUser,
        'worksheets'        : krsk_models.RondoWorkSheets,
        'timesheets'        : krsk_models.RondoTimeSheets,
        'export_4_payment'  : krsk_models.RondoExport4Payment,
        'workers'           : krsk_models.RondoWorkers,
        'type_of_work'      : krsk_models.RondoTypeOfWork,
    },
]


GROUP_TO_COUNTERPARTY = [
    ['Отдел обслуживания', 'Командор-Розница'],
    ['Служба Контроля', 'Командор-СК'],
    ['Разгуляй', 'Разгуляй'],
    ['РОНДО', 'РОНДО'],
]


def add_counterpartys():
    for c in COUNTERPARTYS:
        print(c)
        krsk_models.Counterparty.objects.create(
            counterparty=c['counterparty'],
            slug=c['slug'],
            export_4_payment=ContentType.objects.get_for_model(c['export_4_payment']),
            shop=ContentType.objects.get_for_model(c['shop']),
            shop_user=ContentType.objects.get_for_model(c['shop_user']),
            timesheets=ContentType.objects.get_for_model(c['timesheets']),
            type_of_work=ContentType.objects.get_for_model(c['type_of_work']),
            workers=ContentType.objects.get_for_model(c['workers']),
            worksheets=ContentType.objects.get_for_model(c['worksheets']),)


def add_counterparty_to_user():
    for pair in GROUP_TO_COUNTERPARTY:
        group_users = User.objects.filter(groups__name=pair[0])
        counterparty = krsk_models.Counterparty.get(counterparty=pair[1])
        for user in group_users:
            user.extendaccount.last_counterparty = counterparty


class Migration(migrations.Migration):

    operations = [
        migrations.CreateModel(
            name='Counterparty',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('counterparty', models.CharField(blank=True, max_length=200, null=True, verbose_name='Название контрагента')),
                ('slug', models.SlugField(default='', max_length=20, unique=True)),
                ('export_4_payment', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='counterparty_export_4_payment_%(app_label)s_%(class)s_related', to='contenttypes.contenttype')),
                ('shop', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='contenttypes.contenttype')),
                ('shop_user', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='counterparty_shop_user_%(app_label)s_%(class)s_related', to='contenttypes.contenttype')),
                ('timesheets', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='counterparty_timesheets_%(app_label)s_%(class)s_related', to='contenttypes.contenttype')),
                ('type_of_work', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='counterparty_type_of_work_%(app_label)s_%(class)s_related', to='contenttypes.contenttype')),
                ('workers', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='counterparty_workers_%(app_label)s_%(class)s_related', to='contenttypes.contenttype')),
                ('worksheets', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='counterparty_worksheets_%(app_label)s_%(class)s_related', to='contenttypes.contenttype')),
            ],
        ),
        migrations.AddField(
            model_name='extendaccount',
            name='last_counterparty',
            field=models.OneToOneField(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='KRSK_WorkSheets.counterparty'),
        ),
        migrations.AddField(
            model_name='filterdata',
            name='counterparty',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='KRSK_WorkSheets.counterparty'),
        ),
        migrations.RunPython(add_counterpartys),
        migrations.RunPython(add_counterparty_to_user),
    ]

```

При запуске я получаю ошибку:
```
django.db.utils.ProgrammingError: ОШИБКА:  столбец "shop_id" в таблице "KRSK_WorkSheets_counterparty" не существует
LINE 1: ...WorkSheets_counterparty" ("counterparty", "slug", "shop_id",...
```