: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.17
import django.db.models.deletion
from django.conf import settings
from django.db import migrations, models
import posthog.migration_helpers.squash_idempotent
class Migration(migrations.Migration):
initial = True
dependencies = [
("ee", "0001_squash_2026_09_07_initial"),
("feature_flags", "0001_squash_2026_09_07_initial"),
]
operations = [
posthog.migration_helpers.squash_idempotent.AddFieldIfMissing(
model_name="featureflagroleaccess",
name="feature_flag",
field=models.ForeignKey(
on_delete=django.db.models.deletion.CASCADE,
related_name="access",
related_query_name="access",
to="feature_flags.featureflag",
),
),
posthog.migration_helpers.squash_idempotent.AddFieldIfMissing(
model_name="role",
name="members",
field=models.ManyToManyField(through="ee.RoleMembership", to=settings.AUTH_USER_MODEL),
),
posthog.migration_helpers.squash_idempotent.AddConstraintIfMissing(
model_name="featureflagroleaccess",
constraint=models.UniqueConstraint(fields=("role", "feature_flag"), name="unique_feature_flag_and_role"),
),
]