moviewyrm/bookwyrm/migrations/0016_auto_20201129_0304.py

106 lines
3.1 KiB
Python
Raw Normal View History

2020-11-29 03:05:12 +00:00
# Generated by Django 3.0.7 on 2020-11-29 03:04
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
from django.contrib.postgres.fields import ArrayField
2021-03-08 16:49:10 +00:00
class Migration(migrations.Migration):
dependencies = [
2021-03-08 16:49:10 +00:00
("bookwyrm", "0015_auto_20201128_0349"),
]
operations = [
2020-11-29 03:05:12 +00:00
migrations.AlterField(
2021-03-08 16:49:10 +00:00
model_name="book",
name="subject_places",
field=ArrayField(
base_field=models.CharField(max_length=255),
blank=True,
default=list,
null=True,
size=None,
),
2020-11-29 03:05:12 +00:00
),
migrations.AlterField(
2021-03-08 16:49:10 +00:00
model_name="book",
name="subjects",
field=ArrayField(
base_field=models.CharField(max_length=255),
blank=True,
default=list,
null=True,
size=None,
),
2020-11-29 03:05:12 +00:00
),
migrations.AlterField(
2021-03-08 16:49:10 +00:00
model_name="edition",
name="parent_work",
field=models.ForeignKey(
null=True,
on_delete=django.db.models.deletion.PROTECT,
related_name="editions",
to="bookwyrm.Work",
),
2020-11-29 03:05:12 +00:00
),
migrations.AlterField(
2021-03-08 16:49:10 +00:00
model_name="tag",
name="name",
2020-11-29 03:05:12 +00:00
field=models.CharField(max_length=100, unique=True),
),
migrations.AlterUniqueTogether(
2021-03-08 16:49:10 +00:00
name="tag",
unique_together=set(),
),
migrations.RemoveField(
2021-03-08 16:49:10 +00:00
model_name="tag",
name="book",
),
migrations.RemoveField(
2021-03-08 16:49:10 +00:00
model_name="tag",
name="user",
),
migrations.CreateModel(
2021-03-08 16:49:10 +00:00
name="UserTag",
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", models.CharField(max_length=255, null=True)),
(
"book",
models.ForeignKey(
on_delete=django.db.models.deletion.PROTECT,
to="bookwyrm.Edition",
),
),
(
"tag",
models.ForeignKey(
on_delete=django.db.models.deletion.PROTECT, to="bookwyrm.Tag"
),
),
(
"user",
models.ForeignKey(
on_delete=django.db.models.deletion.PROTECT,
to=settings.AUTH_USER_MODEL,
),
),
],
options={
2021-03-08 16:49:10 +00:00
"unique_together": {("user", "book", "tag")},
},
),
]