# Generated by Django 3.2.15 on 2022-09-29 17:12
import logging

from django.db import migrations, models
import django.db.models.deletion
import django.utils.timezone
import model_utils.fields

from integrated_channels.integrated_channel.management.commands import IntegratedChannelCommandMixin
from integrated_channels.utils import batch_by_pk, generate_formatted_log

LOGGER = logging.getLogger(__name__)


class Migration(migrations.Migration):

    dependencies = [
        ('integrated_channel', '0019_merge_20220928_1842'),
    ]

    operations = [
        migrations.CreateModel(
            name='ApiResponseRecord',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created', model_utils.fields.AutoCreatedField(default=django.utils.timezone.now, editable=False, verbose_name='created')),
                ('modified', model_utils.fields.AutoLastModifiedField(default=django.utils.timezone.now, editable=False, verbose_name='modified')),
                ('status_code', models.PositiveIntegerField(blank=True, help_text='The most recent remote API call response HTTP status code', null=True)),
                ('body', models.TextField(blank=True, help_text='The most recent remote API call response body', null=True)),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.AddField(
            model_name='contentmetadataitemtransmission',
            name='api_record',
            field=models.OneToOneField(blank=True, help_text='Data pertaining to the transmissions API request response.', null=True, on_delete=django.db.models.deletion.CASCADE, to='integrated_channel.apiresponserecord'),
        ),
        migrations.AddField(
            model_name='genericlearnerdatatransmissionaudit',
            name='api_record',
            field=models.OneToOneField(blank=True, help_text='Data pertaining to the transmissions API request response.', null=True, on_delete=django.db.models.deletion.CASCADE, to='integrated_channel.apiresponserecord'),
        ),
    ]
