kopia lustrzana https://github.com/jointakahe/takahe
58 wiersze
2.1 KiB
Python
58 wiersze
2.1 KiB
Python
# Generated by Django 4.1.3 on 2022-11-27 20:16
|
|
|
|
import django.contrib.postgres.indexes
|
|
from django.db import migrations, models
|
|
|
|
import activities.models.hashtag
|
|
import stator.models
|
|
|
|
|
|
class Migration(migrations.Migration):
|
|
dependencies = [
|
|
("activities", "0001_initial"),
|
|
]
|
|
|
|
operations = [
|
|
migrations.CreateModel(
|
|
name="Hashtag",
|
|
fields=[
|
|
("state_ready", models.BooleanField(default=True)),
|
|
("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)),
|
|
(
|
|
"hashtag",
|
|
models.SlugField(max_length=100, primary_key=True, serialize=False),
|
|
),
|
|
(
|
|
"name_override",
|
|
models.CharField(blank=True, max_length=100, null=True),
|
|
),
|
|
("public", models.BooleanField(null=True)),
|
|
(
|
|
"state",
|
|
stator.models.StateField(
|
|
choices=[("outdated", "outdated"), ("updated", "updated")],
|
|
default="outdated",
|
|
graph=activities.models.hashtag.HashtagStates,
|
|
max_length=100,
|
|
),
|
|
),
|
|
("stats", models.JSONField(blank=True, null=True)),
|
|
("stats_updated", models.DateTimeField(blank=True, null=True)),
|
|
("aliases", models.JSONField(blank=True, null=True)),
|
|
("created", models.DateTimeField(auto_now_add=True)),
|
|
("updated", models.DateTimeField(auto_now=True)),
|
|
],
|
|
options={
|
|
"abstract": False,
|
|
},
|
|
),
|
|
migrations.AddIndex(
|
|
model_name="post",
|
|
index=django.contrib.postgres.indexes.GinIndex(
|
|
fields=["hashtags"], name="hashtags_gin"
|
|
),
|
|
),
|
|
]
|