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(search): Add migration to retroactively fix generated dashboards #27658

Merged
merged 2 commits into from
Jan 17, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# Generated by Django 4.2.15 on 2025-01-17 22:28

from django.db import migrations


class Migration(migrations.Migration):
dependencies = [
("posthog", "0545_insight_filters_to_query"),
]

operations = [
migrations.RunSQL(
"""
UPDATE posthog_dashboard
SET creation_mode = 'template'
WHERE name LIKE 'Generated Dashboard: % Usage'
AND description LIKE 'This dashboard was generated by the feature flag with key (%)'
AND creation_mode = 'default'
""",
reverse_sql="""
UPDATE posthog_dashboard
SET creation_mode = 'default'
WHERE name LIKE 'Generated Dashboard: % Usage'
AND description LIKE 'This dashboard was generated by the feature flag with key (%)'
AND creation_mode = 'template'
""",
),
]
2 changes: 1 addition & 1 deletion posthog/migrations/max_migration.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0545_insight_filters_to_query
0546_update_creation_mode_on_generated_dashboards
Loading