adding federation

This commit is contained in:
Mouse Reeve
2020-01-26 17:55:02 -08:00
parent e30e06c283
commit 6b85d8838f
11 changed files with 244 additions and 83 deletions

View File

@ -1,4 +1,4 @@
# Generated by Django 2.0.13 on 2020-01-26 20:12
# Generated by Django 2.0.13 on 2020-01-27 01:47
from django.conf import settings
import django.contrib.auth.models
@ -32,8 +32,9 @@ class Migration(migrations.Migration):
('is_staff', models.BooleanField(default=False, help_text='Designates whether the user can log into this admin site.', verbose_name='staff status')),
('is_active', models.BooleanField(default=True, help_text='Designates whether this user should be treated as active. Unselect this instead of deleting accounts.', verbose_name='active')),
('date_joined', models.DateTimeField(default=django.utils.timezone.now, verbose_name='date joined')),
('private_key', models.CharField(max_length=1024)),
('public_key', models.CharField(max_length=1024)),
('activitypub_id', models.CharField(max_length=255)),
('private_key', models.TextField(blank=True, null=True)),
('public_key', models.TextField()),
('api_key', models.CharField(blank=True, max_length=255, null=True)),
('actor', django.contrib.postgres.fields.jsonb.JSONField()),
('local', models.BooleanField(default=True)),
@ -52,16 +53,6 @@ class Migration(migrations.Migration):
('objects', django.contrib.auth.models.UserManager()),
],
),
migrations.CreateModel(
name='Activity',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('data', django.contrib.postgres.fields.jsonb.JSONField()),
('remote', models.BooleanField(default=False)),
('created_date', models.DateTimeField(auto_now_add=True)),
('user', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to=settings.AUTH_USER_MODEL)),
],
),
migrations.CreateModel(
name='Author',
fields=[
@ -76,6 +67,7 @@ class Migration(migrations.Migration):
name='Book',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('activitypub_id', models.CharField(max_length=255)),
('openlibary_key', models.CharField(max_length=255)),
('data', django.contrib.postgres.fields.jsonb.JSONField()),
('added_date', models.DateTimeField(auto_now_add=True)),
@ -84,26 +76,12 @@ class Migration(migrations.Migration):
('authors', models.ManyToManyField(to='fedireads.Author')),
],
),
migrations.CreateModel(
name='Review',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('name', models.CharField(max_length=255)),
('content', django.contrib.postgres.fields.jsonb.JSONField(max_length=5000)),
('created_date', models.DateTimeField(auto_now_add=True)),
('updated_date', models.DateTimeField(auto_now=True)),
('star_rating', models.IntegerField(default=0)),
('author', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to=settings.AUTH_USER_MODEL)),
('book', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='fedireads.Book')),
],
options={
'abstract': False,
},
),
migrations.CreateModel(
name='Shelf',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('activitypub_id', models.CharField(max_length=255)),
('identifier', models.CharField(max_length=255)),
('name', models.CharField(max_length=100)),
('editable', models.BooleanField(default=True)),
('shelf_type', models.CharField(default='custom', max_length=100)),
@ -151,4 +129,12 @@ class Migration(migrations.Migration):
name='works',
field=models.ManyToManyField(to='fedireads.Work'),
),
migrations.AlterUniqueTogether(
name='shelfbook',
unique_together={('book', 'shelf')},
),
migrations.AlterUniqueTogether(
name='shelf',
unique_together={('user', 'name')},
),
]