mirror of
https://github.com/bookwyrm-social/bookwyrm.git
synced 2024-12-30 20:10:36 +00:00
77841909fe
Fixes #28
38 lines
1.4 KiB
Python
38 lines
1.4 KiB
Python
# Generated by Django 3.0.3 on 2020-02-19 08:16
|
|
|
|
from django.conf import settings
|
|
from django.db import migrations, models
|
|
import django.db.models.deletion
|
|
|
|
|
|
class Migration(migrations.Migration):
|
|
|
|
dependencies = [
|
|
('fedireads', '0001_initial'),
|
|
]
|
|
|
|
operations = [
|
|
migrations.CreateModel(
|
|
name='Favorite',
|
|
fields=[
|
|
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
|
('content', models.TextField(blank=True, null=True)),
|
|
('created_date', models.DateTimeField(auto_now_add=True)),
|
|
('status', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='fedireads.Status')),
|
|
('user', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to=settings.AUTH_USER_MODEL)),
|
|
],
|
|
options={
|
|
'unique_together': {('user', 'status')},
|
|
},
|
|
),
|
|
migrations.AddField(
|
|
model_name='status',
|
|
name='favorites',
|
|
field=models.ManyToManyField(related_name='user_favorites', through='fedireads.Favorite', to=settings.AUTH_USER_MODEL),
|
|
),
|
|
migrations.AddField(
|
|
model_name='user',
|
|
name='favorites',
|
|
field=models.ManyToManyField(related_name='favorite_statuses', through='fedireads.Favorite', to='fedireads.Status'),
|
|
),
|
|
]
|