# -*- coding: utf-8 -*-
# Generated by Django 1.11.12 on 2018-04-27 21:34
from __future__ import absolute_import
from __future__ import unicode_literals

from django.db import migrations, models
import jsonfield.fields


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    state_operations = [
        migrations.CreateModel(
            name='RequestLog',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('domain', models.CharField(db_index=True, max_length=126)),
                ('timestamp', models.DateTimeField(auto_now_add=True)),
                ('log_level', models.IntegerField(null=True)),
                ('request_method', models.CharField(max_length=12)),
                ('request_url', models.CharField(max_length=255)),
                ('request_headers', jsonfield.fields.JSONField(blank=True)),
                ('request_params', jsonfield.fields.JSONField(blank=True)),
                ('request_body', jsonfield.fields.JSONField(blank=True, null=True)),
                ('request_error', models.TextField(null=True)),
                ('response_status', models.IntegerField(null=True)),
                ('response_body', models.TextField(blank=True, null=True)),
            ],
            options={
                'db_table': 'dhis2_jsonapilog',
            },
        ),
    ]

    operations = [
        migrations.SeparateDatabaseAndState(state_operations=state_operations)
    ]

# -*- coding: utf-8 -*-
# Generated by Django 1.11.12 on 2018-04-27 21:34
from __future__ import absolute_import
from __future__ import unicode_literals

from django.db import migrations, models
import jsonfield.fields


class Migration(migrations.Migration):

    dependencies = [
        ('dhis2', '0004_auto_20171122_0827'),
    ]

    state_operations = [
        migrations.CreateModel(
            name='RequestLog',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('domain', models.CharField(db_index=True, max_length=126)),
                ('timestamp', models.DateTimeField(auto_now_add=True)),
                ('log_level', models.IntegerField(null=True)),
                ('request_method', models.CharField(max_length=12)),
                ('request_url', models.CharField(max_length=255)),
                ('request_headers', jsonfield.fields.JSONField(blank=True)),
                ('request_params', jsonfield.fields.JSONField(blank=True)),
                ('request_body', jsonfield.fields.JSONField(blank=True, null=True)),
                ('request_error', models.TextField(null=True)),
                ('response_status', models.IntegerField(null=True)),
                ('response_body', models.TextField(blank=True, null=True)),
            ],
            options={
                'db_table': 'dhis2_jsonapilog',
            },
        ),
    ]

    operations = [
        migrations.SeparateDatabaseAndState(state_operations=state_operations)
    ]

Set migration dependency