2020-04-21 14:09:21 +00:00
|
|
|
# Generated by Django 3.0.3 on 2020-04-21 13:47
|
|
|
|
|
|
|
|
from django.conf import settings
|
|
|
|
from django.db import migrations, models
|
|
|
|
import django.db.models.deletion
|
|
|
|
import django.utils.timezone
|
2020-09-21 15:10:37 +00:00
|
|
|
import bookwyrm.utils.fields
|
2020-04-21 14:09:21 +00:00
|
|
|
|
|
|
|
|
|
|
|
class Migration(migrations.Migration):
|
|
|
|
|
|
|
|
dependencies = [
|
2020-09-21 15:10:37 +00:00
|
|
|
('bookwyrm', '0031_readthrough'),
|
2020-04-21 14:09:21 +00:00
|
|
|
]
|
|
|
|
|
|
|
|
operations = [
|
|
|
|
migrations.CreateModel(
|
|
|
|
name='ImportItem',
|
|
|
|
fields=[
|
|
|
|
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
2020-09-21 15:10:37 +00:00
|
|
|
('data', bookwyrm.utils.fields.JSONField()),
|
2020-04-21 14:09:21 +00:00
|
|
|
],
|
|
|
|
),
|
|
|
|
migrations.CreateModel(
|
|
|
|
name='ImportJob',
|
|
|
|
fields=[
|
|
|
|
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
|
|
|
('created_date', models.DateTimeField(default=django.utils.timezone.now)),
|
|
|
|
('task_id', models.CharField(max_length=100, null=True)),
|
|
|
|
],
|
|
|
|
),
|
|
|
|
migrations.RemoveConstraint(
|
|
|
|
model_name='notification',
|
|
|
|
name='notification_type_valid',
|
|
|
|
),
|
|
|
|
migrations.AlterField(
|
|
|
|
model_name='notification',
|
|
|
|
name='notification_type',
|
|
|
|
field=models.CharField(choices=[('FAVORITE', 'Favorite'), ('REPLY', 'Reply'), ('TAG', 'Tag'), ('FOLLOW', 'Follow'), ('FOLLOW_REQUEST', 'Follow Request'), ('BOOST', 'Boost'), ('IMPORT_RESULT', 'Import Result')], max_length=255),
|
|
|
|
),
|
|
|
|
migrations.AddConstraint(
|
|
|
|
model_name='notification',
|
|
|
|
constraint=models.CheckConstraint(check=models.Q(notification_type__in=['FAVORITE', 'REPLY', 'TAG', 'FOLLOW', 'FOLLOW_REQUEST', 'BOOST', 'IMPORT_RESULT']), name='notification_type_valid'),
|
|
|
|
),
|
|
|
|
migrations.AddField(
|
|
|
|
model_name='importjob',
|
|
|
|
name='user',
|
|
|
|
field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL),
|
|
|
|
),
|
|
|
|
migrations.AddField(
|
|
|
|
model_name='importitem',
|
|
|
|
name='book',
|
2020-09-21 15:10:37 +00:00
|
|
|
field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='bookwyrm.Book'),
|
2020-04-21 14:09:21 +00:00
|
|
|
),
|
|
|
|
migrations.AddField(
|
|
|
|
model_name='importitem',
|
|
|
|
name='job',
|
2020-09-21 15:10:37 +00:00
|
|
|
field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='items', to='bookwyrm.ImportJob'),
|
2020-04-21 14:09:21 +00:00
|
|
|
),
|
|
|
|
]
|