: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
feat(workflows): add action_redirects column to hog flows (#71880)
Harley Alexander740faa1143ba
diff --git a/products/workflows/backend/migrations/0009_hogflow_action_redirects.py b/products/workflows/backend/migrations/0009_hogflow_action_redirects.pynew file mode 100644index 000000000000..da21cf5b5ad2--- /dev/null+++ b/products/workflows/backend/migrations/0009_hogflow_action_redirects.py@@ -0,0 +1,15 @@+from django.db import migrations, models+++class Migration(migrations.Migration):+ dependencies = [+ ("workflows", "0008_teamworkflowsconfig"),+ ]++ operations = [+ migrations.AddField(+ model_name="hogflow",+ name="action_redirects",+ field=models.JSONField(blank=True, null=True),+ ),+ ]diff --git a/products/workflows/backend/migrations/max_migration.txt b/products/workflows/backend/migrations/max_migration.txtindex c91fcd8e0f1d..acd817ac2b67 100644--- a/products/workflows/backend/migrations/max_migration.txt+++ b/products/workflows/backend/migrations/max_migration.txt@@ -1 +1 @@-0008_teamworkflowsconfig+0009_hogflow_action_redirectsdiff --git a/products/workflows/backend/models/hog_flow/hog_flow.py b/products/workflows/backend/models/hog_flow/hog_flow.pyindex 0f0727154cd6..7e4c3cffd94f 100644--- a/products/workflows/backend/models/hog_flow/hog_flow.py+++ b/products/workflows/backend/models/hog_flow/hog_flow.py@@ -90,6 +90,12 @@ class HogFlow(UUIDTModel):draft = models.JSONField(null=True, blank=True)draft_updated_at = models.DateTimeField(null=True, blank=True)+ # Skip-forward map for deleted steps: {deleted_action_id: next surviving action_id}. Maintained+ # by the API whenever a live graph edit deletes actions, so runs parked on a deleted step can+ # continue at its surviving successor instead of exiting. Values always reference actions+ # present in this row's `actions`; entries with no surviving successor are omitted.+ action_redirects = models.JSONField(null=True, blank=True)+def __str__(self):return f"HogFlow {self.id}/{self.version}: {self.name}"