<reponame>marcphilippebeaujean-abertay/recur-notion<filename>tasks/migrations/0001_initial.py
# Generated by Django 3.2.10 on 2021-12-30 22:16

import datetime

import django.core.serializers.json
import django.db.models.deletion
from django.conf import settings
from django.db import migrations, models
from django.utils.timezone import utc


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
        ("django_q", "0014_schedule_cluster"),
    ]

    operations = [
        migrations.CreateModel(
            name="RecurringTask",
            fields=[
                (
                    "id",
                    models.BigAutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                (
                    "name",
                    models.CharField(default="New Recurring Task", max_length=255),
                ),
                (
                    "database_id",
                    models.CharField(blank=None, max_length=255, null=None),
                ),
                (
                    "database_name",
                    models.CharField(blank=None, max_length=255, null=None),
                ),
                (
                    "start_time",
                    models.DateTimeField(
                        default=datetime.datetime(
                            2021, 12, 31, 22, 16, 15, 713798, tzinfo=utc
                        )
                    ),
                ),
                (
                    "properties_json",
                    models.JSONField(
                        default=dict,
                        encoder=django.core.serializers.json.DjangoJSONEncoder,
                    ),
                ),
                (
                    "interval",
                    models.CharField(
                        choices=[
                            ("1", "Every Day"),
                            ("7", "Every 7 Days"),
                            ("30", "Every 30 Days"),
                            ("365", "Every 365 Days"),
                        ],
                        default="1",
                        max_length=30,
                    ),
                ),
                (
                    "owner",
                    models.ForeignKey(
                        on_delete=django.db.models.deletion.CASCADE,
                        related_name="tasks",
                        to=settings.AUTH_USER_MODEL,
                    ),
                ),
                (
                    "scheduler_job",
                    models.OneToOneField(
                        blank=True,
                        default=None,
                        null=True,
                        on_delete=django.db.models.deletion.CASCADE,
                        related_name="related_recurring_task",
                        to="django_q.schedule",
                    ),
                ),
            ],
        ),
    ]

# Generated by Django 3.2.10 on 2021-12-30 22:16

import datetime

import django.core.serializers.json
import django.db.models.deletion
from django.conf import settings
from django.db import migrations, models
from django.utils.timezone import utc


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
        ("django_q", "0014_schedule_cluster"),
    ]

    operations = [
        migrations.CreateModel(
            name="RecurringTask",
            fields=[
                (
                    "id",
                    models.BigAutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                (
                    "name",
                    models.CharField(default="New Recurring Task", max_length=255),
                ),
                (
                    "database_id",
                    models.CharField(blank=None, max_length=255, null=None),
                ),
                (
                    "database_name",
                    models.CharField(blank=None, max_length=255, null=None),
                ),
                (
                    "start_time",
                    models.DateTimeField(
                        default=datetime.datetime(
                            2021, 12, 31, 22, 16, 15, 713798, tzinfo=utc
                        )
                    ),
                ),
                (
                    "properties_json",
                    models.JSONField(
                        default=dict,
                        encoder=django.core.serializers.json.DjangoJSONEncoder,
                    ),
                ),
                (
                    "interval",
                    models.CharField(
                        choices=[
                            ("1", "Every Day"),
                            ("7", "Every 7 Days"),
                            ("30", "Every 30 Days"),
                            ("365", "Every 365 Days"),
                        ],
                        default="1",
                        max_length=30,
                    ),
                ),
                (
                    "owner",
                    models.ForeignKey(
                        on_delete=django.db.models.deletion.CASCADE,
                        related_name="tasks",
                        to=settings.AUTH_USER_MODEL,
                    ),
                ),
                (
                    "scheduler_job",
                    models.OneToOneField(
                        blank=True,
                        default=None,
                        null=True,
                        on_delete=django.db.models.deletion.CASCADE,
                        related_name="related_recurring_task",
                        to="django_q.schedule",
                    ),
                ),
            ],
        ),
    ]
# Generated by Django 3.2.10 on 2021-12-30 22:16