summaryrefslogtreecommitdiffstats
path: root/users/migrations/0001_initial.py
diff options
context:
space:
mode:
Diffstat (limited to 'users/migrations/0001_initial.py')
-rw-r--r--users/migrations/0001_initial.py68
1 files changed, 65 insertions, 3 deletions
diff --git a/users/migrations/0001_initial.py b/users/migrations/0001_initial.py
index f5ebf55..2f64337 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-07 04:19
+# Generated by Django 4.1.3 on 2022-11-10 05:58
import functools
@@ -6,7 +6,10 @@ import django.db.models.deletion
from django.conf import settings
from django.db import migrations, models
+import stator.models
+import users.models.follow
import users.models.identity
+import users.models.inbox_message
class Migration(migrations.Migration):
@@ -78,6 +81,37 @@ class Migration(migrations.Migration):
],
),
migrations.CreateModel(
+ name="InboxMessage",
+ fields=[
+ (
+ "id",
+ models.BigAutoField(
+ auto_created=True,
+ primary_key=True,
+ serialize=False,
+ verbose_name="ID",
+ ),
+ ),
+ ("state_ready", models.BooleanField(default=False)),
+ ("state_changed", models.DateTimeField(auto_now_add=True)),
+ ("state_attempted", models.DateTimeField(blank=True, null=True)),
+ ("state_locked_until", models.DateTimeField(blank=True, null=True)),
+ ("message", models.JSONField()),
+ (
+ "state",
+ stator.models.StateField(
+ choices=[("received", "received"), ("processed", "processed")],
+ default="received",
+ graph=users.models.inbox_message.InboxMessageStates,
+ max_length=100,
+ ),
+ ),
+ ],
+ options={
+ "abstract": False,
+ },
+ ),
+ migrations.CreateModel(
name="UserEvent",
fields=[
(
@@ -124,7 +158,20 @@ class Migration(migrations.Migration):
verbose_name="ID",
),
),
+ ("state_ready", models.BooleanField(default=False)),
+ ("state_changed", models.DateTimeField(auto_now_add=True)),
+ ("state_attempted", models.DateTimeField(blank=True, null=True)),
+ ("state_locked_until", models.DateTimeField(blank=True, null=True)),
("actor_uri", models.CharField(max_length=500, unique=True)),
+ (
+ "state",
+ stator.models.StateField(
+ choices=[("outdated", "outdated"), ("updated", "updated")],
+ default="outdated",
+ graph=users.models.identity.IdentityStates,
+ max_length=100,
+ ),
+ ),
("local", models.BooleanField()),
("username", models.CharField(blank=True, max_length=500, null=True)),
("name", models.CharField(blank=True, max_length=500, null=True)),
@@ -239,10 +286,25 @@ class Migration(migrations.Migration):
verbose_name="ID",
),
),
+ ("state_ready", models.BooleanField(default=False)),
+ ("state_changed", models.DateTimeField(auto_now_add=True)),
+ ("state_attempted", models.DateTimeField(blank=True, null=True)),
+ ("state_locked_until", models.DateTimeField(blank=True, null=True)),
("uri", models.CharField(blank=True, max_length=500, null=True)),
("note", models.TextField(blank=True, null=True)),
- ("requested", models.BooleanField(default=False)),
- ("accepted", models.BooleanField(default=False)),
+ (
+ "state",
+ stator.models.StateField(
+ choices=[
+ ("pending", "pending"),
+ ("requested", "requested"),
+ ("accepted", "accepted"),
+ ],
+ default="pending",
+ graph=users.models.follow.FollowStates,
+ max_length=100,
+ ),
+ ),
("created", models.DateTimeField(auto_now_add=True)),
("updated", models.DateTimeField(auto_now=True)),
(