# Generated by Django 2.2 on 2019-04-20 17:58

from django.conf import settings
import django.contrib.postgres.fields.jsonb
from django.db import migrations, models
import django.db.models.deletion


class Migration(migrations.Migration):

    dependencies = [
        ('survey', '0029_auto_20190411_2303'),
    ]

    operations = [
        migrations.CreateModel(
            name='UserHistory',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('date', models.DateTimeField(auto_now_add=True)),
                ('changes', django.contrib.postgres.fields.jsonb.JSONField(default={})),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.AddIndex(
            model_name='userhistory',
            index=models.Index(fields=['user'], name='survey_user_user_id_4e3445_idx'),
        ),
        migrations.AddIndex(
            model_name='userhistory',
            index=models.Index(fields=['user', '-date'], name='survey_user_user_id_d54a43_idx'),
        ),
    ]
