# Generated by Django 2.2.10 on 2020-02-20 10:09

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


class Migration(migrations.Migration):

    dependencies = [
        ("recruitment", "0011_recruitment_index_page_streamfield"),
    ]

    operations = [
        migrations.CreateModel(
            name="JobSubcategory",
            fields=[
                (
                    "id",
                    models.AutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                ("title", models.CharField(max_length=128)),
            ],
            options={
                "verbose_name_plural": "Job subcategories",
                "ordering": ["title"],
            },
        ),
        migrations.RemoveField(model_name="talentlinkjob", name="category",),
        migrations.AddField(
            model_name="jobcategory",
            name="subcategories",
            field=models.ManyToManyField(
                related_name="categories", to="recruitment.JobSubcategory"
            ),
        ),
        migrations.AddField(
            model_name="talentlinkjob",
            name="subcategory",
            field=models.ForeignKey(
                null=True,
                on_delete=django.db.models.deletion.PROTECT,
                related_name="jobs",
                to="recruitment.JobSubcategory",
            ),
        ),
    ]
