:hedgehog: PostHog is the leading platform for building self-driving products. Our developer tools – AI observability, analytics, session replay, flags, experiments, error tracking, logs, and more – capture all the context agents need to diagnose problems, uncover opportunities, and ship fixes. Steer it all from Slack, web, desktop, or the MCP.
Python ab-testingai-analyticsanalyticscdpdata-warehouseexperimentsfeature-flagsjavascriptproduct-analyticspythonreactsession-replaysurveystypescriptweb-analytics
# Generated by Django 5.2.18 on 2026-10-20 15:44
import django.db.models.manager
import django.db.models.deletion
from django.conf import settings
from django.db import migrations, models
import posthog.uuidt
class Migration(migrations.Migration):
dependencies = [
("posthog", "1404_organization_inactive_quota_index"),
("signals", "0186_signalteamconfig_onboarding"),
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
]
operations = [
migrations.CreateModel(
name="UserActivitySummary",
fields=[
(
"id",
models.UUIDField(
default=posthog.uuidt.uuid7,
editable=False,
primary_key=True,
serialize=False,
),
),
("summary", models.JSONField(blank=True, null=True)),
("summary_text", models.TextField(blank=True, null=True)),
("generated_at", models.DateTimeField(blank=True, null=True)),
("model", models.CharField(blank=True, max_length=100, null=True)),
(
"prompt_version",
models.PositiveSmallIntegerField(blank=True, null=True),
),
(
"render_version",
models.PositiveSmallIntegerField(blank=True, null=True),
),
("tokens_in", models.IntegerField(blank=True, null=True)),
("tokens_out", models.IntegerField(blank=True, null=True)),
("cost_usd", models.FloatField(blank=True, null=True)),
("latency_ms", models.IntegerField(blank=True, null=True)),
("inputs_used", models.JSONField(blank=True, default=dict)),
(
"status",
models.CharField(choices=[("ok", "Ok"), ("failed", "Failed")], max_length=20),
),
("error", models.CharField(blank=True, max_length=200, null=True)),
("input_watermark", models.DateTimeField(blank=True, null=True)),
("next_eligible_at", models.DateTimeField(blank=True, null=True)),
("created_at", models.DateTimeField(auto_now_add=True)),
("updated_at", models.DateTimeField(auto_now=True)),
(
"team",
models.ForeignKey(
db_constraint=False,
on_delete=django.db.models.deletion.CASCADE,
related_name="+",
to="posthog.team",
),
),
(
"user",
models.ForeignKey(
db_constraint=False,
on_delete=django.db.models.deletion.CASCADE,
related_name="+",
to=settings.AUTH_USER_MODEL,
),
),
],
options={
"default_manager_name": "all_teams",
"constraints": [
models.UniqueConstraint(
fields=("team", "user"),
name="signals_activity_summary_team_user",
)
],
},
managers=[
("all_teams", django.db.models.manager.Manager()),
],
),
]