# Generated by Django 2.2 on 2019-05-09 15:42

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


class Migration(migrations.Migration):

    dependencies = [("concordia", "0030_auto_20190503_1559")]

    operations = [
        migrations.CreateModel(
            name="Topic",
            fields=[
                (
                    "id",
                    models.AutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                ("published", models.BooleanField(blank=True, default=False)),
                ("title", models.CharField(max_length=255)),
                ("slug", models.SlugField(allow_unicode=True, max_length=80)),
                ("description", models.TextField(blank=True)),
                (
                    "thumbnail_image",
                    models.ImageField(
                        blank=True, null=True, upload_to="topic-thumbnails"
                    ),
                ),
                ("short_description", models.TextField(blank=True)),
            ],
            options={"ordering": ["title"]},
        ),
        migrations.AlterModelOptions(name="resource", options={}),
        migrations.RemoveField(model_name="project", name="category"),
        migrations.AlterField(
            model_name="resource",
            name="campaign",
            field=models.ForeignKey(
                blank=True,
                null=True,
                on_delete=django.db.models.deletion.CASCADE,
                to="concordia.Campaign",
            ),
        ),
        migrations.AlterUniqueTogether(name="resource", unique_together=set()),
        migrations.AddField(
            model_name="project",
            name="topics",
            field=models.ManyToManyField(to="concordia.Topic"),
        ),
        migrations.AddField(
            model_name="resource",
            name="topic",
            field=models.ForeignKey(
                blank=True,
                null=True,
                on_delete=django.db.models.deletion.CASCADE,
                to="concordia.Topic",
            ),
        ),
    ]
