# Generated by Django 2.2.9 on 2020-01-09 11:19

import django.contrib.postgres.fields.citext
from django.db import migrations, models

import grandchallenge.challenges.models


class Migration(migrations.Migration):

    dependencies = [
        ("challenges", "0019_auto_20190129_1536"),
    ]

    operations = [
        migrations.CreateModel(
            name="ChallengeSeries",
            fields=[
                (
                    "id",
                    models.AutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                (
                    "name",
                    django.contrib.postgres.fields.citext.CICharField(
                        max_length=64, unique=True
                    ),
                ),
                ("url", models.URLField(blank=True)),
            ],
            options={
                "verbose_name_plural": "Challenge Series",
                "ordering": ("name",),
            },
        ),
        migrations.AlterField(
            model_name="challenge",
            name="logo",
            field=models.ImageField(
                blank=True,
                help_text="A logo for this challenge. Should be square with a resolution of 640x640 px or higher.",
                upload_to=grandchallenge.challenges.models.get_logo_path,
            ),
        ),
        migrations.AlterField(
            model_name="externalchallenge",
            name="logo",
            field=models.ImageField(
                blank=True,
                help_text="A logo for this challenge. Should be square with a resolution of 640x640 px or higher.",
                upload_to=grandchallenge.challenges.models.get_logo_path,
            ),
        ),
        migrations.AddField(
            model_name="challenge",
            name="series",
            field=models.ManyToManyField(
                blank=True,
                help_text="Which challenge series is this associated with?",
                to="challenges.ChallengeSeries",
            ),
        ),
        migrations.AddField(
            model_name="externalchallenge",
            name="series",
            field=models.ManyToManyField(
                blank=True,
                help_text="Which challenge series is this associated with?",
                to="challenges.ChallengeSeries",
            ),
        ),
    ]
