# Generated by Django 2.2.5 on 2020-02-02 16:55

import apps.spiders.models
import django.contrib.postgres.fields
import django.contrib.postgres.fields.jsonb
from django.db import migrations, models
import django.db.models.deletion


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='Spider',
            fields=[
                ('name', models.CharField(max_length=64, primary_key=True, serialize=False)),
                ('description', models.TextField(default='')),
                ('associated_web_site', models.URLField()),
            ],
        ),
        migrations.CreateModel(
            name='SpiderEvent',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('event_kind', models.PositiveSmallIntegerField(choices=[(apps.spiders.models.SpiderEventKind(0), 0), (apps.spiders.models.SpiderEventKind(1), 1)])),
                ('event_data', django.contrib.postgres.fields.jsonb.JSONField()),
                ('received_at', models.DateTimeField(auto_now=True)),
                ('associated_spider', models.ForeignKey(on_delete=django.db.models.deletion.DO_NOTHING, to='spiders.Spider')),
            ],
        ),
        migrations.CreateModel(
            name='SpiderConfiguration',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('website_part', models.CharField(default='', max_length=255, null=True)),
                ('search_words', django.contrib.postgres.fields.ArrayField(base_field=models.CharField(blank=True, max_length=64), size=None)),
                ('associated_spider', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='spiders.Spider')),
            ],
        ),
    ]
