: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(project): add is_pending_deletion column (#62125)
Yasenaad772ef212c
diff --git a/posthog/api/test/notebooks/__snapshots__/test_notebook.ambr b/posthog/api/test/notebooks/__snapshots__/test_notebook.ambrindex 22da09a634d5..dca15ac1ef0a 100644--- a/posthog/api/test/notebooks/__snapshots__/test_notebook.ambr+++ b/posthog/api/test/notebooks/__snapshots__/test_notebook.ambr@@ -271,7 +271,8 @@"posthog_project"."organization_id","posthog_project"."name","posthog_project"."created_at",- "posthog_project"."product_description"+ "posthog_project"."product_description",+ "posthog_project"."is_pending_deletion"FROM "posthog_project"WHERE "posthog_project"."id" = 99999LIMIT 21@@ -1176,7 +1177,8 @@"posthog_project"."organization_id","posthog_project"."name","posthog_project"."created_at",- "posthog_project"."product_description"+ "posthog_project"."product_description",+ "posthog_project"."is_pending_deletion"FROM "posthog_project"WHERE "posthog_project"."id" = 99999LIMIT 21@@ -1325,7 +1327,8 @@"posthog_project"."organization_id","posthog_project"."name","posthog_project"."created_at",- "posthog_project"."product_description"+ "posthog_project"."product_description",+ "posthog_project"."is_pending_deletion"FROM "posthog_project"WHERE "posthog_project"."id" = 99999LIMIT 21diff --git a/posthog/migrations/1217_project_is_pending_deletion.py b/posthog/migrations/1217_project_is_pending_deletion.pynew file mode 100644index 000000000000..0c6574fb74cd--- /dev/null+++ b/posthog/migrations/1217_project_is_pending_deletion.py@@ -0,0 +1,20 @@+# Generated by Django 5.2.14 on 2026-06-08 10:54++from django.db import migrations, models+++class Migration(migrations.Migration):+ dependencies = [("posthog", "1216_migrate_cohorts_models")]++ operations = [+ migrations.AddField(+ model_name="project",+ name="is_pending_deletion",+ field=models.BooleanField(+ blank=True,+ default=False,+ help_text="Set to True when project deletion has been initiated. Blocks UI access to this project until the async task completes.",+ null=True,+ ),+ ),+ ]diff --git a/posthog/migrations/max_migration.txt b/posthog/migrations/max_migration.txtindex 089c457074e5..44335a24d758 100644--- a/posthog/migrations/max_migration.txt+++ b/posthog/migrations/max_migration.txt@@ -1 +1 @@-1216_migrate_cohorts_models+1217_project_is_pending_deletiondiff --git a/posthog/models/project.py b/posthog/models/project.pyindex 0927d2fed198..c9d674832d25 100644--- a/posthog/models/project.py+++ b/posthog/models/project.py@@ -50,6 +50,12 @@ class Project(UpdatedMetaFields):created_at = models.DateTimeField(auto_now_add=True)# Deprecated in favor of CoreMemoryproduct_description = models.TextField(null=True, blank=True, max_length=1000)+ is_pending_deletion = models.BooleanField(+ default=False,+ null=True,+ blank=True,+ help_text="Set to True when project deletion has been initiated. Blocks UI access to this project until the async task completes.",+ )objects: ProjectManager = ProjectManager()diff --git a/products/actions/backend/api/test/__snapshots__/test_action.ambr b/products/actions/backend/api/test/__snapshots__/test_action.ambrindex 11ae5e23379e..ad41f86c0a71 100644--- a/products/actions/backend/api/test/__snapshots__/test_action.ambr+++ b/products/actions/backend/api/test/__snapshots__/test_action.ambr@@ -229,7 +229,8 @@"posthog_project"."organization_id","posthog_project"."name","posthog_project"."created_at",- "posthog_project"."product_description"+ "posthog_project"."product_description",+ "posthog_project"."is_pending_deletion"FROM "posthog_project"WHERE "posthog_project"."id" = 99999LIMIT 21@@ -855,7 +856,8 @@"posthog_project"."organization_id","posthog_project"."name","posthog_project"."created_at",- "posthog_project"."product_description"+ "posthog_project"."product_description",+ "posthog_project"."is_pending_deletion"FROM "posthog_project"WHERE "posthog_project"."id" = 99999LIMIT 21@@ -1122,7 +1124,8 @@"posthog_project"."organization_id","posthog_project"."name","posthog_project"."created_at",- "posthog_project"."product_description"+ "posthog_project"."product_description",+ "posthog_project"."is_pending_deletion"FROM "posthog_project"WHERE "posthog_project"."id" = 99999LIMIT 21diff --git a/products/annotations/backend/api/test/__snapshots__/test_annotation.ambr b/products/annotations/backend/api/test/__snapshots__/test_annotation.ambrindex 360fec8c6588..1d82d2a75d97 100644--- a/products/annotations/backend/api/test/__snapshots__/test_annotation.ambr+++ b/products/annotations/backend/api/test/__snapshots__/test_annotation.ambr@@ -229,7 +229,8 @@"posthog_project"."organization_id","posthog_project"."name","posthog_project"."created_at",- "posthog_project"."product_description"+ "posthog_project"."product_description",+ "posthog_project"."is_pending_deletion"FROM "posthog_project"WHERE "posthog_project"."id" = 99999LIMIT 21@@ -864,7 +865,8 @@"posthog_project"."organization_id","posthog_project"."name","posthog_project"."created_at",- "posthog_project"."product_description"+ "posthog_project"."product_description",+ "posthog_project"."is_pending_deletion"FROM "posthog_project"WHERE "posthog_project"."id" = 99999LIMIT 21@@ -1140,7 +1142,8 @@"posthog_project"."organization_id","posthog_project"."name","posthog_project"."created_at",- "posthog_project"."product_description"+ "posthog_project"."product_description",+ "posthog_project"."is_pending_deletion"FROM "posthog_project"WHERE "posthog_project"."id" = 99999LIMIT 21diff --git a/products/feature_flags/backend/api/test/__snapshots__/test_feature_flag.ambr b/products/feature_flags/backend/api/test/__snapshots__/test_feature_flag.ambrindex 7d76ca5bb63f..b06cb7b6c311 100644--- a/products/feature_flags/backend/api/test/__snapshots__/test_feature_flag.ambr+++ b/products/feature_flags/backend/api/test/__snapshots__/test_feature_flag.ambr@@ -2692,7 +2692,8 @@"posthog_project"."organization_id","posthog_project"."name","posthog_project"."created_at",- "posthog_project"."product_description"+ "posthog_project"."product_description",+ "posthog_project"."is_pending_deletion"FROM "posthog_project"WHERE "posthog_project"."id" = 99999LIMIT 21