# -*- coding: utf-8 -*-
# Generated by Django 1.11.5 on 2017-09-10 11:44
from __future__ import unicode_literals

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('taggit', '0002_auto_20150616_2121'),
    ]

    operations = [
        migrations.CreateModel(
            name='Alert',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created', models.DateTimeField(auto_now_add=True)),
                ('email', models.EmailField(max_length=254)),
            ],
        ),
        migrations.CreateModel(
            name='Execution',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created', models.DateTimeField(auto_now_add=True)),
                ('auto', models.BooleanField(default=False)),
            ],
        ),
        migrations.CreateModel(
            name='Query',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created', models.DateTimeField(auto_now_add=True)),
                ('intention', models.CharField(choices=[('OF', 'Offer'), ('RE', 'Request')], max_length=2)),
                ('intersect_keywords', models.BooleanField(default=True)),
                ('public', models.BooleanField(default=True)),
                ('keywords', taggit.managers.TaggableManager(help_text='A comma-separated list of tags.', through='taggit.TaggedItem', to='taggit.Tag', verbose_name='Tags')),
            ],
        ),
        migrations.CreateModel(
            name='Result',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('text_hash', models.CharField(max_length=32)),
                ('from_twitter_status_id', models.CharField(max_length=64)),
                ('useful', models.BooleanField(default=False)),
                ('execution', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='queries.Execution')),
            ],
        ),
        migrations.AddField(
            model_name='execution',
            name='query',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='queries.Query'),
        ),
        migrations.AddField(
            model_name='alert',
            name='query',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='queries.Query'),
        ),
    ]
