# Generated by Django 2.2.12 on 2020-06-28 00:06

import django.contrib.postgres.fields.jsonb
from django.db import migrations, models
import django.db.models.deletion


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='Folder',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('clickup_id', models.PositiveIntegerField(unique=True, verbose_name='ClickUp ID')),
                ('is_active', models.BooleanField(null=True, verbose_name='is active?')),
                ('name', models.TextField(max_length=2048, null=True, verbose_name='name')),
                ('description', models.TextField(blank=True, null=True, verbose_name='description')),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='List',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('clickup_id', models.PositiveIntegerField(unique=True, verbose_name='ClickUp ID')),
                ('is_active', models.BooleanField(null=True, verbose_name='is active?')),
                ('name', models.TextField(max_length=2048, null=True, verbose_name='name')),
                ('description', models.TextField(blank=True, null=True, verbose_name='description')),
                ('custom_fields_imported', models.BooleanField(default=False, verbose_name='Custom fields imported?')),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='ListCustomField',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('clickup_id', models.CharField(max_length=40, unique=True, verbose_name='ClickUp ID')),
                ('name', models.CharField(max_length=255, null=True, verbose_name='name')),
                ('_type', models.CharField(max_length=20)),
                ('type_config', django.contrib.postgres.fields.jsonb.JSONField(blank=True, null=True)),
                ('created_json', django.contrib.postgres.fields.jsonb.JSONField(blank=True, null=True, verbose_name='ClickUp JSON Response')),
            ],
        ),
        migrations.CreateModel(
            name='Space',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('clickup_id', models.PositiveIntegerField(unique=True, verbose_name='ClickUp ID')),
                ('is_active', models.BooleanField(null=True, verbose_name='is active?')),
                ('name', models.TextField(max_length=2048, null=True, verbose_name='name')),
                ('description', models.TextField(blank=True, null=True, verbose_name='description')),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='Task',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('is_active', models.BooleanField(null=True, verbose_name='is active?')),
                ('name', models.TextField(max_length=2048, null=True, verbose_name='name')),
                ('description', models.TextField(blank=True, null=True, verbose_name='description')),
                ('clickup_id', models.CharField(max_length=12, unique=True, verbose_name='ClickUp ID')),
                ('created_json', django.contrib.postgres.fields.jsonb.JSONField(blank=True, null=True, verbose_name='TaskCreated JSON Response')),
                ('updated_json', django.contrib.postgres.fields.jsonb.JSONField(blank=True, null=True, verbose_name='TaskUpdated JSON Response')),
                ('status', models.CharField(blank=True, max_length=100, null=True, verbose_name='status')),
                ('_list', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='tasks', to='core.List')),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='Team',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('clickup_id', models.PositiveIntegerField(unique=True, verbose_name='ClickUp ID')),
                ('name', models.CharField(max_length=255, verbose_name='name')),
                ('is_active', models.BooleanField(default=True, verbose_name='is active?')),
                ('is_imported', models.BooleanField(default=False, verbose_name='is imported?')),
            ],
        ),
        migrations.CreateModel(
            name='Webhook',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('clickup_id', models.CharField(max_length=50, unique=True, verbose_name='ClickUp ID')),
                ('created_json', django.contrib.postgres.fields.jsonb.JSONField(blank=True, null=True, verbose_name='ClickUp JSON Response')),
                ('team', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='webhooks', to='core.Team')),
            ],
        ),
        migrations.CreateModel(
            name='TaskCustomField',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('list_custom_field', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='task_custom_fields', to='core.ListCustomField')),
                ('task', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='custom_fields', to='core.Task')),
            ],
        ),
    ]
