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

refactor(insights): add migration to convert filters to query #24527

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

thmsobrmlr
Copy link
Contributor

@thmsobrmlr thmsobrmlr commented Aug 22, 2024

Problem

We're currently migrating insight filters to query in Django shell. Unfortunately self-hosted users are left out.

Changes

Does the same for self hosted users.

⚠️ This should only be merged after we completed the migration with Django shell. ⚠️

How did you test this code?

DEBUG=1 python manage.py migrate
DEBUG=1 python manage.py migrate posthog 0458_alter_insightviewed_team_alter_insightviewed_user
SELECT COUNT(filters->>'migrated_at') * 1.0 / COUNT(*) FROM posthog_dashboarditem

@thmsobrmlr thmsobrmlr requested a review from a team August 22, 2024 13:47
Copy link
Contributor

@skoob13 skoob13 left a comment

Choose a reason for hiding this comment

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

It looks great! It only needs to update the migration number;

posthog/migrations/0459_insight_filters_to_query.py Outdated Show resolved Hide resolved
posthog/migrations/0459_insight_filters_to_query.py Outdated Show resolved Hide resolved
@posthog-bot
Copy link
Contributor

This PR hasn't seen activity in a week! Should it be merged, closed, or further worked on? If you want to keep it open, post a comment or remove the stale label – otherwise this will be closed in another week. If you want to permanentely keep it open, use the waiting label.

@thmsobrmlr thmsobrmlr added waiting Prevents stale-bot from marking the PR as stale. and removed stale labels Sep 2, 2024
@Twixes Twixes self-requested a review September 6, 2024 15:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
waiting Prevents stale-bot from marking the PR as stale.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants