Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Fix column order difference between creation and migration in raw_sessions #24505

Merged
merged 2 commits into from
Aug 21, 2024

Conversation

robbie-c
Copy link
Member

@robbie-c robbie-c commented Aug 21, 2024

Pulled out from #24475 as just the most essential changes

Problem

The columns as created by the migrations were in a different order to the creation SQL, which broke the backfill script. This was my bad - I included them in the middle of the SQL but didn't include an AFTER expression in the migration.

Changes

These migrations have already been run on the EU and US cloud instances, so let's treat the order currently live as fixed. This changes the code to match what is running in prod.

It also adds a test to ensure the backfill SQL can run successfully

Does this work well for both Cloud and self-hosted?

Yes

How did you test this code?

Added a test

@robbie-c robbie-c force-pushed the fix/fix-column-order-and-backfill-script branch from fd74671 to fdbb3fd Compare August 21, 2024 12:13
@robbie-c robbie-c force-pushed the fix/fix-column-order-and-backfill-script branch from fdbb3fd to 21b7ef4 Compare August 21, 2024 12:16
@@ -7,6 +7,7 @@
ADD COLUMN IF NOT EXISTS
page_screen_autocapture_uniq_up_to
AggregateFunction(uniqUpTo(1), Nullable(UUID))
AFTER maybe_has_session_replay
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This line should have been included before

@robbie-c robbie-c merged commit 69d6754 into master Aug 21, 2024
88 checks passed
@robbie-c robbie-c deleted the fix/fix-column-order-and-backfill-script branch August 21, 2024 18:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants