Cleaning up model fields

This commit is contained in:
Mouse Reeve
2020-02-15 14:38:46 -08:00
parent 906aa317c9
commit 5cd43d53ba
8 changed files with 50 additions and 62 deletions

View File

@ -1,4 +1,4 @@
# Generated by Django 3.0.3 on 2020-02-15 22:15
# Generated by Django 3.0.3 on 2020-02-15 22:50
from django.conf import settings
import django.contrib.auth.models
@ -35,7 +35,6 @@ class Migration(migrations.Migration):
('date_joined', models.DateTimeField(default=django.utils.timezone.now, verbose_name='date joined')),
('private_key', models.TextField(blank=True, null=True)),
('public_key', models.TextField(blank=True, null=True)),
('api_key', models.CharField(blank=True, max_length=255, null=True)),
('actor', models.CharField(max_length=255, unique=True)),
('inbox', models.CharField(max_length=255, unique=True)),
('shared_inbox', models.CharField(blank=True, max_length=255, null=True)),
@ -65,6 +64,7 @@ class Migration(migrations.Migration):
('content', fedireads.utils.fields.JSONField(max_length=5000)),
('activity_type', models.CharField(max_length=255)),
('fedireads_type', models.CharField(blank=True, max_length=255, null=True)),
('local', models.BooleanField(default=True)),
('created_date', models.DateTimeField(auto_now_add=True)),
('updated_date', models.DateTimeField(auto_now=True)),
('user', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to=settings.AUTH_USER_MODEL)),
@ -84,7 +84,6 @@ 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)),
('openlibrary_key', models.CharField(max_length=255, unique=True)),
('data', fedireads.utils.fields.JSONField()),
('cover', models.ImageField(blank=True, null=True, upload_to='covers/')),
@ -99,7 +98,6 @@ class Migration(migrations.Migration):
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('server_name', models.CharField(max_length=255, unique=True)),
('shared_inbox', models.CharField(max_length=255, unique=True)),
('status', models.CharField(default='federated', max_length=255)),
('application_type', models.CharField(max_length=255, null=True)),
],
@ -108,11 +106,9 @@ class Migration(migrations.Migration):
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, unique=True)),
('name', models.CharField(max_length=100)),
('identifier', models.CharField(max_length=100)),
('editable', models.BooleanField(default=True)),
('shelf_type', models.CharField(default='custom', max_length=100)),
('created_date', models.DateTimeField(auto_now_add=True)),
('updated_date', models.DateTimeField(auto_now=True)),
],
@ -123,6 +119,7 @@ class Migration(migrations.Migration):
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('status_type', models.CharField(default='Note', max_length=255)),
('activity', fedireads.utils.fields.JSONField(max_length=5000, null=True)),
('local', models.BooleanField(default=True)),
('content', models.TextField(blank=True, null=True)),
('created_date', models.DateTimeField(auto_now_add=True)),
('updated_date', models.DateTimeField(auto_now=True)),
@ -134,7 +131,7 @@ class Migration(migrations.Migration):
name='ShelfBook',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('added_date', models.DateTimeField(auto_now_add=True)),
('created_date', models.DateTimeField(auto_now_add=True)),
('added_by', models.ForeignKey(blank=True, null=True, 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')),
('shelf', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='fedireads.Shelf')),
@ -189,7 +186,7 @@ class Migration(migrations.Migration):
),
migrations.AlterUniqueTogether(
name='shelf',
unique_together={('user', 'name')},
unique_together={('user', 'identifier')},
),
migrations.CreateModel(
name='ReviewActivity',