Skip to content

: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.

2.4 KB
Raw Blame
# Generated by Django 5.2.14 on 2026-06-09 09:51

import django.db.models.manager
import django.db.models.deletion
from django.db import migrations, models

import posthog.models.utils


class Migration(migrations.Migration):
    dependencies = [
        ("posthog", "1216_migrate_cohorts_models"),
        ("signals", "0033_signalscoutrun_emitted_count_and_more"),
    ]

    operations = [
        migrations.CreateModel(
            name="SignalScoutEmission",
            fields=[
                (
                    "id",
                    models.UUIDField(
                        default=posthog.models.utils.uuid7,
                        editable=False,
                        primary_key=True,
                        serialize=False,
                    ),
                ),
                ("finding_id", models.CharField(max_length=200)),
                ("description", models.TextField()),
                ("weight", models.FloatField()),
                ("confidence", models.FloatField()),
                ("severity", models.CharField(blank=True, max_length=20, null=True)),
                ("source_id", models.CharField(max_length=200)),
                ("emitted_at", models.DateTimeField(auto_now_add=True)),
                (
                    "scout_run",
                    models.ForeignKey(
                        on_delete=django.db.models.deletion.CASCADE,
                        related_name="emissions",
                        to="signals.signalscoutrun",
                    ),
                ),
                (
                    "team",
                    models.ForeignKey(
                        on_delete=django.db.models.deletion.CASCADE,
                        related_name="signal_scout_emissions",
                        to="posthog.team",
                    ),
                ),
            ],
            options={
                "verbose_name": "Signal scout emission",
                "verbose_name_plural": "Signal scout emissions",
                "default_manager_name": "all_teams",
                "indexes": [
                    models.Index(
                        fields=["team", "scout_run"],
                        name="signal_scout_emission_run_idx",
                    )
                ],
            },
            managers=[
                ("all_teams", django.db.models.manager.Manager()),
            ],
        ),
    ]