-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: correct materialized view definition for session replay events s…
…napshot source (#19389) * fix: correct materialized view definition for session replay events snapshot source * Update query snapshots --------- Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
- Loading branch information
1 parent
76f57ad
commit 962756b
Showing
3 changed files
with
47 additions
and
6 deletions.
There are no files selected for viewing
15 changes: 15 additions & 0 deletions
15
posthog/clickhouse/migrations/0051_session_replay_source_mv_fix.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
from posthog.clickhouse.client.migration_tools import run_sql_with_exceptions | ||
from posthog.session_recordings.sql.session_replay_event_migrations_sql import ( | ||
DROP_SESSION_REPLAY_EVENTS_TABLE_MV_SQL, | ||
) | ||
from posthog.session_recordings.sql.session_replay_event_sql import ( | ||
SESSION_REPLAY_EVENTS_TABLE_MV_SQL, | ||
) | ||
|
||
operations = [ | ||
# we have to drop materialized view because 0050 created it incorrectly | ||
run_sql_with_exceptions(DROP_SESSION_REPLAY_EVENTS_TABLE_MV_SQL()), | ||
# now we can recreate it with explicit column definitions | ||
# that correctly identifies snapshot source as LowCardinality(Nullable(String)) | ||
run_sql_with_exceptions(SESSION_REPLAY_EVENTS_TABLE_MV_SQL()), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters