# Generated by Django 3.2.12 on 2022-02-28 09:51

import django.db.models.deletion
import django.utils.timezone
from django.conf import settings
from django.db import migrations, models

from .. import conf


class Migration(migrations.Migration):

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
        ("publicbody", "0039_publicbody_alternative_emails"),
        ("organization", "0001_initial"),
        ("auth", "0012_alter_user_first_name_max_length"),
        ("froide_govplan", "0002_auto_20220215_2113"),
    ] + (
        [("foirequest", "0054_alter_foirequest_options")]
        if conf.GOVPLAN_ENABLE_FOIREQUEST
        else []
    )

    operations = (
        [
            migrations.AddField(
                model_name="governmentplan",
                name="due_date",
                field=models.DateField(blank=True, null=True, verbose_name="due date"),
            ),
            migrations.AddField(
                model_name="governmentplan",
                name="measure",
                field=models.CharField(
                    blank=True, max_length=255, verbose_name="measure"
                ),
            ),
            migrations.AddField(
                model_name="governmentplan",
                name="quote",
                field=models.TextField(blank=True, verbose_name="quote"),
            ),
            migrations.AlterField(
                model_name="government",
                name="description",
                field=models.TextField(blank=True, verbose_name="description"),
            ),
            migrations.AlterField(
                model_name="government",
                name="end_date",
                field=models.DateField(blank=True, null=True, verbose_name="end date"),
            ),
            migrations.AlterField(
                model_name="government",
                name="jurisdiction",
                field=models.ForeignKey(
                    null=True,
                    on_delete=django.db.models.deletion.SET_NULL,
                    to="publicbody.jurisdiction",
                    verbose_name="jurisdiction",
                ),
            ),
            migrations.AlterField(
                model_name="government",
                name="name",
                field=models.CharField(max_length=255, verbose_name="name"),
            ),
            migrations.AlterField(
                model_name="government",
                name="planning_document",
                field=models.URLField(blank=True, verbose_name="planning document"),
            ),
            migrations.AlterField(
                model_name="government",
                name="public",
                field=models.BooleanField(default=False, verbose_name="is public?"),
            ),
            migrations.AlterField(
                model_name="government",
                name="slug",
                field=models.SlugField(
                    max_length=255, unique=True, verbose_name="slug"
                ),
            ),
            migrations.AlterField(
                model_name="government",
                name="start_date",
                field=models.DateField(
                    blank=True, null=True, verbose_name="start date"
                ),
            ),
            migrations.AlterField(
                model_name="governmentplan",
                name="description",
                field=models.TextField(blank=True, verbose_name="description"),
            ),
            migrations.AlterField(
                model_name="governmentplan",
                name="government",
                field=models.ForeignKey(
                    on_delete=django.db.models.deletion.CASCADE,
                    to="froide_govplan.government",
                    verbose_name="government",
                ),
            ),
            migrations.AlterField(
                model_name="governmentplan",
                name="group",
                field=models.ForeignKey(
                    blank=True,
                    null=True,
                    on_delete=django.db.models.deletion.SET_NULL,
                    to="auth.group",
                    verbose_name="group",
                ),
            ),
            migrations.AlterField(
                model_name="governmentplan",
                name="organization",
                field=models.ForeignKey(
                    blank=True,
                    null=True,
                    on_delete=django.db.models.deletion.SET_NULL,
                    to="organization.organization",
                    verbose_name="organization",
                ),
            ),
            migrations.AlterField(
                model_name="governmentplan",
                name="public",
                field=models.BooleanField(default=False, verbose_name="is public?"),
            ),
            migrations.AlterField(
                model_name="governmentplan",
                name="rating",
                field=models.IntegerField(
                    blank=True,
                    choices=[
                        (1, "terrible"),
                        (2, "bad"),
                        (3, "OK"),
                        (4, "good"),
                        (5, "excellent"),
                    ],
                    null=True,
                    verbose_name="rating",
                ),
            ),
            migrations.AlterField(
                model_name="governmentplan",
                name="reference",
                field=models.CharField(
                    blank=True, max_length=255, verbose_name="reference"
                ),
            ),
            migrations.AlterField(
                model_name="governmentplan",
                name="responsible_publicbody",
                field=models.ForeignKey(
                    blank=True,
                    null=True,
                    on_delete=django.db.models.deletion.SET_NULL,
                    to="publicbody.publicbody",
                    verbose_name="responsible public body",
                ),
            ),
            migrations.AlterField(
                model_name="governmentplan",
                name="slug",
                field=models.SlugField(
                    max_length=255, unique=True, verbose_name="slug"
                ),
            ),
            migrations.AlterField(
                model_name="governmentplan",
                name="status",
                field=models.CharField(
                    choices=[
                        ("not_started", "not started"),
                        ("started", "started"),
                        ("partially_implemented", "partially implemented"),
                        ("implemented", "implemented"),
                        ("deferred", "deferred"),
                    ],
                    default="not_started",
                    max_length=25,
                    verbose_name="status",
                ),
            ),
            migrations.AlterField(
                model_name="governmentplan",
                name="title",
                field=models.CharField(max_length=255, verbose_name="title"),
            ),
            migrations.AlterField(
                model_name="governmentplanupdate",
                name="content",
                field=models.TextField(blank=True, verbose_name="content"),
            ),
        ]
        + (
            [
                migrations.AlterField(
                    model_name="governmentplanupdate",
                    name="foirequest",
                    field=models.ForeignKey(
                        blank=True,
                        null=True,
                        on_delete=django.db.models.deletion.SET_NULL,
                        to="foirequest.foirequest",
                        verbose_name="FOI request",
                    ),
                ),
            ]
            if conf.GOVPLAN_ENABLE_FOIREQUEST
            else []
        )
        + [
            migrations.AlterField(
                model_name="governmentplanupdate",
                name="organization",
                field=models.ForeignKey(
                    blank=True,
                    null=True,
                    on_delete=django.db.models.deletion.SET_NULL,
                    to="organization.organization",
                    verbose_name="organization",
                ),
            ),
            migrations.AlterField(
                model_name="governmentplanupdate",
                name="plan",
                field=models.ForeignKey(
                    on_delete=django.db.models.deletion.CASCADE,
                    related_name="updates",
                    to="froide_govplan.governmentplan",
                    verbose_name="plan",
                ),
            ),
            migrations.AlterField(
                model_name="governmentplanupdate",
                name="public",
                field=models.BooleanField(default=False, verbose_name="is public?"),
            ),
            migrations.AlterField(
                model_name="governmentplanupdate",
                name="rating",
                field=models.IntegerField(
                    blank=True,
                    choices=[
                        (1, "terrible"),
                        (2, "bad"),
                        (3, "OK"),
                        (4, "good"),
                        (5, "excellent"),
                    ],
                    null=True,
                    verbose_name="rating",
                ),
            ),
            migrations.AlterField(
                model_name="governmentplanupdate",
                name="status",
                field=models.CharField(
                    blank=True,
                    choices=[
                        ("not_started", "not started"),
                        ("started", "started"),
                        ("partially_implemented", "partially implemented"),
                        ("implemented", "implemented"),
                        ("deferred", "deferred"),
                    ],
                    default="",
                    max_length=25,
                    verbose_name="status",
                ),
            ),
            migrations.AlterField(
                model_name="governmentplanupdate",
                name="timestamp",
                field=models.DateTimeField(
                    default=django.utils.timezone.now, verbose_name="timestamp"
                ),
            ),
            migrations.AlterField(
                model_name="governmentplanupdate",
                name="title",
                field=models.CharField(
                    blank=True, max_length=1024, verbose_name="title"
                ),
            ),
            migrations.AlterField(
                model_name="governmentplanupdate",
                name="url",
                field=models.URLField(blank=True, verbose_name="URL"),
            ),
            migrations.AlterField(
                model_name="governmentplanupdate",
                name="user",
                field=models.ForeignKey(
                    blank=True,
                    null=True,
                    on_delete=django.db.models.deletion.SET_NULL,
                    to=settings.AUTH_USER_MODEL,
                    verbose_name="user",
                ),
            ),
        ]
    )
