moviewyrm/bookwyrm/migrations/0036_annualgoal.py

66 lines
2.1 KiB
Python
Raw Permalink Normal View History

2021-01-16 19:34:19 +00:00
# Generated by Django 3.0.7 on 2021-01-16 18:43
2021-01-16 16:18:54 +00:00
import bookwyrm.models.fields
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
2021-03-08 16:49:10 +00:00
("bookwyrm", "0035_edition_edition_rank"),
2021-01-16 16:18:54 +00:00
]
operations = [
migrations.CreateModel(
2021-03-08 16:49:10 +00:00
name="AnnualGoal",
2021-01-16 16:18:54 +00:00
fields=[
2021-03-08 16:49:10 +00:00
(
"id",
models.AutoField(
auto_created=True,
primary_key=True,
serialize=False,
verbose_name="ID",
),
),
("created_date", models.DateTimeField(auto_now_add=True)),
("updated_date", models.DateTimeField(auto_now=True)),
(
"remote_id",
bookwyrm.models.fields.RemoteIdField(
max_length=255,
null=True,
validators=[bookwyrm.models.fields.validate_remote_id],
),
),
("goal", models.IntegerField()),
("year", models.IntegerField(default=2021)),
(
"privacy",
models.CharField(
choices=[
("public", "Public"),
("unlisted", "Unlisted"),
("followers", "Followers"),
("direct", "Direct"),
],
default="public",
max_length=255,
),
),
(
"user",
models.ForeignKey(
on_delete=django.db.models.deletion.PROTECT,
to=settings.AUTH_USER_MODEL,
),
),
2021-01-16 16:18:54 +00:00
],
options={
2021-03-08 16:49:10 +00:00
"unique_together": {("user", "year")},
2021-01-16 16:18:54 +00:00
},
),
]