# Generated by Django 4.0 on 2022-01-08 15:22

import uuid

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


class Migration(migrations.Migration):
    dependencies = [
        ("connector_airflow", "0020_remove_all_dags"),
    ]

    operations = [
        migrations.RemoveField(
            model_name="dag",
            name="cluster",
        ),
        migrations.AddField(
            model_name="dag",
            name="config",
            field=models.JSONField(blank=True, default=dict),
        ),
        migrations.AddField(
            model_name="dag",
            name="credentials",
            field=models.JSONField(blank=True, default=list),
        ),
        migrations.AddField(
            model_name="dag",
            name="schedule",
            field=models.CharField(blank=True, max_length=200, null=True),
        ),
        migrations.AddField(
            model_name="dag",
            name="user",
            field=models.ForeignKey(
                null=True,
                on_delete=django.db.models.deletion.SET_NULL,
                to="user_management.user",
            ),
        ),
        migrations.CreateModel(
            name="DAGTemplate",
            fields=[
                (
                    "id",
                    models.UUIDField(
                        default=uuid.uuid4,
                        editable=False,
                        primary_key=True,
                        serialize=False,
                    ),
                ),
                ("created_at", models.DateTimeField(auto_now_add=True)),
                ("updated_at", models.DateTimeField(auto_now=True)),
                ("builder", models.CharField(max_length=200)),
                (
                    "cluster",
                    models.ForeignKey(
                        on_delete=django.db.models.deletion.CASCADE,
                        to="connector_airflow.cluster",
                    ),
                ),
            ],
            options={
                "verbose_name": "DAGTemplate",
                "ordering": ["builder"],
            },
        ),
        migrations.AddField(
            model_name="dag",
            name="template",
            field=models.ForeignKey(
                default=0,
                on_delete=django.db.models.deletion.CASCADE,
                to="connector_airflow.dagtemplate",
            ),
            preserve_default=False,
        ),
    ]

# Generated by Django 4.0 on 2022-01-08 15:22

import uuid

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


class Migration(migrations.Migration):
    dependencies = [
        ("connector_airflow", "0020_remove_all_dags"),
    ]

    operations = [
        migrations.RemoveField(
            model_name="dag",
            name="cluster",
        ),
        migrations.AddField(
            model_name="dag",
            name="config",
            field=models.JSONField(blank=True, default=dict),
        ),
        migrations.AddField(
            model_name="dag",
            name="credentials",
            field=models.JSONField(blank=True, default=list),
        ),
        migrations.AddField(
            model_name="dag",
            name="schedule",
            field=models.CharField(blank=True, max_length=200, null=True),
        ),
        migrations.AddField(
            model_name="dag",
            name="user",
            field=models.ForeignKey(
                null=True,
                on_delete=django.db.models.deletion.SET_NULL,
                to="user_management.user",
            ),
        ),
        migrations.CreateModel(
            name="DAGTemplate",
            fields=[
                (
                    "id",
                    models.UUIDField(
                        default=uuid.uuid4,
                        editable=False,
                        primary_key=True,
                        serialize=False,
                    ),
                ),
                ("created_at", models.DateTimeField(auto_now_add=True)),
                ("updated_at", models.DateTimeField(auto_now=True)),
                ("builder", models.CharField(max_length=200)),
                (
                    "cluster",
                    models.ForeignKey(
                        on_delete=django.db.models.deletion.CASCADE,
                        to="connector_airflow.cluster",
                    ),
                ),
            ],
            options={
                "verbose_name": "DAGTemplate",
                "ordering": ["builder"],
            },
        ),
        migrations.AddField(
            model_name="dag",
            name="template",
            field=models.ForeignKey(
                default=0,
                on_delete=django.db.models.deletion.CASCADE,
                to="connector_airflow.dagtemplate",
            ),
            preserve_default=False,
        ),
    ]

# Generated by Django 4.0 on 2022-01-08 15:22