: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 6.1.3 on 2026-11-04 19:49
import django.db.models.deletion
from django.db import migrations, models
import posthog.uuidt
class Migration(migrations.Migration):
dependencies = [
("metrics", "0002_metricsdashboardtemplate_variables"),
("posthog", "1424_workload_trust_policy"),
]
operations = [
migrations.CreateModel(
name="MetricDailyQueryCount",
fields=[
(
"id",
models.UUIDField(
default=posthog.uuidt.uuid7,
editable=False,
primary_key=True,
serialize=False,
),
),
("metric_name", models.CharField(max_length=400)),
("date", models.DateField()),
("query_count", models.BigIntegerField(default=0)),
("last_queried_at", models.DateTimeField()),
(
"team",
models.ForeignKey(
db_constraint=False,
on_delete=django.db.models.deletion.CASCADE,
related_name="+",
to="posthog.team",
),
),
],
options={
"indexes": [models.Index(fields=["team", "date"], name="metrics_dqc_team_date_idx")],
"constraints": [
models.UniqueConstraint(
fields=("team", "metric_name", "date"),
name="metrics_daily_query_count_unique",
)
],
},
),
]