# Generated by Django 2.1.5 on 2019-04-05 10:48

import django.db.models.deletion
from django.conf import settings
from django.db import migrations, models


class Migration(migrations.Migration):

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
        ('pretixbase', '0116_auto_20190402_0722'),
        ('pretixapi', '0003_webhook_webhookcall_webhookeventlistener'),
    ]

    operations = [
        migrations.CreateModel(
            name='ApiCall',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('idempotency_key', models.CharField(db_index=True, max_length=190)),
                ('auth_hash', models.CharField(db_index=True, max_length=190)),
                ('created', models.DateTimeField(auto_now_add=True)),
                ('locked', models.DateTimeField(null=True)),
                ('request_method', models.CharField(max_length=20)),
                ('request_path', models.CharField(max_length=255)),
                ('response_code', models.PositiveIntegerField()),
                ('response_headers', models.TextField()),
                ('response_body', models.BinaryField()),
            ],
        ),
        migrations.AlterModelOptions(
            name='webhookcall',
            options={'ordering': ('-datetime',)},
        ),
        migrations.AlterModelOptions(
            name='webhookeventlistener',
            options={'ordering': ('action_type',)},
        ),
        migrations.AlterUniqueTogether(
            name='apicall',
            unique_together={('idempotency_key', 'auth_hash')},
        ),
    ]
