# -*- coding: utf-8 -*-
# Generated by Django 1.11.23 on 2019-11-13 15:12
from __future__ import unicode_literals

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


class Migration(migrations.Migration):

    dependencies = [
        ("contenttypes", "0002_remove_content_type_name"),
        ("chroma_core", "0006_updateyumfilejob"),
    ]

    operations = [
        migrations.CreateModel(
            name="AddOstPoolJob",
            fields=[
                (
                    "job_ptr",
                    models.OneToOneField(
                        auto_created=True,
                        on_delete=django.db.models.deletion.CASCADE,
                        parent_link=True,
                        primary_key=True,
                        serialize=False,
                        to="chroma_core.Job",
                    ),
                ),
                ("ost", models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to="chroma_core.ManagedOst")),
            ],
            options={"ordering": ["id"],},
            bases=("chroma_core.job",),
        ),
        migrations.CreateModel(
            name="DestroyOstPoolJob",
            fields=[
                (
                    "job_ptr",
                    models.OneToOneField(
                        auto_created=True,
                        on_delete=django.db.models.deletion.CASCADE,
                        parent_link=True,
                        primary_key=True,
                        serialize=False,
                        to="chroma_core.Job",
                    ),
                ),
            ],
            options={"ordering": ["id"],},
            bases=("chroma_core.job",),
        ),
        migrations.CreateModel(
            name="OstPool",
            fields=[
                ("id", models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name="ID")),
                ("name", models.CharField(help_text=b"OST Pool name, up to 15 characters", max_length=15)),
                ("not_deleted", models.NullBooleanField(default=True)),
                (
                    "content_type",
                    models.ForeignKey(
                        editable=False,
                        null=True,
                        on_delete=django.db.models.deletion.CASCADE,
                        to="contenttypes.ContentType",
                    ),
                ),
                (
                    "filesystem",
                    models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to="chroma_core.ManagedFilesystem"),
                ),
                ("osts", models.ManyToManyField(help_text=b"OST list in this Pool", to=b"chroma_core.ManagedOst")),
            ],
        ),
        migrations.CreateModel(
            name="RemoveOstPoolJob",
            fields=[
                (
                    "job_ptr",
                    models.OneToOneField(
                        auto_created=True,
                        on_delete=django.db.models.deletion.CASCADE,
                        parent_link=True,
                        primary_key=True,
                        serialize=False,
                        to="chroma_core.Job",
                    ),
                ),
                ("ost", models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to="chroma_core.ManagedOst")),
                ("pool", models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to="chroma_core.OstPool")),
            ],
            options={"ordering": ["id"],},
            bases=("chroma_core.job",),
        ),
        migrations.AddField(
            model_name="destroyostpooljob",
            name="pool",
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to="chroma_core.OstPool"),
        ),
        migrations.AddField(
            model_name="addostpooljob",
            name="pool",
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to="chroma_core.OstPool"),
        ),
        migrations.AlterModelOptions(name="ostpool", options={"ordering": ["id"]},),
        migrations.AlterUniqueTogether(name="ostpool", unique_together=set([("name", "filesystem", "not_deleted")]),),
        migrations.CreateModel(
            name="CreateOstPoolJob",
            fields=[
                (
                    "job_ptr",
                    models.OneToOneField(
                        auto_created=True,
                        on_delete=django.db.models.deletion.CASCADE,
                        parent_link=True,
                        primary_key=True,
                        serialize=False,
                        to="chroma_core.Job",
                    ),
                ),
                ("pool", models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to="chroma_core.OstPool")),
            ],
            options={"ordering": ["id"],},
            bases=("chroma_core.job",),
        ),
    ]
