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.

chore(data-modeling): drop the retired bytes_read column (#123083)

Jovan Sakovicce0ebd7540a9
diff --git a/products/data_modeling/backend/migrations/0057_datamodelingjob_drop_bytes_read_column.py b/products/data_modeling/backend/migrations/0057_datamodelingjob_drop_bytes_read_column.py
new file mode 100644
index 000000000000..59754e0944f8
--- /dev/null
+++ b/products/data_modeling/backend/migrations/0057_datamodelingjob_drop_bytes_read_column.py
@@ -0,0 +1,19 @@
+from django.db import migrations
+
+
+class Migration(migrations.Migration):
+ dependencies = [
+ ("data_modeling", "0056_datamodelingjob_untrack_bytes_read"),
+ ]
+
+ operations = [
+ migrations.SeparateDatabaseAndState(
+ state_operations=[],
+ database_operations=[
+ migrations.RunSQL(
+ sql='ALTER TABLE "posthog_datamodelingjob" DROP COLUMN IF EXISTS "bytes_read"',
+ reverse_sql='ALTER TABLE "posthog_datamodelingjob" ADD COLUMN IF NOT EXISTS "bytes_read" bigint NULL',
+ ),
+ ],
+ ),
+ ]
diff --git a/products/data_modeling/backend/migrations/max_migration.txt b/products/data_modeling/backend/migrations/max_migration.txt
index 4c81d35595f0..b5b93bb8a6dc 100644
--- a/products/data_modeling/backend/migrations/max_migration.txt
+++ b/products/data_modeling/backend/migrations/max_migration.txt
@@ -1 +1 @@
-0056_datamodelingjob_untrack_bytes_read
+0057_datamodelingjob_drop_bytes_read_column