ausglamr/blogs/migrations/0001_initial.py

450 lines
16 KiB
Python
Raw Normal View History

2024-01-26 11:00:26 +11:00
# Generated by Django 4.2.7 on 2024-01-22 08:13
2024-01-04 11:54:56 +11:00
2024-01-07 16:58:56 +11:00
import blogs.models.blog
2024-01-04 11:54:56 +11:00
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),
),
2024-01-04 11:54:56 +11:00
("url", models.URLField(max_length=2000, unique=True)),
("description", models.TextField(blank=True, null=True)),
("updateddate", models.DateTimeField()),
2024-01-26 11:00:26 +11:00
(
"pubdate",
models.DateTimeField(default=django.utils.timezone.now, null=True),
),
2024-01-04 11:54:56 +11:00
("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)),
2024-01-04 11:54:56 +11:00
("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)),
2024-01-07 16:58:56 +11:00
("active", models.BooleanField(default=True, null=True)),
2024-01-04 11:54:56 +11:00
(
"activitypub_account_name",
2024-01-07 16:58:56 +11:00
models.CharField(
blank=True,
max_length=200,
null=True,
validators=[blogs.models.blog.validate_ap_address],
),
2024-01-04 11:54:56 +11:00
),
(
2024-01-07 16:58:56 +11:00
"contact_email",
2024-01-04 11:54:56 +11:00
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)),
2024-01-04 11:54:56 +11:00
(
"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),
),
2024-01-26 11:00:26 +11:00
("pubdate", models.DateTimeField()),
2024-01-04 11:54:56 +11:00
("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),
),
(
2024-01-07 16:58:56 +11:00
"contact_email",
2024-01-04 11:54:56 +11:00
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)),
2024-01-04 11:54:56 +11:00
(
"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),
),
2024-01-04 11:54:56 +11:00
(
2024-01-07 16:58:56 +11:00
"contact_email",
2024-01-04 11:54:56 +11:00
models.EmailField(blank=True, max_length=254, null=True),
),
("announced", models.BooleanField(default=False)),
("approved", models.BooleanField(default=False)),
2024-01-26 11:00:26 +11:00
(
"pubdate",
models.DateTimeField(default=django.utils.timezone.now, null=True),
),
2024-01-04 11:54:56 +11:00
],
),
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)),
2024-01-26 11:00:26 +11:00
("author_name", models.CharField(max_length=100)),
2024-01-04 11:54:56 +11:00
(
"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),
),
2024-01-04 11:54:56 +11:00
(
"activitypub_account_name",
models.CharField(blank=True, max_length=200, null=True),
),
(
2024-01-07 16:58:56 +11:00
"contact_email",
2024-01-04 11:54:56 +11:00
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()),
2024-01-26 11:00:26 +11:00
("pubdate", models.DateTimeField(default=None, null=True)),
2024-01-04 11:54:56 +11:00
],
),
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()),
2024-01-26 11:00:26 +11:00
(
"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",
),
),
],
),
2024-01-04 11:54:56 +11:00
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)),
2024-01-26 11:00:26 +11:00
(
"pubdate",
models.DateTimeField(default=django.utils.timezone.now, null=True),
),
2024-01-04 11:54:56 +11:00
("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),
),
2024-01-04 11:54:56 +11:00
("url", models.URLField(max_length=2000, unique=True)),
("description", models.TextField(blank=True, null=True)),
("updateddate", models.DateTimeField()),
2024-01-26 11:00:26 +11:00
(
"pubdate",
models.DateTimeField(default=django.utils.timezone.now, null=True),
),
2024-01-04 11:54:56 +11:00
("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,
},
),
]