From c6a8020170700789567e0d9d5939449ddfc87b6d Mon Sep 17 00:00:00 2001 From: meikel Date: Thu, 30 Jul 2026 11:33:43 +0200 Subject: [PATCH] chore(workflows): drop the dead email reputation snapshot table Generated-By: PostHog Code Task-Id: 0f3e9835-ed9b-469d-aa52-1152818572a2 --- ...0017_drop_emailreputationsnapshot_table.py | 20 +++++++++++++++++++ .../backend/migrations/max_migration.txt | 2 +- 2 files changed, 21 insertions(+), 1 deletion(-) create mode 100644 products/workflows/backend/migrations/0017_drop_emailreputationsnapshot_table.py diff --git a/products/workflows/backend/migrations/0017_drop_emailreputationsnapshot_table.py b/products/workflows/backend/migrations/0017_drop_emailreputationsnapshot_table.py new file mode 100644 index 000000000000..774b31347154 --- /dev/null +++ b/products/workflows/backend/migrations/0017_drop_emailreputationsnapshot_table.py @@ -0,0 +1,20 @@ +from django.db import migrations + + +class Migration(migrations.Migration): + dependencies = [ + ("workflows", "0016_drop_emailreputationsnapshot_fk"), + ] + + # Phase 2 of the two-phase table drop (safe-django-migrations.md, "Dropping Tables"). + # 0015 removed EmailReputationSnapshot from Django state and 0016 dropped its FK to + # posthog_hogflow; the physical table has been dead ever since. This drops it now that the + # state removal has shipped. Irreversible by nature — the reverse is a no-op rather than a + # bogus CREATE TABLE, so a rollback past this point simply leaves the table absent (nothing + # reads or writes it). + operations = [ + migrations.RunSQL( + sql='DROP TABLE IF EXISTS "posthog_emailreputationsnapshot";', + reverse_sql=migrations.RunSQL.noop, + ), + ] diff --git a/products/workflows/backend/migrations/max_migration.txt b/products/workflows/backend/migrations/max_migration.txt index 92b4c0e3895c..862851e8e8bd 100644 --- a/products/workflows/backend/migrations/max_migration.txt +++ b/products/workflows/backend/migrations/max_migration.txt @@ -1 +1 @@ -0016_drop_emailreputationsnapshot_fk +0017_drop_emailreputationsnapshot_table