# Generated by Django 4.2.7 on 2024-01-22 08:13

import blogs.models.blog
from django.db import migrations, models
import django.db.models.deletion
import django.utils.timezone
import uuid


class Migration(migrations.Migration):
    initial = True

    dependencies = []

    operations = [
        migrations.CreateModel(
            name="Announcement",
            fields=[
                (
                    "id",
                    models.BigAutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                ("status", models.TextField()),
                ("summary", models.TextField(null=True)),
                ("queued", models.DateTimeField(default=django.utils.timezone.now)),
            ],
        ),
        migrations.CreateModel(
            name="Blog",
            fields=[
                (
                    "id",
                    models.BigAutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                ("title", models.CharField(max_length=2000)),
                (
                    "author_name",
                    models.CharField(blank=True, max_length=1000, null=True),
                ),
                ("url", models.URLField(max_length=2000, unique=True)),
                ("description", models.TextField(blank=True, null=True)),
                ("updateddate", models.DateTimeField()),
                (
                    "pubdate",
                    models.DateTimeField(default=django.utils.timezone.now, null=True),
                ),
                ("feed", models.URLField(max_length=2000)),
                (
                    "category",
                    models.CharField(
                        choices=[
                            ("GAL", "Galleries"),
                            ("LIB", "Libraries"),
                            ("ARC", "Archives"),
                            ("MUS", "Museums"),
                            ("REC", "Records"),
                            ("DH", "Digital Humanities"),
                            ("GLAM", "GLAMR"),
                        ],
                        max_length=4,
                    ),
                ),
                ("added", models.DateTimeField(default=django.utils.timezone.now)),
                ("approved", models.BooleanField(default=False)),
                ("announced", models.BooleanField(default=False)),
                ("failing", models.BooleanField(blank=True, default=False, null=True)),
                (
                    "suspended",
                    models.BooleanField(blank=True, default=False, null=True),
                ),
                ("suspension_lifted", models.DateTimeField(blank=True, null=True)),
                ("active", models.BooleanField(default=True, null=True)),
                (
                    "activitypub_account_name",
                    models.CharField(
                        blank=True,
                        max_length=200,
                        null=True,
                        validators=[blogs.models.blog.validate_ap_address],
                    ),
                ),
                (
                    "contact_email",
                    models.EmailField(blank=True, max_length=254, null=True),
                ),
            ],
            options={
                "abstract": False,
            },
        ),
        migrations.CreateModel(
            name="ContentWarning",
            fields=[
                (
                    "id",
                    models.BigAutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                ("match_text", models.CharField(max_length=999, null=True)),
                ("display", models.CharField(max_length=999, null=True)),
            ],
        ),
        migrations.CreateModel(
            name="Event",
            fields=[
                (
                    "id",
                    models.BigAutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                ("name", models.CharField(max_length=100)),
                (
                    "category",
                    models.CharField(
                        choices=[
                            ("GAL", "Galleries"),
                            ("LIB", "Libraries"),
                            ("ARC", "Archives"),
                            ("MUS", "Museums"),
                            ("REC", "Records"),
                            ("DH", "Digital Humanities"),
                            ("GLAM", "GLAMR"),
                        ],
                        max_length=4,
                    ),
                ),
                ("url", models.URLField(max_length=400, unique=True)),
                (
                    "description",
                    models.TextField(blank=True, max_length=250, null=True),
                ),
                ("pubdate", models.DateTimeField()),
                ("start_date", models.DateField()),
                (
                    "announcements",
                    models.IntegerField(blank=True, default=0, null=True),
                ),
                (
                    "activitypub_account_name",
                    models.CharField(blank=True, max_length=200, null=True),
                ),
                (
                    "contact_email",
                    models.EmailField(blank=True, max_length=254, null=True),
                ),
                ("approved", models.BooleanField(default=False)),
            ],
        ),
        migrations.CreateModel(
            name="Group",
            fields=[
                (
                    "id",
                    models.BigAutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                ("name", models.CharField(max_length=100)),
                (
                    "category",
                    models.CharField(
                        choices=[
                            ("GAL", "Galleries"),
                            ("LIB", "Libraries"),
                            ("ARC", "Archives"),
                            ("MUS", "Museums"),
                            ("REC", "Records"),
                            ("DH", "Digital Humanities"),
                            ("GLAM", "GLAMR"),
                        ],
                        max_length=4,
                    ),
                ),
                (
                    "type",
                    models.CharField(
                        choices=[
                            ("DISC", "Discord server"),
                            ("DCRS", "Discourse community"),
                            ("EML", "email list"),
                            ("GOOG", "Google group"),
                            ("KBIN", "KBin server"),
                            ("LEMM", "Lemmy server"),
                            ("MAS", "Mastodon server"),
                            ("RED", "subreddit"),
                            ("SLAC", "Slack channel"),
                            ("ZLIP", "Zulip server"),
                            ("OTHR", "group"),
                        ],
                        max_length=4,
                    ),
                ),
                ("url", models.URLField(max_length=400, unique=True)),
                ("registration_url", models.URLField(max_length=400, unique=True)),
                (
                    "description",
                    models.TextField(blank=True, max_length=250, null=True),
                ),
                (
                    "contact_email",
                    models.EmailField(blank=True, max_length=254, null=True),
                ),
                ("announced", models.BooleanField(default=False)),
                ("approved", models.BooleanField(default=False)),
                (
                    "pubdate",
                    models.DateTimeField(default=django.utils.timezone.now, null=True),
                ),
            ],
        ),
        migrations.CreateModel(
            name="Newsletter",
            fields=[
                (
                    "id",
                    models.BigAutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                ("name", models.CharField(max_length=100)),
                ("author_name", models.CharField(max_length=100)),
                (
                    "category",
                    models.CharField(
                        choices=[
                            ("GAL", "Galleries"),
                            ("LIB", "Libraries"),
                            ("ARC", "Archives"),
                            ("MUS", "Museums"),
                            ("REC", "Records"),
                            ("DH", "Digital Humanities"),
                            ("GLAM", "GLAMR"),
                        ],
                        max_length=4,
                    ),
                ),
                ("url", models.URLField(max_length=400, unique=True)),
                (
                    "feed",
                    models.URLField(
                        blank=True, max_length=1000, null=True, unique=True
                    ),
                ),
                (
                    "description",
                    models.TextField(blank=True, max_length=250, null=True),
                ),
                (
                    "activitypub_account_name",
                    models.CharField(blank=True, max_length=200, null=True),
                ),
                (
                    "contact_email",
                    models.EmailField(blank=True, max_length=254, null=True),
                ),
                ("announced", models.BooleanField(default=False)),
                ("approved", models.BooleanField(default=False)),
                ("active", models.BooleanField(default=True, null=True)),
                ("failing", models.BooleanField(blank=True, default=False, null=True)),
                ("updateddate", models.DateTimeField()),
                ("pubdate", models.DateTimeField(default=None, null=True)),
            ],
        ),
        migrations.CreateModel(
            name="SiteMessage",
            fields=[
                (
                    "id",
                    models.BigAutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                ("message", models.TextField(max_length=999)),
            ],
        ),
        migrations.CreateModel(
            name="Subscriber",
            fields=[
                (
                    "id",
                    models.BigAutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                (
                    "email",
                    models.EmailField(
                        blank=True, max_length=254, null=True, unique=True
                    ),
                ),
                ("confirmed", models.BooleanField(default=False, editable=False)),
                ("token", models.UUIDField(default=uuid.uuid4, editable=False)),
            ],
        ),
        migrations.CreateModel(
            name="Tag",
            fields=[
                (
                    "id",
                    models.BigAutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                ("name", models.CharField(max_length=100, unique=True)),
            ],
        ),
        migrations.CreateModel(
            name="Edition",
            fields=[
                (
                    "id",
                    models.BigAutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                ("title", models.CharField(max_length=2000)),
                (
                    "author_name",
                    models.CharField(blank=True, max_length=1000, null=True),
                ),
                ("url", models.URLField(max_length=2000, unique=True)),
                ("description", models.TextField(blank=True, null=True)),
                ("updateddate", models.DateTimeField()),
                (
                    "pubdate",
                    models.DateTimeField(default=django.utils.timezone.now, null=True),
                ),
                ("guid", models.CharField(max_length=2000)),
                (
                    "newsletter",
                    models.ForeignKey(
                        on_delete=django.db.models.deletion.CASCADE,
                        related_name="editions",
                        to="blogs.newsletter",
                    ),
                ),
            ],
        ),
        migrations.CreateModel(
            name="CallForPapers",
            fields=[
                (
                    "id",
                    models.BigAutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                ("name", models.CharField(max_length=100)),
                ("details", models.TextField(blank=True, max_length=250, null=True)),
                (
                    "pubdate",
                    models.DateTimeField(default=django.utils.timezone.now, null=True),
                ),
                ("opening_date", models.DateField()),
                ("closing_date", models.DateField()),
                ("announcements", models.IntegerField(default=0, null=True)),
                ("approved", models.BooleanField(default=False)),
                (
                    "event",
                    models.ForeignKey(
                        on_delete=django.db.models.deletion.CASCADE,
                        related_name="cfp",
                        to="blogs.event",
                    ),
                ),
            ],
        ),
        migrations.CreateModel(
            name="Article",
            fields=[
                (
                    "id",
                    models.BigAutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                ("title", models.CharField(max_length=2000)),
                (
                    "author_name",
                    models.CharField(blank=True, max_length=1000, null=True),
                ),
                ("url", models.URLField(max_length=2000, unique=True)),
                ("description", models.TextField(blank=True, null=True)),
                ("updateddate", models.DateTimeField()),
                (
                    "pubdate",
                    models.DateTimeField(default=django.utils.timezone.now, null=True),
                ),
                ("guid", models.CharField(max_length=2000)),
                (
                    "blog",
                    models.ForeignKey(
                        on_delete=django.db.models.deletion.CASCADE,
                        related_name="articles",
                        to="blogs.blog",
                    ),
                ),
                (
                    "tags",
                    models.ManyToManyField(related_name="articles", to="blogs.tag"),
                ),
            ],
            options={
                "abstract": False,
            },
        ),
    ]
