# -*- coding: utf-8 -*-
# Generated by Django 1.10.8 on 2017-11-01 00:15
from __future__ import unicode_literals

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('contenttypes', '0002_remove_content_type_name'),
    ]

    operations = [
        migrations.CreateModel(
            name='ActableEvent',
            fields=[
                ('id', models.AutoField(auto_created=True,
                                        primary_key=True, serialize=False, verbose_name='ID')),
                ('object_id', models.PositiveIntegerField()),
                ('cached_html', models.TextField(blank=True,
                                                 help_text='Cached HTML snippet', null=True)),
                ('cached_json', models.TextField(blank=True,
                                                 help_text='Cached JSON representation of context', null=True)),
                ('date', models.DateTimeField(auto_now_add=True,
                                              db_index=True, help_text='Date that this event occurred')),
                ('is_cache_outdated', models.BooleanField(default=False,
                                                          help_text='Mark if it is known that this cache needs updating')),
                ('cache_updated_date', models.DateTimeField(auto_now=True,
                                                            help_text='Date that the cache of this event was last updated')),
                ('is_creation', models.BooleanField(default=False,
                                                    help_text='Mark if this event is the creation of the principle object')),
                ('content_type', models.ForeignKey(
                    on_delete=django.db.models.deletion.CASCADE, to='contenttypes.ContentType')),
            ],
            options={
                'get_latest_by': '-date',
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='ActableRelation',
            fields=[
                ('id', models.AutoField(auto_created=True,
                                        primary_key=True, serialize=False, verbose_name='ID')),
                ('object_id', models.PositiveIntegerField()),
                ('cached_html', models.TextField(blank=True,
                                                 help_text='Cached HTML snippet', null=True)),
                ('cached_json', models.TextField(blank=True,
                                                 help_text='Cached JSON representation of context', null=True)),
                ('date', models.DateTimeField(auto_now_add=True,
                                              db_index=True, help_text='Date that this event occurred')),
                ('is_cache_outdated', models.BooleanField(default=False,
                                                          help_text='Mark if it is known that this cache needs updating')),
                ('relation', models.CharField(db_index=True,
                                              help_text='Description of grammatical or topical relation (e.g. "subject", "target", or "project_context")', max_length=64)),
                ('content_type', models.ForeignKey(
                    on_delete=django.db.models.deletion.CASCADE, to='contenttypes.ContentType')),
                ('event', models.ForeignKey(
                    on_delete=django.db.models.deletion.CASCADE, to='actable.ActableEvent')),
            ],
            options={
                'get_latest_by': '-date',
                'abstract': False,
            },
        ),
    ]
