# Generated by Django 2.0.5 on 2018-12-20 15:04

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='CronSchedule',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(help_text='Human readable version of schedule, i.e Every 10 minutes', max_length=100)),
                ('minute', models.CharField(default='*', help_text='At what minute. * for every', max_length=100)),
                ('hour', models.CharField(default='*', help_text='At what hour. * for every', max_length=100)),
                ('day_of_week', models.CharField(default='*', help_text='At what day of the week. * for every', max_length=100)),
                ('day_of_month', models.CharField(default='*', help_text='At what day of the month. * for every', max_length=100)),
                ('month_of_year', models.CharField(default='*', help_text='At what month of the year. * for every', max_length=100)),
            ],
        ),
        migrations.CreateModel(
            name='RegisteredTask',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('task_name', models.CharField(help_text='The task to be run ie. stock --get_stock_updates', max_length=125)),
            ],
        ),
        migrations.CreateModel(
            name='Task',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(help_text='The human readable name of the task', max_length=255)),
                ('enabled', models.BooleanField(default=False, help_text='Whether the task is enabled')),
                ('cron_schedule', models.ForeignKey(on_delete=django.db.models.deletion.DO_NOTHING, to='sidekick.CronSchedule')),
                ('registered_task', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='sidekick.RegisteredTask')),
            ],
        ),
    ]
