: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-21 16:05
import django.db.models.manager
import django.db.models.deletion
from django.db import migrations, models
import posthog.uuidt
class Migration(migrations.Migration):
dependencies = [
("posthog", "1406_file_system_team_text_trgm_index"),
("signals", "0190_monitoring_fallback_expiry"),
]
operations = [
migrations.AddField(
model_name="useractivitysummary",
name="version",
field=models.PositiveIntegerField(db_default=0, default=0),
),
migrations.CreateModel(
name="UserActivitySummaryVersion",
fields=[
(
"id",
models.UUIDField(
default=posthog.uuidt.uuid7,
editable=False,
primary_key=True,
serialize=False,
),
),
("version", models.PositiveIntegerField()),
("summary", models.JSONField()),
("summary_text", models.TextField()),
("generated_at", models.DateTimeField()),
("model", models.CharField(max_length=100)),
("prompt_version", models.PositiveSmallIntegerField()),
("render_version", models.PositiveSmallIntegerField()),
("input_watermark", models.DateTimeField()),
("inputs_used", models.JSONField(blank=True, default=dict)),
("tokens_in", models.IntegerField(blank=True, null=True)),
("tokens_out", models.IntegerField(blank=True, null=True)),
("cost_usd", models.FloatField(blank=True, null=True)),
("created_at", models.DateTimeField(auto_now_add=True)),
(
"summary_row",
models.ForeignKey(
db_index=False,
on_delete=django.db.models.deletion.CASCADE,
related_name="versions",
to="signals.useractivitysummary",
),
),
(
"team",
models.ForeignKey(
db_constraint=False,
on_delete=django.db.models.deletion.CASCADE,
related_name="+",
to="posthog.team",
),
),
],
options={
"default_manager_name": "all_teams",
"constraints": [
models.UniqueConstraint(
fields=("summary_row", "version"),
name="signals_activity_summary_version_unique",
)
],
},
managers=[
("all_teams", django.db.models.manager.Manager()),
],
),
]