kopia lustrzana https://github.com/jointakahe/takahe
61 wiersze
2.0 KiB
Python
61 wiersze
2.0 KiB
Python
# Generated by Django 4.2.8 on 2024-01-02 16:20
|
|
|
|
from django.db import migrations, models
|
|
|
|
import stator.models
|
|
import users.models.relay
|
|
|
|
|
|
class Migration(migrations.Migration):
|
|
dependencies = [
|
|
("users", "0022_follow_request"),
|
|
]
|
|
|
|
operations = [
|
|
migrations.CreateModel(
|
|
name="Relay",
|
|
fields=[
|
|
(
|
|
"id",
|
|
models.BigAutoField(
|
|
auto_created=True,
|
|
primary_key=True,
|
|
serialize=False,
|
|
verbose_name="ID",
|
|
),
|
|
),
|
|
("state_changed", models.DateTimeField(auto_now_add=True)),
|
|
("state_next_attempt", models.DateTimeField(blank=True, null=True)),
|
|
(
|
|
"state_locked_until",
|
|
models.DateTimeField(blank=True, db_index=True, null=True),
|
|
),
|
|
("inbox_uri", models.CharField(max_length=500, unique=True)),
|
|
(
|
|
"state",
|
|
stator.models.StateField(
|
|
choices=[
|
|
("new", "new"),
|
|
("subscribed", "subscribed"),
|
|
("unsubscribing", "unsubscribing"),
|
|
("unsubscribed", "unsubscribed"),
|
|
],
|
|
default="new",
|
|
graph=users.models.relay.RelayStates,
|
|
max_length=100,
|
|
),
|
|
),
|
|
("created", models.DateTimeField(auto_now_add=True)),
|
|
("updated", models.DateTimeField(auto_now=True)),
|
|
],
|
|
options={
|
|
"indexes": [
|
|
models.Index(
|
|
fields=["state", "state_next_attempt", "state_locked_until"],
|
|
name="ix_relay_state_next",
|
|
)
|
|
],
|
|
},
|
|
),
|
|
]
|