Skip to content

Commit

Permalink
Add migration to drop and recreate the mv
Browse files Browse the repository at this point in the history
  • Loading branch information
robbie-c committed Oct 29, 2024
1 parent 91e848d commit 68a6847
Showing 1 changed file with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
from posthog.clickhouse.client.migration_tools import run_sql_with_exceptions
from posthog.models.sessions.sql import DROP_SESSION_MATERIALIZED_VIEW_SQL, SESSIONS_TABLE_MV_SQL

operations = [
# drop the mv, and recreate it with the new part of the WHERE clause
run_sql_with_exceptions(DROP_SESSION_MATERIALIZED_VIEW_SQL()),
run_sql_with_exceptions(SESSIONS_TABLE_MV_SQL()),
]

0 comments on commit 68a6847

Please sign in to comment.