# -*- coding: utf-8 -*-
# Generated by Django 1.10.7 on 2017-11-08 21:25
from __future__ import unicode_literals

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 = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
        ('core', '0003_auto_20170606_2120'),
    ]

    operations = [
        migrations.CreateModel(
            name='ModelHistory',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('model_type', models.TextField()),
                ('reference_id', models.IntegerField()),
            ],
        ),
        migrations.CreateModel(
            name='ModelSnapshot',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('create_datetime', models.DateTimeField()),
                ('state', django.contrib.postgres.fields.jsonb.JSONField()),
                ('history', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='core.ModelHistory')),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'ordering': ['create_datetime'],
            },
        ),
    ]
