From e44a321ec53bc84b5986ac0371b4122201fa3a5a Mon Sep 17 00:00:00 2001 From: Andrew Godwin Date: Sat, 5 Nov 2022 17:51:54 -0600 Subject: Get Actor fetching and parsing working --- users/migrations/0001_initial.py | 67 +++++++++++++++++++++++++++++++++++----- 1 file changed, 59 insertions(+), 8 deletions(-) (limited to 'users/migrations') diff --git a/users/migrations/0001_initial.py b/users/migrations/0001_initial.py index e258d1b..5f9eacb 100644 --- a/users/migrations/0001_initial.py +++ b/users/migrations/0001_initial.py @@ -1,4 +1,4 @@ -# Generated by Django 4.1.3 on 2022-11-05 19:15 +# Generated by Django 4.1.3 on 2022-11-05 23:50 import functools @@ -96,32 +96,50 @@ class Migration(migrations.Migration): ), ("handle", models.CharField(max_length=500, unique=True)), ("name", models.CharField(blank=True, max_length=500, null=True)), - ("bio", models.TextField(blank=True, null=True)), + ("summary", models.TextField(blank=True, null=True)), + ("actor_uri", models.CharField(blank=True, max_length=500, null=True)), ( - "profile_image", + "profile_uri", + models.CharField(blank=True, max_length=500, null=True), + ), + ("inbox_uri", models.CharField(blank=True, max_length=500, null=True)), + ("outbox_uri", models.CharField(blank=True, max_length=500, null=True)), + ("icon_uri", models.CharField(blank=True, max_length=500, null=True)), + ("image_uri", models.CharField(blank=True, max_length=500, null=True)), + ( + "icon", models.ImageField( + blank=True, + null=True, upload_to=functools.partial( users.models.identity.upload_namer, *("profile_images",), **{}, - ) + ), ), ), ( - "background_image", + "image", models.ImageField( + blank=True, + null=True, upload_to=functools.partial( users.models.identity.upload_namer, *("background_images",), **{}, - ) + ), ), ), ("local", models.BooleanField()), - ("private_key", models.BinaryField(blank=True, null=True)), - ("public_key", models.BinaryField(blank=True, null=True)), + ( + "manually_approves_followers", + models.BooleanField(blank=True, null=True), + ), + ("private_key", models.TextField(blank=True, null=True)), + ("public_key", models.TextField(blank=True, null=True)), ("created", models.DateTimeField(auto_now_add=True)), ("updated", models.DateTimeField(auto_now=True)), + ("fetched", models.DateTimeField(blank=True, null=True)), ("deleted", models.DateTimeField(blank=True, null=True)), ( "users", @@ -131,4 +149,37 @@ class Migration(migrations.Migration): ), ], ), + migrations.CreateModel( + name="Follow", + fields=[ + ( + "id", + models.BigAutoField( + auto_created=True, + primary_key=True, + serialize=False, + verbose_name="ID", + ), + ), + ("note", models.TextField(blank=True, null=True)), + ("created", models.DateTimeField(auto_now_add=True)), + ("updated", models.DateTimeField(auto_now=True)), + ( + "source", + models.ForeignKey( + on_delete=django.db.models.deletion.CASCADE, + related_name="outbound_follows", + to="users.identity", + ), + ), + ( + "target", + models.ForeignKey( + on_delete=django.db.models.deletion.CASCADE, + related_name="inbound_follows", + to="users.identity", + ), + ), + ], + ), ] -- cgit v1.2.3