# Generated by Django 3.0 on 2019-12-19 19:34

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


class Migration(migrations.Migration):

    dependencies = [
        ('webscraper', '0005_auto_20191214_1815'),
    ]

    operations = [
        migrations.CreateModel(
            name='Queue',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.TextField()),
            ],
        ),
        migrations.CreateModel(
            name='QueueTask',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('task_id', models.TextField(unique=True)),
            ],
        ),
        migrations.CreateModel(
            name='QueueTaskStatus',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.TextField(unique=True)),
            ],
        ),
        migrations.CreateModel(
            name='UrlContentType',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.TextField(unique=True)),
            ],
        ),
        migrations.RemoveIndex(
            model_name='scrapedurl',
            name='webscraper__queue_8c3e3e_idx',
        ),
        migrations.RemoveField(
            model_name='scrapedurl',
            name='date_init_request',
        ),
        migrations.RemoveField(
            model_name='scrapedurl',
            name='images',
        ),
        migrations.RemoveField(
            model_name='scrapedurl',
            name='path_base',
        ),
        migrations.RemoveField(
            model_name='scrapedurl',
            name='queue',
        ),
        migrations.RemoveField(
            model_name='scrapedurl',
            name='status',
        ),
        migrations.RemoveField(
            model_name='scrapedurl',
            name='suburls',
        ),
        migrations.RemoveField(
            model_name='scrapedurl',
            name='text',
        ),
        migrations.AddField(
            model_name='scrapedurl',
            name='date_init',
            field=models.DateTimeField(default=django.utils.timezone.now),
        ),
        migrations.AddField(
            model_name='scrapedurl',
            name='path',
            field=models.FilePathField(default='/home/maciej/Desktop/semantive/Semantive/scraperservice/scraped_url'),
        ),
        migrations.AddField(
            model_name='queuetask',
            name='queue',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='webscraper.Queue'),
        ),
        migrations.AddField(
            model_name='queuetask',
            name='status',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, to='webscraper.QueueTaskStatus'),
        ),
        migrations.AddField(
            model_name='scrapedurl',
            name='task',
            field=models.OneToOneField(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='webscraper.QueueTask'),
        ),
        migrations.AddField(
            model_name='scrapedurl',
            name='type',
            field=models.ManyToManyField(default=1, to='webscraper.UrlContentType'),
        ),
    ]
