2020-11-29 03:05:12 +00:00
|
|
|
# Generated by Django 3.0.7 on 2020-11-29 03:04
|
2020-11-28 19:00:40 +00:00
|
|
|
|
|
|
|
from django.conf import settings
|
|
|
|
from django.db import migrations, models
|
|
|
|
import django.db.models.deletion
|
2020-12-13 04:18:03 +00:00
|
|
|
from django.contrib.postgres.fields import ArrayField
|
2020-11-28 19:00:40 +00:00
|
|
|
|
2021-03-08 16:49:10 +00:00
|
|
|
|
2020-11-28 19:00:40 +00:00
|
|
|
class Migration(migrations.Migration):
|
|
|
|
|
|
|
|
dependencies = [
|
2021-03-08 16:49:10 +00:00
|
|
|
("bookwyrm", "0015_auto_20201128_0349"),
|
2020-11-28 19:00:40 +00:00
|
|
|
]
|
|
|
|
|
|
|
|
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),
|
|
|
|
),
|
2020-11-28 19:00:40 +00:00
|
|
|
migrations.AlterUniqueTogether(
|
2021-03-08 16:49:10 +00:00
|
|
|
name="tag",
|
2020-11-28 19:00:40 +00:00
|
|
|
unique_together=set(),
|
|
|
|
),
|
|
|
|
migrations.RemoveField(
|
2021-03-08 16:49:10 +00:00
|
|
|
model_name="tag",
|
|
|
|
name="book",
|
2020-11-28 19:00:40 +00:00
|
|
|
),
|
|
|
|
migrations.RemoveField(
|
2021-03-08 16:49:10 +00:00
|
|
|
model_name="tag",
|
|
|
|
name="user",
|
2020-11-28 19:00:40 +00:00
|
|
|
),
|
|
|
|
migrations.CreateModel(
|
2021-03-08 16:49:10 +00:00
|
|
|
name="UserTag",
|
2020-11-28 19:00:40 +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", 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,
|
|
|
|
),
|
|
|
|
),
|
2020-11-28 19:00:40 +00:00
|
|
|
],
|
|
|
|
options={
|
2021-03-08 16:49:10 +00:00
|
|
|
"unique_together": {("user", "book", "tag")},
|
2020-11-28 19:00:40 +00:00
|
|
|
},
|
|
|
|
),
|
|
|
|
]
|