# Generated by Django 3.1.4 on 2021-01-20 01:03

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('django_celery_beat', '0014_remove_clockedschedule_enabled'),
    ]

    operations = [
        migrations.CreateModel(
            name='APIFetcherTracker',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('status', models.CharField(choices=[('idle', 'Idle'), ('active', 'Active'), ('failed', 'Failed')], default='idle', max_length=7)),
                ('last_run_at', models.DateTimeField(blank=True, null=True)),
                ('last_run_finish_at', models.DateTimeField(blank=True, null=True)),
            ],
            options={
                'db_table': 'api_fetcher_tracker',
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='Post',
            fields=[
                ('id', models.IntegerField(primary_key=True, serialize=False)),
                ('rank', models.IntegerField()),
                ('subject', models.TextField()),
                ('url', models.TextField()),
                ('age', models.CharField(max_length=15)),
                ('score', models.IntegerField(blank=True, null=True)),
                ('submitted_by', models.CharField(blank=True, max_length=15, null=True)),
                ('num_of_comments', models.IntegerField(blank=True, null=True)),
                ('sentiment_score', models.FloatField(blank=True, null=True)),
                ('sentiment_label', models.TextField(default='Not Ready')),
            ],
            options={
                'ordering': ['rank'],
            },
        ),
        migrations.CreateModel(
            name='ScrapperTracker',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('status', models.CharField(choices=[('idle', 'Idle'), ('active', 'Active'), ('failed', 'Failed')], default='idle', max_length=7)),
                ('last_run_at', models.DateTimeField(blank=True, null=True)),
                ('last_run_finish_at', models.DateTimeField(blank=True, null=True)),
                ('periodic_task', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to='django_celery_beat.periodictask')),
            ],
            options={
                'db_table': 'scrapper_tracker',
                'abstract': False,
            },
        ),
        migrations.AddIndex(
            model_name='post',
            index=models.Index(fields=['rank'], name='posts_post_rank_fdd6ac_idx'),
        ),
        migrations.AddField(
            model_name='apifetchertracker',
            name='periodic_task',
            field=models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to='django_celery_beat.periodictask'),
        ),
    ]
