Skip to content

:hedgehog: PostHog is the leading platform for building self-driving products. Our developer tools – AI observability, analytics, session replay, flags, experiments, error tracking, logs, and more – capture all the context agents need to diagnose problems, uncover opportunities, and ship fixes. Steer it all from Slack, web, desktop, or the MCP.

feat(capture): admin for dynamic global rate-limit thresholds (#71409)

Eli Reisman91fd40e11c92
diff --git a/.github/scripts/check-idor-model-coverage.py b/.github/scripts/check-idor-model-coverage.py
index 5fed1f388c22..a07d3de1b6a4 100644
--- a/.github/scripts/check-idor-model-coverage.py
+++ b/.github/scripts/check-idor-model-coverage.py
@@ -302,6 +302,7 @@ def get_scoped_models() -> tuple[dict[str, set[str]], set[str], set[str], set[st
# --- Infra / no tenant data ---
"EventBuffer",
"EventIngestionRestrictionConfig",
+ "GlobalRateLimitThresholdConfig",
"MessagingRecord",
}
diff --git a/posthog/admin/admins/global_rate_limit_threshold_config.py b/posthog/admin/admins/global_rate_limit_threshold_config.py
new file mode 100644
index 000000000000..1be14ee344ec
--- /dev/null
+++ b/posthog/admin/admins/global_rate_limit_threshold_config.py
@@ -0,0 +1,47 @@
+from django.contrib import admin
+from django.db.models import OuterRef, Subquery
+
+from posthog.models.global_rate_limit_threshold_config import GlobalRateLimitThresholdConfig
+
+
[email protected](GlobalRateLimitThresholdConfig)
+class GlobalRateLimitThresholdConfigAdmin(admin.ModelAdmin):
+ list_display = (
+ "id",
+ "token",
+ "display_team_id",
+ "distinct_id",
+ "threshold",
+ "display_resolved_key",
+ "note",
+ "updated_at",
+ )
+ list_per_page = 20
+ readonly_fields = ("display_team_id", "display_resolved_key", "created_at", "updated_at")
+ search_fields = ("token", "distinct_id", "note")
+ fields = (
+ "token",
+ "distinct_id",
+ "threshold",
+ "note",
+ "display_team_id",
+ "display_resolved_key",
+ "created_at",
+ "updated_at",
+ )
+
+ def get_queryset(self, request):
+ from posthog.models.team.team import Team
+
+ qs = super().get_queryset(request)
+ return qs.annotate(
+ team_id_from_token=Subquery(Team.objects.filter(api_token=OuterRef("token")).values("id")[:1])
+ )
+
+ @admin.display(description="Team ID")
+ def display_team_id(self, obj):
+ return getattr(obj, "team_id_from_token", None)
+
+ @admin.display(description="Resolved key")
+ def display_resolved_key(self, obj):
+ return obj.resolved_key
diff --git a/posthog/admin/test_admin.py b/posthog/admin/test_admin.py
index 8631658bfea0..07780eb17ed4 100644
--- a/posthog/admin/test_admin.py
+++ b/posthog/admin/test_admin.py
@@ -8,10 +8,12 @@ from django.test import RequestFactory
from posthog.admin import _OAUTH_ADMIN_MODEL_NAMES, install_admin_app_list_overrides, register_all_admin
from posthog.admin.admins.event_ingestion_restriction_config import EventIngestionRestrictionConfigAdmin
+from posthog.admin.admins.global_rate_limit_threshold_config import GlobalRateLimitThresholdConfigAdmin
from posthog.admin.admins.user_admin import UserAdmin, UserChangeForm
from posthog.admin.inlines.organization_member_inline import OrganizationMemberForUserInline, OrganizationMemberInline
from posthog.models import User
from posthog.models.event_ingestion_restriction_config import EventIngestionRestrictionConfig
+from posthog.models.global_rate_limit_threshold_config import GlobalRateLimitThresholdConfig
from products.alerts.backend.models.alert import AlertConfiguration
from products.cdp.backend.admin.plugin_attachment_inline import PluginAttachmentInline
@@ -187,6 +189,24 @@ class TestEventIngestionRestrictionConfigAdminConfig:
assert "display_team_id" in admin_instance.readonly_fields
+class TestGlobalRateLimitThresholdConfigAdmin:
+ def test_display_team_id_reads_annotation(self):
+ admin_instance = GlobalRateLimitThresholdConfigAdmin(GlobalRateLimitThresholdConfig, AdminSite())
+ cases = [
+ ("present", 42, 42),
+ ("missing", None, None),
+ ]
+ for label, annotation_value, expected in cases:
+ obj = MagicMock()
+ obj.team_id_from_token = annotation_value
+ assert admin_instance.display_team_id(obj) == expected, label
+
+ def test_display_resolved_key_reads_model_property(self):
+ admin_instance = GlobalRateLimitThresholdConfigAdmin(GlobalRateLimitThresholdConfig, AdminSite())
+ obj = GlobalRateLimitThresholdConfig(token="phc_abc", distinct_id="noisy_user", threshold=10)
+ assert admin_instance.display_resolved_key(obj) == "phc_abc:noisy_user"
+
+
class TestProductAdminRegistration:
# Regression guard: these models' admin classes live in their product app
# (`products/<name>/backend/admin.py` or an `admin/` package), not in the
diff --git a/posthog/api/test/dashboards/__snapshots__/test_dashboard.ambr b/posthog/api/test/dashboards/__snapshots__/test_dashboard.ambr
index 8cdaf6ca42ee..37e0ac8e11b8 100644
--- a/posthog/api/test/dashboards/__snapshots__/test_dashboard.ambr
+++ b/posthog/api/test/dashboards/__snapshots__/test_dashboard.ambr
@@ -2310,221 +2310,283 @@
5 /* ... */))
'''
# ---
-# name: TestDashboard.test_adding_insights_is_not_nplus1_for_gets.45
+# name: TestDashboard.test_adding_insights_is_not_nplus1_for_gets.5
'''
- SELECT "posthog_team"."id",
- "posthog_team"."uuid",
- "posthog_team"."organization_id",
- "posthog_team"."parent_team_id",
- "posthog_team"."project_id",
- "posthog_team"."api_token",
- "posthog_team"."app_urls",
- "posthog_team"."name",
- "posthog_team"."slack_incoming_webhook",
- "posthog_team"."created_at",
- "posthog_team"."updated_at",
- "posthog_team"."anonymize_ips",
- "posthog_team"."completed_snippet_onboarding",
- "posthog_team"."has_completed_onboarding_for",
- "posthog_team"."onboarding_tasks",
- "posthog_team"."ingested_event",
- "posthog_team"."ingested_production_event",
- "posthog_team"."ingested_production_event_last_checked_at",
- "posthog_team"."person_processing_opt_out",
- "posthog_team"."secret_api_token",
- "posthog_team"."secret_api_token_backup",
- "posthog_team"."session_recording_opt_in",
- "posthog_team"."session_recording_sample_rate",
- "posthog_team"."session_recording_minimum_duration_milliseconds",
- "posthog_team"."session_recording_linked_flag",
- "posthog_team"."session_recording_network_payload_capture_config",
- "posthog_team"."session_recording_masking_config",
- "posthog_team"."session_recording_url_trigger_config",
- "posthog_team"."session_recording_url_blocklist_config",
- "posthog_team"."session_recording_event_trigger_config",
- "posthog_team"."session_recording_trigger_match_type_config",
- "posthog_team"."session_recording_trigger_groups",
- "posthog_team"."session_replay_config",
- "posthog_team"."session_recording_retention_period",
- "posthog_team"."event_retention_months",
- "posthog_team"."conversations_enabled",
- "posthog_team"."conversations_settings",
- "posthog_team"."proactive_tasks_enabled",
- "posthog_team"."survey_config",
- "posthog_team"."surveys_opt_in",
- "posthog_team"."product_tours_opt_in",
- "posthog_team"."capture_console_log_opt_in",
- "posthog_team"."capture_performance_opt_in",
- "posthog_team"."capture_dead_clicks",
- "posthog_team"."autocapture_opt_out",
- "posthog_team"."autocapture_web_vitals_opt_in",
- "posthog_team"."autocapture_web_vitals_allowed_metrics",
- "posthog_team"."autocapture_exceptions_opt_in",
- "posthog_team"."autocapture_exceptions_errors_to_ignore",
- "posthog_team"."logs_settings",
- "posthog_team"."llm_gateway_enabled_at",
- "posthog_team"."llm_gateway_revoked_at",
- "posthog_team"."llm_gateway_overspend_allowance_usd",
- "posthog_team"."heatmaps_opt_in",
- "posthog_team"."receive_org_level_activity_logs",
- "posthog_team"."web_analytics_pre_aggregated_tables_enabled",
- "posthog_team"."web_analytics_pre_aggregated_tables_version",
- "posthog_team"."flags_persistence_default",
- "posthog_team"."feature_flag_confirmation_enabled",
- "posthog_team"."feature_flag_confirmation_message",
- "posthog_team"."default_evaluation_environments_enabled",
- "posthog_team"."require_evaluation_environment_tags",
- "posthog_team"."default_evaluation_contexts_enabled",
- "posthog_team"."require_evaluation_contexts",
- "posthog_team"."session_recording_version",
- "posthog_team"."signup_token",
- "posthog_team"."is_demo",
- "posthog_team"."access_control",
- "posthog_team"."week_start_day",
- "posthog_team"."inject_web_apps",
- "posthog_team"."test_account_filters",
- "posthog_team"."test_account_filters_default_checked",
- "posthog_team"."path_cleaning_filters",
- "posthog_team"."timezone",
- "posthog_team"."data_attributes",
- "posthog_team"."person_display_name_properties",
- "posthog_team"."live_events_columns",
- "posthog_team"."recording_domains",
- "posthog_team"."human_friendly_comparison_periods",
- "posthog_team"."cookieless_server_hash_mode",
- "posthog_team"."primary_dashboard_id",
- "posthog_team"."default_data_theme",
- "posthog_team"."extra_settings",
- "posthog_team"."modifiers",
- "posthog_team"."correlation_config",
- "posthog_team"."session_recording_retention_period_days",
- "posthog_team"."external_data_workspace_id",
- "posthog_team"."external_data_workspace_last_synced_at",
- "posthog_team"."api_query_rate_limit",
- "posthog_team"."drop_events_older_than",
- "posthog_team"."base_currency",
- "posthog_team"."experiment_recalculation_time",
- "posthog_team"."default_experiment_confidence_level",
- "posthog_team"."default_experiment_stats_method",
- "posthog_team"."business_model"
- FROM "posthog_team"
- WHERE "posthog_team"."id" = 99999
- LIMIT 21
+ SELECT "posthog_organizationmembership"."id",
+ "posthog_organizationmembership"."organization_id",
+ "posthog_organizationmembership"."user_id",
+ "posthog_organizationmembership"."level",
+ "posthog_organizationmembership"."joined_at",
+ "posthog_organizationmembership"."updated_at",
+ "posthog_organizationmembership"."invited_by_id",
+ "posthog_organization"."id",
+ "posthog_organization"."name",
+ "posthog_organization"."slug",
+ "posthog_organization"."logo_media_id",
+ "posthog_organization"."created_at",
+ "posthog_organization"."updated_at",
+ "posthog_organization"."is_active",
+ "posthog_organization"."is_not_active_reason",
+ "posthog_organization"."session_cookie_age",
+ "posthog_organization"."is_member_join_email_enabled",
+ "posthog_organization"."is_ai_data_processing_approved",
+ "posthog_organization"."is_ai_training_opted_in",
+ "posthog_organization"."is_ai_training_locked",
+ "posthog_organization"."is_ai_training_cta_shown",
+ "posthog_organization"."enforce_2fa",
+ "posthog_organization"."members_can_invite",
+ "posthog_organization"."members_can_create_projects",
+ "posthog_organization"."members_can_use_personal_api_keys",
+ "posthog_organization"."allow_publicly_shared_resources",
+ "posthog_organization"."default_role_id",
+ "posthog_organization"."plugins_access_level",
+ "posthog_organization"."for_internal_metrics",
+ "posthog_organization"."default_experiment_stats_method",
+ "posthog_organization"."default_anonymize_ips",
+ "posthog_organization"."is_hipaa",
+ "posthog_organization"."is_pending_deletion",
+ "posthog_organization"."customer_id",
+ "posthog_organization"."available_product_features",
+ "posthog_organization"."usage",
+ "posthog_organization"."never_drop_data",
+ "posthog_organization"."customer_trust_scores",
+ "posthog_organization"."setup_section_2_completed",
+ "posthog_organization"."personalization",
+ "posthog_organization"."domain_whitelist",
+ "posthog_organization"."is_platform"
+ FROM "posthog_organizationmembership"
+ INNER JOIN "posthog_organization" ON ("posthog_organizationmembership"."organization_id" = "posthog_organization"."id")
+ WHERE "posthog_organizationmembership"."user_id" = 99999
'''
# ---
-# name: TestDashboard.test_adding_insights_is_not_nplus1_for_gets.46
+# name: TestDashboard.test_adding_insights_is_not_nplus1_for_gets.6
'''
- SELECT "posthog_filesystem"."team_id",
- "posthog_filesystem"."id",
- "posthog_filesystem"."path",
- "posthog_filesystem"."depth",
- "posthog_filesystem"."type",
- "posthog_filesystem"."ref",
- "posthog_filesystem"."href",
- "posthog_filesystem"."shortcut",
- "posthog_filesystem"."meta",
- "posthog_filesystem"."created_at",
- "posthog_filesystem"."created_by_id",
- "posthog_filesystem"."surface",
- "posthog_filesystem"."project_id"
- FROM "posthog_filesystem"
- WHERE (("posthog_filesystem"."surface" IS NULL
- OR "posthog_filesystem"."surface" = 'web')
- AND "posthog_filesystem"."ref" = '0001'
- AND "posthog_filesystem"."team_id" = 99999
- AND "posthog_filesystem"."type" = 'dashboard'
- AND NOT ("posthog_filesystem"."shortcut"
- AND "posthog_filesystem"."shortcut" IS NOT NULL))
+ SELECT "ee_accesscontrol"."team_id" AS "team_id",
+ "ee_accesscontrol"."resource_id" AS "resource_id",
+ "ee_accesscontrol"."organization_member_id" AS "organization_member_id",
+ "ee_accesscontrol"."role_id" AS "role_id",
+ "ee_accesscontrol"."access_level" AS "access_level"
+ FROM "ee_accesscontrol"
+ INNER JOIN "posthog_team" ON ("ee_accesscontrol"."team_id" = "posthog_team"."id")
+ WHERE ("ee_accesscontrol"."resource" = 'project'
+ AND "posthog_team"."organization_id" IN ('00000000-0000-0000-0000-000000000000'::uuid))
'''
# ---
-# name: TestDashboard.test_adding_insights_is_not_nplus1_for_gets.47
+# name: TestDashboard.test_adding_insights_is_not_nplus1_for_gets.7
'''
- SELECT "posthog_filesystemshortcut"."id",
- "posthog_filesystemshortcut"."team_id",
- "posthog_filesystemshortcut"."user_id",
- "posthog_filesystemshortcut"."path",
- "posthog_filesystemshortcut"."type",
- "posthog_filesystemshortcut"."ref",
- "posthog_filesystemshortcut"."href",
- "posthog_filesystemshortcut"."order",
- "posthog_filesystemshortcut"."created_at",
- "posthog_filesystemshortcut"."surface"
- FROM "posthog_filesystemshortcut"
- WHERE (("posthog_filesystemshortcut"."surface" IS NULL
- OR "posthog_filesystemshortcut"."surface" = 'web')
- AND "posthog_filesystemshortcut"."ref" = '0001'
- AND "posthog_filesystemshortcut"."team_id" = 99999
- AND "posthog_filesystemshortcut"."type" = 'dashboard'
- AND NOT ("posthog_filesystemshortcut"."path" = 'dashboard'
- AND "posthog_filesystemshortcut"."href" = '__skipped__'
- AND "posthog_filesystemshortcut"."href" IS NOT NULL))
+ SELECT "ee_rolemembership"."organization_member_id" AS "organization_member_id",
+ "ee_rolemembership"."role_id" AS "role_id"
+ FROM "ee_rolemembership"
+ WHERE "ee_rolemembership"."user_id" = 99999
'''
# ---
-# name: TestDashboard.test_adding_insights_is_not_nplus1_for_gets.48
+# name: TestDashboard.test_adding_insights_is_not_nplus1_for_gets.8
'''
- SELECT "posthog_insightvariable"."created_by_id",
- "posthog_insightvariable"."created_at",
- "posthog_insightvariable"."updated_at",
- "posthog_insightvariable"."id",
- "posthog_insightvariable"."team_id",
- "posthog_insightvariable"."name",
- "posthog_insightvariable"."code_name",
- "posthog_insightvariable"."type",
- "posthog_insightvariable"."default_value",
- "posthog_insightvariable"."values"
- FROM "posthog_insightvariable"
- WHERE "posthog_insightvariable"."team_id" = 99999
+ SELECT "posthog_dashboard"."id",
+ "posthog_dashboard"."name",
+ "posthog_dashboard"."description",
+ "posthog_dashboard"."team_id",
+ "posthog_dashboard"."pinned",
+ "posthog_dashboard"."created_at",
+ "posthog_dashboard"."created_by_id",
+ "posthog_dashboard"."deleted",
+ "posthog_dashboard"."last_accessed_at",
+ "posthog_dashboard"."last_refresh",
+ "posthog_dashboard"."filters",
+ "posthog_dashboard"."variables",
+ "posthog_dashboard"."breakdown_colors",
+ "posthog_dashboard"."data_color_theme_id",
+ "posthog_dashboard"."creation_mode",
+ "posthog_dashboard"."restriction_level",
+ "posthog_dashboard"."quick_filter_ids",
+ "posthog_dashboard"."deprecated_tags",
+ "posthog_dashboard"."tags",
+ "posthog_dashboard"."share_token",
+ "posthog_dashboard"."is_shared"
+ FROM "posthog_dashboard"
+ INNER JOIN "posthog_team" ON ("posthog_dashboard"."team_id" = "posthog_team"."id")
+ WHERE (NOT ("posthog_dashboard"."deleted")
+ AND ("posthog_dashboard"."team_id" =
+ (SELECT U0."parent_team_id" AS "parent_team_id"
+ FROM "posthog_team" U0
+ WHERE U0."id" = 99999
+ LIMIT 1)
+ OR ("posthog_team"."parent_team_id" IS NULL
+ AND "posthog_dashboard"."team_id" = 99999))
+ AND "posthog_dashboard"."id" = 99999)
+ LIMIT 21
'''
# ---
-# name: TestDashboard.test_adding_insights_is_not_nplus1_for_gets.49
+# name: TestDashboard.test_adding_insights_is_not_nplus1_for_gets.9
'''
- SELECT "posthog_dashboardtile"."id",
- "posthog_dashboardtile"."dashboard_id",
- "posthog_dashboardtile"."insight_id",
- "posthog_dashboardtile"."text_id",
- "posthog_dashboardtile"."button_tile_id",
- "posthog_dashboardtile"."widget_id",
- "posthog_dashboardtile"."team_id",
- "posthog_dashboardtile"."layouts",
- "posthog_dashboardtile"."color",
- "posthog_dashboardtile"."filters_hash",
- "posthog_dashboardtile"."last_refresh",
- "posthog_dashboardtile"."refreshing",
- "posthog_dashboardtile"."refresh_attempt",
- "posthog_dashboardtile"."filters_overrides",
- "posthog_dashboardtile"."show_description",
- "posthog_dashboardtile"."transparent_background",
- "posthog_dashboardtile"."deleted",
- "posthog_dashboarditem"."id",
- "posthog_dashboarditem"."name",
- "posthog_dashboarditem"."derived_name",
- "posthog_dashboarditem"."description",
- "posthog_dashboarditem"."team_id",
- "posthog_dashboarditem"."filters",
- "posthog_dashboarditem"."filters_hash",
- "posthog_dashboarditem"."query",
- "posthog_dashboarditem"."query_metadata",
- "posthog_dashboarditem"."order",
- "posthog_dashboarditem"."deleted",
- "posthog_dashboarditem"."saved",
- "posthog_dashboarditem"."created_at",
- "posthog_dashboarditem"."refreshing",
- "posthog_dashboarditem"."created_by_id",
- "posthog_dashboarditem"."is_sample",
- "posthog_dashboarditem"."short_id",
- "posthog_dashboarditem"."favorited",
- "posthog_dashboarditem"."refresh_attempt",
- "posthog_dashboarditem"."last_modified_at",
- "posthog_dashboarditem"."last_modified_by_id",
- "posthog_dashboarditem"."dashboard_id",
- "posthog_dashboarditem"."last_refresh",
- "posthog_dashboarditem"."layouts",
- "posthog_dashboarditem"."color",
- "posthog_dashboarditem"."dive_dashboard_id",
- "posthog_dashboarditem"."updated_at",
- "posthog_dashboarditem"."deprecated_tags",
- "posthog_dashboarditem"."tags",
- "posthog_team"."id",
+ SELECT COUNT(*) AS "__count"
+ FROM "posthog_dashboardtile"
+ INNER JOIN "posthog_dashboard" ON ("posthog_dashboardtile"."dashboard_id" = "posthog_dashboard"."id")
+ WHERE (NOT ("posthog_dashboardtile"."deleted"
+ AND "posthog_dashboardtile"."deleted" IS NOT NULL)
+ AND NOT ("posthog_dashboard"."deleted")
+ AND "posthog_dashboardtile"."dashboard_id" = 99999
+ AND NOT ("posthog_dashboardtile"."deleted"
+ AND "posthog_dashboardtile"."deleted" IS NOT NULL))
+ '''
+# ---
+# name: TestDashboard.test_listing_dashboards_is_not_nplus1
+ '''
+ SELECT "posthog_user"."id",
+ "posthog_user"."password",
+ "posthog_user"."last_login",
+ "posthog_user"."first_name",
+ "posthog_user"."last_name",
+ "posthog_user"."is_staff",
+ "posthog_user"."date_joined",
+ "posthog_user"."uuid",
+ "posthog_user"."current_organization_id",
+ "posthog_user"."current_team_id",
+ "posthog_user"."email",
+ "posthog_user"."pending_email",
+ "posthog_user"."distinct_id",
+ "posthog_user"."is_email_verified",
+ "posthog_user"."credentials_reviewed_at",
+ "posthog_user"."requested_2fa_reset_at",
+ "posthog_user"."has_seen_product_intro_for",
+ "posthog_user"."strapi_id",
+ "posthog_user"."is_active",
+ "posthog_user"."role_at_organization",
+ "posthog_user"."theme_mode",
+ "posthog_user"."partial_notification_settings",
+ "posthog_user"."anonymize_data",
+ "posthog_user"."allow_impersonation",
+ "posthog_user"."toolbar_mode",
+ "posthog_user"."hedgehog_config",
+ "posthog_user"."allow_sidebar_suggestions",
+ "posthog_user"."shortcut_position",
+ "posthog_user"."passkeys_enabled_for_2fa",
+ "posthog_user"."hide_mcp_hints",
+ "posthog_user"."onboarding_skipped_at",
+ "posthog_user"."onboarding_skipped_reason",
+ "posthog_user"."onboarding_skipped_organization_id",
+ "posthog_user"."onboarding_delegated_to_invite_id",
+ "posthog_user"."onboarding_delegated_to_organization_id",
+ "posthog_user"."onboarding_delegation_accepted_at",
+ "posthog_user"."events_column_config",
+ "posthog_user"."email_opt_in"
+ FROM "posthog_user"
+ WHERE ("posthog_user"."is_active"
+ AND "posthog_user"."id" = 99999)
+ '''
+# ---
+# name: TestDashboard.test_listing_dashboards_is_not_nplus1.1
+ '''
+ SELECT "posthog_organization"."id",
+ "posthog_organization"."name",
+ "posthog_organization"."slug",
+ "posthog_organization"."logo_media_id",
+ "posthog_organization"."created_at",
+ "posthog_organization"."updated_at",
+ "posthog_organization"."is_active",
+ "posthog_organization"."is_not_active_reason",
+ "posthog_organization"."session_cookie_age",
+ "posthog_organization"."is_member_join_email_enabled",
+ "posthog_organization"."is_ai_data_processing_approved",
+ "posthog_organization"."is_ai_training_opted_in",
+ "posthog_organization"."is_ai_training_locked",
+ "posthog_organization"."is_ai_training_cta_shown",
+ "posthog_organization"."enforce_2fa",
+ "posthog_organization"."members_can_invite",
+ "posthog_organization"."members_can_create_projects",
+ "posthog_organization"."members_can_use_personal_api_keys",
+ "posthog_organization"."allow_publicly_shared_resources",
+ "posthog_organization"."default_role_id",
+ "posthog_organization"."plugins_access_level",
+ "posthog_organization"."for_internal_metrics",
+ "posthog_organization"."default_experiment_stats_method",
+ "posthog_organization"."default_anonymize_ips",
+ "posthog_organization"."is_hipaa",
+ "posthog_organization"."is_pending_deletion",
+ "posthog_organization"."customer_id",
+ "posthog_organization"."available_product_features",
+ "posthog_organization"."usage",
+ "posthog_organization"."never_drop_data",
+ "posthog_organization"."customer_trust_scores",
+ "posthog_organization"."setup_section_2_completed",
+ "posthog_organization"."personalization",
+ "posthog_organization"."domain_whitelist",
+ "posthog_organization"."is_platform"
+ FROM "posthog_organization"
+ WHERE "posthog_organization"."id" = '00000000-0000-0000-0000-000000000000'::uuid
+ LIMIT 21
+ '''
+# ---
+# name: TestDashboard.test_listing_dashboards_is_not_nplus1.10
+ '''
+ SELECT "posthog_filesystem"."team_id",
+ "posthog_filesystem"."id",
+ "posthog_filesystem"."path",
+ "posthog_filesystem"."depth",
+ "posthog_filesystem"."type",
+ "posthog_filesystem"."ref",
+ "posthog_filesystem"."href",
+ "posthog_filesystem"."shortcut",
+ "posthog_filesystem"."meta",
+ "posthog_filesystem"."created_at",
+ "posthog_filesystem"."created_by_id",
+ "posthog_filesystem"."surface",
+ "posthog_filesystem"."project_id"
+ FROM "posthog_filesystem"
+ WHERE (("posthog_filesystem"."surface" IS NULL
+ OR "posthog_filesystem"."surface" = 'web')
+ AND "posthog_filesystem"."ref" = '0001'
+ AND "posthog_filesystem"."team_id" = 99999
+ AND "posthog_filesystem"."type" = 'insight'
+ AND NOT ("posthog_filesystem"."shortcut"
+ AND "posthog_filesystem"."shortcut" IS NOT NULL))
+ '''
+# ---
+# name: TestDashboard.test_listing_dashboards_is_not_nplus1.11
+ '''
+ SELECT "posthog_organization"."id",
+ "posthog_organization"."name",
+ "posthog_organization"."slug",
+ "posthog_organization"."logo_media_id",
+ "posthog_organization"."created_at",
+ "posthog_organization"."updated_at",
+ "posthog_organization"."is_active",
+ "posthog_organization"."is_not_active_reason",
+ "posthog_organization"."session_cookie_age",
+ "posthog_organization"."is_member_join_email_enabled",
+ "posthog_organization"."is_ai_data_processing_approved",
+ "posthog_organization"."is_ai_training_opted_in",
+ "posthog_organization"."is_ai_training_locked",
+ "posthog_organization"."is_ai_training_cta_shown",
+ "posthog_organization"."enforce_2fa",
+ "posthog_organization"."members_can_invite",
+ "posthog_organization"."members_can_create_projects",
+ "posthog_organization"."members_can_use_personal_api_keys",
+ "posthog_organization"."allow_publicly_shared_resources",
+ "posthog_organization"."default_role_id",
+ "posthog_organization"."plugins_access_level",
+ "posthog_organization"."for_internal_metrics",
+ "posthog_organization"."default_experiment_stats_method",
+ "posthog_organization"."default_anonymize_ips",
+ "posthog_organization"."is_hipaa",
+ "posthog_organization"."is_pending_deletion",
+ "posthog_organization"."customer_id",
+ "posthog_organization"."available_product_features",
+ "posthog_organization"."usage",
+ "posthog_organization"."never_drop_data",
+ "posthog_organization"."customer_trust_scores",
+ "posthog_organization"."setup_section_2_completed",
+ "posthog_organization"."personalization",
+ "posthog_organization"."domain_whitelist",
+ "posthog_organization"."is_platform"
+ FROM "posthog_organization"
+ WHERE "posthog_organization"."id" = '00000000-0000-0000-0000-000000000000'::uuid
+ LIMIT 21
+ '''
+# ---
+# name: TestDashboard.test_listing_dashboards_is_not_nplus1.12
+ '''
+ SELECT "posthog_team"."id",
"posthog_team"."uuid",
"posthog_team"."organization_id",
"posthog_team"."parent_team_id",
@@ -2610,375 +2672,102 @@
"posthog_team"."modifiers",
"posthog_team"."correlation_config",
"posthog_team"."session_recording_retention_period_days",
- "posthog_team"."plugins_opt_in",
- "posthog_team"."opt_out_capture",
- "posthog_team"."event_names",
- "posthog_team"."event_names_with_usage",
- "posthog_team"."event_properties",
- "posthog_team"."event_properties_with_usage",
- "posthog_team"."event_properties_numerical",
"posthog_team"."external_data_workspace_id",
"posthog_team"."external_data_workspace_last_synced_at",
"posthog_team"."api_query_rate_limit",
- "posthog_team"."revenue_tracking_config",
"posthog_team"."drop_events_older_than",
"posthog_team"."base_currency",
"posthog_team"."experiment_recalculation_time",
"posthog_team"."default_experiment_confidence_level",
"posthog_team"."default_experiment_stats_method",
- "posthog_team"."business_model",
- "posthog_user"."id",
- "posthog_user"."password",
- "posthog_user"."last_login",
- "posthog_user"."first_name",
- "posthog_user"."last_name",
- "posthog_user"."is_staff",
- "posthog_user"."date_joined",
- "posthog_user"."uuid",
- "posthog_user"."current_organization_id",
- "posthog_user"."current_team_id",
- "posthog_user"."email",
- "posthog_user"."pending_email",
- "posthog_user"."distinct_id",
- "posthog_user"."is_email_verified",
- "posthog_user"."credentials_reviewed_at",
- "posthog_user"."requested_password_reset_at",
- "posthog_user"."requested_2fa_reset_at",
- "posthog_user"."has_seen_product_intro_for",
- "posthog_user"."strapi_id",
- "posthog_user"."is_active",
- "posthog_user"."role_at_organization",
- "posthog_user"."theme_mode",
- "posthog_user"."partial_notification_settings",
- "posthog_user"."anonymize_data",
- "posthog_user"."allow_impersonation",
- "posthog_user"."toolbar_mode",
- "posthog_user"."hedgehog_config",
- "posthog_user"."allow_sidebar_suggestions",
- "posthog_user"."shortcut_position",
- "posthog_user"."passkeys_enabled_for_2fa",
- "posthog_user"."hide_mcp_hints",
- "posthog_user"."onboarding_skipped_at",
- "posthog_user"."onboarding_skipped_reason",
- "posthog_user"."onboarding_skipped_organization_id",
- "posthog_user"."onboarding_delegated_to_invite_id",
- "posthog_user"."onboarding_delegated_to_organization_id",
- "posthog_user"."onboarding_delegation_accepted_at",
- "posthog_user"."events_column_config",
- "posthog_user"."email_opt_in",
- T6."id",
- T6."password",
- T6."last_login",
- T6."first_name",
- T6."last_name",
- T6."is_staff",
- T6."date_joined",
- T6."uuid",
- T6."current_organization_id",
- T6."current_team_id",
- T6."email",
- T6."pending_email",
- T6."distinct_id",
- T6."is_email_verified",
- T6."credentials_reviewed_at",
- T6."requested_password_reset_at",
- T6."requested_2fa_reset_at",
- T6."has_seen_product_intro_for",
- T6."strapi_id",
- T6."is_active",
- T6."role_at_organization",
- T6."theme_mode",
- T6."partial_notification_settings",
- T6."anonymize_data",
- T6."allow_impersonation",
- T6."toolbar_mode",
- T6."hedgehog_config",
- T6."allow_sidebar_suggestions",
- T6."shortcut_position",
- T6."passkeys_enabled_for_2fa",
- T6."hide_mcp_hints",
- T6."onboarding_skipped_at",
- T6."onboarding_skipped_reason",
- T6."onboarding_skipped_organization_id",
- T6."onboarding_delegated_to_invite_id",
- T6."onboarding_delegated_to_organization_id",
- T6."onboarding_delegation_accepted_at",
- T6."events_column_config",
- T6."email_opt_in",
- "posthog_text"."id",
- "posthog_text"."body",
- "posthog_text"."created_by_id",
- "posthog_text"."last_modified_at",
- "posthog_text"."last_modified_by_id",
- "posthog_text"."team_id",
- "posthog_buttontile"."id",
- "posthog_buttontile"."url",
- "posthog_buttontile"."text",
- "posthog_buttontile"."placement",
- "posthog_buttontile"."style",
- "posthog_buttontile"."created_by_id",
- "posthog_buttontile"."last_modified_at",
- "posthog_buttontile"."last_modified_by_id",
- "posthog_buttontile"."team_id",
- "posthog_dashboardwidget"."id",
- "posthog_dashboardwidget"."widget_type",
- "posthog_dashboardwidget"."name",
- "posthog_dashboardwidget"."description",
- "posthog_dashboardwidget"."config",
- "posthog_dashboardwidget"."created_by_id",
- "posthog_dashboardwidget"."last_modified_at",
- "posthog_dashboardwidget"."last_modified_by_id",
- "posthog_dashboardwidget"."team_id",
- T10."id",
- T10."password",
- T10."last_login",
- T10."first_name",
- T10."last_name",
- T10."is_staff",
- T10."date_joined",
- T10."uuid",
- T10."current_organization_id",
- T10."current_team_id",
- T10."email",
- T10."pending_email",
- T10."distinct_id",
- T10."is_email_verified",
- T10."credentials_reviewed_at",
- T10."requested_password_reset_at",
- T10."requested_2fa_reset_at",
- T10."has_seen_product_intro_for",
- T10."strapi_id",
- T10."is_active",
- T10."role_at_organization",
- T10."theme_mode",
- T10."partial_notification_settings",
- T10."anonymize_data",
- T10."allow_impersonation",
- T10."toolbar_mode",
- T10."hedgehog_config",
- T10."allow_sidebar_suggestions",
- T10."shortcut_position",
- T10."passkeys_enabled_for_2fa",
- T10."hide_mcp_hints",
- T10."onboarding_skipped_at",
- T10."onboarding_skipped_reason",
- T10."onboarding_skipped_organization_id",
- T10."onboarding_delegated_to_invite_id",
- T10."onboarding_delegated_to_organization_id",
- T10."onboarding_delegation_accepted_at",
- T10."events_column_config",
- T10."email_opt_in",
- T11."id",
- T11."password",
- T11."last_login",
- T11."first_name",
- T11."last_name",
- T11."is_staff",
- T11."date_joined",
- T11."uuid",
- T11."current_organization_id",
- T11."current_team_id",
- T11."email",
- T11."pending_email",
- T11."distinct_id",
- T11."is_email_verified",
- T11."credentials_reviewed_at",
- T11."requested_password_reset_at",
- T11."requested_2fa_reset_at",
- T11."has_seen_product_intro_for",
- T11."strapi_id",
- T11."is_active",
- T11."role_at_organization",
- T11."theme_mode",
- T11."partial_notification_settings",
- T11."anonymize_data",
- T11."allow_impersonation",
- T11."toolbar_mode",
- T11."hedgehog_config",
- T11."allow_sidebar_suggestions",
- T11."shortcut_position",
- T11."passkeys_enabled_for_2fa",
- T11."hide_mcp_hints",
- T11."onboarding_skipped_at",
- T11."onboarding_skipped_reason",
- T11."onboarding_skipped_organization_id",
- T11."onboarding_delegated_to_invite_id",
- T11."onboarding_delegated_to_organization_id",
- T11."onboarding_delegation_accepted_at",
- T11."events_column_config",
- T11."email_opt_in"
+ "posthog_team"."business_model"
+ FROM "posthog_team"
+ WHERE "posthog_team"."id" = 99999
+ LIMIT 21
+ '''
+# ---
+# name: TestDashboard.test_listing_dashboards_is_not_nplus1.13
+ '''
+ SELECT "posthog_dashboardtile"."id",
+ "posthog_dashboardtile"."dashboard_id",
+ "posthog_dashboardtile"."insight_id",
+ "posthog_dashboardtile"."text_id",
+ "posthog_dashboardtile"."button_tile_id",
+ "posthog_dashboardtile"."widget_id",
+ "posthog_dashboardtile"."team_id",
+ "posthog_dashboardtile"."layouts",
+ "posthog_dashboardtile"."color",
+ "posthog_dashboardtile"."filters_hash",
+ "posthog_dashboardtile"."last_refresh",
+ "posthog_dashboardtile"."refreshing",
+ "posthog_dashboardtile"."refresh_attempt",
+ "posthog_dashboardtile"."filters_overrides",
+ "posthog_dashboardtile"."show_description",
+ "posthog_dashboardtile"."transparent_background",
+ "posthog_dashboardtile"."deleted"
FROM "posthog_dashboardtile"
INNER JOIN "posthog_dashboard" ON ("posthog_dashboardtile"."dashboard_id" = "posthog_dashboard"."id")
- LEFT OUTER JOIN "posthog_dashboarditem" ON ("posthog_dashboardtile"."insight_id" = "posthog_dashboarditem"."id")
- LEFT OUTER JOIN "posthog_team" ON ("posthog_dashboarditem"."team_id" = "posthog_team"."id")
- LEFT OUTER JOIN "posthog_user" ON ("posthog_dashboarditem"."created_by_id" = "posthog_user"."id")
- LEFT OUTER JOIN "posthog_user" T6 ON ("posthog_dashboarditem"."last_modified_by_id" = T6."id")
- LEFT OUTER JOIN "posthog_text" ON ("posthog_dashboardtile"."text_id" = "posthog_text"."id")
- LEFT OUTER JOIN "posthog_buttontile" ON ("posthog_dashboardtile"."button_tile_id" = "posthog_buttontile"."id")
- LEFT OUTER JOIN "posthog_dashboardwidget" ON ("posthog_dashboardtile"."widget_id" = "posthog_dashboardwidget"."id")
- LEFT OUTER JOIN "posthog_user" T10 ON ("posthog_dashboardwidget"."created_by_id" = T10."id")
- LEFT OUTER JOIN "posthog_user" T11 ON ("posthog_dashboardwidget"."last_modified_by_id" = T11."id")
WHERE (NOT ("posthog_dashboardtile"."deleted"
AND "posthog_dashboardtile"."deleted" IS NOT NULL)
AND NOT ("posthog_dashboard"."deleted")
- AND NOT ("posthog_dashboard"."deleted"
- AND "posthog_dashboardtile"."deleted"
- AND "posthog_dashboardtile"."deleted" IS NOT NULL)
- AND (NOT "posthog_dashboarditem"."deleted"
- OR "posthog_dashboardtile"."insight_id" IS NULL)
- AND "posthog_dashboardtile"."dashboard_id" = 99999
- AND "posthog_dashboardtile"."dashboard_id" = 99999
- AND NOT ("posthog_dashboard"."deleted"
- AND "posthog_dashboardtile"."deleted"
- AND "posthog_dashboardtile"."deleted" IS NOT NULL)
- AND (NOT "posthog_dashboarditem"."deleted"
- OR "posthog_dashboardtile"."insight_id" IS NULL))
- ORDER BY "posthog_dashboarditem"."order" ASC
+ AND "posthog_dashboardtile"."insight_id" = 99999)
'''
# ---
-# name: TestDashboard.test_adding_insights_is_not_nplus1_for_gets.5
+# name: TestDashboard.test_listing_dashboards_is_not_nplus1.14
'''
- SELECT "posthog_organizationmembership"."id",
- "posthog_organizationmembership"."organization_id",
- "posthog_organizationmembership"."user_id",
- "posthog_organizationmembership"."level",
- "posthog_organizationmembership"."joined_at",
- "posthog_organizationmembership"."updated_at",
- "posthog_organizationmembership"."invited_by_id",
- "posthog_organization"."id",
- "posthog_organization"."name",
- "posthog_organization"."slug",
- "posthog_organization"."logo_media_id",
- "posthog_organization"."created_at",
- "posthog_organization"."updated_at",
- "posthog_organization"."is_active",
- "posthog_organization"."is_not_active_reason",
- "posthog_organization"."session_cookie_age",
- "posthog_organization"."is_member_join_email_enabled",
- "posthog_organization"."is_ai_data_processing_approved",
- "posthog_organization"."is_ai_training_opted_in",
- "posthog_organization"."is_ai_training_locked",
- "posthog_organization"."is_ai_training_cta_shown",
- "posthog_organization"."enforce_2fa",
- "posthog_organization"."members_can_invite",
- "posthog_organization"."members_can_create_projects",
- "posthog_organization"."members_can_use_personal_api_keys",
- "posthog_organization"."allow_publicly_shared_resources",
- "posthog_organization"."default_role_id",
- "posthog_organization"."plugins_access_level",
- "posthog_organization"."for_internal_metrics",
- "posthog_organization"."default_experiment_stats_method",
- "posthog_organization"."default_anonymize_ips",
- "posthog_organization"."is_hipaa",
- "posthog_organization"."is_pending_deletion",
- "posthog_organization"."customer_id",
- "posthog_organization"."available_product_features",
- "posthog_organization"."usage",
- "posthog_organization"."never_drop_data",
- "posthog_organization"."customer_trust_scores",
- "posthog_organization"."setup_section_2_completed",
- "posthog_organization"."personalization",
- "posthog_organization"."domain_whitelist",
- "posthog_organization"."is_platform"
- FROM "posthog_organizationmembership"
- INNER JOIN "posthog_organization" ON ("posthog_organizationmembership"."organization_id" = "posthog_organization"."id")
- WHERE "posthog_organizationmembership"."user_id" = 99999
+ SELECT "posthog_dashboardtile"."id",
+ "posthog_dashboardtile"."dashboard_id",
+ "posthog_dashboardtile"."insight_id",
+ "posthog_dashboardtile"."text_id",
+ "posthog_dashboardtile"."button_tile_id",
+ "posthog_dashboardtile"."widget_id",
+ "posthog_dashboardtile"."team_id",
+ "posthog_dashboardtile"."layouts",
+ "posthog_dashboardtile"."color",
+ "posthog_dashboardtile"."filters_hash",
+ "posthog_dashboardtile"."last_refresh",
+ "posthog_dashboardtile"."refreshing",
+ "posthog_dashboardtile"."refresh_attempt",
+ "posthog_dashboardtile"."filters_overrides",
+ "posthog_dashboardtile"."show_description",
+ "posthog_dashboardtile"."transparent_background",
+ "posthog_dashboardtile"."deleted"
+ FROM "posthog_dashboardtile"
+ INNER JOIN "posthog_dashboard" ON ("posthog_dashboardtile"."dashboard_id" = "posthog_dashboard"."id")
+ WHERE (NOT ("posthog_dashboardtile"."deleted"
+ AND "posthog_dashboardtile"."deleted" IS NOT NULL)
+ AND NOT ("posthog_dashboard"."deleted")
+ AND "posthog_dashboardtile"."insight_id" = 99999)
'''
# ---
-# name: TestDashboard.test_adding_insights_is_not_nplus1_for_gets.50
- '''
- SELECT "posthog_insightcachingstate"."id",
- "posthog_insightcachingstate"."team_id",
- "posthog_insightcachingstate"."insight_id",
- "posthog_insightcachingstate"."dashboard_tile_id",
- "posthog_insightcachingstate"."cache_key",
- "posthog_insightcachingstate"."target_cache_age_seconds",
- "posthog_insightcachingstate"."last_refresh",
- "posthog_insightcachingstate"."last_refresh_queued_at",
- "posthog_insightcachingstate"."refresh_attempt",
- "posthog_insightcachingstate"."created_at",
- "posthog_insightcachingstate"."updated_at"
- FROM "posthog_insightcachingstate"
- WHERE "posthog_insightcachingstate"."dashboard_tile_id" IN (1,
- 2,
- 3,
- 4,
- 5 /* ... */)
- '''
-# ---
-# name: TestDashboard.test_adding_insights_is_not_nplus1_for_gets.51
+# name: TestDashboard.test_listing_dashboards_is_not_nplus1.15
'''
- SELECT ("posthog_dashboardtile"."insight_id") AS "_prefetch_related_val_insight_id",
- "posthog_dashboard"."id",
- "posthog_dashboard"."name",
- "posthog_dashboard"."description",
- "posthog_dashboard"."team_id",
- "posthog_dashboard"."pinned",
- "posthog_dashboard"."created_at",
- "posthog_dashboard"."created_by_id",
- "posthog_dashboard"."deleted",
- "posthog_dashboard"."last_accessed_at",
- "posthog_dashboard"."last_refresh",
- "posthog_dashboard"."filters",
- "posthog_dashboard"."variables",
- "posthog_dashboard"."breakdown_colors",
- "posthog_dashboard"."data_color_theme_id",
- "posthog_dashboard"."creation_mode",
- "posthog_dashboard"."restriction_level",
- "posthog_dashboard"."quick_filter_ids",
- "posthog_dashboard"."deprecated_tags",
- "posthog_dashboard"."tags",
- "posthog_dashboard"."share_token",
- "posthog_dashboard"."is_shared"
- FROM "posthog_dashboard"
- INNER JOIN "posthog_dashboardtile" ON ("posthog_dashboard"."id" = "posthog_dashboardtile"."dashboard_id")
- WHERE (NOT ("posthog_dashboard"."deleted")
- AND "posthog_dashboard"."id" IN
- (SELECT U0."dashboard_id" AS "dashboard_id"
- FROM "posthog_dashboardtile" U0
- INNER JOIN "posthog_dashboard" U1 ON (U0."dashboard_id" = U1."id")
- WHERE (NOT (U0."deleted"
- AND U0."deleted" IS NOT NULL)
- AND NOT (U1."deleted")))
- AND "posthog_dashboardtile"."insight_id" IN (1,
- 2,
- 3,
- 4,
- 5 /* ... */))
+ SELECT "posthog_insightvariable"."created_by_id",
+ "posthog_insightvariable"."created_at",
+ "posthog_insightvariable"."updated_at",
+ "posthog_insightvariable"."id",
+ "posthog_insightvariable"."team_id",
+ "posthog_insightvariable"."name",
+ "posthog_insightvariable"."code_name",
+ "posthog_insightvariable"."type",
+ "posthog_insightvariable"."default_value",
+ "posthog_insightvariable"."values"
+ FROM "posthog_insightvariable"
+ WHERE "posthog_insightvariable"."team_id" = 99999
'''
# ---
-# name: TestDashboard.test_adding_insights_is_not_nplus1_for_gets.52
+# name: TestDashboard.test_listing_dashboards_is_not_nplus1.16
'''
- SELECT "posthog_dashboardtile"."id",
- "posthog_dashboardtile"."dashboard_id",
- "posthog_dashboardtile"."insight_id",
- "posthog_dashboardtile"."text_id",
- "posthog_dashboardtile"."button_tile_id",
- "posthog_dashboardtile"."widget_id",
- "posthog_dashboardtile"."team_id",
- "posthog_dashboardtile"."layouts",
- "posthog_dashboardtile"."color",
- "posthog_dashboardtile"."filters_hash",
- "posthog_dashboardtile"."last_refresh",
- "posthog_dashboardtile"."refreshing",
- "posthog_dashboardtile"."refresh_attempt",
- "posthog_dashboardtile"."filters_overrides",
- "posthog_dashboardtile"."show_description",
- "posthog_dashboardtile"."transparent_background",
- "posthog_dashboardtile"."deleted"
+ SELECT "posthog_dashboardtile"."dashboard_id" AS "dashboard_id"
FROM "posthog_dashboardtile"
INNER JOIN "posthog_dashboard" ON ("posthog_dashboardtile"."dashboard_id" = "posthog_dashboard"."id")
WHERE (NOT ("posthog_dashboardtile"."deleted"
AND "posthog_dashboardtile"."deleted" IS NOT NULL)
AND NOT ("posthog_dashboard"."deleted")
- AND "posthog_dashboardtile"."insight_id" IN (1,
- 2,
- 3,
- 4,
- 5 /* ... */))
+ AND "posthog_dashboardtile"."insight_id" = 99999)
'''
# ---
-# name: TestDashboard.test_adding_insights_is_not_nplus1_for_gets.53
+# name: TestDashboard.test_listing_dashboards_is_not_nplus1.17
'''
SELECT "posthog_dashboard"."id",
"posthog_dashboard"."name",
@@ -3002,61 +2791,25 @@
"posthog_dashboard"."share_token",
"posthog_dashboard"."is_shared"
FROM "posthog_dashboard"
- WHERE ("posthog_dashboard"."id") IN ((1,
- 2)/* ... */)
+ WHERE (NOT ("posthog_dashboard"."deleted")
+ AND "posthog_dashboard"."id" IN (1,
+ 2,
+ 3,
+ 4,
+ 5 /* ... */))
'''
# ---
-# name: TestDashboard.test_adding_insights_is_not_nplus1_for_gets.54
+# name: TestDashboard.test_listing_dashboards_is_not_nplus1.18
'''
- SELECT "posthog_taggeditem"."id",
- "posthog_taggeditem"."tag_id",
- "posthog_taggeditem"."dashboard_id",
- "posthog_taggeditem"."insight_id",
- "posthog_taggeditem"."event_definition_id",
- "posthog_taggeditem"."property_definition_id",
- "posthog_taggeditem"."action_id",
- "posthog_taggeditem"."feature_flag_id",
- "posthog_taggeditem"."experiment_saved_metric_id",
- "posthog_taggeditem"."ticket_id",
- "posthog_taggeditem"."account_id",
- "posthog_taggeditem"."endpoint_id",
- "posthog_tag"."id",
- "posthog_tag"."name",
- "posthog_tag"."team_id"
+ SELECT "posthog_tag"."name" AS "tag__name"
FROM "posthog_taggeditem"
INNER JOIN "posthog_tag" ON ("posthog_taggeditem"."tag_id" = "posthog_tag"."id")
- WHERE "posthog_taggeditem"."insight_id" IN (1,
- 2,
- 3,
- 4,
- 5 /* ... */)
+ WHERE "posthog_taggeditem"."insight_id" = 99999
'''
# ---
-# name: TestDashboard.test_adding_insights_is_not_nplus1_for_gets.55
+# name: TestDashboard.test_listing_dashboards_is_not_nplus1.19
'''
- SELECT "posthog_alertconfiguration"."created_by_id",
- "posthog_alertconfiguration"."created_at",
- "posthog_alertconfiguration"."id",
- "posthog_alertconfiguration"."team_id",
- "posthog_alertconfiguration"."insight_id",
- "posthog_alertconfiguration"."name",
- "posthog_alertconfiguration"."config",
- "posthog_alertconfiguration"."calculation_interval",
- "posthog_alertconfiguration"."threshold_id",
- "posthog_alertconfiguration"."condition",
- "posthog_alertconfiguration"."detector_config",
- "posthog_alertconfiguration"."state",
- "posthog_alertconfiguration"."enabled",
- "posthog_alertconfiguration"."last_notified_at",
- "posthog_alertconfiguration"."last_checked_at",
- "posthog_alertconfiguration"."next_check_at",
- "posthog_alertconfiguration"."snoozed_until",
- "posthog_alertconfiguration"."skip_weekend",
- "posthog_alertconfiguration"."schedule_restriction",
- "posthog_alertconfiguration"."investigation_agent_enabled",
- "posthog_alertconfiguration"."investigation_gates_notifications",
- "posthog_alertconfiguration"."investigation_inconclusive_action",
- "posthog_user"."id",
+ SELECT "posthog_user"."id",
"posthog_user"."password",
"posthog_user"."last_login",
"posthog_user"."first_name",
@@ -3071,7 +2824,6 @@
"posthog_user"."distinct_id",
"posthog_user"."is_email_verified",
"posthog_user"."credentials_reviewed_at",
- "posthog_user"."requested_password_reset_at",
"posthog_user"."requested_2fa_reset_at",
"posthog_user"."has_seen_product_intro_for",
"posthog_user"."strapi_id",
@@ -3095,166 +2847,109 @@
"posthog_user"."onboarding_delegation_accepted_at",
"posthog_user"."events_column_config",
"posthog_user"."email_opt_in"
- FROM "posthog_alertconfiguration"
- LEFT OUTER JOIN "posthog_user" ON ("posthog_alertconfiguration"."created_by_id" = "posthog_user"."id")
- WHERE "posthog_alertconfiguration"."insight_id" IN (1,
- 2,
- 3,
- 4,
- 5 /* ... */)
- '''
-# ---
-# name: TestDashboard.test_adding_insights_is_not_nplus1_for_gets.56
- '''
- SELECT "posthog_dashboard"."id",
- "posthog_dashboard"."name",
- "posthog_dashboard"."description",
- "posthog_dashboard"."team_id",
- "posthog_dashboard"."pinned",
- "posthog_dashboard"."created_at",
- "posthog_dashboard"."created_by_id",
- "posthog_dashboard"."deleted",
- "posthog_dashboard"."last_accessed_at",
- "posthog_dashboard"."last_refresh",
- "posthog_dashboard"."filters",
- "posthog_dashboard"."variables",
- "posthog_dashboard"."breakdown_colors",
- "posthog_dashboard"."data_color_theme_id",
- "posthog_dashboard"."creation_mode",
- "posthog_dashboard"."restriction_level",
- "posthog_dashboard"."quick_filter_ids",
- "posthog_dashboard"."deprecated_tags",
- "posthog_dashboard"."tags",
- "posthog_dashboard"."share_token",
- "posthog_dashboard"."is_shared"
- FROM "posthog_dashboard"
- WHERE (NOT ("posthog_dashboard"."deleted")
- AND "posthog_dashboard"."id" IN (1,
- 2,
- 3,
- 4,
- 5 /* ... */))
- '''
-# ---
-# name: TestDashboard.test_adding_insights_is_not_nplus1_for_gets.6
- '''
- SELECT "ee_accesscontrol"."team_id" AS "team_id",
- "ee_accesscontrol"."resource_id" AS "resource_id",
- "ee_accesscontrol"."organization_member_id" AS "organization_member_id",
- "ee_accesscontrol"."role_id" AS "role_id",
- "ee_accesscontrol"."access_level" AS "access_level"
- FROM "ee_accesscontrol"
- INNER JOIN "posthog_team" ON ("ee_accesscontrol"."team_id" = "posthog_team"."id")
- WHERE ("ee_accesscontrol"."resource" = 'project'
- AND "posthog_team"."organization_id" IN ('00000000-0000-0000-0000-000000000000'::uuid))
- '''
-# ---
-# name: TestDashboard.test_adding_insights_is_not_nplus1_for_gets.7
- '''
- SELECT "ee_rolemembership"."organization_member_id" AS "organization_member_id",
- "ee_rolemembership"."role_id" AS "role_id"
- FROM "ee_rolemembership"
- WHERE "ee_rolemembership"."user_id" = 99999
- '''
-# ---
-# name: TestDashboard.test_adding_insights_is_not_nplus1_for_gets.8
- '''
- SELECT "posthog_dashboard"."id",
- "posthog_dashboard"."name",
- "posthog_dashboard"."description",
- "posthog_dashboard"."team_id",
- "posthog_dashboard"."pinned",
- "posthog_dashboard"."created_at",
- "posthog_dashboard"."created_by_id",
- "posthog_dashboard"."deleted",
- "posthog_dashboard"."last_accessed_at",
- "posthog_dashboard"."last_refresh",
- "posthog_dashboard"."filters",
- "posthog_dashboard"."variables",
- "posthog_dashboard"."breakdown_colors",
- "posthog_dashboard"."data_color_theme_id",
- "posthog_dashboard"."creation_mode",
- "posthog_dashboard"."restriction_level",
- "posthog_dashboard"."quick_filter_ids",
- "posthog_dashboard"."deprecated_tags",
- "posthog_dashboard"."tags",
- "posthog_dashboard"."share_token",
- "posthog_dashboard"."is_shared"
- FROM "posthog_dashboard"
- INNER JOIN "posthog_team" ON ("posthog_dashboard"."team_id" = "posthog_team"."id")
- WHERE (NOT ("posthog_dashboard"."deleted")
- AND ("posthog_dashboard"."team_id" =
- (SELECT U0."parent_team_id" AS "parent_team_id"
- FROM "posthog_team" U0
- WHERE U0."id" = 99999
- LIMIT 1)
- OR ("posthog_team"."parent_team_id" IS NULL
- AND "posthog_dashboard"."team_id" = 99999))
- AND "posthog_dashboard"."id" = 99999)
- LIMIT 21
- '''
-# ---
-# name: TestDashboard.test_adding_insights_is_not_nplus1_for_gets.9
- '''
- SELECT COUNT(*) AS "__count"
- FROM "posthog_dashboardtile"
- INNER JOIN "posthog_dashboard" ON ("posthog_dashboardtile"."dashboard_id" = "posthog_dashboard"."id")
- WHERE (NOT ("posthog_dashboardtile"."deleted"
- AND "posthog_dashboardtile"."deleted" IS NOT NULL)
- AND NOT ("posthog_dashboard"."deleted")
- AND "posthog_dashboardtile"."dashboard_id" = 99999
- AND NOT ("posthog_dashboardtile"."deleted"
- AND "posthog_dashboardtile"."deleted" IS NOT NULL))
+ FROM "posthog_user"
+ WHERE ("posthog_user"."is_active"
+ AND "posthog_user"."id" = 99999)
'''
# ---
-# name: TestDashboard.test_listing_dashboards_is_not_nplus1
+# name: TestDashboard.test_listing_dashboards_is_not_nplus1.2
'''
- SELECT "posthog_user"."id",
- "posthog_user"."password",
- "posthog_user"."last_login",
- "posthog_user"."first_name",
- "posthog_user"."last_name",
- "posthog_user"."is_staff",
- "posthog_user"."date_joined",
- "posthog_user"."uuid",
- "posthog_user"."current_organization_id",
- "posthog_user"."current_team_id",
- "posthog_user"."email",
- "posthog_user"."pending_email",
- "posthog_user"."distinct_id",
- "posthog_user"."is_email_verified",
- "posthog_user"."credentials_reviewed_at",
- "posthog_user"."requested_2fa_reset_at",
- "posthog_user"."has_seen_product_intro_for",
- "posthog_user"."strapi_id",
- "posthog_user"."is_active",
- "posthog_user"."role_at_organization",
- "posthog_user"."theme_mode",
- "posthog_user"."partial_notification_settings",
- "posthog_user"."anonymize_data",
- "posthog_user"."allow_impersonation",
- "posthog_user"."toolbar_mode",
- "posthog_user"."hedgehog_config",
- "posthog_user"."allow_sidebar_suggestions",
- "posthog_user"."shortcut_position",
- "posthog_user"."passkeys_enabled_for_2fa",
- "posthog_user"."hide_mcp_hints",
- "posthog_user"."onboarding_skipped_at",
- "posthog_user"."onboarding_skipped_reason",
- "posthog_user"."onboarding_skipped_organization_id",
- "posthog_user"."onboarding_delegated_to_invite_id",
- "posthog_user"."onboarding_delegated_to_organization_id",
- "posthog_user"."onboarding_delegation_accepted_at",
- "posthog_user"."events_column_config",
- "posthog_user"."email_opt_in"
- FROM "posthog_user"
- WHERE ("posthog_user"."is_active"
- AND "posthog_user"."id" = 99999)
- '''
-# ---
-# name: TestDashboard.test_listing_dashboards_is_not_nplus1.1
- '''
- SELECT "posthog_organization"."id",
+ SELECT "posthog_team"."id",
+ "posthog_team"."uuid",
+ "posthog_team"."organization_id",
+ "posthog_team"."parent_team_id",
+ "posthog_team"."project_id",
+ "posthog_team"."api_token",
+ "posthog_team"."app_urls",
+ "posthog_team"."name",
+ "posthog_team"."slack_incoming_webhook",
+ "posthog_team"."created_at",
+ "posthog_team"."updated_at",
+ "posthog_team"."anonymize_ips",
+ "posthog_team"."completed_snippet_onboarding",
+ "posthog_team"."has_completed_onboarding_for",
+ "posthog_team"."onboarding_tasks",
+ "posthog_team"."ingested_event",
+ "posthog_team"."ingested_production_event",
+ "posthog_team"."ingested_production_event_last_checked_at",
+ "posthog_team"."person_processing_opt_out",
+ "posthog_team"."secret_api_token",
+ "posthog_team"."secret_api_token_backup",
+ "posthog_team"."session_recording_opt_in",
+ "posthog_team"."session_recording_sample_rate",
+ "posthog_team"."session_recording_minimum_duration_milliseconds",
+ "posthog_team"."session_recording_linked_flag",
+ "posthog_team"."session_recording_network_payload_capture_config",
+ "posthog_team"."session_recording_masking_config",
+ "posthog_team"."session_recording_url_trigger_config",
+ "posthog_team"."session_recording_url_blocklist_config",
+ "posthog_team"."session_recording_event_trigger_config",
+ "posthog_team"."session_recording_trigger_match_type_config",
+ "posthog_team"."session_recording_trigger_groups",
+ "posthog_team"."session_replay_config",
+ "posthog_team"."session_recording_retention_period",
+ "posthog_team"."event_retention_months",
+ "posthog_team"."conversations_enabled",
+ "posthog_team"."conversations_settings",
+ "posthog_team"."proactive_tasks_enabled",
+ "posthog_team"."survey_config",
+ "posthog_team"."surveys_opt_in",
+ "posthog_team"."product_tours_opt_in",
+ "posthog_team"."capture_console_log_opt_in",
+ "posthog_team"."capture_performance_opt_in",
+ "posthog_team"."capture_dead_clicks",
+ "posthog_team"."autocapture_opt_out",
+ "posthog_team"."autocapture_web_vitals_opt_in",
+ "posthog_team"."autocapture_web_vitals_allowed_metrics",
+ "posthog_team"."autocapture_exceptions_opt_in",
+ "posthog_team"."autocapture_exceptions_errors_to_ignore",
+ "posthog_team"."logs_settings",
+ "posthog_team"."llm_gateway_enabled_at",
+ "posthog_team"."llm_gateway_revoked_at",
+ "posthog_team"."llm_gateway_overspend_allowance_usd",
+ "posthog_team"."heatmaps_opt_in",
+ "posthog_team"."receive_org_level_activity_logs",
+ "posthog_team"."web_analytics_pre_aggregated_tables_enabled",
+ "posthog_team"."web_analytics_pre_aggregated_tables_version",
+ "posthog_team"."flags_persistence_default",
+ "posthog_team"."feature_flag_confirmation_enabled",
+ "posthog_team"."feature_flag_confirmation_message",
+ "posthog_team"."default_evaluation_environments_enabled",
+ "posthog_team"."require_evaluation_environment_tags",
+ "posthog_team"."default_evaluation_contexts_enabled",
+ "posthog_team"."require_evaluation_contexts",
+ "posthog_team"."session_recording_version",
+ "posthog_team"."signup_token",
+ "posthog_team"."is_demo",
+ "posthog_team"."access_control",
+ "posthog_team"."week_start_day",
+ "posthog_team"."inject_web_apps",
+ "posthog_team"."test_account_filters",
+ "posthog_team"."test_account_filters_default_checked",
+ "posthog_team"."path_cleaning_filters",
+ "posthog_team"."timezone",
+ "posthog_team"."data_attributes",
+ "posthog_team"."person_display_name_properties",
+ "posthog_team"."live_events_columns",
+ "posthog_team"."recording_domains",
+ "posthog_team"."human_friendly_comparison_periods",
+ "posthog_team"."cookieless_server_hash_mode",
+ "posthog_team"."primary_dashboard_id",
+ "posthog_team"."default_data_theme",
+ "posthog_team"."extra_settings",
+ "posthog_team"."modifiers",
+ "posthog_team"."correlation_config",
+ "posthog_team"."session_recording_retention_period_days",
+ "posthog_team"."external_data_workspace_id",
+ "posthog_team"."external_data_workspace_last_synced_at",
+ "posthog_team"."api_query_rate_limit",
+ "posthog_team"."drop_events_older_than",
+ "posthog_team"."base_currency",
+ "posthog_team"."experiment_recalculation_time",
+ "posthog_team"."default_experiment_confidence_level",
+ "posthog_team"."default_experiment_stats_method",
+ "posthog_team"."business_model",
+ "posthog_organization"."id",
"posthog_organization"."name",
"posthog_organization"."slug",
"posthog_organization"."logo_media_id",
@@ -3289,37 +2984,13 @@
"posthog_organization"."personalization",
"posthog_organization"."domain_whitelist",
"posthog_organization"."is_platform"
- FROM "posthog_organization"
- WHERE "posthog_organization"."id" = '00000000-0000-0000-0000-000000000000'::uuid
+ FROM "posthog_team"
+ INNER JOIN "posthog_organization" ON ("posthog_team"."organization_id" = "posthog_organization"."id")
+ WHERE "posthog_team"."id" = 99999
LIMIT 21
'''
# ---
-# name: TestDashboard.test_listing_dashboards_is_not_nplus1.10
- '''
- SELECT "posthog_filesystem"."team_id",
- "posthog_filesystem"."id",
- "posthog_filesystem"."path",
- "posthog_filesystem"."depth",
- "posthog_filesystem"."type",
- "posthog_filesystem"."ref",
- "posthog_filesystem"."href",
- "posthog_filesystem"."shortcut",
- "posthog_filesystem"."meta",
- "posthog_filesystem"."created_at",
- "posthog_filesystem"."created_by_id",
- "posthog_filesystem"."surface",
- "posthog_filesystem"."project_id"
- FROM "posthog_filesystem"
- WHERE (("posthog_filesystem"."surface" IS NULL
- OR "posthog_filesystem"."surface" = 'web')
- AND "posthog_filesystem"."ref" = '0001'
- AND "posthog_filesystem"."team_id" = 99999
- AND "posthog_filesystem"."type" = 'insight'
- AND NOT ("posthog_filesystem"."shortcut"
- AND "posthog_filesystem"."shortcut" IS NOT NULL))
- '''
-# ---
-# name: TestDashboard.test_listing_dashboards_is_not_nplus1.11
+# name: TestDashboard.test_listing_dashboards_is_not_nplus1.20
'''
SELECT "posthog_organization"."id",
"posthog_organization"."name",
@@ -3361,7 +3032,7 @@
LIMIT 21
'''
# ---
-# name: TestDashboard.test_listing_dashboards_is_not_nplus1.12
+# name: TestDashboard.test_listing_dashboards_is_not_nplus1.21
'''
SELECT "posthog_team"."id",
"posthog_team"."uuid",
@@ -3457,275 +3128,57 @@
"posthog_team"."experiment_recalculation_time",
"posthog_team"."default_experiment_confidence_level",
"posthog_team"."default_experiment_stats_method",
- "posthog_team"."business_model"
+ "posthog_team"."business_model",
+ "posthog_organization"."id",
+ "posthog_organization"."name",
+ "posthog_organization"."slug",
+ "posthog_organization"."logo_media_id",
+ "posthog_organization"."created_at",
+ "posthog_organization"."updated_at",
+ "posthog_organization"."is_active",
+ "posthog_organization"."is_not_active_reason",
+ "posthog_organization"."session_cookie_age",
+ "posthog_organization"."is_member_join_email_enabled",
+ "posthog_organization"."is_ai_data_processing_approved",
+ "posthog_organization"."is_ai_training_opted_in",
+ "posthog_organization"."is_ai_training_locked",
+ "posthog_organization"."is_ai_training_cta_shown",
+ "posthog_organization"."enforce_2fa",
+ "posthog_organization"."members_can_invite",
+ "posthog_organization"."members_can_create_projects",
+ "posthog_organization"."members_can_use_personal_api_keys",
+ "posthog_organization"."allow_publicly_shared_resources",
+ "posthog_organization"."default_role_id",
+ "posthog_organization"."plugins_access_level",
+ "posthog_organization"."for_internal_metrics",
+ "posthog_organization"."default_experiment_stats_method",
+ "posthog_organization"."default_anonymize_ips",
+ "posthog_organization"."is_hipaa",
+ "posthog_organization"."is_pending_deletion",
+ "posthog_organization"."customer_id",
+ "posthog_organization"."available_product_features",
+ "posthog_organization"."usage",
+ "posthog_organization"."never_drop_data",
+ "posthog_organization"."customer_trust_scores",
+ "posthog_organization"."setup_section_2_completed",
+ "posthog_organization"."personalization",
+ "posthog_organization"."domain_whitelist",
+ "posthog_organization"."is_platform"
FROM "posthog_team"
+ INNER JOIN "posthog_organization" ON ("posthog_team"."organization_id" = "posthog_organization"."id")
WHERE "posthog_team"."id" = 99999
LIMIT 21
'''
# ---
-# name: TestDashboard.test_listing_dashboards_is_not_nplus1.13
- '''
- SELECT "posthog_dashboardtile"."id",
- "posthog_dashboardtile"."dashboard_id",
- "posthog_dashboardtile"."insight_id",
- "posthog_dashboardtile"."text_id",
- "posthog_dashboardtile"."button_tile_id",
- "posthog_dashboardtile"."widget_id",
- "posthog_dashboardtile"."team_id",
- "posthog_dashboardtile"."layouts",
- "posthog_dashboardtile"."color",
- "posthog_dashboardtile"."filters_hash",
- "posthog_dashboardtile"."last_refresh",
- "posthog_dashboardtile"."refreshing",
- "posthog_dashboardtile"."refresh_attempt",
- "posthog_dashboardtile"."filters_overrides",
- "posthog_dashboardtile"."show_description",
- "posthog_dashboardtile"."transparent_background",
- "posthog_dashboardtile"."deleted"
- FROM "posthog_dashboardtile"
- INNER JOIN "posthog_dashboard" ON ("posthog_dashboardtile"."dashboard_id" = "posthog_dashboard"."id")
- WHERE (NOT ("posthog_dashboardtile"."deleted"
- AND "posthog_dashboardtile"."deleted" IS NOT NULL)
- AND NOT ("posthog_dashboard"."deleted")
- AND "posthog_dashboardtile"."insight_id" = 99999)
- '''
-# ---
-# name: TestDashboard.test_listing_dashboards_is_not_nplus1.14
+# name: TestDashboard.test_listing_dashboards_is_not_nplus1.22
'''
- SELECT "posthog_dashboardtile"."id",
- "posthog_dashboardtile"."dashboard_id",
- "posthog_dashboardtile"."insight_id",
- "posthog_dashboardtile"."text_id",
- "posthog_dashboardtile"."button_tile_id",
- "posthog_dashboardtile"."widget_id",
- "posthog_dashboardtile"."team_id",
- "posthog_dashboardtile"."layouts",
- "posthog_dashboardtile"."color",
- "posthog_dashboardtile"."filters_hash",
- "posthog_dashboardtile"."last_refresh",
- "posthog_dashboardtile"."refreshing",
- "posthog_dashboardtile"."refresh_attempt",
- "posthog_dashboardtile"."filters_overrides",
- "posthog_dashboardtile"."show_description",
- "posthog_dashboardtile"."transparent_background",
- "posthog_dashboardtile"."deleted"
- FROM "posthog_dashboardtile"
- INNER JOIN "posthog_dashboard" ON ("posthog_dashboardtile"."dashboard_id" = "posthog_dashboard"."id")
- WHERE (NOT ("posthog_dashboardtile"."deleted"
- AND "posthog_dashboardtile"."deleted" IS NOT NULL)
- AND NOT ("posthog_dashboard"."deleted")
- AND "posthog_dashboardtile"."insight_id" = 99999)
- '''
-# ---
-# name: TestDashboard.test_listing_dashboards_is_not_nplus1.15
- '''
- SELECT "posthog_insightvariable"."created_by_id",
- "posthog_insightvariable"."created_at",
- "posthog_insightvariable"."updated_at",
- "posthog_insightvariable"."id",
- "posthog_insightvariable"."team_id",
- "posthog_insightvariable"."name",
- "posthog_insightvariable"."code_name",
- "posthog_insightvariable"."type",
- "posthog_insightvariable"."default_value",
- "posthog_insightvariable"."values"
- FROM "posthog_insightvariable"
- WHERE "posthog_insightvariable"."team_id" = 99999
- '''
-# ---
-# name: TestDashboard.test_listing_dashboards_is_not_nplus1.16
- '''
- SELECT "posthog_dashboardtile"."dashboard_id" AS "dashboard_id"
- FROM "posthog_dashboardtile"
- INNER JOIN "posthog_dashboard" ON ("posthog_dashboardtile"."dashboard_id" = "posthog_dashboard"."id")
- WHERE (NOT ("posthog_dashboardtile"."deleted"
- AND "posthog_dashboardtile"."deleted" IS NOT NULL)
- AND NOT ("posthog_dashboard"."deleted")
- AND "posthog_dashboardtile"."insight_id" = 99999)
- '''
-# ---
-# name: TestDashboard.test_listing_dashboards_is_not_nplus1.17
- '''
- SELECT "posthog_dashboard"."id",
- "posthog_dashboard"."name",
- "posthog_dashboard"."description",
- "posthog_dashboard"."team_id",
- "posthog_dashboard"."pinned",
- "posthog_dashboard"."created_at",
- "posthog_dashboard"."created_by_id",
- "posthog_dashboard"."deleted",
- "posthog_dashboard"."last_accessed_at",
- "posthog_dashboard"."last_refresh",
- "posthog_dashboard"."filters",
- "posthog_dashboard"."variables",
- "posthog_dashboard"."breakdown_colors",
- "posthog_dashboard"."data_color_theme_id",
- "posthog_dashboard"."creation_mode",
- "posthog_dashboard"."restriction_level",
- "posthog_dashboard"."quick_filter_ids",
- "posthog_dashboard"."deprecated_tags",
- "posthog_dashboard"."tags",
- "posthog_dashboard"."share_token",
- "posthog_dashboard"."is_shared"
- FROM "posthog_dashboard"
- WHERE (NOT ("posthog_dashboard"."deleted")
- AND "posthog_dashboard"."id" IN (1,
- 2,
- 3,
- 4,
- 5 /* ... */))
- '''
-# ---
-# name: TestDashboard.test_listing_dashboards_is_not_nplus1.18
- '''
- SELECT "posthog_tag"."name" AS "tag__name"
- FROM "posthog_taggeditem"
- INNER JOIN "posthog_tag" ON ("posthog_taggeditem"."tag_id" = "posthog_tag"."id")
- WHERE "posthog_taggeditem"."insight_id" = 99999
- '''
-# ---
-# name: TestDashboard.test_listing_dashboards_is_not_nplus1.19
- '''
- SELECT "posthog_user"."id",
- "posthog_user"."password",
- "posthog_user"."last_login",
- "posthog_user"."first_name",
- "posthog_user"."last_name",
- "posthog_user"."is_staff",
- "posthog_user"."date_joined",
- "posthog_user"."uuid",
- "posthog_user"."current_organization_id",
- "posthog_user"."current_team_id",
- "posthog_user"."email",
- "posthog_user"."pending_email",
- "posthog_user"."distinct_id",
- "posthog_user"."is_email_verified",
- "posthog_user"."credentials_reviewed_at",
- "posthog_user"."requested_2fa_reset_at",
- "posthog_user"."has_seen_product_intro_for",
- "posthog_user"."strapi_id",
- "posthog_user"."is_active",
- "posthog_user"."role_at_organization",
- "posthog_user"."theme_mode",
- "posthog_user"."partial_notification_settings",
- "posthog_user"."anonymize_data",
- "posthog_user"."allow_impersonation",
- "posthog_user"."toolbar_mode",
- "posthog_user"."hedgehog_config",
- "posthog_user"."allow_sidebar_suggestions",
- "posthog_user"."shortcut_position",
- "posthog_user"."passkeys_enabled_for_2fa",
- "posthog_user"."hide_mcp_hints",
- "posthog_user"."onboarding_skipped_at",
- "posthog_user"."onboarding_skipped_reason",
- "posthog_user"."onboarding_skipped_organization_id",
- "posthog_user"."onboarding_delegated_to_invite_id",
- "posthog_user"."onboarding_delegated_to_organization_id",
- "posthog_user"."onboarding_delegation_accepted_at",
- "posthog_user"."events_column_config",
- "posthog_user"."email_opt_in"
- FROM "posthog_user"
- WHERE ("posthog_user"."is_active"
- AND "posthog_user"."id" = 99999)
- '''
-# ---
-# name: TestDashboard.test_listing_dashboards_is_not_nplus1.2
- '''
- SELECT "posthog_team"."id",
- "posthog_team"."uuid",
- "posthog_team"."organization_id",
- "posthog_team"."parent_team_id",
- "posthog_team"."project_id",
- "posthog_team"."api_token",
- "posthog_team"."app_urls",
- "posthog_team"."name",
- "posthog_team"."slack_incoming_webhook",
- "posthog_team"."created_at",
- "posthog_team"."updated_at",
- "posthog_team"."anonymize_ips",
- "posthog_team"."completed_snippet_onboarding",
- "posthog_team"."has_completed_onboarding_for",
- "posthog_team"."onboarding_tasks",
- "posthog_team"."ingested_event",
- "posthog_team"."ingested_production_event",
- "posthog_team"."ingested_production_event_last_checked_at",
- "posthog_team"."person_processing_opt_out",
- "posthog_team"."secret_api_token",
- "posthog_team"."secret_api_token_backup",
- "posthog_team"."session_recording_opt_in",
- "posthog_team"."session_recording_sample_rate",
- "posthog_team"."session_recording_minimum_duration_milliseconds",
- "posthog_team"."session_recording_linked_flag",
- "posthog_team"."session_recording_network_payload_capture_config",
- "posthog_team"."session_recording_masking_config",
- "posthog_team"."session_recording_url_trigger_config",
- "posthog_team"."session_recording_url_blocklist_config",
- "posthog_team"."session_recording_event_trigger_config",
- "posthog_team"."session_recording_trigger_match_type_config",
- "posthog_team"."session_recording_trigger_groups",
- "posthog_team"."session_replay_config",
- "posthog_team"."session_recording_retention_period",
- "posthog_team"."event_retention_months",
- "posthog_team"."conversations_enabled",
- "posthog_team"."conversations_settings",
- "posthog_team"."proactive_tasks_enabled",
- "posthog_team"."survey_config",
- "posthog_team"."surveys_opt_in",
- "posthog_team"."product_tours_opt_in",
- "posthog_team"."capture_console_log_opt_in",
- "posthog_team"."capture_performance_opt_in",
- "posthog_team"."capture_dead_clicks",
- "posthog_team"."autocapture_opt_out",
- "posthog_team"."autocapture_web_vitals_opt_in",
- "posthog_team"."autocapture_web_vitals_allowed_metrics",
- "posthog_team"."autocapture_exceptions_opt_in",
- "posthog_team"."autocapture_exceptions_errors_to_ignore",
- "posthog_team"."logs_settings",
- "posthog_team"."llm_gateway_enabled_at",
- "posthog_team"."llm_gateway_revoked_at",
- "posthog_team"."llm_gateway_overspend_allowance_usd",
- "posthog_team"."heatmaps_opt_in",
- "posthog_team"."receive_org_level_activity_logs",
- "posthog_team"."web_analytics_pre_aggregated_tables_enabled",
- "posthog_team"."web_analytics_pre_aggregated_tables_version",
- "posthog_team"."flags_persistence_default",
- "posthog_team"."feature_flag_confirmation_enabled",
- "posthog_team"."feature_flag_confirmation_message",
- "posthog_team"."default_evaluation_environments_enabled",
- "posthog_team"."require_evaluation_environment_tags",
- "posthog_team"."default_evaluation_contexts_enabled",
- "posthog_team"."require_evaluation_contexts",
- "posthog_team"."session_recording_version",
- "posthog_team"."signup_token",
- "posthog_team"."is_demo",
- "posthog_team"."access_control",
- "posthog_team"."week_start_day",
- "posthog_team"."inject_web_apps",
- "posthog_team"."test_account_filters",
- "posthog_team"."test_account_filters_default_checked",
- "posthog_team"."path_cleaning_filters",
- "posthog_team"."timezone",
- "posthog_team"."data_attributes",
- "posthog_team"."person_display_name_properties",
- "posthog_team"."live_events_columns",
- "posthog_team"."recording_domains",
- "posthog_team"."human_friendly_comparison_periods",
- "posthog_team"."cookieless_server_hash_mode",
- "posthog_team"."primary_dashboard_id",
- "posthog_team"."default_data_theme",
- "posthog_team"."extra_settings",
- "posthog_team"."modifiers",
- "posthog_team"."correlation_config",
- "posthog_team"."session_recording_retention_period_days",
- "posthog_team"."external_data_workspace_id",
- "posthog_team"."external_data_workspace_last_synced_at",
- "posthog_team"."api_query_rate_limit",
- "posthog_team"."drop_events_older_than",
- "posthog_team"."base_currency",
- "posthog_team"."experiment_recalculation_time",
- "posthog_team"."default_experiment_confidence_level",
- "posthog_team"."default_experiment_stats_method",
- "posthog_team"."business_model",
+ SELECT "posthog_organizationmembership"."id",
+ "posthog_organizationmembership"."organization_id",
+ "posthog_organizationmembership"."user_id",
+ "posthog_organizationmembership"."level",
+ "posthog_organizationmembership"."joined_at",
+ "posthog_organizationmembership"."updated_at",
+ "posthog_organizationmembership"."invited_by_id",
"posthog_organization"."id",
"posthog_organization"."name",
"posthog_organization"."slug",
@@ -3761,244 +3214,14 @@
"posthog_organization"."personalization",
"posthog_organization"."domain_whitelist",
"posthog_organization"."is_platform"
- FROM "posthog_team"
- INNER JOIN "posthog_organization" ON ("posthog_team"."organization_id" = "posthog_organization"."id")
- WHERE "posthog_team"."id" = 99999
+ FROM "posthog_organizationmembership"
+ INNER JOIN "posthog_organization" ON ("posthog_organizationmembership"."organization_id" = "posthog_organization"."id")
+ WHERE ("posthog_organizationmembership"."organization_id" = '00000000-0000-0000-0000-000000000000'::uuid
+ AND "posthog_organizationmembership"."user_id" = 99999)
LIMIT 21
'''
# ---
-# name: TestDashboard.test_listing_dashboards_is_not_nplus1.20
- '''
- SELECT "posthog_organization"."id",
- "posthog_organization"."name",
- "posthog_organization"."slug",
- "posthog_organization"."logo_media_id",
- "posthog_organization"."created_at",
- "posthog_organization"."updated_at",
- "posthog_organization"."is_active",
- "posthog_organization"."is_not_active_reason",
- "posthog_organization"."session_cookie_age",
- "posthog_organization"."is_member_join_email_enabled",
- "posthog_organization"."is_ai_data_processing_approved",
- "posthog_organization"."is_ai_training_opted_in",
- "posthog_organization"."is_ai_training_locked",
- "posthog_organization"."is_ai_training_cta_shown",
- "posthog_organization"."enforce_2fa",
- "posthog_organization"."members_can_invite",
- "posthog_organization"."members_can_create_projects",
- "posthog_organization"."members_can_use_personal_api_keys",
- "posthog_organization"."allow_publicly_shared_resources",
- "posthog_organization"."default_role_id",
- "posthog_organization"."plugins_access_level",
- "posthog_organization"."for_internal_metrics",
- "posthog_organization"."default_experiment_stats_method",
- "posthog_organization"."default_anonymize_ips",
- "posthog_organization"."is_hipaa",
- "posthog_organization"."is_pending_deletion",
- "posthog_organization"."customer_id",
- "posthog_organization"."available_product_features",
- "posthog_organization"."usage",
- "posthog_organization"."never_drop_data",
- "posthog_organization"."customer_trust_scores",
- "posthog_organization"."setup_section_2_completed",
- "posthog_organization"."personalization",
- "posthog_organization"."domain_whitelist",
- "posthog_organization"."is_platform"
- FROM "posthog_organization"
- WHERE "posthog_organization"."id" = '00000000-0000-0000-0000-000000000000'::uuid
- LIMIT 21
- '''
-# ---
-# name: TestDashboard.test_listing_dashboards_is_not_nplus1.21
- '''
- SELECT "posthog_team"."id",
- "posthog_team"."uuid",
- "posthog_team"."organization_id",
- "posthog_team"."parent_team_id",
- "posthog_team"."project_id",
- "posthog_team"."api_token",
- "posthog_team"."app_urls",
- "posthog_team"."name",
- "posthog_team"."slack_incoming_webhook",
- "posthog_team"."created_at",
- "posthog_team"."updated_at",
- "posthog_team"."anonymize_ips",
- "posthog_team"."completed_snippet_onboarding",
- "posthog_team"."has_completed_onboarding_for",
- "posthog_team"."onboarding_tasks",
- "posthog_team"."ingested_event",
- "posthog_team"."ingested_production_event",
- "posthog_team"."ingested_production_event_last_checked_at",
- "posthog_team"."person_processing_opt_out",
- "posthog_team"."secret_api_token",
- "posthog_team"."secret_api_token_backup",
- "posthog_team"."session_recording_opt_in",
- "posthog_team"."session_recording_sample_rate",
- "posthog_team"."session_recording_minimum_duration_milliseconds",
- "posthog_team"."session_recording_linked_flag",
- "posthog_team"."session_recording_network_payload_capture_config",
- "posthog_team"."session_recording_masking_config",
- "posthog_team"."session_recording_url_trigger_config",
- "posthog_team"."session_recording_url_blocklist_config",
- "posthog_team"."session_recording_event_trigger_config",
- "posthog_team"."session_recording_trigger_match_type_config",
- "posthog_team"."session_recording_trigger_groups",
- "posthog_team"."session_replay_config",
- "posthog_team"."session_recording_retention_period",
- "posthog_team"."event_retention_months",
- "posthog_team"."conversations_enabled",
- "posthog_team"."conversations_settings",
- "posthog_team"."proactive_tasks_enabled",
- "posthog_team"."survey_config",
- "posthog_team"."surveys_opt_in",
- "posthog_team"."product_tours_opt_in",
- "posthog_team"."capture_console_log_opt_in",
- "posthog_team"."capture_performance_opt_in",
- "posthog_team"."capture_dead_clicks",
- "posthog_team"."autocapture_opt_out",
- "posthog_team"."autocapture_web_vitals_opt_in",
- "posthog_team"."autocapture_web_vitals_allowed_metrics",
- "posthog_team"."autocapture_exceptions_opt_in",
- "posthog_team"."autocapture_exceptions_errors_to_ignore",
- "posthog_team"."logs_settings",
- "posthog_team"."llm_gateway_enabled_at",
- "posthog_team"."llm_gateway_revoked_at",
- "posthog_team"."llm_gateway_overspend_allowance_usd",
- "posthog_team"."heatmaps_opt_in",
- "posthog_team"."receive_org_level_activity_logs",
- "posthog_team"."web_analytics_pre_aggregated_tables_enabled",
- "posthog_team"."web_analytics_pre_aggregated_tables_version",
- "posthog_team"."flags_persistence_default",
- "posthog_team"."feature_flag_confirmation_enabled",
- "posthog_team"."feature_flag_confirmation_message",
- "posthog_team"."default_evaluation_environments_enabled",
- "posthog_team"."require_evaluation_environment_tags",
- "posthog_team"."default_evaluation_contexts_enabled",
- "posthog_team"."require_evaluation_contexts",
- "posthog_team"."session_recording_version",
- "posthog_team"."signup_token",
- "posthog_team"."is_demo",
- "posthog_team"."access_control",
- "posthog_team"."week_start_day",
- "posthog_team"."inject_web_apps",
- "posthog_team"."test_account_filters",
- "posthog_team"."test_account_filters_default_checked",
- "posthog_team"."path_cleaning_filters",
- "posthog_team"."timezone",
- "posthog_team"."data_attributes",
- "posthog_team"."person_display_name_properties",
- "posthog_team"."live_events_columns",
- "posthog_team"."recording_domains",
- "posthog_team"."human_friendly_comparison_periods",
- "posthog_team"."cookieless_server_hash_mode",
- "posthog_team"."primary_dashboard_id",
- "posthog_team"."default_data_theme",
- "posthog_team"."extra_settings",
- "posthog_team"."modifiers",
- "posthog_team"."correlation_config",
- "posthog_team"."session_recording_retention_period_days",
- "posthog_team"."external_data_workspace_id",
- "posthog_team"."external_data_workspace_last_synced_at",
- "posthog_team"."api_query_rate_limit",
- "posthog_team"."drop_events_older_than",
- "posthog_team"."base_currency",
- "posthog_team"."experiment_recalculation_time",
- "posthog_team"."default_experiment_confidence_level",
- "posthog_team"."default_experiment_stats_method",
- "posthog_team"."business_model",
- "posthog_organization"."id",
- "posthog_organization"."name",
- "posthog_organization"."slug",
- "posthog_organization"."logo_media_id",
- "posthog_organization"."created_at",
- "posthog_organization"."updated_at",
- "posthog_organization"."is_active",
- "posthog_organization"."is_not_active_reason",
- "posthog_organization"."session_cookie_age",
- "posthog_organization"."is_member_join_email_enabled",
- "posthog_organization"."is_ai_data_processing_approved",
- "posthog_organization"."is_ai_training_opted_in",
- "posthog_organization"."is_ai_training_locked",
- "posthog_organization"."is_ai_training_cta_shown",
- "posthog_organization"."enforce_2fa",
- "posthog_organization"."members_can_invite",
- "posthog_organization"."members_can_create_projects",
- "posthog_organization"."members_can_use_personal_api_keys",
- "posthog_organization"."allow_publicly_shared_resources",
- "posthog_organization"."default_role_id",
- "posthog_organization"."plugins_access_level",
- "posthog_organization"."for_internal_metrics",
- "posthog_organization"."default_experiment_stats_method",
- "posthog_organization"."default_anonymize_ips",
- "posthog_organization"."is_hipaa",
- "posthog_organization"."is_pending_deletion",
- "posthog_organization"."customer_id",
- "posthog_organization"."available_product_features",
- "posthog_organization"."usage",
- "posthog_organization"."never_drop_data",
- "posthog_organization"."customer_trust_scores",
- "posthog_organization"."setup_section_2_completed",
- "posthog_organization"."personalization",
- "posthog_organization"."domain_whitelist",
- "posthog_organization"."is_platform"
- FROM "posthog_team"
- INNER JOIN "posthog_organization" ON ("posthog_team"."organization_id" = "posthog_organization"."id")
- WHERE "posthog_team"."id" = 99999
- LIMIT 21
- '''
-# ---
-# name: TestDashboard.test_listing_dashboards_is_not_nplus1.22
- '''
- SELECT "posthog_organizationmembership"."id",
- "posthog_organizationmembership"."organization_id",
- "posthog_organizationmembership"."user_id",
- "posthog_organizationmembership"."level",
- "posthog_organizationmembership"."joined_at",
- "posthog_organizationmembership"."updated_at",
- "posthog_organizationmembership"."invited_by_id",
- "posthog_organization"."id",
- "posthog_organization"."name",
- "posthog_organization"."slug",
- "posthog_organization"."logo_media_id",
- "posthog_organization"."created_at",
- "posthog_organization"."updated_at",
- "posthog_organization"."is_active",
- "posthog_organization"."is_not_active_reason",
- "posthog_organization"."session_cookie_age",
- "posthog_organization"."is_member_join_email_enabled",
- "posthog_organization"."is_ai_data_processing_approved",
- "posthog_organization"."is_ai_training_opted_in",
- "posthog_organization"."is_ai_training_locked",
- "posthog_organization"."is_ai_training_cta_shown",
- "posthog_organization"."enforce_2fa",
- "posthog_organization"."members_can_invite",
- "posthog_organization"."members_can_create_projects",
- "posthog_organization"."members_can_use_personal_api_keys",
- "posthog_organization"."allow_publicly_shared_resources",
- "posthog_organization"."default_role_id",
- "posthog_organization"."plugins_access_level",
- "posthog_organization"."for_internal_metrics",
- "posthog_organization"."default_experiment_stats_method",
- "posthog_organization"."default_anonymize_ips",
- "posthog_organization"."is_hipaa",
- "posthog_organization"."is_pending_deletion",
- "posthog_organization"."customer_id",
- "posthog_organization"."available_product_features",
- "posthog_organization"."usage",
- "posthog_organization"."never_drop_data",
- "posthog_organization"."customer_trust_scores",
- "posthog_organization"."setup_section_2_completed",
- "posthog_organization"."personalization",
- "posthog_organization"."domain_whitelist",
- "posthog_organization"."is_platform"
- FROM "posthog_organizationmembership"
- INNER JOIN "posthog_organization" ON ("posthog_organizationmembership"."organization_id" = "posthog_organization"."id")
- WHERE ("posthog_organizationmembership"."organization_id" = '00000000-0000-0000-0000-000000000000'::uuid
- AND "posthog_organizationmembership"."user_id" = 99999)
- LIMIT 21
- '''
-# ---
-# name: TestDashboard.test_listing_dashboards_is_not_nplus1.23
+# name: TestDashboard.test_listing_dashboards_is_not_nplus1.23
'''
SELECT "ee_accesscontrol"."id",
"ee_accesscontrol"."team_id",
@@ -4225,51 +3448,6 @@
5 /* ... */)
'''
# ---
-# name: TestDashboard.test_listing_dashboards_is_not_nplus1.29
- '''
- SELECT "posthog_user"."id",
- "posthog_user"."password",
- "posthog_user"."last_login",
- "posthog_user"."first_name",
- "posthog_user"."last_name",
- "posthog_user"."is_staff",
- "posthog_user"."date_joined",
- "posthog_user"."uuid",
- "posthog_user"."current_organization_id",
- "posthog_user"."current_team_id",
- "posthog_user"."email",
- "posthog_user"."pending_email",
- "posthog_user"."distinct_id",
- "posthog_user"."is_email_verified",
- "posthog_user"."credentials_reviewed_at",
- "posthog_user"."requested_2fa_reset_at",
- "posthog_user"."has_seen_product_intro_for",
- "posthog_user"."strapi_id",
- "posthog_user"."is_active",
- "posthog_user"."role_at_organization",
- "posthog_user"."theme_mode",
- "posthog_user"."partial_notification_settings",
- "posthog_user"."anonymize_data",
- "posthog_user"."allow_impersonation",
- "posthog_user"."toolbar_mode",
- "posthog_user"."hedgehog_config",
- "posthog_user"."allow_sidebar_suggestions",
- "posthog_user"."shortcut_position",
- "posthog_user"."passkeys_enabled_for_2fa",
- "posthog_user"."hide_mcp_hints",
- "posthog_user"."onboarding_skipped_at",
- "posthog_user"."onboarding_skipped_reason",
- "posthog_user"."onboarding_skipped_organization_id",
- "posthog_user"."onboarding_delegated_to_invite_id",
- "posthog_user"."onboarding_delegated_to_organization_id",
- "posthog_user"."onboarding_delegation_accepted_at",
- "posthog_user"."events_column_config",
- "posthog_user"."email_opt_in"
- FROM "posthog_user"
- WHERE ("posthog_user"."is_active"
- AND "posthog_user"."id" = 99999)
- '''
-# ---
# name: TestDashboard.test_listing_dashboards_is_not_nplus1.3
'''
SELECT "posthog_organizationmembership"."id",
@@ -4321,13 +3499,44 @@
LIMIT 21
'''
# ---
-# name: TestDashboard.test_listing_dashboards_is_not_nplus1.30
+# name: TestDashboard.test_listing_dashboards_is_not_nplus1.4
'''
- SELECT "posthog_organization"."id",
- "posthog_organization"."name",
- "posthog_organization"."slug",
- "posthog_organization"."logo_media_id",
- "posthog_organization"."created_at",
+ SELECT "ee_accesscontrol"."id",
+ "ee_accesscontrol"."team_id",
+ "ee_accesscontrol"."access_level",
+ "ee_accesscontrol"."resource",
+ "ee_accesscontrol"."resource_id",
+ "ee_accesscontrol"."organization_member_id",
+ "ee_accesscontrol"."role_id",
+ "ee_accesscontrol"."created_by_id",
+ "ee_accesscontrol"."created_at",
+ "ee_accesscontrol"."updated_at",
+ "posthog_team"."organization_id" AS "_team_organization_id"
+ FROM "ee_accesscontrol"
+ INNER JOIN "posthog_team" ON ("ee_accesscontrol"."team_id" = "posthog_team"."id")
+ LEFT OUTER JOIN "posthog_organizationmembership" ON ("ee_accesscontrol"."organization_member_id" = "posthog_organizationmembership"."id")
+ WHERE (("ee_accesscontrol"."organization_member_id" IS NULL
+ AND "ee_accesscontrol"."role_id" IS NULL
+ AND "ee_accesscontrol"."team_id" = 99999)
+ OR ("posthog_organizationmembership"."user_id" = 99999
+ AND "ee_accesscontrol"."role_id" IS NULL
+ AND "ee_accesscontrol"."team_id" = 99999))
+ '''
+# ---
+# name: TestDashboard.test_listing_dashboards_is_not_nplus1.5
+ '''
+ SELECT "posthog_organizationmembership"."id",
+ "posthog_organizationmembership"."organization_id",
+ "posthog_organizationmembership"."user_id",
+ "posthog_organizationmembership"."level",
+ "posthog_organizationmembership"."joined_at",
+ "posthog_organizationmembership"."updated_at",
+ "posthog_organizationmembership"."invited_by_id",
+ "posthog_organization"."id",
+ "posthog_organization"."name",
+ "posthog_organization"."slug",
+ "posthog_organization"."logo_media_id",
+ "posthog_organization"."created_at",
"posthog_organization"."updated_at",
"posthog_organization"."is_active",
"posthog_organization"."is_not_active_reason",
@@ -4358,12 +3567,94 @@
"posthog_organization"."personalization",
"posthog_organization"."domain_whitelist",
"posthog_organization"."is_platform"
- FROM "posthog_organization"
- WHERE "posthog_organization"."id" = '00000000-0000-0000-0000-000000000000'::uuid
+ FROM "posthog_organizationmembership"
+ INNER JOIN "posthog_organization" ON ("posthog_organizationmembership"."organization_id" = "posthog_organization"."id")
+ WHERE "posthog_organizationmembership"."user_id" = 99999
+ '''
+# ---
+# name: TestDashboard.test_listing_dashboards_is_not_nplus1.6
+ '''
+ SELECT "posthog_dashboard"."id",
+ "posthog_dashboard"."name",
+ "posthog_dashboard"."description",
+ "posthog_dashboard"."team_id",
+ "posthog_dashboard"."pinned",
+ "posthog_dashboard"."created_at",
+ "posthog_dashboard"."created_by_id",
+ "posthog_dashboard"."deleted",
+ "posthog_dashboard"."last_accessed_at",
+ "posthog_dashboard"."last_refresh",
+ "posthog_dashboard"."filters",
+ "posthog_dashboard"."variables",
+ "posthog_dashboard"."breakdown_colors",
+ "posthog_dashboard"."data_color_theme_id",
+ "posthog_dashboard"."creation_mode",
+ "posthog_dashboard"."restriction_level",
+ "posthog_dashboard"."quick_filter_ids",
+ "posthog_dashboard"."deprecated_tags",
+ "posthog_dashboard"."tags",
+ "posthog_dashboard"."share_token",
+ "posthog_dashboard"."is_shared"
+ FROM "posthog_dashboard"
+ INNER JOIN "posthog_team" ON ("posthog_dashboard"."team_id" = "posthog_team"."id")
+ WHERE (NOT ("posthog_dashboard"."deleted")
+ AND ("posthog_dashboard"."team_id" =
+ (SELECT U0."parent_team_id" AS "parent_team_id"
+ FROM "posthog_team" U0
+ WHERE U0."id" = 99999
+ LIMIT 1)
+ OR ("posthog_team"."parent_team_id" IS NULL
+ AND "posthog_dashboard"."team_id" = 99999))
+ AND "posthog_dashboard"."id" = 99999)
LIMIT 21
'''
# ---
-# name: TestDashboard.test_listing_dashboards_is_not_nplus1.31
+# name: TestDashboard.test_listing_dashboards_is_not_nplus1.7
+ '''
+ SELECT COUNT(*) AS "__count"
+ FROM "posthog_dashboardtile"
+ INNER JOIN "posthog_dashboard" ON ("posthog_dashboardtile"."dashboard_id" = "posthog_dashboard"."id")
+ WHERE (NOT ("posthog_dashboardtile"."deleted"
+ AND "posthog_dashboardtile"."deleted" IS NOT NULL)
+ AND NOT ("posthog_dashboard"."deleted")
+ AND "posthog_dashboardtile"."dashboard_id" = 99999
+ AND NOT ("posthog_dashboardtile"."deleted"
+ AND "posthog_dashboardtile"."deleted" IS NOT NULL))
+ '''
+# ---
+# name: TestDashboard.test_listing_dashboards_is_not_nplus1.8
+ '''
+ SELECT "posthog_dashboard"."id",
+ "posthog_dashboard"."name",
+ "posthog_dashboard"."description",
+ "posthog_dashboard"."team_id",
+ "posthog_dashboard"."pinned",
+ "posthog_dashboard"."created_at",
+ "posthog_dashboard"."created_by_id",
+ "posthog_dashboard"."deleted",
+ "posthog_dashboard"."last_accessed_at",
+ "posthog_dashboard"."last_refresh",
+ "posthog_dashboard"."filters",
+ "posthog_dashboard"."variables",
+ "posthog_dashboard"."breakdown_colors",
+ "posthog_dashboard"."data_color_theme_id",
+ "posthog_dashboard"."creation_mode",
+ "posthog_dashboard"."restriction_level",
+ "posthog_dashboard"."quick_filter_ids",
+ "posthog_dashboard"."deprecated_tags",
+ "posthog_dashboard"."tags",
+ "posthog_dashboard"."share_token",
+ "posthog_dashboard"."is_shared"
+ FROM "posthog_dashboard"
+ WHERE (NOT ("posthog_dashboard"."deleted")
+ AND "posthog_dashboard"."id" IN (1,
+ 2,
+ 3,
+ 4,
+ 5 /* ... */))
+ '''
+# ---
+# name: TestDashboard.test_listing_dashboards_is_not_nplus1.9
'''
SELECT "posthog_team"."id",
"posthog_team"."uuid",
@@ -4459,58 +3750,60 @@
"posthog_team"."experiment_recalculation_time",
"posthog_team"."default_experiment_confidence_level",
"posthog_team"."default_experiment_stats_method",
- "posthog_team"."business_model",
- "posthog_organization"."id",
- "posthog_organization"."name",
- "posthog_organization"."slug",
- "posthog_organization"."logo_media_id",
- "posthog_organization"."created_at",
- "posthog_organization"."updated_at",
- "posthog_organization"."is_active",
- "posthog_organization"."is_not_active_reason",
- "posthog_organization"."session_cookie_age",
- "posthog_organization"."is_member_join_email_enabled",
- "posthog_organization"."is_ai_data_processing_approved",
- "posthog_organization"."is_ai_training_opted_in",
- "posthog_organization"."is_ai_training_locked",
- "posthog_organization"."is_ai_training_cta_shown",
- "posthog_organization"."enforce_2fa",
- "posthog_organization"."members_can_invite",
- "posthog_organization"."members_can_create_projects",
- "posthog_organization"."members_can_use_personal_api_keys",
- "posthog_organization"."allow_publicly_shared_resources",
- "posthog_organization"."default_role_id",
- "posthog_organization"."plugins_access_level",
- "posthog_organization"."for_internal_metrics",
- "posthog_organization"."default_experiment_stats_method",
- "posthog_organization"."default_anonymize_ips",
- "posthog_organization"."is_hipaa",
- "posthog_organization"."is_pending_deletion",
- "posthog_organization"."customer_id",
- "posthog_organization"."available_product_features",
- "posthog_organization"."usage",
- "posthog_organization"."never_drop_data",
- "posthog_organization"."customer_trust_scores",
- "posthog_organization"."setup_section_2_completed",
- "posthog_organization"."personalization",
- "posthog_organization"."domain_whitelist",
- "posthog_organization"."is_platform"
+ "posthog_team"."business_model"
FROM "posthog_team"
- INNER JOIN "posthog_organization" ON ("posthog_team"."organization_id" = "posthog_organization"."id")
WHERE "posthog_team"."id" = 99999
LIMIT 21
'''
# ---
-# name: TestDashboard.test_listing_dashboards_is_not_nplus1.32
+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles
'''
- SELECT "posthog_organizationmembership"."id",
- "posthog_organizationmembership"."organization_id",
- "posthog_organizationmembership"."user_id",
- "posthog_organizationmembership"."level",
- "posthog_organizationmembership"."joined_at",
- "posthog_organizationmembership"."updated_at",
- "posthog_organizationmembership"."invited_by_id",
- "posthog_organization"."id",
+ SELECT "posthog_user"."id",
+ "posthog_user"."password",
+ "posthog_user"."last_login",
+ "posthog_user"."first_name",
+ "posthog_user"."last_name",
+ "posthog_user"."is_staff",
+ "posthog_user"."date_joined",
+ "posthog_user"."uuid",
+ "posthog_user"."current_organization_id",
+ "posthog_user"."current_team_id",
+ "posthog_user"."email",
+ "posthog_user"."pending_email",
+ "posthog_user"."distinct_id",
+ "posthog_user"."is_email_verified",
+ "posthog_user"."credentials_reviewed_at",
+ "posthog_user"."requested_2fa_reset_at",
+ "posthog_user"."has_seen_product_intro_for",
+ "posthog_user"."strapi_id",
+ "posthog_user"."is_active",
+ "posthog_user"."role_at_organization",
+ "posthog_user"."theme_mode",
+ "posthog_user"."partial_notification_settings",
+ "posthog_user"."anonymize_data",
+ "posthog_user"."allow_impersonation",
+ "posthog_user"."toolbar_mode",
+ "posthog_user"."hedgehog_config",
+ "posthog_user"."allow_sidebar_suggestions",
+ "posthog_user"."shortcut_position",
+ "posthog_user"."passkeys_enabled_for_2fa",
+ "posthog_user"."hide_mcp_hints",
+ "posthog_user"."onboarding_skipped_at",
+ "posthog_user"."onboarding_skipped_reason",
+ "posthog_user"."onboarding_skipped_organization_id",
+ "posthog_user"."onboarding_delegated_to_invite_id",
+ "posthog_user"."onboarding_delegated_to_organization_id",
+ "posthog_user"."onboarding_delegation_accepted_at",
+ "posthog_user"."events_column_config",
+ "posthog_user"."email_opt_in"
+ FROM "posthog_user"
+ WHERE ("posthog_user"."is_active"
+ AND "posthog_user"."id" = 99999)
+ '''
+# ---
+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.1
+ '''
+ SELECT "posthog_organization"."id",
"posthog_organization"."name",
"posthog_organization"."slug",
"posthog_organization"."logo_media_id",
@@ -4545,49 +3838,94 @@
"posthog_organization"."personalization",
"posthog_organization"."domain_whitelist",
"posthog_organization"."is_platform"
- FROM "posthog_organizationmembership"
- INNER JOIN "posthog_organization" ON ("posthog_organizationmembership"."organization_id" = "posthog_organization"."id")
- WHERE ("posthog_organizationmembership"."organization_id" = '00000000-0000-0000-0000-000000000000'::uuid
- AND "posthog_organizationmembership"."user_id" = 99999)
+ FROM "posthog_organization"
+ WHERE "posthog_organization"."id" = '00000000-0000-0000-0000-000000000000'::uuid
LIMIT 21
'''
# ---
-# name: TestDashboard.test_listing_dashboards_is_not_nplus1.33
- '''
- SELECT "ee_accesscontrol"."id",
- "ee_accesscontrol"."team_id",
- "ee_accesscontrol"."access_level",
- "ee_accesscontrol"."resource",
- "ee_accesscontrol"."resource_id",
- "ee_accesscontrol"."organization_member_id",
- "ee_accesscontrol"."role_id",
- "ee_accesscontrol"."created_by_id",
- "ee_accesscontrol"."created_at",
- "ee_accesscontrol"."updated_at",
- "posthog_team"."organization_id" AS "_team_organization_id"
- FROM "ee_accesscontrol"
- INNER JOIN "posthog_team" ON ("ee_accesscontrol"."team_id" = "posthog_team"."id")
- LEFT OUTER JOIN "posthog_organizationmembership" ON ("ee_accesscontrol"."organization_member_id" = "posthog_organizationmembership"."id")
- WHERE (("ee_accesscontrol"."organization_member_id" IS NULL
- AND "ee_accesscontrol"."role_id" IS NULL
- AND "ee_accesscontrol"."team_id" = 99999)
- OR ("posthog_organizationmembership"."user_id" = 99999
- AND "ee_accesscontrol"."role_id" IS NULL
- AND "ee_accesscontrol"."team_id" = 99999))
- '''
-# ---
-# name: TestDashboard.test_listing_dashboards_is_not_nplus1.34
+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.10
'''
- SELECT "posthog_organizationmembership"."id",
- "posthog_organizationmembership"."organization_id",
- "posthog_organizationmembership"."user_id",
- "posthog_organizationmembership"."level",
- "posthog_organizationmembership"."joined_at",
- "posthog_organizationmembership"."updated_at",
- "posthog_organizationmembership"."invited_by_id",
- "posthog_organization"."id",
- "posthog_organization"."name",
- "posthog_organization"."slug",
+ SELECT "posthog_filesystem"."team_id",
+ "posthog_filesystem"."id",
+ "posthog_filesystem"."path",
+ "posthog_filesystem"."depth",
+ "posthog_filesystem"."type",
+ "posthog_filesystem"."ref",
+ "posthog_filesystem"."href",
+ "posthog_filesystem"."shortcut",
+ "posthog_filesystem"."meta",
+ "posthog_filesystem"."created_at",
+ "posthog_filesystem"."created_by_id",
+ "posthog_filesystem"."surface",
+ "posthog_filesystem"."project_id"
+ FROM "posthog_filesystem"
+ WHERE (("posthog_filesystem"."surface" IS NULL
+ OR "posthog_filesystem"."surface" = 'web')
+ AND "posthog_filesystem"."ref" = '0001'
+ AND "posthog_filesystem"."team_id" = 99999
+ AND "posthog_filesystem"."type" = 'dashboard'
+ AND NOT ("posthog_filesystem"."shortcut"
+ AND "posthog_filesystem"."shortcut" IS NOT NULL))
+ '''
+# ---
+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.100
+ '''
+ SELECT "posthog_tag"."name" AS "tag__name"
+ FROM "posthog_taggeditem"
+ INNER JOIN "posthog_tag" ON ("posthog_taggeditem"."tag_id" = "posthog_tag"."id")
+ WHERE "posthog_taggeditem"."insight_id" = 99999
+ '''
+# ---
+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.101
+ '''
+ SELECT "posthog_user"."id",
+ "posthog_user"."password",
+ "posthog_user"."last_login",
+ "posthog_user"."first_name",
+ "posthog_user"."last_name",
+ "posthog_user"."is_staff",
+ "posthog_user"."date_joined",
+ "posthog_user"."uuid",
+ "posthog_user"."current_organization_id",
+ "posthog_user"."current_team_id",
+ "posthog_user"."email",
+ "posthog_user"."pending_email",
+ "posthog_user"."distinct_id",
+ "posthog_user"."is_email_verified",
+ "posthog_user"."credentials_reviewed_at",
+ "posthog_user"."requested_2fa_reset_at",
+ "posthog_user"."has_seen_product_intro_for",
+ "posthog_user"."strapi_id",
+ "posthog_user"."is_active",
+ "posthog_user"."role_at_organization",
+ "posthog_user"."theme_mode",
+ "posthog_user"."partial_notification_settings",
+ "posthog_user"."anonymize_data",
+ "posthog_user"."allow_impersonation",
+ "posthog_user"."toolbar_mode",
+ "posthog_user"."hedgehog_config",
+ "posthog_user"."allow_sidebar_suggestions",
+ "posthog_user"."shortcut_position",
+ "posthog_user"."passkeys_enabled_for_2fa",
+ "posthog_user"."hide_mcp_hints",
+ "posthog_user"."onboarding_skipped_at",
+ "posthog_user"."onboarding_skipped_reason",
+ "posthog_user"."onboarding_skipped_organization_id",
+ "posthog_user"."onboarding_delegated_to_invite_id",
+ "posthog_user"."onboarding_delegated_to_organization_id",
+ "posthog_user"."onboarding_delegation_accepted_at",
+ "posthog_user"."events_column_config",
+ "posthog_user"."email_opt_in"
+ FROM "posthog_user"
+ WHERE ("posthog_user"."is_active"
+ AND "posthog_user"."id" = 99999)
+ '''
+# ---
+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.102
+ '''
+ SELECT "posthog_organization"."id",
+ "posthog_organization"."name",
+ "posthog_organization"."slug",
"posthog_organization"."logo_media_id",
"posthog_organization"."created_at",
"posthog_organization"."updated_at",
@@ -4620,166 +3958,201 @@
"posthog_organization"."personalization",
"posthog_organization"."domain_whitelist",
"posthog_organization"."is_platform"
- FROM "posthog_organizationmembership"
- INNER JOIN "posthog_organization" ON ("posthog_organizationmembership"."organization_id" = "posthog_organization"."id")
- WHERE "posthog_organizationmembership"."user_id" = 99999
+ FROM "posthog_organization"
+ WHERE "posthog_organization"."id" = '00000000-0000-0000-0000-000000000000'::uuid
+ LIMIT 21
'''
# ---
-# name: TestDashboard.test_listing_dashboards_is_not_nplus1.35
+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.103
'''
- SELECT COUNT(*) AS "__count"
- FROM "posthog_dashboard"
- INNER JOIN "posthog_team" ON ("posthog_dashboard"."team_id" = "posthog_team"."id")
- LEFT OUTER JOIN "posthog_filesystemviewlog" recent_dashboard_views ON ("posthog_team"."id" = recent_dashboard_views."team_id"
- AND ((recent_dashboard_views."user_id" = 99999
- AND recent_dashboard_views."type" = 'dashboard'
- AND recent_dashboard_views."ref" = ("posthog_dashboard"."id")::varchar)))
- WHERE ("posthog_team"."project_id" = 99999
- AND NOT ("posthog_dashboard"."deleted")
- AND NOT ("posthog_dashboard"."creation_mode" = 'unlisted'))
+ SELECT "posthog_team"."id",
+ "posthog_team"."uuid",
+ "posthog_team"."organization_id",
+ "posthog_team"."parent_team_id",
+ "posthog_team"."project_id",
+ "posthog_team"."api_token",
+ "posthog_team"."app_urls",
+ "posthog_team"."name",
+ "posthog_team"."slack_incoming_webhook",
+ "posthog_team"."created_at",
+ "posthog_team"."updated_at",
+ "posthog_team"."anonymize_ips",
+ "posthog_team"."completed_snippet_onboarding",
+ "posthog_team"."has_completed_onboarding_for",
+ "posthog_team"."onboarding_tasks",
+ "posthog_team"."ingested_event",
+ "posthog_team"."ingested_production_event",
+ "posthog_team"."ingested_production_event_last_checked_at",
+ "posthog_team"."person_processing_opt_out",
+ "posthog_team"."secret_api_token",
+ "posthog_team"."secret_api_token_backup",
+ "posthog_team"."session_recording_opt_in",
+ "posthog_team"."session_recording_sample_rate",
+ "posthog_team"."session_recording_minimum_duration_milliseconds",
+ "posthog_team"."session_recording_linked_flag",
+ "posthog_team"."session_recording_network_payload_capture_config",
+ "posthog_team"."session_recording_masking_config",
+ "posthog_team"."session_recording_url_trigger_config",
+ "posthog_team"."session_recording_url_blocklist_config",
+ "posthog_team"."session_recording_event_trigger_config",
+ "posthog_team"."session_recording_trigger_match_type_config",
+ "posthog_team"."session_recording_trigger_groups",
+ "posthog_team"."session_replay_config",
+ "posthog_team"."session_recording_retention_period",
+ "posthog_team"."event_retention_months",
+ "posthog_team"."conversations_enabled",
+ "posthog_team"."conversations_settings",
+ "posthog_team"."proactive_tasks_enabled",
+ "posthog_team"."survey_config",
+ "posthog_team"."surveys_opt_in",
+ "posthog_team"."product_tours_opt_in",
+ "posthog_team"."capture_console_log_opt_in",
+ "posthog_team"."capture_performance_opt_in",
+ "posthog_team"."capture_dead_clicks",
+ "posthog_team"."autocapture_opt_out",
+ "posthog_team"."autocapture_web_vitals_opt_in",
+ "posthog_team"."autocapture_web_vitals_allowed_metrics",
+ "posthog_team"."autocapture_exceptions_opt_in",
+ "posthog_team"."autocapture_exceptions_errors_to_ignore",
+ "posthog_team"."logs_settings",
+ "posthog_team"."llm_gateway_enabled_at",
+ "posthog_team"."llm_gateway_revoked_at",
+ "posthog_team"."llm_gateway_overspend_allowance_usd",
+ "posthog_team"."heatmaps_opt_in",
+ "posthog_team"."receive_org_level_activity_logs",
+ "posthog_team"."web_analytics_pre_aggregated_tables_enabled",
+ "posthog_team"."web_analytics_pre_aggregated_tables_version",
+ "posthog_team"."flags_persistence_default",
+ "posthog_team"."feature_flag_confirmation_enabled",
+ "posthog_team"."feature_flag_confirmation_message",
+ "posthog_team"."default_evaluation_environments_enabled",
+ "posthog_team"."require_evaluation_environment_tags",
+ "posthog_team"."default_evaluation_contexts_enabled",
+ "posthog_team"."require_evaluation_contexts",
+ "posthog_team"."session_recording_version",
+ "posthog_team"."signup_token",
+ "posthog_team"."is_demo",
+ "posthog_team"."access_control",
+ "posthog_team"."week_start_day",
+ "posthog_team"."inject_web_apps",
+ "posthog_team"."test_account_filters",
+ "posthog_team"."test_account_filters_default_checked",
+ "posthog_team"."path_cleaning_filters",
+ "posthog_team"."timezone",
+ "posthog_team"."data_attributes",
+ "posthog_team"."person_display_name_properties",
+ "posthog_team"."live_events_columns",
+ "posthog_team"."recording_domains",
+ "posthog_team"."human_friendly_comparison_periods",
+ "posthog_team"."cookieless_server_hash_mode",
+ "posthog_team"."primary_dashboard_id",
+ "posthog_team"."default_data_theme",
+ "posthog_team"."extra_settings",
+ "posthog_team"."modifiers",
+ "posthog_team"."correlation_config",
+ "posthog_team"."session_recording_retention_period_days",
+ "posthog_team"."external_data_workspace_id",
+ "posthog_team"."external_data_workspace_last_synced_at",
+ "posthog_team"."api_query_rate_limit",
+ "posthog_team"."drop_events_older_than",
+ "posthog_team"."base_currency",
+ "posthog_team"."experiment_recalculation_time",
+ "posthog_team"."default_experiment_confidence_level",
+ "posthog_team"."default_experiment_stats_method",
+ "posthog_team"."business_model",
+ "posthog_organization"."id",
+ "posthog_organization"."name",
+ "posthog_organization"."slug",
+ "posthog_organization"."logo_media_id",
+ "posthog_organization"."created_at",
+ "posthog_organization"."updated_at",
+ "posthog_organization"."is_active",
+ "posthog_organization"."is_not_active_reason",
+ "posthog_organization"."session_cookie_age",
+ "posthog_organization"."is_member_join_email_enabled",
+ "posthog_organization"."is_ai_data_processing_approved",
+ "posthog_organization"."is_ai_training_opted_in",
+ "posthog_organization"."is_ai_training_locked",
+ "posthog_organization"."is_ai_training_cta_shown",
+ "posthog_organization"."enforce_2fa",
+ "posthog_organization"."members_can_invite",
+ "posthog_organization"."members_can_create_projects",
+ "posthog_organization"."members_can_use_personal_api_keys",
+ "posthog_organization"."allow_publicly_shared_resources",
+ "posthog_organization"."default_role_id",
+ "posthog_organization"."plugins_access_level",
+ "posthog_organization"."for_internal_metrics",
+ "posthog_organization"."default_experiment_stats_method",
+ "posthog_organization"."default_anonymize_ips",
+ "posthog_organization"."is_hipaa",
+ "posthog_organization"."is_pending_deletion",
+ "posthog_organization"."customer_id",
+ "posthog_organization"."available_product_features",
+ "posthog_organization"."usage",
+ "posthog_organization"."never_drop_data",
+ "posthog_organization"."customer_trust_scores",
+ "posthog_organization"."setup_section_2_completed",
+ "posthog_organization"."personalization",
+ "posthog_organization"."domain_whitelist",
+ "posthog_organization"."is_platform"
+ FROM "posthog_team"
+ INNER JOIN "posthog_organization" ON ("posthog_team"."organization_id" = "posthog_organization"."id")
+ WHERE "posthog_team"."id" = 99999
+ LIMIT 21
'''
# ---
-# name: TestDashboard.test_listing_dashboards_is_not_nplus1.36
+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.104
'''
- SELECT "posthog_dashboard"."id",
- "posthog_dashboard"."name",
- "posthog_dashboard"."description",
- "posthog_dashboard"."team_id",
- "posthog_dashboard"."pinned",
- "posthog_dashboard"."created_at",
- "posthog_dashboard"."created_by_id",
- "posthog_dashboard"."deleted",
- "posthog_dashboard"."last_accessed_at",
- "posthog_dashboard"."last_refresh",
- "posthog_dashboard"."filters",
- "posthog_dashboard"."variables",
- "posthog_dashboard"."breakdown_colors",
- "posthog_dashboard"."data_color_theme_id",
- "posthog_dashboard"."creation_mode",
- "posthog_dashboard"."restriction_level",
- "posthog_dashboard"."quick_filter_ids",
- "posthog_dashboard"."deprecated_tags",
- "posthog_dashboard"."tags",
- "posthog_dashboard"."share_token",
- "posthog_dashboard"."is_shared",
- recent_dashboard_views."viewed_at" AS "last_viewed_at",
- ("posthog_dashboard"."id")::varchar AS "_ref_id",
-
- (SELECT U0."path" AS "path"
- FROM "posthog_filesystem" U0
- WHERE ((U0."surface" IS NULL
- OR U0."surface" = 'web')
- AND U0."ref" = ("posthog_dashboard"."id")::varchar
- AND U0."team_id" = ("posthog_dashboard"."team_id")
- AND U0."type" = 'dashboard'
- AND NOT (U0."shortcut"
- AND U0."shortcut" IS NOT NULL))
- ORDER BY U0."id" ASC
- LIMIT 1) AS "_folder_path",
- T6."id",
- T6."password",
- T6."last_login",
- T6."first_name",
- T6."last_name",
- T6."is_staff",
- T6."date_joined",
- T6."uuid",
- T6."current_organization_id",
- T6."current_team_id",
- T6."email",
- T6."pending_email",
- T6."distinct_id",
- T6."is_email_verified",
- T6."credentials_reviewed_at",
- T6."requested_password_reset_at",
- T6."requested_2fa_reset_at",
- T6."has_seen_product_intro_for",
- T6."strapi_id",
- T6."is_active",
- T6."role_at_organization",
- T6."theme_mode",
- T6."partial_notification_settings",
- T6."anonymize_data",
- T6."allow_impersonation",
- T6."toolbar_mode",
- T6."hedgehog_config",
- T6."allow_sidebar_suggestions",
- T6."shortcut_position",
- T6."passkeys_enabled_for_2fa",
- T6."hide_mcp_hints",
- T6."onboarding_skipped_at",
- T6."onboarding_skipped_reason",
- T6."onboarding_skipped_organization_id",
- T6."onboarding_delegated_to_invite_id",
- T6."onboarding_delegated_to_organization_id",
- T6."onboarding_delegation_accepted_at",
- T6."events_column_config",
- T6."email_opt_in"
- FROM "posthog_dashboard"
- INNER JOIN "posthog_team" ON ("posthog_dashboard"."team_id" = "posthog_team"."id")
- LEFT OUTER JOIN "posthog_filesystemviewlog" recent_dashboard_views ON ("posthog_team"."id" = recent_dashboard_views."team_id"
- AND ((recent_dashboard_views."user_id" = 99999
- AND recent_dashboard_views."type" = 'dashboard'
- AND recent_dashboard_views."ref" = ("posthog_dashboard"."id")::varchar)))
- LEFT OUTER JOIN "posthog_user" T6 ON ("posthog_dashboard"."created_by_id" = T6."id")
- WHERE ("posthog_team"."project_id" = 99999
- AND NOT ("posthog_dashboard"."deleted")
- AND NOT ("posthog_dashboard"."creation_mode" = 'unlisted'))
- ORDER BY "posthog_dashboard"."pinned" DESC,
- "posthog_dashboard"."name" ASC
- LIMIT 300
- '''
-# ---
-# name: TestDashboard.test_listing_dashboards_is_not_nplus1.37
- '''
- SELECT "posthog_sharingconfiguration"."id",
- "posthog_sharingconfiguration"."team_id",
- "posthog_sharingconfiguration"."dashboard_id",
- "posthog_sharingconfiguration"."insight_id",
- "posthog_sharingconfiguration"."recording_id",
- "posthog_sharingconfiguration"."notebook_id",
- "posthog_sharingconfiguration"."interviewee_context_id",
- "posthog_sharingconfiguration"."created_at",
- "posthog_sharingconfiguration"."enabled",
- "posthog_sharingconfiguration"."access_token",
- "posthog_sharingconfiguration"."expires_at",
- "posthog_sharingconfiguration"."settings",
- "posthog_sharingconfiguration"."password_required"
- FROM "posthog_sharingconfiguration"
- WHERE "posthog_sharingconfiguration"."dashboard_id" IN (1,
- 2,
- 3,
- 4,
- 5 /* ... */)
- '''
-# ---
-# name: TestDashboard.test_listing_dashboards_is_not_nplus1.38
- '''
- SELECT "posthog_taggeditem"."id",
- "posthog_taggeditem"."tag_id",
- "posthog_taggeditem"."dashboard_id",
- "posthog_taggeditem"."insight_id",
- "posthog_taggeditem"."event_definition_id",
- "posthog_taggeditem"."property_definition_id",
- "posthog_taggeditem"."action_id",
- "posthog_taggeditem"."feature_flag_id",
- "posthog_taggeditem"."experiment_saved_metric_id",
- "posthog_taggeditem"."ticket_id",
- "posthog_taggeditem"."account_id",
- "posthog_taggeditem"."endpoint_id",
- "posthog_tag"."id",
- "posthog_tag"."name",
- "posthog_tag"."team_id"
- FROM "posthog_taggeditem"
- INNER JOIN "posthog_tag" ON ("posthog_taggeditem"."tag_id" = "posthog_tag"."id")
- WHERE "posthog_taggeditem"."dashboard_id" IN (1,
- 2,
- 3,
- 4,
- 5 /* ... */)
+ SELECT "posthog_organizationmembership"."id",
+ "posthog_organizationmembership"."organization_id",
+ "posthog_organizationmembership"."user_id",
+ "posthog_organizationmembership"."level",
+ "posthog_organizationmembership"."joined_at",
+ "posthog_organizationmembership"."updated_at",
+ "posthog_organizationmembership"."invited_by_id",
+ "posthog_organization"."id",
+ "posthog_organization"."name",
+ "posthog_organization"."slug",
+ "posthog_organization"."logo_media_id",
+ "posthog_organization"."created_at",
+ "posthog_organization"."updated_at",
+ "posthog_organization"."is_active",
+ "posthog_organization"."is_not_active_reason",
+ "posthog_organization"."session_cookie_age",
+ "posthog_organization"."is_member_join_email_enabled",
+ "posthog_organization"."is_ai_data_processing_approved",
+ "posthog_organization"."is_ai_training_opted_in",
+ "posthog_organization"."is_ai_training_locked",
+ "posthog_organization"."is_ai_training_cta_shown",
+ "posthog_organization"."enforce_2fa",
+ "posthog_organization"."members_can_invite",
+ "posthog_organization"."members_can_create_projects",
+ "posthog_organization"."members_can_use_personal_api_keys",
+ "posthog_organization"."allow_publicly_shared_resources",
+ "posthog_organization"."default_role_id",
+ "posthog_organization"."plugins_access_level",
+ "posthog_organization"."for_internal_metrics",
+ "posthog_organization"."default_experiment_stats_method",
+ "posthog_organization"."default_anonymize_ips",
+ "posthog_organization"."is_hipaa",
+ "posthog_organization"."is_pending_deletion",
+ "posthog_organization"."customer_id",
+ "posthog_organization"."available_product_features",
+ "posthog_organization"."usage",
+ "posthog_organization"."never_drop_data",
+ "posthog_organization"."customer_trust_scores",
+ "posthog_organization"."setup_section_2_completed",
+ "posthog_organization"."personalization",
+ "posthog_organization"."domain_whitelist",
+ "posthog_organization"."is_platform"
+ FROM "posthog_organizationmembership"
+ INNER JOIN "posthog_organization" ON ("posthog_organizationmembership"."organization_id" = "posthog_organization"."id")
+ WHERE ("posthog_organizationmembership"."organization_id" = '00000000-0000-0000-0000-000000000000'::uuid
+ AND "posthog_organizationmembership"."user_id" = 99999)
+ LIMIT 21
'''
# ---
-# name: TestDashboard.test_listing_dashboards_is_not_nplus1.4
+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.105
'''
SELECT "ee_accesscontrol"."id",
"ee_accesscontrol"."team_id",
@@ -4803,7 +4176,7 @@
AND "ee_accesscontrol"."team_id" = 99999))
'''
# ---
-# name: TestDashboard.test_listing_dashboards_is_not_nplus1.5
+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.106
'''
SELECT "posthog_organizationmembership"."id",
"posthog_organizationmembership"."organization_id",
@@ -4852,7 +4225,28 @@
WHERE "posthog_organizationmembership"."user_id" = 99999
'''
# ---
-# name: TestDashboard.test_listing_dashboards_is_not_nplus1.6
+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.107
+ '''
+ SELECT "ee_accesscontrol"."team_id" AS "team_id",
+ "ee_accesscontrol"."resource_id" AS "resource_id",
+ "ee_accesscontrol"."organization_member_id" AS "organization_member_id",
+ "ee_accesscontrol"."role_id" AS "role_id",
+ "ee_accesscontrol"."access_level" AS "access_level"
+ FROM "ee_accesscontrol"
+ INNER JOIN "posthog_team" ON ("ee_accesscontrol"."team_id" = "posthog_team"."id")
+ WHERE ("ee_accesscontrol"."resource" = 'project'
+ AND "posthog_team"."organization_id" IN ('00000000-0000-0000-0000-000000000000'::uuid))
+ '''
+# ---
+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.108
+ '''
+ SELECT "ee_rolemembership"."organization_member_id" AS "organization_member_id",
+ "ee_rolemembership"."role_id" AS "role_id"
+ FROM "ee_rolemembership"
+ WHERE "ee_rolemembership"."user_id" = 99999
+ '''
+# ---
+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.109
'''
SELECT "posthog_dashboard"."id",
"posthog_dashboard"."name",
@@ -4889,7 +4283,19 @@
LIMIT 21
'''
# ---
-# name: TestDashboard.test_listing_dashboards_is_not_nplus1.7
+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.11
+ '''
+ SELECT COUNT(*) AS "__count"
+ FROM "posthog_dashboardtile"
+ INNER JOIN "posthog_dashboard" ON ("posthog_dashboardtile"."dashboard_id" = "posthog_dashboard"."id")
+ WHERE (NOT ("posthog_dashboardtile"."deleted"
+ AND "posthog_dashboardtile"."deleted" IS NOT NULL)
+ AND NOT ("posthog_dashboard"."deleted")
+ AND "posthog_dashboardtile"."dashboard_id" = 99999
+ AND NOT ("posthog_dashboardtile"."insight_id" IS NULL))
+ '''
+# ---
+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.110
'''
SELECT COUNT(*) AS "__count"
FROM "posthog_dashboardtile"
@@ -4902,7 +4308,7 @@
AND "posthog_dashboardtile"."deleted" IS NOT NULL))
'''
# ---
-# name: TestDashboard.test_listing_dashboards_is_not_nplus1.8
+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.111
'''
SELECT "posthog_dashboard"."id",
"posthog_dashboard"."name",
@@ -4934,7 +4340,7 @@
5 /* ... */))
'''
# ---
-# name: TestDashboard.test_listing_dashboards_is_not_nplus1.9
+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.112
'''
SELECT "posthog_team"."id",
"posthog_team"."uuid",
@@ -5036,94 +4442,7 @@
LIMIT 21
'''
# ---
-# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles
- '''
- SELECT "posthog_user"."id",
- "posthog_user"."password",
- "posthog_user"."last_login",
- "posthog_user"."first_name",
- "posthog_user"."last_name",
- "posthog_user"."is_staff",
- "posthog_user"."date_joined",
- "posthog_user"."uuid",
- "posthog_user"."current_organization_id",
- "posthog_user"."current_team_id",
- "posthog_user"."email",
- "posthog_user"."pending_email",
- "posthog_user"."distinct_id",
- "posthog_user"."is_email_verified",
- "posthog_user"."credentials_reviewed_at",
- "posthog_user"."requested_2fa_reset_at",
- "posthog_user"."has_seen_product_intro_for",
- "posthog_user"."strapi_id",
- "posthog_user"."is_active",
- "posthog_user"."role_at_organization",
- "posthog_user"."theme_mode",
- "posthog_user"."partial_notification_settings",
- "posthog_user"."anonymize_data",
- "posthog_user"."allow_impersonation",
- "posthog_user"."toolbar_mode",
- "posthog_user"."hedgehog_config",
- "posthog_user"."allow_sidebar_suggestions",
- "posthog_user"."shortcut_position",
- "posthog_user"."passkeys_enabled_for_2fa",
- "posthog_user"."hide_mcp_hints",
- "posthog_user"."onboarding_skipped_at",
- "posthog_user"."onboarding_skipped_reason",
- "posthog_user"."onboarding_skipped_organization_id",
- "posthog_user"."onboarding_delegated_to_invite_id",
- "posthog_user"."onboarding_delegated_to_organization_id",
- "posthog_user"."onboarding_delegation_accepted_at",
- "posthog_user"."events_column_config",
- "posthog_user"."email_opt_in"
- FROM "posthog_user"
- WHERE ("posthog_user"."is_active"
- AND "posthog_user"."id" = 99999)
- '''
-# ---
-# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.1
- '''
- SELECT "posthog_organization"."id",
- "posthog_organization"."name",
- "posthog_organization"."slug",
- "posthog_organization"."logo_media_id",
- "posthog_organization"."created_at",
- "posthog_organization"."updated_at",
- "posthog_organization"."is_active",
- "posthog_organization"."is_not_active_reason",
- "posthog_organization"."session_cookie_age",
- "posthog_organization"."is_member_join_email_enabled",
- "posthog_organization"."is_ai_data_processing_approved",
- "posthog_organization"."is_ai_training_opted_in",
- "posthog_organization"."is_ai_training_locked",
- "posthog_organization"."is_ai_training_cta_shown",
- "posthog_organization"."enforce_2fa",
- "posthog_organization"."members_can_invite",
- "posthog_organization"."members_can_create_projects",
- "posthog_organization"."members_can_use_personal_api_keys",
- "posthog_organization"."allow_publicly_shared_resources",
- "posthog_organization"."default_role_id",
- "posthog_organization"."plugins_access_level",
- "posthog_organization"."for_internal_metrics",
- "posthog_organization"."default_experiment_stats_method",
- "posthog_organization"."default_anonymize_ips",
- "posthog_organization"."is_hipaa",
- "posthog_organization"."is_pending_deletion",
- "posthog_organization"."customer_id",
- "posthog_organization"."available_product_features",
- "posthog_organization"."usage",
- "posthog_organization"."never_drop_data",
- "posthog_organization"."customer_trust_scores",
- "posthog_organization"."setup_section_2_completed",
- "posthog_organization"."personalization",
- "posthog_organization"."domain_whitelist",
- "posthog_organization"."is_platform"
- FROM "posthog_organization"
- WHERE "posthog_organization"."id" = '00000000-0000-0000-0000-000000000000'::uuid
- LIMIT 21
- '''
-# ---
-# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.10
+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.113
'''
SELECT "posthog_filesystem"."team_id",
"posthog_filesystem"."id",
@@ -5143,65 +4462,12 @@
OR "posthog_filesystem"."surface" = 'web')
AND "posthog_filesystem"."ref" = '0001'
AND "posthog_filesystem"."team_id" = 99999
- AND "posthog_filesystem"."type" = 'dashboard'
+ AND "posthog_filesystem"."type" = 'insight'
AND NOT ("posthog_filesystem"."shortcut"
AND "posthog_filesystem"."shortcut" IS NOT NULL))
'''
# ---
-# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.100
- '''
- SELECT "posthog_tag"."name" AS "tag__name"
- FROM "posthog_taggeditem"
- INNER JOIN "posthog_tag" ON ("posthog_taggeditem"."tag_id" = "posthog_tag"."id")
- WHERE "posthog_taggeditem"."insight_id" = 99999
- '''
-# ---
-# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.101
- '''
- SELECT "posthog_user"."id",
- "posthog_user"."password",
- "posthog_user"."last_login",
- "posthog_user"."first_name",
- "posthog_user"."last_name",
- "posthog_user"."is_staff",
- "posthog_user"."date_joined",
- "posthog_user"."uuid",
- "posthog_user"."current_organization_id",
- "posthog_user"."current_team_id",
- "posthog_user"."email",
- "posthog_user"."pending_email",
- "posthog_user"."distinct_id",
- "posthog_user"."is_email_verified",
- "posthog_user"."credentials_reviewed_at",
- "posthog_user"."requested_2fa_reset_at",
- "posthog_user"."has_seen_product_intro_for",
- "posthog_user"."strapi_id",
- "posthog_user"."is_active",
- "posthog_user"."role_at_organization",
- "posthog_user"."theme_mode",
- "posthog_user"."partial_notification_settings",
- "posthog_user"."anonymize_data",
- "posthog_user"."allow_impersonation",
- "posthog_user"."toolbar_mode",
- "posthog_user"."hedgehog_config",
- "posthog_user"."allow_sidebar_suggestions",
- "posthog_user"."shortcut_position",
- "posthog_user"."passkeys_enabled_for_2fa",
- "posthog_user"."hide_mcp_hints",
- "posthog_user"."onboarding_skipped_at",
- "posthog_user"."onboarding_skipped_reason",
- "posthog_user"."onboarding_skipped_organization_id",
- "posthog_user"."onboarding_delegated_to_invite_id",
- "posthog_user"."onboarding_delegated_to_organization_id",
- "posthog_user"."onboarding_delegation_accepted_at",
- "posthog_user"."events_column_config",
- "posthog_user"."email_opt_in"
- FROM "posthog_user"
- WHERE ("posthog_user"."is_active"
- AND "posthog_user"."id" = 99999)
- '''
-# ---
-# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.102
+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.114
'''
SELECT "posthog_organization"."id",
"posthog_organization"."name",
@@ -5243,7 +4509,7 @@
LIMIT 21
'''
# ---
-# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.103
+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.115
'''
SELECT "posthog_team"."id",
"posthog_team"."uuid",
@@ -5339,256 +4605,113 @@
"posthog_team"."experiment_recalculation_time",
"posthog_team"."default_experiment_confidence_level",
"posthog_team"."default_experiment_stats_method",
- "posthog_team"."business_model",
- "posthog_organization"."id",
- "posthog_organization"."name",
- "posthog_organization"."slug",
- "posthog_organization"."logo_media_id",
- "posthog_organization"."created_at",
- "posthog_organization"."updated_at",
- "posthog_organization"."is_active",
- "posthog_organization"."is_not_active_reason",
- "posthog_organization"."session_cookie_age",
- "posthog_organization"."is_member_join_email_enabled",
- "posthog_organization"."is_ai_data_processing_approved",
- "posthog_organization"."is_ai_training_opted_in",
- "posthog_organization"."is_ai_training_locked",
- "posthog_organization"."is_ai_training_cta_shown",
- "posthog_organization"."enforce_2fa",
- "posthog_organization"."members_can_invite",
- "posthog_organization"."members_can_create_projects",
- "posthog_organization"."members_can_use_personal_api_keys",
- "posthog_organization"."allow_publicly_shared_resources",
- "posthog_organization"."default_role_id",
- "posthog_organization"."plugins_access_level",
- "posthog_organization"."for_internal_metrics",
- "posthog_organization"."default_experiment_stats_method",
- "posthog_organization"."default_anonymize_ips",
- "posthog_organization"."is_hipaa",
- "posthog_organization"."is_pending_deletion",
- "posthog_organization"."customer_id",
- "posthog_organization"."available_product_features",
- "posthog_organization"."usage",
- "posthog_organization"."never_drop_data",
- "posthog_organization"."customer_trust_scores",
- "posthog_organization"."setup_section_2_completed",
- "posthog_organization"."personalization",
- "posthog_organization"."domain_whitelist",
- "posthog_organization"."is_platform"
+ "posthog_team"."business_model"
FROM "posthog_team"
- INNER JOIN "posthog_organization" ON ("posthog_team"."organization_id" = "posthog_organization"."id")
WHERE "posthog_team"."id" = 99999
LIMIT 21
'''
# ---
-# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.104
+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.116
'''
- SELECT "posthog_organizationmembership"."id",
- "posthog_organizationmembership"."organization_id",
- "posthog_organizationmembership"."user_id",
- "posthog_organizationmembership"."level",
- "posthog_organizationmembership"."joined_at",
- "posthog_organizationmembership"."updated_at",
- "posthog_organizationmembership"."invited_by_id",
- "posthog_organization"."id",
- "posthog_organization"."name",
- "posthog_organization"."slug",
- "posthog_organization"."logo_media_id",
- "posthog_organization"."created_at",
- "posthog_organization"."updated_at",
- "posthog_organization"."is_active",
- "posthog_organization"."is_not_active_reason",
- "posthog_organization"."session_cookie_age",
- "posthog_organization"."is_member_join_email_enabled",
- "posthog_organization"."is_ai_data_processing_approved",
- "posthog_organization"."is_ai_training_opted_in",
- "posthog_organization"."is_ai_training_locked",
- "posthog_organization"."is_ai_training_cta_shown",
- "posthog_organization"."enforce_2fa",
- "posthog_organization"."members_can_invite",
- "posthog_organization"."members_can_create_projects",
- "posthog_organization"."members_can_use_personal_api_keys",
- "posthog_organization"."allow_publicly_shared_resources",
- "posthog_organization"."default_role_id",
- "posthog_organization"."plugins_access_level",
- "posthog_organization"."for_internal_metrics",
- "posthog_organization"."default_experiment_stats_method",
- "posthog_organization"."default_anonymize_ips",
- "posthog_organization"."is_hipaa",
- "posthog_organization"."is_pending_deletion",
- "posthog_organization"."customer_id",
- "posthog_organization"."available_product_features",
- "posthog_organization"."usage",
- "posthog_organization"."never_drop_data",
- "posthog_organization"."customer_trust_scores",
- "posthog_organization"."setup_section_2_completed",
- "posthog_organization"."personalization",
- "posthog_organization"."domain_whitelist",
- "posthog_organization"."is_platform"
- FROM "posthog_organizationmembership"
- INNER JOIN "posthog_organization" ON ("posthog_organizationmembership"."organization_id" = "posthog_organization"."id")
- WHERE ("posthog_organizationmembership"."organization_id" = '00000000-0000-0000-0000-000000000000'::uuid
- AND "posthog_organizationmembership"."user_id" = 99999)
- LIMIT 21
+ SELECT "posthog_dashboardtile"."id",
+ "posthog_dashboardtile"."dashboard_id",
+ "posthog_dashboardtile"."insight_id",
+ "posthog_dashboardtile"."text_id",
+ "posthog_dashboardtile"."button_tile_id",
+ "posthog_dashboardtile"."widget_id",
+ "posthog_dashboardtile"."team_id",
+ "posthog_dashboardtile"."layouts",
+ "posthog_dashboardtile"."color",
+ "posthog_dashboardtile"."filters_hash",
+ "posthog_dashboardtile"."last_refresh",
+ "posthog_dashboardtile"."refreshing",
+ "posthog_dashboardtile"."refresh_attempt",
+ "posthog_dashboardtile"."filters_overrides",
+ "posthog_dashboardtile"."show_description",
+ "posthog_dashboardtile"."transparent_background",
+ "posthog_dashboardtile"."deleted"
+ FROM "posthog_dashboardtile"
+ INNER JOIN "posthog_dashboard" ON ("posthog_dashboardtile"."dashboard_id" = "posthog_dashboard"."id")
+ WHERE (NOT ("posthog_dashboardtile"."deleted"
+ AND "posthog_dashboardtile"."deleted" IS NOT NULL)
+ AND NOT ("posthog_dashboard"."deleted")
+ AND "posthog_dashboardtile"."insight_id" = 99999)
'''
# ---
-# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.105
+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.117
'''
- SELECT "ee_accesscontrol"."id",
- "ee_accesscontrol"."team_id",
- "ee_accesscontrol"."access_level",
- "ee_accesscontrol"."resource",
- "ee_accesscontrol"."resource_id",
- "ee_accesscontrol"."organization_member_id",
- "ee_accesscontrol"."role_id",
- "ee_accesscontrol"."created_by_id",
- "ee_accesscontrol"."created_at",
- "ee_accesscontrol"."updated_at",
- "posthog_team"."organization_id" AS "_team_organization_id"
- FROM "ee_accesscontrol"
- INNER JOIN "posthog_team" ON ("ee_accesscontrol"."team_id" = "posthog_team"."id")
- LEFT OUTER JOIN "posthog_organizationmembership" ON ("ee_accesscontrol"."organization_member_id" = "posthog_organizationmembership"."id")
- WHERE (("ee_accesscontrol"."organization_member_id" IS NULL
- AND "ee_accesscontrol"."role_id" IS NULL
- AND "ee_accesscontrol"."team_id" = 99999)
- OR ("posthog_organizationmembership"."user_id" = 99999
- AND "ee_accesscontrol"."role_id" IS NULL
- AND "ee_accesscontrol"."team_id" = 99999))
+ SELECT "posthog_dashboardtile"."id",
+ "posthog_dashboardtile"."dashboard_id",
+ "posthog_dashboardtile"."insight_id",
+ "posthog_dashboardtile"."text_id",
+ "posthog_dashboardtile"."button_tile_id",
+ "posthog_dashboardtile"."widget_id",
+ "posthog_dashboardtile"."team_id",
+ "posthog_dashboardtile"."layouts",
+ "posthog_dashboardtile"."color",
+ "posthog_dashboardtile"."filters_hash",
+ "posthog_dashboardtile"."last_refresh",
+ "posthog_dashboardtile"."refreshing",
+ "posthog_dashboardtile"."refresh_attempt",
+ "posthog_dashboardtile"."filters_overrides",
+ "posthog_dashboardtile"."show_description",
+ "posthog_dashboardtile"."transparent_background",
+ "posthog_dashboardtile"."deleted"
+ FROM "posthog_dashboardtile"
+ INNER JOIN "posthog_dashboard" ON ("posthog_dashboardtile"."dashboard_id" = "posthog_dashboard"."id")
+ WHERE (NOT ("posthog_dashboardtile"."deleted"
+ AND "posthog_dashboardtile"."deleted" IS NOT NULL)
+ AND NOT ("posthog_dashboard"."deleted")
+ AND "posthog_dashboardtile"."insight_id" = 99999)
'''
# ---
-# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.106
+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.118
'''
- SELECT "posthog_organizationmembership"."id",
- "posthog_organizationmembership"."organization_id",
- "posthog_organizationmembership"."user_id",
- "posthog_organizationmembership"."level",
- "posthog_organizationmembership"."joined_at",
- "posthog_organizationmembership"."updated_at",
- "posthog_organizationmembership"."invited_by_id",
- "posthog_organization"."id",
- "posthog_organization"."name",
- "posthog_organization"."slug",
- "posthog_organization"."logo_media_id",
- "posthog_organization"."created_at",
- "posthog_organization"."updated_at",
- "posthog_organization"."is_active",
- "posthog_organization"."is_not_active_reason",
- "posthog_organization"."session_cookie_age",
- "posthog_organization"."is_member_join_email_enabled",
- "posthog_organization"."is_ai_data_processing_approved",
- "posthog_organization"."is_ai_training_opted_in",
- "posthog_organization"."is_ai_training_locked",
- "posthog_organization"."is_ai_training_cta_shown",
- "posthog_organization"."enforce_2fa",
- "posthog_organization"."members_can_invite",
- "posthog_organization"."members_can_create_projects",
- "posthog_organization"."members_can_use_personal_api_keys",
- "posthog_organization"."allow_publicly_shared_resources",
- "posthog_organization"."default_role_id",
- "posthog_organization"."plugins_access_level",
- "posthog_organization"."for_internal_metrics",
- "posthog_organization"."default_experiment_stats_method",
- "posthog_organization"."default_anonymize_ips",
- "posthog_organization"."is_hipaa",
- "posthog_organization"."is_pending_deletion",
- "posthog_organization"."customer_id",
- "posthog_organization"."available_product_features",
- "posthog_organization"."usage",
- "posthog_organization"."never_drop_data",
- "posthog_organization"."customer_trust_scores",
- "posthog_organization"."setup_section_2_completed",
- "posthog_organization"."personalization",
- "posthog_organization"."domain_whitelist",
- "posthog_organization"."is_platform"
- FROM "posthog_organizationmembership"
- INNER JOIN "posthog_organization" ON ("posthog_organizationmembership"."organization_id" = "posthog_organization"."id")
- WHERE "posthog_organizationmembership"."user_id" = 99999
- '''
-# ---
-# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.107
- '''
- SELECT "ee_accesscontrol"."team_id" AS "team_id",
- "ee_accesscontrol"."resource_id" AS "resource_id",
- "ee_accesscontrol"."organization_member_id" AS "organization_member_id",
- "ee_accesscontrol"."role_id" AS "role_id",
- "ee_accesscontrol"."access_level" AS "access_level"
- FROM "ee_accesscontrol"
- INNER JOIN "posthog_team" ON ("ee_accesscontrol"."team_id" = "posthog_team"."id")
- WHERE ("ee_accesscontrol"."resource" = 'project'
- AND "posthog_team"."organization_id" IN ('00000000-0000-0000-0000-000000000000'::uuid))
- '''
-# ---
-# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.108
- '''
- SELECT "ee_rolemembership"."organization_member_id" AS "organization_member_id",
- "ee_rolemembership"."role_id" AS "role_id"
- FROM "ee_rolemembership"
- WHERE "ee_rolemembership"."user_id" = 99999
- '''
-# ---
-# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.109
- '''
- SELECT "posthog_dashboard"."id",
- "posthog_dashboard"."name",
- "posthog_dashboard"."description",
- "posthog_dashboard"."team_id",
- "posthog_dashboard"."pinned",
- "posthog_dashboard"."created_at",
- "posthog_dashboard"."created_by_id",
- "posthog_dashboard"."deleted",
- "posthog_dashboard"."last_accessed_at",
- "posthog_dashboard"."last_refresh",
- "posthog_dashboard"."filters",
- "posthog_dashboard"."variables",
- "posthog_dashboard"."breakdown_colors",
- "posthog_dashboard"."data_color_theme_id",
- "posthog_dashboard"."creation_mode",
- "posthog_dashboard"."restriction_level",
- "posthog_dashboard"."quick_filter_ids",
- "posthog_dashboard"."deprecated_tags",
- "posthog_dashboard"."tags",
- "posthog_dashboard"."share_token",
- "posthog_dashboard"."is_shared"
- FROM "posthog_dashboard"
- INNER JOIN "posthog_team" ON ("posthog_dashboard"."team_id" = "posthog_team"."id")
- WHERE (NOT ("posthog_dashboard"."deleted")
- AND ("posthog_dashboard"."team_id" =
- (SELECT U0."parent_team_id" AS "parent_team_id"
- FROM "posthog_team" U0
- WHERE U0."id" = 99999
- LIMIT 1)
- OR ("posthog_team"."parent_team_id" IS NULL
- AND "posthog_dashboard"."team_id" = 99999))
- AND "posthog_dashboard"."id" = 99999)
- LIMIT 21
+ SELECT "posthog_insightvariable"."created_by_id",
+ "posthog_insightvariable"."created_at",
+ "posthog_insightvariable"."updated_at",
+ "posthog_insightvariable"."id",
+ "posthog_insightvariable"."team_id",
+ "posthog_insightvariable"."name",
+ "posthog_insightvariable"."code_name",
+ "posthog_insightvariable"."type",
+ "posthog_insightvariable"."default_value",
+ "posthog_insightvariable"."values"
+ FROM "posthog_insightvariable"
+ WHERE "posthog_insightvariable"."team_id" = 99999
'''
# ---
-# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.11
+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.119
'''
- SELECT COUNT(*) AS "__count"
+ SELECT "posthog_dashboardtile"."dashboard_id" AS "dashboard_id"
FROM "posthog_dashboardtile"
INNER JOIN "posthog_dashboard" ON ("posthog_dashboardtile"."dashboard_id" = "posthog_dashboard"."id")
WHERE (NOT ("posthog_dashboardtile"."deleted"
AND "posthog_dashboardtile"."deleted" IS NOT NULL)
AND NOT ("posthog_dashboard"."deleted")
- AND "posthog_dashboardtile"."dashboard_id" = 99999
- AND NOT ("posthog_dashboardtile"."insight_id" IS NULL))
+ AND "posthog_dashboardtile"."insight_id" = 99999)
'''
# ---
-# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.110
+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.12
'''
- SELECT COUNT(*) AS "__count"
- FROM "posthog_dashboardtile"
- INNER JOIN "posthog_dashboard" ON ("posthog_dashboardtile"."dashboard_id" = "posthog_dashboard"."id")
- WHERE (NOT ("posthog_dashboardtile"."deleted"
- AND "posthog_dashboardtile"."deleted" IS NOT NULL)
- AND NOT ("posthog_dashboard"."deleted")
- AND "posthog_dashboardtile"."dashboard_id" = 99999
- AND NOT ("posthog_dashboardtile"."deleted"
- AND "posthog_dashboardtile"."deleted" IS NOT NULL))
+ SELECT "posthog_sharingconfiguration"."id",
+ "posthog_sharingconfiguration"."team_id",
+ "posthog_sharingconfiguration"."dashboard_id",
+ "posthog_sharingconfiguration"."insight_id",
+ "posthog_sharingconfiguration"."recording_id",
+ "posthog_sharingconfiguration"."notebook_id",
+ "posthog_sharingconfiguration"."interviewee_context_id",
+ "posthog_sharingconfiguration"."created_at",
+ "posthog_sharingconfiguration"."enabled",
+ "posthog_sharingconfiguration"."access_token",
+ "posthog_sharingconfiguration"."expires_at",
+ "posthog_sharingconfiguration"."settings",
+ "posthog_sharingconfiguration"."password_required"
+ FROM "posthog_sharingconfiguration"
+ WHERE "posthog_sharingconfiguration"."dashboard_id" = 99999
'''
# ---
-# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.111
+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.120
'''
SELECT "posthog_dashboard"."id",
"posthog_dashboard"."name",
@@ -5620,7 +4743,102 @@
5 /* ... */))
'''
# ---
-# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.112
+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.121
+ '''
+ SELECT "posthog_tag"."name" AS "tag__name"
+ FROM "posthog_taggeditem"
+ INNER JOIN "posthog_tag" ON ("posthog_taggeditem"."tag_id" = "posthog_tag"."id")
+ WHERE "posthog_taggeditem"."insight_id" = 99999
+ '''
+# ---
+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.122
+ '''
+ SELECT "posthog_user"."id",
+ "posthog_user"."password",
+ "posthog_user"."last_login",
+ "posthog_user"."first_name",
+ "posthog_user"."last_name",
+ "posthog_user"."is_staff",
+ "posthog_user"."date_joined",
+ "posthog_user"."uuid",
+ "posthog_user"."current_organization_id",
+ "posthog_user"."current_team_id",
+ "posthog_user"."email",
+ "posthog_user"."pending_email",
+ "posthog_user"."distinct_id",
+ "posthog_user"."is_email_verified",
+ "posthog_user"."credentials_reviewed_at",
+ "posthog_user"."requested_2fa_reset_at",
+ "posthog_user"."has_seen_product_intro_for",
+ "posthog_user"."strapi_id",
+ "posthog_user"."is_active",
+ "posthog_user"."role_at_organization",
+ "posthog_user"."theme_mode",
+ "posthog_user"."partial_notification_settings",
+ "posthog_user"."anonymize_data",
+ "posthog_user"."allow_impersonation",
+ "posthog_user"."toolbar_mode",
+ "posthog_user"."hedgehog_config",
+ "posthog_user"."allow_sidebar_suggestions",
+ "posthog_user"."shortcut_position",
+ "posthog_user"."passkeys_enabled_for_2fa",
+ "posthog_user"."hide_mcp_hints",
+ "posthog_user"."onboarding_skipped_at",
+ "posthog_user"."onboarding_skipped_reason",
+ "posthog_user"."onboarding_skipped_organization_id",
+ "posthog_user"."onboarding_delegated_to_invite_id",
+ "posthog_user"."onboarding_delegated_to_organization_id",
+ "posthog_user"."onboarding_delegation_accepted_at",
+ "posthog_user"."events_column_config",
+ "posthog_user"."email_opt_in"
+ FROM "posthog_user"
+ WHERE ("posthog_user"."is_active"
+ AND "posthog_user"."id" = 99999)
+ '''
+# ---
+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.123
+ '''
+ SELECT "posthog_organization"."id",
+ "posthog_organization"."name",
+ "posthog_organization"."slug",
+ "posthog_organization"."logo_media_id",
+ "posthog_organization"."created_at",
+ "posthog_organization"."updated_at",
+ "posthog_organization"."is_active",
+ "posthog_organization"."is_not_active_reason",
+ "posthog_organization"."session_cookie_age",
+ "posthog_organization"."is_member_join_email_enabled",
+ "posthog_organization"."is_ai_data_processing_approved",
+ "posthog_organization"."is_ai_training_opted_in",
+ "posthog_organization"."is_ai_training_locked",
+ "posthog_organization"."is_ai_training_cta_shown",
+ "posthog_organization"."enforce_2fa",
+ "posthog_organization"."members_can_invite",
+ "posthog_organization"."members_can_create_projects",
+ "posthog_organization"."members_can_use_personal_api_keys",
+ "posthog_organization"."allow_publicly_shared_resources",
+ "posthog_organization"."default_role_id",
+ "posthog_organization"."plugins_access_level",
+ "posthog_organization"."for_internal_metrics",
+ "posthog_organization"."default_experiment_stats_method",
+ "posthog_organization"."default_anonymize_ips",
+ "posthog_organization"."is_hipaa",
+ "posthog_organization"."is_pending_deletion",
+ "posthog_organization"."customer_id",
+ "posthog_organization"."available_product_features",
+ "posthog_organization"."usage",
+ "posthog_organization"."never_drop_data",
+ "posthog_organization"."customer_trust_scores",
+ "posthog_organization"."setup_section_2_completed",
+ "posthog_organization"."personalization",
+ "posthog_organization"."domain_whitelist",
+ "posthog_organization"."is_platform"
+ FROM "posthog_organization"
+ WHERE "posthog_organization"."id" = '00000000-0000-0000-0000-000000000000'::uuid
+ LIMIT 21
+ '''
+# ---
+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.124
'''
SELECT "posthog_team"."id",
"posthog_team"."uuid",
@@ -5716,40 +4934,8 @@
"posthog_team"."experiment_recalculation_time",
"posthog_team"."default_experiment_confidence_level",
"posthog_team"."default_experiment_stats_method",
- "posthog_team"."business_model"
- FROM "posthog_team"
- WHERE "posthog_team"."id" = 99999
- LIMIT 21
- '''
-# ---
-# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.113
- '''
- SELECT "posthog_filesystem"."team_id",
- "posthog_filesystem"."id",
- "posthog_filesystem"."path",
- "posthog_filesystem"."depth",
- "posthog_filesystem"."type",
- "posthog_filesystem"."ref",
- "posthog_filesystem"."href",
- "posthog_filesystem"."shortcut",
- "posthog_filesystem"."meta",
- "posthog_filesystem"."created_at",
- "posthog_filesystem"."created_by_id",
- "posthog_filesystem"."surface",
- "posthog_filesystem"."project_id"
- FROM "posthog_filesystem"
- WHERE (("posthog_filesystem"."surface" IS NULL
- OR "posthog_filesystem"."surface" = 'web')
- AND "posthog_filesystem"."ref" = '0001'
- AND "posthog_filesystem"."team_id" = 99999
- AND "posthog_filesystem"."type" = 'insight'
- AND NOT ("posthog_filesystem"."shortcut"
- AND "posthog_filesystem"."shortcut" IS NOT NULL))
- '''
-# ---
-# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.114
- '''
- SELECT "posthog_organization"."id",
+ "posthog_team"."business_model",
+ "posthog_organization"."id",
"posthog_organization"."name",
"posthog_organization"."slug",
"posthog_organization"."logo_media_id",
@@ -5784,301 +4970,97 @@
"posthog_organization"."personalization",
"posthog_organization"."domain_whitelist",
"posthog_organization"."is_platform"
- FROM "posthog_organization"
- WHERE "posthog_organization"."id" = '00000000-0000-0000-0000-000000000000'::uuid
- LIMIT 21
- '''
-# ---
-# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.115
- '''
- SELECT "posthog_team"."id",
- "posthog_team"."uuid",
- "posthog_team"."organization_id",
- "posthog_team"."parent_team_id",
- "posthog_team"."project_id",
- "posthog_team"."api_token",
- "posthog_team"."app_urls",
- "posthog_team"."name",
- "posthog_team"."slack_incoming_webhook",
- "posthog_team"."created_at",
- "posthog_team"."updated_at",
- "posthog_team"."anonymize_ips",
- "posthog_team"."completed_snippet_onboarding",
- "posthog_team"."has_completed_onboarding_for",
- "posthog_team"."onboarding_tasks",
- "posthog_team"."ingested_event",
- "posthog_team"."ingested_production_event",
- "posthog_team"."ingested_production_event_last_checked_at",
- "posthog_team"."person_processing_opt_out",
- "posthog_team"."secret_api_token",
- "posthog_team"."secret_api_token_backup",
- "posthog_team"."session_recording_opt_in",
- "posthog_team"."session_recording_sample_rate",
- "posthog_team"."session_recording_minimum_duration_milliseconds",
- "posthog_team"."session_recording_linked_flag",
- "posthog_team"."session_recording_network_payload_capture_config",
- "posthog_team"."session_recording_masking_config",
- "posthog_team"."session_recording_url_trigger_config",
- "posthog_team"."session_recording_url_blocklist_config",
- "posthog_team"."session_recording_event_trigger_config",
- "posthog_team"."session_recording_trigger_match_type_config",
- "posthog_team"."session_recording_trigger_groups",
- "posthog_team"."session_replay_config",
- "posthog_team"."session_recording_retention_period",
- "posthog_team"."event_retention_months",
- "posthog_team"."conversations_enabled",
- "posthog_team"."conversations_settings",
- "posthog_team"."proactive_tasks_enabled",
- "posthog_team"."survey_config",
- "posthog_team"."surveys_opt_in",
- "posthog_team"."product_tours_opt_in",
- "posthog_team"."capture_console_log_opt_in",
- "posthog_team"."capture_performance_opt_in",
- "posthog_team"."capture_dead_clicks",
- "posthog_team"."autocapture_opt_out",
- "posthog_team"."autocapture_web_vitals_opt_in",
- "posthog_team"."autocapture_web_vitals_allowed_metrics",
- "posthog_team"."autocapture_exceptions_opt_in",
- "posthog_team"."autocapture_exceptions_errors_to_ignore",
- "posthog_team"."logs_settings",
- "posthog_team"."llm_gateway_enabled_at",
- "posthog_team"."llm_gateway_revoked_at",
- "posthog_team"."llm_gateway_overspend_allowance_usd",
- "posthog_team"."heatmaps_opt_in",
- "posthog_team"."receive_org_level_activity_logs",
- "posthog_team"."web_analytics_pre_aggregated_tables_enabled",
- "posthog_team"."web_analytics_pre_aggregated_tables_version",
- "posthog_team"."flags_persistence_default",
- "posthog_team"."feature_flag_confirmation_enabled",
- "posthog_team"."feature_flag_confirmation_message",
- "posthog_team"."default_evaluation_environments_enabled",
- "posthog_team"."require_evaluation_environment_tags",
- "posthog_team"."default_evaluation_contexts_enabled",
- "posthog_team"."require_evaluation_contexts",
- "posthog_team"."session_recording_version",
- "posthog_team"."signup_token",
- "posthog_team"."is_demo",
- "posthog_team"."access_control",
- "posthog_team"."week_start_day",
- "posthog_team"."inject_web_apps",
- "posthog_team"."test_account_filters",
- "posthog_team"."test_account_filters_default_checked",
- "posthog_team"."path_cleaning_filters",
- "posthog_team"."timezone",
- "posthog_team"."data_attributes",
- "posthog_team"."person_display_name_properties",
- "posthog_team"."live_events_columns",
- "posthog_team"."recording_domains",
- "posthog_team"."human_friendly_comparison_periods",
- "posthog_team"."cookieless_server_hash_mode",
- "posthog_team"."primary_dashboard_id",
- "posthog_team"."default_data_theme",
- "posthog_team"."extra_settings",
- "posthog_team"."modifiers",
- "posthog_team"."correlation_config",
- "posthog_team"."session_recording_retention_period_days",
- "posthog_team"."external_data_workspace_id",
- "posthog_team"."external_data_workspace_last_synced_at",
- "posthog_team"."api_query_rate_limit",
- "posthog_team"."drop_events_older_than",
- "posthog_team"."base_currency",
- "posthog_team"."experiment_recalculation_time",
- "posthog_team"."default_experiment_confidence_level",
- "posthog_team"."default_experiment_stats_method",
- "posthog_team"."business_model"
FROM "posthog_team"
+ INNER JOIN "posthog_organization" ON ("posthog_team"."organization_id" = "posthog_organization"."id")
WHERE "posthog_team"."id" = 99999
LIMIT 21
'''
# ---
-# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.116
+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.125
'''
- SELECT "posthog_dashboardtile"."id",
- "posthog_dashboardtile"."dashboard_id",
- "posthog_dashboardtile"."insight_id",
- "posthog_dashboardtile"."text_id",
- "posthog_dashboardtile"."button_tile_id",
- "posthog_dashboardtile"."widget_id",
- "posthog_dashboardtile"."team_id",
- "posthog_dashboardtile"."layouts",
- "posthog_dashboardtile"."color",
- "posthog_dashboardtile"."filters_hash",
- "posthog_dashboardtile"."last_refresh",
- "posthog_dashboardtile"."refreshing",
- "posthog_dashboardtile"."refresh_attempt",
- "posthog_dashboardtile"."filters_overrides",
- "posthog_dashboardtile"."show_description",
- "posthog_dashboardtile"."transparent_background",
- "posthog_dashboardtile"."deleted"
- FROM "posthog_dashboardtile"
- INNER JOIN "posthog_dashboard" ON ("posthog_dashboardtile"."dashboard_id" = "posthog_dashboard"."id")
- WHERE (NOT ("posthog_dashboardtile"."deleted"
- AND "posthog_dashboardtile"."deleted" IS NOT NULL)
- AND NOT ("posthog_dashboard"."deleted")
- AND "posthog_dashboardtile"."insight_id" = 99999)
+ SELECT "posthog_organizationmembership"."id",
+ "posthog_organizationmembership"."organization_id",
+ "posthog_organizationmembership"."user_id",
+ "posthog_organizationmembership"."level",
+ "posthog_organizationmembership"."joined_at",
+ "posthog_organizationmembership"."updated_at",
+ "posthog_organizationmembership"."invited_by_id",
+ "posthog_organization"."id",
+ "posthog_organization"."name",
+ "posthog_organization"."slug",
+ "posthog_organization"."logo_media_id",
+ "posthog_organization"."created_at",
+ "posthog_organization"."updated_at",
+ "posthog_organization"."is_active",
+ "posthog_organization"."is_not_active_reason",
+ "posthog_organization"."session_cookie_age",
+ "posthog_organization"."is_member_join_email_enabled",
+ "posthog_organization"."is_ai_data_processing_approved",
+ "posthog_organization"."is_ai_training_opted_in",
+ "posthog_organization"."is_ai_training_locked",
+ "posthog_organization"."is_ai_training_cta_shown",
+ "posthog_organization"."enforce_2fa",
+ "posthog_organization"."members_can_invite",
+ "posthog_organization"."members_can_create_projects",
+ "posthog_organization"."members_can_use_personal_api_keys",
+ "posthog_organization"."allow_publicly_shared_resources",
+ "posthog_organization"."default_role_id",
+ "posthog_organization"."plugins_access_level",
+ "posthog_organization"."for_internal_metrics",
+ "posthog_organization"."default_experiment_stats_method",
+ "posthog_organization"."default_anonymize_ips",
+ "posthog_organization"."is_hipaa",
+ "posthog_organization"."is_pending_deletion",
+ "posthog_organization"."customer_id",
+ "posthog_organization"."available_product_features",
+ "posthog_organization"."usage",
+ "posthog_organization"."never_drop_data",
+ "posthog_organization"."customer_trust_scores",
+ "posthog_organization"."setup_section_2_completed",
+ "posthog_organization"."personalization",
+ "posthog_organization"."domain_whitelist",
+ "posthog_organization"."is_platform"
+ FROM "posthog_organizationmembership"
+ INNER JOIN "posthog_organization" ON ("posthog_organizationmembership"."organization_id" = "posthog_organization"."id")
+ WHERE ("posthog_organizationmembership"."organization_id" = '00000000-0000-0000-0000-000000000000'::uuid
+ AND "posthog_organizationmembership"."user_id" = 99999)
+ LIMIT 21
'''
# ---
-# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.117
+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.126
'''
- SELECT "posthog_dashboardtile"."id",
- "posthog_dashboardtile"."dashboard_id",
- "posthog_dashboardtile"."insight_id",
- "posthog_dashboardtile"."text_id",
- "posthog_dashboardtile"."button_tile_id",
- "posthog_dashboardtile"."widget_id",
- "posthog_dashboardtile"."team_id",
- "posthog_dashboardtile"."layouts",
- "posthog_dashboardtile"."color",
- "posthog_dashboardtile"."filters_hash",
- "posthog_dashboardtile"."last_refresh",
- "posthog_dashboardtile"."refreshing",
- "posthog_dashboardtile"."refresh_attempt",
- "posthog_dashboardtile"."filters_overrides",
- "posthog_dashboardtile"."show_description",
- "posthog_dashboardtile"."transparent_background",
- "posthog_dashboardtile"."deleted"
- FROM "posthog_dashboardtile"
- INNER JOIN "posthog_dashboard" ON ("posthog_dashboardtile"."dashboard_id" = "posthog_dashboard"."id")
- WHERE (NOT ("posthog_dashboardtile"."deleted"
- AND "posthog_dashboardtile"."deleted" IS NOT NULL)
- AND NOT ("posthog_dashboard"."deleted")
- AND "posthog_dashboardtile"."insight_id" = 99999)
+ SELECT "ee_accesscontrol"."id",
+ "ee_accesscontrol"."team_id",
+ "ee_accesscontrol"."access_level",
+ "ee_accesscontrol"."resource",
+ "ee_accesscontrol"."resource_id",
+ "ee_accesscontrol"."organization_member_id",
+ "ee_accesscontrol"."role_id",
+ "ee_accesscontrol"."created_by_id",
+ "ee_accesscontrol"."created_at",
+ "ee_accesscontrol"."updated_at",
+ "posthog_team"."organization_id" AS "_team_organization_id"
+ FROM "ee_accesscontrol"
+ INNER JOIN "posthog_team" ON ("ee_accesscontrol"."team_id" = "posthog_team"."id")
+ LEFT OUTER JOIN "posthog_organizationmembership" ON ("ee_accesscontrol"."organization_member_id" = "posthog_organizationmembership"."id")
+ WHERE (("ee_accesscontrol"."organization_member_id" IS NULL
+ AND "ee_accesscontrol"."role_id" IS NULL
+ AND "ee_accesscontrol"."team_id" = 99999)
+ OR ("posthog_organizationmembership"."user_id" = 99999
+ AND "ee_accesscontrol"."role_id" IS NULL
+ AND "ee_accesscontrol"."team_id" = 99999))
'''
# ---
-# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.118
+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.127
'''
- SELECT "posthog_insightvariable"."created_by_id",
- "posthog_insightvariable"."created_at",
- "posthog_insightvariable"."updated_at",
- "posthog_insightvariable"."id",
- "posthog_insightvariable"."team_id",
- "posthog_insightvariable"."name",
- "posthog_insightvariable"."code_name",
- "posthog_insightvariable"."type",
- "posthog_insightvariable"."default_value",
- "posthog_insightvariable"."values"
- FROM "posthog_insightvariable"
- WHERE "posthog_insightvariable"."team_id" = 99999
- '''
-# ---
-# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.119
- '''
- SELECT "posthog_dashboardtile"."dashboard_id" AS "dashboard_id"
- FROM "posthog_dashboardtile"
- INNER JOIN "posthog_dashboard" ON ("posthog_dashboardtile"."dashboard_id" = "posthog_dashboard"."id")
- WHERE (NOT ("posthog_dashboardtile"."deleted"
- AND "posthog_dashboardtile"."deleted" IS NOT NULL)
- AND NOT ("posthog_dashboard"."deleted")
- AND "posthog_dashboardtile"."insight_id" = 99999)
- '''
-# ---
-# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.12
- '''
- SELECT "posthog_sharingconfiguration"."id",
- "posthog_sharingconfiguration"."team_id",
- "posthog_sharingconfiguration"."dashboard_id",
- "posthog_sharingconfiguration"."insight_id",
- "posthog_sharingconfiguration"."recording_id",
- "posthog_sharingconfiguration"."notebook_id",
- "posthog_sharingconfiguration"."interviewee_context_id",
- "posthog_sharingconfiguration"."created_at",
- "posthog_sharingconfiguration"."enabled",
- "posthog_sharingconfiguration"."access_token",
- "posthog_sharingconfiguration"."expires_at",
- "posthog_sharingconfiguration"."settings",
- "posthog_sharingconfiguration"."password_required"
- FROM "posthog_sharingconfiguration"
- WHERE "posthog_sharingconfiguration"."dashboard_id" = 99999
- '''
-# ---
-# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.120
- '''
- SELECT "posthog_dashboard"."id",
- "posthog_dashboard"."name",
- "posthog_dashboard"."description",
- "posthog_dashboard"."team_id",
- "posthog_dashboard"."pinned",
- "posthog_dashboard"."created_at",
- "posthog_dashboard"."created_by_id",
- "posthog_dashboard"."deleted",
- "posthog_dashboard"."last_accessed_at",
- "posthog_dashboard"."last_refresh",
- "posthog_dashboard"."filters",
- "posthog_dashboard"."variables",
- "posthog_dashboard"."breakdown_colors",
- "posthog_dashboard"."data_color_theme_id",
- "posthog_dashboard"."creation_mode",
- "posthog_dashboard"."restriction_level",
- "posthog_dashboard"."quick_filter_ids",
- "posthog_dashboard"."deprecated_tags",
- "posthog_dashboard"."tags",
- "posthog_dashboard"."share_token",
- "posthog_dashboard"."is_shared"
- FROM "posthog_dashboard"
- WHERE (NOT ("posthog_dashboard"."deleted")
- AND "posthog_dashboard"."id" IN (1,
- 2,
- 3,
- 4,
- 5 /* ... */))
- '''
-# ---
-# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.121
- '''
- SELECT "posthog_tag"."name" AS "tag__name"
- FROM "posthog_taggeditem"
- INNER JOIN "posthog_tag" ON ("posthog_taggeditem"."tag_id" = "posthog_tag"."id")
- WHERE "posthog_taggeditem"."insight_id" = 99999
- '''
-# ---
-# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.122
- '''
- SELECT "posthog_user"."id",
- "posthog_user"."password",
- "posthog_user"."last_login",
- "posthog_user"."first_name",
- "posthog_user"."last_name",
- "posthog_user"."is_staff",
- "posthog_user"."date_joined",
- "posthog_user"."uuid",
- "posthog_user"."current_organization_id",
- "posthog_user"."current_team_id",
- "posthog_user"."email",
- "posthog_user"."pending_email",
- "posthog_user"."distinct_id",
- "posthog_user"."is_email_verified",
- "posthog_user"."credentials_reviewed_at",
- "posthog_user"."requested_2fa_reset_at",
- "posthog_user"."has_seen_product_intro_for",
- "posthog_user"."strapi_id",
- "posthog_user"."is_active",
- "posthog_user"."role_at_organization",
- "posthog_user"."theme_mode",
- "posthog_user"."partial_notification_settings",
- "posthog_user"."anonymize_data",
- "posthog_user"."allow_impersonation",
- "posthog_user"."toolbar_mode",
- "posthog_user"."hedgehog_config",
- "posthog_user"."allow_sidebar_suggestions",
- "posthog_user"."shortcut_position",
- "posthog_user"."passkeys_enabled_for_2fa",
- "posthog_user"."hide_mcp_hints",
- "posthog_user"."onboarding_skipped_at",
- "posthog_user"."onboarding_skipped_reason",
- "posthog_user"."onboarding_skipped_organization_id",
- "posthog_user"."onboarding_delegated_to_invite_id",
- "posthog_user"."onboarding_delegated_to_organization_id",
- "posthog_user"."onboarding_delegation_accepted_at",
- "posthog_user"."events_column_config",
- "posthog_user"."email_opt_in"
- FROM "posthog_user"
- WHERE ("posthog_user"."is_active"
- AND "posthog_user"."id" = 99999)
- '''
-# ---
-# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.123
- '''
- SELECT "posthog_organization"."id",
+ SELECT "posthog_organizationmembership"."id",
+ "posthog_organizationmembership"."organization_id",
+ "posthog_organizationmembership"."user_id",
+ "posthog_organizationmembership"."level",
+ "posthog_organizationmembership"."joined_at",
+ "posthog_organizationmembership"."updated_at",
+ "posthog_organizationmembership"."invited_by_id",
+ "posthog_organization"."id",
"posthog_organization"."name",
"posthog_organization"."slug",
"posthog_organization"."logo_media_id",
@@ -6113,17 +5095,203 @@
"posthog_organization"."personalization",
"posthog_organization"."domain_whitelist",
"posthog_organization"."is_platform"
- FROM "posthog_organization"
- WHERE "posthog_organization"."id" = '00000000-0000-0000-0000-000000000000'::uuid
+ FROM "posthog_organizationmembership"
+ INNER JOIN "posthog_organization" ON ("posthog_organizationmembership"."organization_id" = "posthog_organization"."id")
+ WHERE "posthog_organizationmembership"."user_id" = 99999
+ '''
+# ---
+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.128
+ '''
+ SELECT "ee_accesscontrol"."team_id" AS "team_id",
+ "ee_accesscontrol"."resource_id" AS "resource_id",
+ "ee_accesscontrol"."organization_member_id" AS "organization_member_id",
+ "ee_accesscontrol"."role_id" AS "role_id",
+ "ee_accesscontrol"."access_level" AS "access_level"
+ FROM "ee_accesscontrol"
+ INNER JOIN "posthog_team" ON ("ee_accesscontrol"."team_id" = "posthog_team"."id")
+ WHERE ("ee_accesscontrol"."resource" = 'project'
+ AND "posthog_team"."organization_id" IN ('00000000-0000-0000-0000-000000000000'::uuid))
+ '''
+# ---
+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.129
+ '''
+ SELECT "ee_rolemembership"."organization_member_id" AS "organization_member_id",
+ "ee_rolemembership"."role_id" AS "role_id"
+ FROM "ee_rolemembership"
+ WHERE "ee_rolemembership"."user_id" = 99999
+ '''
+# ---
+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.13
+ '''
+ SELECT COUNT(*) AS "__count"
+ FROM "posthog_taggeditem"
+ WHERE "posthog_taggeditem"."dashboard_id" = 99999
+ '''
+# ---
+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.130
+ '''
+ SELECT "posthog_dashboard"."id",
+ "posthog_dashboard"."name",
+ "posthog_dashboard"."description",
+ "posthog_dashboard"."team_id",
+ "posthog_dashboard"."pinned",
+ "posthog_dashboard"."created_at",
+ "posthog_dashboard"."created_by_id",
+ "posthog_dashboard"."deleted",
+ "posthog_dashboard"."last_accessed_at",
+ "posthog_dashboard"."last_refresh",
+ "posthog_dashboard"."filters",
+ "posthog_dashboard"."variables",
+ "posthog_dashboard"."breakdown_colors",
+ "posthog_dashboard"."data_color_theme_id",
+ "posthog_dashboard"."creation_mode",
+ "posthog_dashboard"."restriction_level",
+ "posthog_dashboard"."quick_filter_ids",
+ "posthog_dashboard"."deprecated_tags",
+ "posthog_dashboard"."tags",
+ "posthog_dashboard"."share_token",
+ "posthog_dashboard"."is_shared",
+ recent_dashboard_views."viewed_at" AS "last_viewed_at",
+ ("posthog_dashboard"."id")::varchar AS "_ref_id",
+
+ (SELECT U0."path" AS "path"
+ FROM "posthog_filesystem" U0
+ WHERE ((U0."surface" IS NULL
+ OR U0."surface" = 'web')
+ AND U0."ref" = ("posthog_dashboard"."id")::varchar
+ AND U0."team_id" = ("posthog_dashboard"."team_id")
+ AND U0."type" = 'dashboard'
+ AND NOT (U0."shortcut"
+ AND U0."shortcut" IS NOT NULL))
+ ORDER BY U0."id" ASC
+ LIMIT 1) AS "_folder_path",
+ T6."id",
+ T6."password",
+ T6."last_login",
+ T6."first_name",
+ T6."last_name",
+ T6."is_staff",
+ T6."date_joined",
+ T6."uuid",
+ T6."current_organization_id",
+ T6."current_team_id",
+ T6."email",
+ T6."pending_email",
+ T6."distinct_id",
+ T6."is_email_verified",
+ T6."credentials_reviewed_at",
+ T6."requested_password_reset_at",
+ T6."requested_2fa_reset_at",
+ T6."has_seen_product_intro_for",
+ T6."strapi_id",
+ T6."is_active",
+ T6."role_at_organization",
+ T6."theme_mode",
+ T6."partial_notification_settings",
+ T6."anonymize_data",
+ T6."allow_impersonation",
+ T6."toolbar_mode",
+ T6."hedgehog_config",
+ T6."allow_sidebar_suggestions",
+ T6."shortcut_position",
+ T6."passkeys_enabled_for_2fa",
+ T6."hide_mcp_hints",
+ T6."onboarding_skipped_at",
+ T6."onboarding_skipped_reason",
+ T6."onboarding_skipped_organization_id",
+ T6."onboarding_delegated_to_invite_id",
+ T6."onboarding_delegated_to_organization_id",
+ T6."onboarding_delegation_accepted_at",
+ T6."events_column_config",
+ T6."email_opt_in"
+ FROM "posthog_dashboard"
+ INNER JOIN "posthog_team" ON ("posthog_dashboard"."team_id" = "posthog_team"."id")
+ LEFT OUTER JOIN "posthog_filesystemviewlog" recent_dashboard_views ON ("posthog_team"."id" = recent_dashboard_views."team_id"
+ AND ((recent_dashboard_views."user_id" = 99999
+ AND recent_dashboard_views."type" = 'dashboard'
+ AND recent_dashboard_views."ref" = ("posthog_dashboard"."id")::varchar)))
+ LEFT OUTER JOIN "posthog_user" T6 ON ("posthog_dashboard"."created_by_id" = T6."id")
+ WHERE ("posthog_team"."project_id" = 99999
+ AND NOT ("posthog_dashboard"."deleted")
+ AND "posthog_dashboard"."id" = 99999)
LIMIT 21
'''
# ---
-# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.124
+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.131
'''
- SELECT "posthog_team"."id",
- "posthog_team"."uuid",
- "posthog_team"."organization_id",
- "posthog_team"."parent_team_id",
+ SELECT "posthog_sharingconfiguration"."id",
+ "posthog_sharingconfiguration"."team_id",
+ "posthog_sharingconfiguration"."dashboard_id",
+ "posthog_sharingconfiguration"."insight_id",
+ "posthog_sharingconfiguration"."recording_id",
+ "posthog_sharingconfiguration"."notebook_id",
+ "posthog_sharingconfiguration"."interviewee_context_id",
+ "posthog_sharingconfiguration"."created_at",
+ "posthog_sharingconfiguration"."enabled",
+ "posthog_sharingconfiguration"."access_token",
+ "posthog_sharingconfiguration"."expires_at",
+ "posthog_sharingconfiguration"."settings",
+ "posthog_sharingconfiguration"."password_required"
+ FROM "posthog_sharingconfiguration"
+ WHERE "posthog_sharingconfiguration"."dashboard_id" IN (1,
+ 2,
+ 3,
+ 4,
+ 5 /* ... */)
+ '''
+# ---
+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.132
+ '''
+ SELECT "posthog_dashboardtile"."id",
+ "posthog_dashboardtile"."dashboard_id",
+ "posthog_dashboardtile"."insight_id",
+ "posthog_dashboardtile"."text_id",
+ "posthog_dashboardtile"."button_tile_id",
+ "posthog_dashboardtile"."widget_id",
+ "posthog_dashboardtile"."team_id",
+ "posthog_dashboardtile"."layouts",
+ "posthog_dashboardtile"."color",
+ "posthog_dashboardtile"."filters_hash",
+ "posthog_dashboardtile"."last_refresh",
+ "posthog_dashboardtile"."refreshing",
+ "posthog_dashboardtile"."refresh_attempt",
+ "posthog_dashboardtile"."filters_overrides",
+ "posthog_dashboardtile"."show_description",
+ "posthog_dashboardtile"."transparent_background",
+ "posthog_dashboardtile"."deleted",
+ "posthog_dashboarditem"."id",
+ "posthog_dashboarditem"."name",
+ "posthog_dashboarditem"."derived_name",
+ "posthog_dashboarditem"."description",
+ "posthog_dashboarditem"."team_id",
+ "posthog_dashboarditem"."filters",
+ "posthog_dashboarditem"."filters_hash",
+ "posthog_dashboarditem"."query",
+ "posthog_dashboarditem"."query_metadata",
+ "posthog_dashboarditem"."order",
+ "posthog_dashboarditem"."deleted",
+ "posthog_dashboarditem"."saved",
+ "posthog_dashboarditem"."created_at",
+ "posthog_dashboarditem"."refreshing",
+ "posthog_dashboarditem"."created_by_id",
+ "posthog_dashboarditem"."is_sample",
+ "posthog_dashboarditem"."short_id",
+ "posthog_dashboarditem"."favorited",
+ "posthog_dashboarditem"."refresh_attempt",
+ "posthog_dashboarditem"."last_modified_at",
+ "posthog_dashboarditem"."last_modified_by_id",
+ "posthog_dashboarditem"."dashboard_id",
+ "posthog_dashboarditem"."last_refresh",
+ "posthog_dashboarditem"."layouts",
+ "posthog_dashboarditem"."color",
+ "posthog_dashboarditem"."dive_dashboard_id",
+ "posthog_dashboarditem"."updated_at",
+ "posthog_dashboarditem"."deprecated_tags",
+ "posthog_dashboarditem"."tags",
+ "posthog_team"."id",
+ "posthog_team"."uuid",
+ "posthog_team"."organization_id",
+ "posthog_team"."parent_team_id",
"posthog_team"."project_id",
"posthog_team"."api_token",
"posthog_team"."app_urls",
@@ -6206,245 +5374,62 @@
"posthog_team"."modifiers",
"posthog_team"."correlation_config",
"posthog_team"."session_recording_retention_period_days",
+ "posthog_team"."plugins_opt_in",
+ "posthog_team"."opt_out_capture",
+ "posthog_team"."event_names",
+ "posthog_team"."event_names_with_usage",
+ "posthog_team"."event_properties",
+ "posthog_team"."event_properties_with_usage",
+ "posthog_team"."event_properties_numerical",
"posthog_team"."external_data_workspace_id",
"posthog_team"."external_data_workspace_last_synced_at",
"posthog_team"."api_query_rate_limit",
+ "posthog_team"."revenue_tracking_config",
"posthog_team"."drop_events_older_than",
"posthog_team"."base_currency",
"posthog_team"."experiment_recalculation_time",
"posthog_team"."default_experiment_confidence_level",
"posthog_team"."default_experiment_stats_method",
"posthog_team"."business_model",
- "posthog_organization"."id",
- "posthog_organization"."name",
- "posthog_organization"."slug",
- "posthog_organization"."logo_media_id",
- "posthog_organization"."created_at",
- "posthog_organization"."updated_at",
- "posthog_organization"."is_active",
- "posthog_organization"."is_not_active_reason",
- "posthog_organization"."session_cookie_age",
- "posthog_organization"."is_member_join_email_enabled",
- "posthog_organization"."is_ai_data_processing_approved",
- "posthog_organization"."is_ai_training_opted_in",
- "posthog_organization"."is_ai_training_locked",
- "posthog_organization"."is_ai_training_cta_shown",
- "posthog_organization"."enforce_2fa",
- "posthog_organization"."members_can_invite",
- "posthog_organization"."members_can_create_projects",
- "posthog_organization"."members_can_use_personal_api_keys",
- "posthog_organization"."allow_publicly_shared_resources",
- "posthog_organization"."default_role_id",
- "posthog_organization"."plugins_access_level",
- "posthog_organization"."for_internal_metrics",
- "posthog_organization"."default_experiment_stats_method",
- "posthog_organization"."default_anonymize_ips",
- "posthog_organization"."is_hipaa",
- "posthog_organization"."is_pending_deletion",
- "posthog_organization"."customer_id",
- "posthog_organization"."available_product_features",
- "posthog_organization"."usage",
- "posthog_organization"."never_drop_data",
- "posthog_organization"."customer_trust_scores",
- "posthog_organization"."setup_section_2_completed",
- "posthog_organization"."personalization",
- "posthog_organization"."domain_whitelist",
- "posthog_organization"."is_platform"
- FROM "posthog_team"
- INNER JOIN "posthog_organization" ON ("posthog_team"."organization_id" = "posthog_organization"."id")
- WHERE "posthog_team"."id" = 99999
- LIMIT 21
- '''
-# ---
-# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.125
- '''
- SELECT "posthog_organizationmembership"."id",
- "posthog_organizationmembership"."organization_id",
- "posthog_organizationmembership"."user_id",
- "posthog_organizationmembership"."level",
- "posthog_organizationmembership"."joined_at",
- "posthog_organizationmembership"."updated_at",
- "posthog_organizationmembership"."invited_by_id",
- "posthog_organization"."id",
- "posthog_organization"."name",
- "posthog_organization"."slug",
- "posthog_organization"."logo_media_id",
- "posthog_organization"."created_at",
- "posthog_organization"."updated_at",
- "posthog_organization"."is_active",
- "posthog_organization"."is_not_active_reason",
- "posthog_organization"."session_cookie_age",
- "posthog_organization"."is_member_join_email_enabled",
- "posthog_organization"."is_ai_data_processing_approved",
- "posthog_organization"."is_ai_training_opted_in",
- "posthog_organization"."is_ai_training_locked",
- "posthog_organization"."is_ai_training_cta_shown",
- "posthog_organization"."enforce_2fa",
- "posthog_organization"."members_can_invite",
- "posthog_organization"."members_can_create_projects",
- "posthog_organization"."members_can_use_personal_api_keys",
- "posthog_organization"."allow_publicly_shared_resources",
- "posthog_organization"."default_role_id",
- "posthog_organization"."plugins_access_level",
- "posthog_organization"."for_internal_metrics",
- "posthog_organization"."default_experiment_stats_method",
- "posthog_organization"."default_anonymize_ips",
- "posthog_organization"."is_hipaa",
- "posthog_organization"."is_pending_deletion",
- "posthog_organization"."customer_id",
- "posthog_organization"."available_product_features",
- "posthog_organization"."usage",
- "posthog_organization"."never_drop_data",
- "posthog_organization"."customer_trust_scores",
- "posthog_organization"."setup_section_2_completed",
- "posthog_organization"."personalization",
- "posthog_organization"."domain_whitelist",
- "posthog_organization"."is_platform"
- FROM "posthog_organizationmembership"
- INNER JOIN "posthog_organization" ON ("posthog_organizationmembership"."organization_id" = "posthog_organization"."id")
- WHERE ("posthog_organizationmembership"."organization_id" = '00000000-0000-0000-0000-000000000000'::uuid
- AND "posthog_organizationmembership"."user_id" = 99999)
- LIMIT 21
- '''
-# ---
-# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.126
- '''
- SELECT "ee_accesscontrol"."id",
- "ee_accesscontrol"."team_id",
- "ee_accesscontrol"."access_level",
- "ee_accesscontrol"."resource",
- "ee_accesscontrol"."resource_id",
- "ee_accesscontrol"."organization_member_id",
- "ee_accesscontrol"."role_id",
- "ee_accesscontrol"."created_by_id",
- "ee_accesscontrol"."created_at",
- "ee_accesscontrol"."updated_at",
- "posthog_team"."organization_id" AS "_team_organization_id"
- FROM "ee_accesscontrol"
- INNER JOIN "posthog_team" ON ("ee_accesscontrol"."team_id" = "posthog_team"."id")
- LEFT OUTER JOIN "posthog_organizationmembership" ON ("ee_accesscontrol"."organization_member_id" = "posthog_organizationmembership"."id")
- WHERE (("ee_accesscontrol"."organization_member_id" IS NULL
- AND "ee_accesscontrol"."role_id" IS NULL
- AND "ee_accesscontrol"."team_id" = 99999)
- OR ("posthog_organizationmembership"."user_id" = 99999
- AND "ee_accesscontrol"."role_id" IS NULL
- AND "ee_accesscontrol"."team_id" = 99999))
- '''
-# ---
-# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.127
- '''
- SELECT "posthog_organizationmembership"."id",
- "posthog_organizationmembership"."organization_id",
- "posthog_organizationmembership"."user_id",
- "posthog_organizationmembership"."level",
- "posthog_organizationmembership"."joined_at",
- "posthog_organizationmembership"."updated_at",
- "posthog_organizationmembership"."invited_by_id",
- "posthog_organization"."id",
- "posthog_organization"."name",
- "posthog_organization"."slug",
- "posthog_organization"."logo_media_id",
- "posthog_organization"."created_at",
- "posthog_organization"."updated_at",
- "posthog_organization"."is_active",
- "posthog_organization"."is_not_active_reason",
- "posthog_organization"."session_cookie_age",
- "posthog_organization"."is_member_join_email_enabled",
- "posthog_organization"."is_ai_data_processing_approved",
- "posthog_organization"."is_ai_training_opted_in",
- "posthog_organization"."is_ai_training_locked",
- "posthog_organization"."is_ai_training_cta_shown",
- "posthog_organization"."enforce_2fa",
- "posthog_organization"."members_can_invite",
- "posthog_organization"."members_can_create_projects",
- "posthog_organization"."members_can_use_personal_api_keys",
- "posthog_organization"."allow_publicly_shared_resources",
- "posthog_organization"."default_role_id",
- "posthog_organization"."plugins_access_level",
- "posthog_organization"."for_internal_metrics",
- "posthog_organization"."default_experiment_stats_method",
- "posthog_organization"."default_anonymize_ips",
- "posthog_organization"."is_hipaa",
- "posthog_organization"."is_pending_deletion",
- "posthog_organization"."customer_id",
- "posthog_organization"."available_product_features",
- "posthog_organization"."usage",
- "posthog_organization"."never_drop_data",
- "posthog_organization"."customer_trust_scores",
- "posthog_organization"."setup_section_2_completed",
- "posthog_organization"."personalization",
- "posthog_organization"."domain_whitelist",
- "posthog_organization"."is_platform"
- FROM "posthog_organizationmembership"
- INNER JOIN "posthog_organization" ON ("posthog_organizationmembership"."organization_id" = "posthog_organization"."id")
- WHERE "posthog_organizationmembership"."user_id" = 99999
- '''
-# ---
-# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.128
- '''
- SELECT "ee_accesscontrol"."team_id" AS "team_id",
- "ee_accesscontrol"."resource_id" AS "resource_id",
- "ee_accesscontrol"."organization_member_id" AS "organization_member_id",
- "ee_accesscontrol"."role_id" AS "role_id",
- "ee_accesscontrol"."access_level" AS "access_level"
- FROM "ee_accesscontrol"
- INNER JOIN "posthog_team" ON ("ee_accesscontrol"."team_id" = "posthog_team"."id")
- WHERE ("ee_accesscontrol"."resource" = 'project'
- AND "posthog_team"."organization_id" IN ('00000000-0000-0000-0000-000000000000'::uuid))
- '''
-# ---
-# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.129
- '''
- SELECT "ee_rolemembership"."organization_member_id" AS "organization_member_id",
- "ee_rolemembership"."role_id" AS "role_id"
- FROM "ee_rolemembership"
- WHERE "ee_rolemembership"."user_id" = 99999
- '''
-# ---
-# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.13
- '''
- SELECT COUNT(*) AS "__count"
- FROM "posthog_taggeditem"
- WHERE "posthog_taggeditem"."dashboard_id" = 99999
- '''
-# ---
-# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.130
- '''
- SELECT "posthog_dashboard"."id",
- "posthog_dashboard"."name",
- "posthog_dashboard"."description",
- "posthog_dashboard"."team_id",
- "posthog_dashboard"."pinned",
- "posthog_dashboard"."created_at",
- "posthog_dashboard"."created_by_id",
- "posthog_dashboard"."deleted",
- "posthog_dashboard"."last_accessed_at",
- "posthog_dashboard"."last_refresh",
- "posthog_dashboard"."filters",
- "posthog_dashboard"."variables",
- "posthog_dashboard"."breakdown_colors",
- "posthog_dashboard"."data_color_theme_id",
- "posthog_dashboard"."creation_mode",
- "posthog_dashboard"."restriction_level",
- "posthog_dashboard"."quick_filter_ids",
- "posthog_dashboard"."deprecated_tags",
- "posthog_dashboard"."tags",
- "posthog_dashboard"."share_token",
- "posthog_dashboard"."is_shared",
- recent_dashboard_views."viewed_at" AS "last_viewed_at",
- ("posthog_dashboard"."id")::varchar AS "_ref_id",
-
- (SELECT U0."path" AS "path"
- FROM "posthog_filesystem" U0
- WHERE ((U0."surface" IS NULL
- OR U0."surface" = 'web')
- AND U0."ref" = ("posthog_dashboard"."id")::varchar
- AND U0."team_id" = ("posthog_dashboard"."team_id")
- AND U0."type" = 'dashboard'
- AND NOT (U0."shortcut"
- AND U0."shortcut" IS NOT NULL))
- ORDER BY U0."id" ASC
- LIMIT 1) AS "_folder_path",
+ "posthog_user"."id",
+ "posthog_user"."password",
+ "posthog_user"."last_login",
+ "posthog_user"."first_name",
+ "posthog_user"."last_name",
+ "posthog_user"."is_staff",
+ "posthog_user"."date_joined",
+ "posthog_user"."uuid",
+ "posthog_user"."current_organization_id",
+ "posthog_user"."current_team_id",
+ "posthog_user"."email",
+ "posthog_user"."pending_email",
+ "posthog_user"."distinct_id",
+ "posthog_user"."is_email_verified",
+ "posthog_user"."credentials_reviewed_at",
+ "posthog_user"."requested_password_reset_at",
+ "posthog_user"."requested_2fa_reset_at",
+ "posthog_user"."has_seen_product_intro_for",
+ "posthog_user"."strapi_id",
+ "posthog_user"."is_active",
+ "posthog_user"."role_at_organization",
+ "posthog_user"."theme_mode",
+ "posthog_user"."partial_notification_settings",
+ "posthog_user"."anonymize_data",
+ "posthog_user"."allow_impersonation",
+ "posthog_user"."toolbar_mode",
+ "posthog_user"."hedgehog_config",
+ "posthog_user"."allow_sidebar_suggestions",
+ "posthog_user"."shortcut_position",
+ "posthog_user"."passkeys_enabled_for_2fa",
+ "posthog_user"."hide_mcp_hints",
+ "posthog_user"."onboarding_skipped_at",
+ "posthog_user"."onboarding_skipped_reason",
+ "posthog_user"."onboarding_skipped_organization_id",
+ "posthog_user"."onboarding_delegated_to_invite_id",
+ "posthog_user"."onboarding_delegated_to_organization_id",
+ "posthog_user"."onboarding_delegation_accepted_at",
+ "posthog_user"."events_column_config",
+ "posthog_user"."email_opt_in",
T6."id",
T6."password",
T6."last_login",
@@ -6483,44 +5468,179 @@
T6."onboarding_delegated_to_organization_id",
T6."onboarding_delegation_accepted_at",
T6."events_column_config",
- T6."email_opt_in"
- FROM "posthog_dashboard"
- INNER JOIN "posthog_team" ON ("posthog_dashboard"."team_id" = "posthog_team"."id")
- LEFT OUTER JOIN "posthog_filesystemviewlog" recent_dashboard_views ON ("posthog_team"."id" = recent_dashboard_views."team_id"
- AND ((recent_dashboard_views."user_id" = 99999
- AND recent_dashboard_views."type" = 'dashboard'
- AND recent_dashboard_views."ref" = ("posthog_dashboard"."id")::varchar)))
- LEFT OUTER JOIN "posthog_user" T6 ON ("posthog_dashboard"."created_by_id" = T6."id")
- WHERE ("posthog_team"."project_id" = 99999
+ T6."email_opt_in",
+ "posthog_text"."id",
+ "posthog_text"."body",
+ "posthog_text"."created_by_id",
+ "posthog_text"."last_modified_at",
+ "posthog_text"."last_modified_by_id",
+ "posthog_text"."team_id",
+ "posthog_buttontile"."id",
+ "posthog_buttontile"."url",
+ "posthog_buttontile"."text",
+ "posthog_buttontile"."placement",
+ "posthog_buttontile"."style",
+ "posthog_buttontile"."created_by_id",
+ "posthog_buttontile"."last_modified_at",
+ "posthog_buttontile"."last_modified_by_id",
+ "posthog_buttontile"."team_id",
+ "posthog_dashboardwidget"."id",
+ "posthog_dashboardwidget"."widget_type",
+ "posthog_dashboardwidget"."name",
+ "posthog_dashboardwidget"."description",
+ "posthog_dashboardwidget"."config",
+ "posthog_dashboardwidget"."created_by_id",
+ "posthog_dashboardwidget"."last_modified_at",
+ "posthog_dashboardwidget"."last_modified_by_id",
+ "posthog_dashboardwidget"."team_id",
+ T10."id",
+ T10."password",
+ T10."last_login",
+ T10."first_name",
+ T10."last_name",
+ T10."is_staff",
+ T10."date_joined",
+ T10."uuid",
+ T10."current_organization_id",
+ T10."current_team_id",
+ T10."email",
+ T10."pending_email",
+ T10."distinct_id",
+ T10."is_email_verified",
+ T10."credentials_reviewed_at",
+ T10."requested_password_reset_at",
+ T10."requested_2fa_reset_at",
+ T10."has_seen_product_intro_for",
+ T10."strapi_id",
+ T10."is_active",
+ T10."role_at_organization",
+ T10."theme_mode",
+ T10."partial_notification_settings",
+ T10."anonymize_data",
+ T10."allow_impersonation",
+ T10."toolbar_mode",
+ T10."hedgehog_config",
+ T10."allow_sidebar_suggestions",
+ T10."shortcut_position",
+ T10."passkeys_enabled_for_2fa",
+ T10."hide_mcp_hints",
+ T10."onboarding_skipped_at",
+ T10."onboarding_skipped_reason",
+ T10."onboarding_skipped_organization_id",
+ T10."onboarding_delegated_to_invite_id",
+ T10."onboarding_delegated_to_organization_id",
+ T10."onboarding_delegation_accepted_at",
+ T10."events_column_config",
+ T10."email_opt_in",
+ T11."id",
+ T11."password",
+ T11."last_login",
+ T11."first_name",
+ T11."last_name",
+ T11."is_staff",
+ T11."date_joined",
+ T11."uuid",
+ T11."current_organization_id",
+ T11."current_team_id",
+ T11."email",
+ T11."pending_email",
+ T11."distinct_id",
+ T11."is_email_verified",
+ T11."credentials_reviewed_at",
+ T11."requested_password_reset_at",
+ T11."requested_2fa_reset_at",
+ T11."has_seen_product_intro_for",
+ T11."strapi_id",
+ T11."is_active",
+ T11."role_at_organization",
+ T11."theme_mode",
+ T11."partial_notification_settings",
+ T11."anonymize_data",
+ T11."allow_impersonation",
+ T11."toolbar_mode",
+ T11."hedgehog_config",
+ T11."allow_sidebar_suggestions",
+ T11."shortcut_position",
+ T11."passkeys_enabled_for_2fa",
+ T11."hide_mcp_hints",
+ T11."onboarding_skipped_at",
+ T11."onboarding_skipped_reason",
+ T11."onboarding_skipped_organization_id",
+ T11."onboarding_delegated_to_invite_id",
+ T11."onboarding_delegated_to_organization_id",
+ T11."onboarding_delegation_accepted_at",
+ T11."events_column_config",
+ T11."email_opt_in"
+ FROM "posthog_dashboardtile"
+ INNER JOIN "posthog_dashboard" ON ("posthog_dashboardtile"."dashboard_id" = "posthog_dashboard"."id")
+ LEFT OUTER JOIN "posthog_dashboarditem" ON ("posthog_dashboardtile"."insight_id" = "posthog_dashboarditem"."id")
+ LEFT OUTER JOIN "posthog_team" ON ("posthog_dashboarditem"."team_id" = "posthog_team"."id")
+ LEFT OUTER JOIN "posthog_user" ON ("posthog_dashboarditem"."created_by_id" = "posthog_user"."id")
+ LEFT OUTER JOIN "posthog_user" T6 ON ("posthog_dashboarditem"."last_modified_by_id" = T6."id")
+ LEFT OUTER JOIN "posthog_text" ON ("posthog_dashboardtile"."text_id" = "posthog_text"."id")
+ LEFT OUTER JOIN "posthog_buttontile" ON ("posthog_dashboardtile"."button_tile_id" = "posthog_buttontile"."id")
+ LEFT OUTER JOIN "posthog_dashboardwidget" ON ("posthog_dashboardtile"."widget_id" = "posthog_dashboardwidget"."id")
+ LEFT OUTER JOIN "posthog_user" T10 ON ("posthog_dashboardwidget"."created_by_id" = T10."id")
+ LEFT OUTER JOIN "posthog_user" T11 ON ("posthog_dashboardwidget"."last_modified_by_id" = T11."id")
+ WHERE (NOT ("posthog_dashboardtile"."deleted"
+ AND "posthog_dashboardtile"."deleted" IS NOT NULL)
AND NOT ("posthog_dashboard"."deleted")
- AND "posthog_dashboard"."id" = 99999)
- LIMIT 21
+ AND NOT ("posthog_dashboard"."deleted"
+ AND "posthog_dashboardtile"."deleted"
+ AND "posthog_dashboardtile"."deleted" IS NOT NULL)
+ AND (NOT "posthog_dashboarditem"."deleted"
+ OR "posthog_dashboardtile"."insight_id" IS NULL)
+ AND "posthog_dashboardtile"."dashboard_id" = 99999
+ AND "posthog_dashboardtile"."dashboard_id" IN (1,
+ 2,
+ 3,
+ 4,
+ 5 /* ... */))
+ ORDER BY "posthog_dashboarditem"."order" ASC
'''
# ---
-# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.131
- '''
- SELECT "posthog_sharingconfiguration"."id",
- "posthog_sharingconfiguration"."team_id",
- "posthog_sharingconfiguration"."dashboard_id",
- "posthog_sharingconfiguration"."insight_id",
- "posthog_sharingconfiguration"."recording_id",
- "posthog_sharingconfiguration"."notebook_id",
- "posthog_sharingconfiguration"."interviewee_context_id",
- "posthog_sharingconfiguration"."created_at",
- "posthog_sharingconfiguration"."enabled",
- "posthog_sharingconfiguration"."access_token",
- "posthog_sharingconfiguration"."expires_at",
- "posthog_sharingconfiguration"."settings",
- "posthog_sharingconfiguration"."password_required"
- FROM "posthog_sharingconfiguration"
- WHERE "posthog_sharingconfiguration"."dashboard_id" IN (1,
- 2,
- 3,
- 4,
- 5 /* ... */)
+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.133
'''
-# ---
-# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.132
+ SELECT ("posthog_dashboardtile"."insight_id") AS "_prefetch_related_val_insight_id",
+ "posthog_dashboard"."id",
+ "posthog_dashboard"."name",
+ "posthog_dashboard"."description",
+ "posthog_dashboard"."team_id",
+ "posthog_dashboard"."pinned",
+ "posthog_dashboard"."created_at",
+ "posthog_dashboard"."created_by_id",
+ "posthog_dashboard"."deleted",
+ "posthog_dashboard"."last_accessed_at",
+ "posthog_dashboard"."last_refresh",
+ "posthog_dashboard"."filters",
+ "posthog_dashboard"."variables",
+ "posthog_dashboard"."breakdown_colors",
+ "posthog_dashboard"."data_color_theme_id",
+ "posthog_dashboard"."creation_mode",
+ "posthog_dashboard"."restriction_level",
+ "posthog_dashboard"."quick_filter_ids",
+ "posthog_dashboard"."deprecated_tags",
+ "posthog_dashboard"."tags",
+ "posthog_dashboard"."share_token",
+ "posthog_dashboard"."is_shared"
+ FROM "posthog_dashboard"
+ INNER JOIN "posthog_dashboardtile" ON ("posthog_dashboard"."id" = "posthog_dashboardtile"."dashboard_id")
+ WHERE (NOT ("posthog_dashboard"."deleted")
+ AND "posthog_dashboard"."id" IN
+ (SELECT U0."dashboard_id" AS "dashboard_id"
+ FROM "posthog_dashboardtile" U0
+ INNER JOIN "posthog_dashboard" U1 ON (U0."dashboard_id" = U1."id")
+ WHERE (NOT (U0."deleted"
+ AND U0."deleted" IS NOT NULL)
+ AND NOT (U1."deleted")))
+ AND "posthog_dashboardtile"."insight_id" IN (1,
+ 2,
+ 3,
+ 4,
+ 5 /* ... */))
+ '''
+# ---
+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.134
'''
SELECT "posthog_dashboardtile"."id",
"posthog_dashboardtile"."dashboard_id",
@@ -6538,37 +5658,76 @@
"posthog_dashboardtile"."filters_overrides",
"posthog_dashboardtile"."show_description",
"posthog_dashboardtile"."transparent_background",
- "posthog_dashboardtile"."deleted",
- "posthog_dashboarditem"."id",
- "posthog_dashboarditem"."name",
- "posthog_dashboarditem"."derived_name",
- "posthog_dashboarditem"."description",
- "posthog_dashboarditem"."team_id",
- "posthog_dashboarditem"."filters",
- "posthog_dashboarditem"."filters_hash",
- "posthog_dashboarditem"."query",
- "posthog_dashboarditem"."query_metadata",
- "posthog_dashboarditem"."order",
- "posthog_dashboarditem"."deleted",
- "posthog_dashboarditem"."saved",
- "posthog_dashboarditem"."created_at",
- "posthog_dashboarditem"."refreshing",
- "posthog_dashboarditem"."created_by_id",
- "posthog_dashboarditem"."is_sample",
- "posthog_dashboarditem"."short_id",
- "posthog_dashboarditem"."favorited",
- "posthog_dashboarditem"."refresh_attempt",
- "posthog_dashboarditem"."last_modified_at",
- "posthog_dashboarditem"."last_modified_by_id",
- "posthog_dashboarditem"."dashboard_id",
- "posthog_dashboarditem"."last_refresh",
- "posthog_dashboarditem"."layouts",
- "posthog_dashboarditem"."color",
- "posthog_dashboarditem"."dive_dashboard_id",
- "posthog_dashboarditem"."updated_at",
- "posthog_dashboarditem"."deprecated_tags",
- "posthog_dashboarditem"."tags",
- "posthog_team"."id",
+ "posthog_dashboardtile"."deleted"
+ FROM "posthog_dashboardtile"
+ INNER JOIN "posthog_dashboard" ON ("posthog_dashboardtile"."dashboard_id" = "posthog_dashboard"."id")
+ WHERE (NOT ("posthog_dashboardtile"."deleted"
+ AND "posthog_dashboardtile"."deleted" IS NOT NULL)
+ AND NOT ("posthog_dashboard"."deleted")
+ AND "posthog_dashboardtile"."insight_id" IN (1,
+ 2,
+ 3,
+ 4,
+ 5 /* ... */))
+ '''
+# ---
+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.135
+ '''
+ SELECT "posthog_dashboard"."id",
+ "posthog_dashboard"."name",
+ "posthog_dashboard"."description",
+ "posthog_dashboard"."team_id",
+ "posthog_dashboard"."pinned",
+ "posthog_dashboard"."created_at",
+ "posthog_dashboard"."created_by_id",
+ "posthog_dashboard"."deleted",
+ "posthog_dashboard"."last_accessed_at",
+ "posthog_dashboard"."last_refresh",
+ "posthog_dashboard"."filters",
+ "posthog_dashboard"."variables",
+ "posthog_dashboard"."breakdown_colors",
+ "posthog_dashboard"."data_color_theme_id",
+ "posthog_dashboard"."creation_mode",
+ "posthog_dashboard"."restriction_level",
+ "posthog_dashboard"."quick_filter_ids",
+ "posthog_dashboard"."deprecated_tags",
+ "posthog_dashboard"."tags",
+ "posthog_dashboard"."share_token",
+ "posthog_dashboard"."is_shared"
+ FROM "posthog_dashboard"
+ WHERE ("posthog_dashboard"."id") IN ((1,
+ 2)/* ... */)
+ '''
+# ---
+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.136
+ '''
+ SELECT "posthog_taggeditem"."id",
+ "posthog_taggeditem"."tag_id",
+ "posthog_taggeditem"."dashboard_id",
+ "posthog_taggeditem"."insight_id",
+ "posthog_taggeditem"."event_definition_id",
+ "posthog_taggeditem"."property_definition_id",
+ "posthog_taggeditem"."action_id",
+ "posthog_taggeditem"."feature_flag_id",
+ "posthog_taggeditem"."experiment_saved_metric_id",
+ "posthog_taggeditem"."ticket_id",
+ "posthog_taggeditem"."account_id",
+ "posthog_taggeditem"."endpoint_id",
+ "posthog_tag"."id",
+ "posthog_tag"."name",
+ "posthog_tag"."team_id"
+ FROM "posthog_taggeditem"
+ INNER JOIN "posthog_tag" ON ("posthog_taggeditem"."tag_id" = "posthog_tag"."id")
+ WHERE "posthog_taggeditem"."dashboard_id" IN (1,
+ 2,
+ 3,
+ 4,
+ 5 /* ... */)
+ '''
+# ---
+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.137
+ '''
+ SELECT "posthog_team"."id",
"posthog_team"."uuid",
"posthog_team"."organization_id",
"posthog_team"."parent_team_id",
@@ -6654,543 +5813,104 @@
"posthog_team"."modifiers",
"posthog_team"."correlation_config",
"posthog_team"."session_recording_retention_period_days",
- "posthog_team"."plugins_opt_in",
- "posthog_team"."opt_out_capture",
- "posthog_team"."event_names",
- "posthog_team"."event_names_with_usage",
- "posthog_team"."event_properties",
- "posthog_team"."event_properties_with_usage",
- "posthog_team"."event_properties_numerical",
"posthog_team"."external_data_workspace_id",
"posthog_team"."external_data_workspace_last_synced_at",
"posthog_team"."api_query_rate_limit",
- "posthog_team"."revenue_tracking_config",
"posthog_team"."drop_events_older_than",
"posthog_team"."base_currency",
"posthog_team"."experiment_recalculation_time",
"posthog_team"."default_experiment_confidence_level",
"posthog_team"."default_experiment_stats_method",
- "posthog_team"."business_model",
- "posthog_user"."id",
- "posthog_user"."password",
- "posthog_user"."last_login",
- "posthog_user"."first_name",
- "posthog_user"."last_name",
- "posthog_user"."is_staff",
- "posthog_user"."date_joined",
- "posthog_user"."uuid",
- "posthog_user"."current_organization_id",
- "posthog_user"."current_team_id",
- "posthog_user"."email",
- "posthog_user"."pending_email",
- "posthog_user"."distinct_id",
- "posthog_user"."is_email_verified",
- "posthog_user"."credentials_reviewed_at",
- "posthog_user"."requested_password_reset_at",
- "posthog_user"."requested_2fa_reset_at",
- "posthog_user"."has_seen_product_intro_for",
- "posthog_user"."strapi_id",
- "posthog_user"."is_active",
- "posthog_user"."role_at_organization",
- "posthog_user"."theme_mode",
- "posthog_user"."partial_notification_settings",
- "posthog_user"."anonymize_data",
- "posthog_user"."allow_impersonation",
- "posthog_user"."toolbar_mode",
- "posthog_user"."hedgehog_config",
- "posthog_user"."allow_sidebar_suggestions",
- "posthog_user"."shortcut_position",
- "posthog_user"."passkeys_enabled_for_2fa",
- "posthog_user"."hide_mcp_hints",
- "posthog_user"."onboarding_skipped_at",
- "posthog_user"."onboarding_skipped_reason",
- "posthog_user"."onboarding_skipped_organization_id",
- "posthog_user"."onboarding_delegated_to_invite_id",
- "posthog_user"."onboarding_delegated_to_organization_id",
- "posthog_user"."onboarding_delegation_accepted_at",
- "posthog_user"."events_column_config",
- "posthog_user"."email_opt_in",
- T6."id",
- T6."password",
- T6."last_login",
- T6."first_name",
- T6."last_name",
- T6."is_staff",
- T6."date_joined",
- T6."uuid",
- T6."current_organization_id",
- T6."current_team_id",
- T6."email",
- T6."pending_email",
- T6."distinct_id",
- T6."is_email_verified",
- T6."credentials_reviewed_at",
- T6."requested_password_reset_at",
- T6."requested_2fa_reset_at",
- T6."has_seen_product_intro_for",
- T6."strapi_id",
- T6."is_active",
- T6."role_at_organization",
- T6."theme_mode",
- T6."partial_notification_settings",
- T6."anonymize_data",
- T6."allow_impersonation",
- T6."toolbar_mode",
- T6."hedgehog_config",
- T6."allow_sidebar_suggestions",
- T6."shortcut_position",
- T6."passkeys_enabled_for_2fa",
- T6."hide_mcp_hints",
- T6."onboarding_skipped_at",
- T6."onboarding_skipped_reason",
- T6."onboarding_skipped_organization_id",
- T6."onboarding_delegated_to_invite_id",
- T6."onboarding_delegated_to_organization_id",
- T6."onboarding_delegation_accepted_at",
- T6."events_column_config",
- T6."email_opt_in",
- "posthog_text"."id",
- "posthog_text"."body",
- "posthog_text"."created_by_id",
- "posthog_text"."last_modified_at",
- "posthog_text"."last_modified_by_id",
- "posthog_text"."team_id",
- "posthog_buttontile"."id",
- "posthog_buttontile"."url",
- "posthog_buttontile"."text",
- "posthog_buttontile"."placement",
- "posthog_buttontile"."style",
- "posthog_buttontile"."created_by_id",
- "posthog_buttontile"."last_modified_at",
- "posthog_buttontile"."last_modified_by_id",
- "posthog_buttontile"."team_id",
- "posthog_dashboardwidget"."id",
- "posthog_dashboardwidget"."widget_type",
- "posthog_dashboardwidget"."name",
- "posthog_dashboardwidget"."description",
- "posthog_dashboardwidget"."config",
- "posthog_dashboardwidget"."created_by_id",
- "posthog_dashboardwidget"."last_modified_at",
- "posthog_dashboardwidget"."last_modified_by_id",
- "posthog_dashboardwidget"."team_id",
- T10."id",
- T10."password",
- T10."last_login",
- T10."first_name",
- T10."last_name",
- T10."is_staff",
- T10."date_joined",
- T10."uuid",
- T10."current_organization_id",
- T10."current_team_id",
- T10."email",
- T10."pending_email",
- T10."distinct_id",
- T10."is_email_verified",
- T10."credentials_reviewed_at",
- T10."requested_password_reset_at",
- T10."requested_2fa_reset_at",
- T10."has_seen_product_intro_for",
- T10."strapi_id",
- T10."is_active",
- T10."role_at_organization",
- T10."theme_mode",
- T10."partial_notification_settings",
- T10."anonymize_data",
- T10."allow_impersonation",
- T10."toolbar_mode",
- T10."hedgehog_config",
- T10."allow_sidebar_suggestions",
- T10."shortcut_position",
- T10."passkeys_enabled_for_2fa",
- T10."hide_mcp_hints",
- T10."onboarding_skipped_at",
- T10."onboarding_skipped_reason",
- T10."onboarding_skipped_organization_id",
- T10."onboarding_delegated_to_invite_id",
- T10."onboarding_delegated_to_organization_id",
- T10."onboarding_delegation_accepted_at",
- T10."events_column_config",
- T10."email_opt_in",
- T11."id",
- T11."password",
- T11."last_login",
- T11."first_name",
- T11."last_name",
- T11."is_staff",
- T11."date_joined",
- T11."uuid",
- T11."current_organization_id",
- T11."current_team_id",
- T11."email",
- T11."pending_email",
- T11."distinct_id",
- T11."is_email_verified",
- T11."credentials_reviewed_at",
- T11."requested_password_reset_at",
- T11."requested_2fa_reset_at",
- T11."has_seen_product_intro_for",
- T11."strapi_id",
- T11."is_active",
- T11."role_at_organization",
- T11."theme_mode",
- T11."partial_notification_settings",
- T11."anonymize_data",
- T11."allow_impersonation",
- T11."toolbar_mode",
- T11."hedgehog_config",
- T11."allow_sidebar_suggestions",
- T11."shortcut_position",
- T11."passkeys_enabled_for_2fa",
- T11."hide_mcp_hints",
- T11."onboarding_skipped_at",
- T11."onboarding_skipped_reason",
- T11."onboarding_skipped_organization_id",
- T11."onboarding_delegated_to_invite_id",
- T11."onboarding_delegated_to_organization_id",
- T11."onboarding_delegation_accepted_at",
- T11."events_column_config",
- T11."email_opt_in"
- FROM "posthog_dashboardtile"
- INNER JOIN "posthog_dashboard" ON ("posthog_dashboardtile"."dashboard_id" = "posthog_dashboard"."id")
- LEFT OUTER JOIN "posthog_dashboarditem" ON ("posthog_dashboardtile"."insight_id" = "posthog_dashboarditem"."id")
- LEFT OUTER JOIN "posthog_team" ON ("posthog_dashboarditem"."team_id" = "posthog_team"."id")
- LEFT OUTER JOIN "posthog_user" ON ("posthog_dashboarditem"."created_by_id" = "posthog_user"."id")
- LEFT OUTER JOIN "posthog_user" T6 ON ("posthog_dashboarditem"."last_modified_by_id" = T6."id")
- LEFT OUTER JOIN "posthog_text" ON ("posthog_dashboardtile"."text_id" = "posthog_text"."id")
- LEFT OUTER JOIN "posthog_buttontile" ON ("posthog_dashboardtile"."button_tile_id" = "posthog_buttontile"."id")
- LEFT OUTER JOIN "posthog_dashboardwidget" ON ("posthog_dashboardtile"."widget_id" = "posthog_dashboardwidget"."id")
- LEFT OUTER JOIN "posthog_user" T10 ON ("posthog_dashboardwidget"."created_by_id" = T10."id")
- LEFT OUTER JOIN "posthog_user" T11 ON ("posthog_dashboardwidget"."last_modified_by_id" = T11."id")
- WHERE (NOT ("posthog_dashboardtile"."deleted"
- AND "posthog_dashboardtile"."deleted" IS NOT NULL)
- AND NOT ("posthog_dashboard"."deleted")
- AND NOT ("posthog_dashboard"."deleted"
- AND "posthog_dashboardtile"."deleted"
- AND "posthog_dashboardtile"."deleted" IS NOT NULL)
- AND (NOT "posthog_dashboarditem"."deleted"
- OR "posthog_dashboardtile"."insight_id" IS NULL)
- AND "posthog_dashboardtile"."dashboard_id" = 99999
- AND "posthog_dashboardtile"."dashboard_id" IN (1,
- 2,
- 3,
- 4,
- 5 /* ... */))
- ORDER BY "posthog_dashboarditem"."order" ASC
+ "posthog_team"."business_model"
+ FROM "posthog_team"
+ WHERE "posthog_team"."id" = 99999
+ LIMIT 21
'''
# ---
-# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.133
+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.138
'''
- SELECT ("posthog_dashboardtile"."insight_id") AS "_prefetch_related_val_insight_id",
- "posthog_dashboard"."id",
- "posthog_dashboard"."name",
- "posthog_dashboard"."description",
- "posthog_dashboard"."team_id",
- "posthog_dashboard"."pinned",
- "posthog_dashboard"."created_at",
- "posthog_dashboard"."created_by_id",
- "posthog_dashboard"."deleted",
- "posthog_dashboard"."last_accessed_at",
- "posthog_dashboard"."last_refresh",
- "posthog_dashboard"."filters",
- "posthog_dashboard"."variables",
- "posthog_dashboard"."breakdown_colors",
- "posthog_dashboard"."data_color_theme_id",
- "posthog_dashboard"."creation_mode",
- "posthog_dashboard"."restriction_level",
- "posthog_dashboard"."quick_filter_ids",
- "posthog_dashboard"."deprecated_tags",
- "posthog_dashboard"."tags",
- "posthog_dashboard"."share_token",
- "posthog_dashboard"."is_shared"
- FROM "posthog_dashboard"
- INNER JOIN "posthog_dashboardtile" ON ("posthog_dashboard"."id" = "posthog_dashboardtile"."dashboard_id")
- WHERE (NOT ("posthog_dashboard"."deleted")
- AND "posthog_dashboard"."id" IN
- (SELECT U0."dashboard_id" AS "dashboard_id"
- FROM "posthog_dashboardtile" U0
- INNER JOIN "posthog_dashboard" U1 ON (U0."dashboard_id" = U1."id")
- WHERE (NOT (U0."deleted"
- AND U0."deleted" IS NOT NULL)
- AND NOT (U1."deleted")))
- AND "posthog_dashboardtile"."insight_id" IN (1,
- 2,
- 3,
- 4,
- 5 /* ... */))
+ SELECT "posthog_filesystem"."team_id",
+ "posthog_filesystem"."id",
+ "posthog_filesystem"."path",
+ "posthog_filesystem"."depth",
+ "posthog_filesystem"."type",
+ "posthog_filesystem"."ref",
+ "posthog_filesystem"."href",
+ "posthog_filesystem"."shortcut",
+ "posthog_filesystem"."meta",
+ "posthog_filesystem"."created_at",
+ "posthog_filesystem"."created_by_id",
+ "posthog_filesystem"."surface",
+ "posthog_filesystem"."project_id"
+ FROM "posthog_filesystem"
+ WHERE (("posthog_filesystem"."surface" IS NULL
+ OR "posthog_filesystem"."surface" = 'web')
+ AND "posthog_filesystem"."ref" = '0001'
+ AND "posthog_filesystem"."team_id" = 99999
+ AND "posthog_filesystem"."type" = 'dashboard'
+ AND NOT ("posthog_filesystem"."shortcut"
+ AND "posthog_filesystem"."shortcut" IS NOT NULL))
'''
# ---
-# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.134
- '''
- SELECT "posthog_dashboardtile"."id",
- "posthog_dashboardtile"."dashboard_id",
- "posthog_dashboardtile"."insight_id",
- "posthog_dashboardtile"."text_id",
- "posthog_dashboardtile"."button_tile_id",
- "posthog_dashboardtile"."widget_id",
- "posthog_dashboardtile"."team_id",
- "posthog_dashboardtile"."layouts",
- "posthog_dashboardtile"."color",
- "posthog_dashboardtile"."filters_hash",
- "posthog_dashboardtile"."last_refresh",
- "posthog_dashboardtile"."refreshing",
- "posthog_dashboardtile"."refresh_attempt",
- "posthog_dashboardtile"."filters_overrides",
- "posthog_dashboardtile"."show_description",
- "posthog_dashboardtile"."transparent_background",
- "posthog_dashboardtile"."deleted"
- FROM "posthog_dashboardtile"
- INNER JOIN "posthog_dashboard" ON ("posthog_dashboardtile"."dashboard_id" = "posthog_dashboard"."id")
- WHERE (NOT ("posthog_dashboardtile"."deleted"
- AND "posthog_dashboardtile"."deleted" IS NOT NULL)
- AND NOT ("posthog_dashboard"."deleted")
- AND "posthog_dashboardtile"."insight_id" IN (1,
- 2,
- 3,
- 4,
- 5 /* ... */))
- '''
-# ---
-# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.135
- '''
- SELECT "posthog_dashboard"."id",
- "posthog_dashboard"."name",
- "posthog_dashboard"."description",
- "posthog_dashboard"."team_id",
- "posthog_dashboard"."pinned",
- "posthog_dashboard"."created_at",
- "posthog_dashboard"."created_by_id",
- "posthog_dashboard"."deleted",
- "posthog_dashboard"."last_accessed_at",
- "posthog_dashboard"."last_refresh",
- "posthog_dashboard"."filters",
- "posthog_dashboard"."variables",
- "posthog_dashboard"."breakdown_colors",
- "posthog_dashboard"."data_color_theme_id",
- "posthog_dashboard"."creation_mode",
- "posthog_dashboard"."restriction_level",
- "posthog_dashboard"."quick_filter_ids",
- "posthog_dashboard"."deprecated_tags",
- "posthog_dashboard"."tags",
- "posthog_dashboard"."share_token",
- "posthog_dashboard"."is_shared"
- FROM "posthog_dashboard"
- WHERE ("posthog_dashboard"."id") IN ((1,
- 2)/* ... */)
- '''
-# ---
-# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.136
- '''
- SELECT "posthog_taggeditem"."id",
- "posthog_taggeditem"."tag_id",
- "posthog_taggeditem"."dashboard_id",
- "posthog_taggeditem"."insight_id",
- "posthog_taggeditem"."event_definition_id",
- "posthog_taggeditem"."property_definition_id",
- "posthog_taggeditem"."action_id",
- "posthog_taggeditem"."feature_flag_id",
- "posthog_taggeditem"."experiment_saved_metric_id",
- "posthog_taggeditem"."ticket_id",
- "posthog_taggeditem"."account_id",
- "posthog_taggeditem"."endpoint_id",
- "posthog_tag"."id",
- "posthog_tag"."name",
- "posthog_tag"."team_id"
- FROM "posthog_taggeditem"
- INNER JOIN "posthog_tag" ON ("posthog_taggeditem"."tag_id" = "posthog_tag"."id")
- WHERE "posthog_taggeditem"."dashboard_id" IN (1,
- 2,
- 3,
- 4,
- 5 /* ... */)
- '''
-# ---
-# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.137
- '''
- SELECT "posthog_team"."id",
- "posthog_team"."uuid",
- "posthog_team"."organization_id",
- "posthog_team"."parent_team_id",
- "posthog_team"."project_id",
- "posthog_team"."api_token",
- "posthog_team"."app_urls",
- "posthog_team"."name",
- "posthog_team"."slack_incoming_webhook",
- "posthog_team"."created_at",
- "posthog_team"."updated_at",
- "posthog_team"."anonymize_ips",
- "posthog_team"."completed_snippet_onboarding",
- "posthog_team"."has_completed_onboarding_for",
- "posthog_team"."onboarding_tasks",
- "posthog_team"."ingested_event",
- "posthog_team"."ingested_production_event",
- "posthog_team"."ingested_production_event_last_checked_at",
- "posthog_team"."person_processing_opt_out",
- "posthog_team"."secret_api_token",
- "posthog_team"."secret_api_token_backup",
- "posthog_team"."session_recording_opt_in",
- "posthog_team"."session_recording_sample_rate",
- "posthog_team"."session_recording_minimum_duration_milliseconds",
- "posthog_team"."session_recording_linked_flag",
- "posthog_team"."session_recording_network_payload_capture_config",
- "posthog_team"."session_recording_masking_config",
- "posthog_team"."session_recording_url_trigger_config",
- "posthog_team"."session_recording_url_blocklist_config",
- "posthog_team"."session_recording_event_trigger_config",
- "posthog_team"."session_recording_trigger_match_type_config",
- "posthog_team"."session_recording_trigger_groups",
- "posthog_team"."session_replay_config",
- "posthog_team"."session_recording_retention_period",
- "posthog_team"."event_retention_months",
- "posthog_team"."conversations_enabled",
- "posthog_team"."conversations_settings",
- "posthog_team"."proactive_tasks_enabled",
- "posthog_team"."survey_config",
- "posthog_team"."surveys_opt_in",
- "posthog_team"."product_tours_opt_in",
- "posthog_team"."capture_console_log_opt_in",
- "posthog_team"."capture_performance_opt_in",
- "posthog_team"."capture_dead_clicks",
- "posthog_team"."autocapture_opt_out",
- "posthog_team"."autocapture_web_vitals_opt_in",
- "posthog_team"."autocapture_web_vitals_allowed_metrics",
- "posthog_team"."autocapture_exceptions_opt_in",
- "posthog_team"."autocapture_exceptions_errors_to_ignore",
- "posthog_team"."logs_settings",
- "posthog_team"."llm_gateway_enabled_at",
- "posthog_team"."llm_gateway_revoked_at",
- "posthog_team"."llm_gateway_overspend_allowance_usd",
- "posthog_team"."heatmaps_opt_in",
- "posthog_team"."receive_org_level_activity_logs",
- "posthog_team"."web_analytics_pre_aggregated_tables_enabled",
- "posthog_team"."web_analytics_pre_aggregated_tables_version",
- "posthog_team"."flags_persistence_default",
- "posthog_team"."feature_flag_confirmation_enabled",
- "posthog_team"."feature_flag_confirmation_message",
- "posthog_team"."default_evaluation_environments_enabled",
- "posthog_team"."require_evaluation_environment_tags",
- "posthog_team"."default_evaluation_contexts_enabled",
- "posthog_team"."require_evaluation_contexts",
- "posthog_team"."session_recording_version",
- "posthog_team"."signup_token",
- "posthog_team"."is_demo",
- "posthog_team"."access_control",
- "posthog_team"."week_start_day",
- "posthog_team"."inject_web_apps",
- "posthog_team"."test_account_filters",
- "posthog_team"."test_account_filters_default_checked",
- "posthog_team"."path_cleaning_filters",
- "posthog_team"."timezone",
- "posthog_team"."data_attributes",
- "posthog_team"."person_display_name_properties",
- "posthog_team"."live_events_columns",
- "posthog_team"."recording_domains",
- "posthog_team"."human_friendly_comparison_periods",
- "posthog_team"."cookieless_server_hash_mode",
- "posthog_team"."primary_dashboard_id",
- "posthog_team"."default_data_theme",
- "posthog_team"."extra_settings",
- "posthog_team"."modifiers",
- "posthog_team"."correlation_config",
- "posthog_team"."session_recording_retention_period_days",
- "posthog_team"."external_data_workspace_id",
- "posthog_team"."external_data_workspace_last_synced_at",
- "posthog_team"."api_query_rate_limit",
- "posthog_team"."drop_events_older_than",
- "posthog_team"."base_currency",
- "posthog_team"."experiment_recalculation_time",
- "posthog_team"."default_experiment_confidence_level",
- "posthog_team"."default_experiment_stats_method",
- "posthog_team"."business_model"
- FROM "posthog_team"
- WHERE "posthog_team"."id" = 99999
- LIMIT 21
- '''
-# ---
-# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.138
- '''
- SELECT "posthog_filesystem"."team_id",
- "posthog_filesystem"."id",
- "posthog_filesystem"."path",
- "posthog_filesystem"."depth",
- "posthog_filesystem"."type",
- "posthog_filesystem"."ref",
- "posthog_filesystem"."href",
- "posthog_filesystem"."shortcut",
- "posthog_filesystem"."meta",
- "posthog_filesystem"."created_at",
- "posthog_filesystem"."created_by_id",
- "posthog_filesystem"."surface",
- "posthog_filesystem"."project_id"
- FROM "posthog_filesystem"
- WHERE (("posthog_filesystem"."surface" IS NULL
- OR "posthog_filesystem"."surface" = 'web')
- AND "posthog_filesystem"."ref" = '0001'
- AND "posthog_filesystem"."team_id" = 99999
- AND "posthog_filesystem"."type" = 'dashboard'
- AND NOT ("posthog_filesystem"."shortcut"
- AND "posthog_filesystem"."shortcut" IS NOT NULL))
- '''
-# ---
-# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.139
- '''
- SELECT "posthog_filesystemshortcut"."id",
- "posthog_filesystemshortcut"."team_id",
- "posthog_filesystemshortcut"."user_id",
- "posthog_filesystemshortcut"."path",
- "posthog_filesystemshortcut"."type",
- "posthog_filesystemshortcut"."ref",
- "posthog_filesystemshortcut"."href",
- "posthog_filesystemshortcut"."order",
- "posthog_filesystemshortcut"."created_at",
- "posthog_filesystemshortcut"."surface"
- FROM "posthog_filesystemshortcut"
- WHERE (("posthog_filesystemshortcut"."surface" IS NULL
- OR "posthog_filesystemshortcut"."surface" = 'web')
- AND "posthog_filesystemshortcut"."ref" = '0001'
- AND "posthog_filesystemshortcut"."team_id" = 99999
- AND "posthog_filesystemshortcut"."type" = 'dashboard'
- AND NOT ("posthog_filesystemshortcut"."path" = 'dashboard-1'
- AND "posthog_filesystemshortcut"."href" = '__skipped__'
- AND "posthog_filesystemshortcut"."href" IS NOT NULL))
- '''
-# ---
-# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.14
- '''
- SELECT "posthog_sharingconfiguration"."id",
- "posthog_sharingconfiguration"."team_id",
- "posthog_sharingconfiguration"."dashboard_id",
- "posthog_sharingconfiguration"."insight_id",
- "posthog_sharingconfiguration"."recording_id",
- "posthog_sharingconfiguration"."notebook_id",
- "posthog_sharingconfiguration"."interviewee_context_id",
- "posthog_sharingconfiguration"."created_at",
- "posthog_sharingconfiguration"."enabled",
- "posthog_sharingconfiguration"."access_token",
- "posthog_sharingconfiguration"."expires_at",
- "posthog_sharingconfiguration"."settings",
- "posthog_sharingconfiguration"."password_required"
- FROM "posthog_sharingconfiguration"
- WHERE "posthog_sharingconfiguration"."dashboard_id" = 99999
- '''
-# ---
-# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.140
- '''
- SELECT "posthog_insightvariable"."created_by_id",
- "posthog_insightvariable"."created_at",
- "posthog_insightvariable"."updated_at",
- "posthog_insightvariable"."id",
- "posthog_insightvariable"."team_id",
- "posthog_insightvariable"."name",
- "posthog_insightvariable"."code_name",
- "posthog_insightvariable"."type",
- "posthog_insightvariable"."default_value",
- "posthog_insightvariable"."values"
- FROM "posthog_insightvariable"
- WHERE "posthog_insightvariable"."team_id" = 99999
- '''
-# ---
-# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.141
+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.139
+ '''
+ SELECT "posthog_filesystemshortcut"."id",
+ "posthog_filesystemshortcut"."team_id",
+ "posthog_filesystemshortcut"."user_id",
+ "posthog_filesystemshortcut"."path",
+ "posthog_filesystemshortcut"."type",
+ "posthog_filesystemshortcut"."ref",
+ "posthog_filesystemshortcut"."href",
+ "posthog_filesystemshortcut"."order",
+ "posthog_filesystemshortcut"."created_at",
+ "posthog_filesystemshortcut"."surface"
+ FROM "posthog_filesystemshortcut"
+ WHERE (("posthog_filesystemshortcut"."surface" IS NULL
+ OR "posthog_filesystemshortcut"."surface" = 'web')
+ AND "posthog_filesystemshortcut"."ref" = '0001'
+ AND "posthog_filesystemshortcut"."team_id" = 99999
+ AND "posthog_filesystemshortcut"."type" = 'dashboard'
+ AND NOT ("posthog_filesystemshortcut"."path" = 'dashboard-1'
+ AND "posthog_filesystemshortcut"."href" = '__skipped__'
+ AND "posthog_filesystemshortcut"."href" IS NOT NULL))
+ '''
+# ---
+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.14
+ '''
+ SELECT "posthog_sharingconfiguration"."id",
+ "posthog_sharingconfiguration"."team_id",
+ "posthog_sharingconfiguration"."dashboard_id",
+ "posthog_sharingconfiguration"."insight_id",
+ "posthog_sharingconfiguration"."recording_id",
+ "posthog_sharingconfiguration"."notebook_id",
+ "posthog_sharingconfiguration"."interviewee_context_id",
+ "posthog_sharingconfiguration"."created_at",
+ "posthog_sharingconfiguration"."enabled",
+ "posthog_sharingconfiguration"."access_token",
+ "posthog_sharingconfiguration"."expires_at",
+ "posthog_sharingconfiguration"."settings",
+ "posthog_sharingconfiguration"."password_required"
+ FROM "posthog_sharingconfiguration"
+ WHERE "posthog_sharingconfiguration"."dashboard_id" = 99999
+ '''
+# ---
+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.140
+ '''
+ SELECT "posthog_insightvariable"."created_by_id",
+ "posthog_insightvariable"."created_at",
+ "posthog_insightvariable"."updated_at",
+ "posthog_insightvariable"."id",
+ "posthog_insightvariable"."team_id",
+ "posthog_insightvariable"."name",
+ "posthog_insightvariable"."code_name",
+ "posthog_insightvariable"."type",
+ "posthog_insightvariable"."default_value",
+ "posthog_insightvariable"."values"
+ FROM "posthog_insightvariable"
+ WHERE "posthog_insightvariable"."team_id" = 99999
+ '''
+# ---
+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.141
'''
SELECT "posthog_dashboardtile"."id",
"posthog_dashboardtile"."dashboard_id",
@@ -7573,4177 +6293,222 @@
"posthog_dashboard"."deprecated_tags",
"posthog_dashboard"."tags",
"posthog_dashboard"."share_token",
- "posthog_dashboard"."is_shared"
- FROM "posthog_dashboard"
- INNER JOIN "posthog_dashboardtile" ON ("posthog_dashboard"."id" = "posthog_dashboardtile"."dashboard_id")
- WHERE (NOT ("posthog_dashboard"."deleted")
- AND "posthog_dashboard"."id" IN
- (SELECT U0."dashboard_id" AS "dashboard_id"
- FROM "posthog_dashboardtile" U0
- INNER JOIN "posthog_dashboard" U1 ON (U0."dashboard_id" = U1."id")
- WHERE (NOT (U0."deleted"
- AND U0."deleted" IS NOT NULL)
- AND NOT (U1."deleted")))
- AND "posthog_dashboardtile"."insight_id" IN (1,
- 2,
- 3,
- 4,
- 5 /* ... */))
- '''
-# ---
-# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.143
- '''
- SELECT "posthog_dashboardtile"."id",
- "posthog_dashboardtile"."dashboard_id",
- "posthog_dashboardtile"."insight_id",
- "posthog_dashboardtile"."text_id",
- "posthog_dashboardtile"."button_tile_id",
- "posthog_dashboardtile"."widget_id",
- "posthog_dashboardtile"."team_id",
- "posthog_dashboardtile"."layouts",
- "posthog_dashboardtile"."color",
- "posthog_dashboardtile"."filters_hash",
- "posthog_dashboardtile"."last_refresh",
- "posthog_dashboardtile"."refreshing",
- "posthog_dashboardtile"."refresh_attempt",
- "posthog_dashboardtile"."filters_overrides",
- "posthog_dashboardtile"."show_description",
- "posthog_dashboardtile"."transparent_background",
- "posthog_dashboardtile"."deleted"
- FROM "posthog_dashboardtile"
- INNER JOIN "posthog_dashboard" ON ("posthog_dashboardtile"."dashboard_id" = "posthog_dashboard"."id")
- WHERE (NOT ("posthog_dashboardtile"."deleted"
- AND "posthog_dashboardtile"."deleted" IS NOT NULL)
- AND NOT ("posthog_dashboard"."deleted")
- AND "posthog_dashboardtile"."insight_id" IN (1,
- 2,
- 3,
- 4,
- 5 /* ... */))
- '''
-# ---
-# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.144
- '''
- SELECT "posthog_dashboard"."id",
- "posthog_dashboard"."name",
- "posthog_dashboard"."description",
- "posthog_dashboard"."team_id",
- "posthog_dashboard"."pinned",
- "posthog_dashboard"."created_at",
- "posthog_dashboard"."created_by_id",
- "posthog_dashboard"."deleted",
- "posthog_dashboard"."last_accessed_at",
- "posthog_dashboard"."last_refresh",
- "posthog_dashboard"."filters",
- "posthog_dashboard"."variables",
- "posthog_dashboard"."breakdown_colors",
- "posthog_dashboard"."data_color_theme_id",
- "posthog_dashboard"."creation_mode",
- "posthog_dashboard"."restriction_level",
- "posthog_dashboard"."quick_filter_ids",
- "posthog_dashboard"."deprecated_tags",
- "posthog_dashboard"."tags",
- "posthog_dashboard"."share_token",
- "posthog_dashboard"."is_shared"
- FROM "posthog_dashboard"
- WHERE ("posthog_dashboard"."id") IN ((1,
- 2)/* ... */)
- '''
-# ---
-# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.145
- '''
- SELECT "posthog_taggeditem"."id",
- "posthog_taggeditem"."tag_id",
- "posthog_taggeditem"."dashboard_id",
- "posthog_taggeditem"."insight_id",
- "posthog_taggeditem"."event_definition_id",
- "posthog_taggeditem"."property_definition_id",
- "posthog_taggeditem"."action_id",
- "posthog_taggeditem"."feature_flag_id",
- "posthog_taggeditem"."experiment_saved_metric_id",
- "posthog_taggeditem"."ticket_id",
- "posthog_taggeditem"."account_id",
- "posthog_taggeditem"."endpoint_id",
- "posthog_tag"."id",
- "posthog_tag"."name",
- "posthog_tag"."team_id"
- FROM "posthog_taggeditem"
- INNER JOIN "posthog_tag" ON ("posthog_taggeditem"."tag_id" = "posthog_tag"."id")
- WHERE "posthog_taggeditem"."insight_id" IN (1,
- 2,
- 3,
- 4,
- 5 /* ... */)
- '''
-# ---
-# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.146
- '''
- SELECT "posthog_alertconfiguration"."created_by_id",
- "posthog_alertconfiguration"."created_at",
- "posthog_alertconfiguration"."id",
- "posthog_alertconfiguration"."team_id",
- "posthog_alertconfiguration"."insight_id",
- "posthog_alertconfiguration"."name",
- "posthog_alertconfiguration"."config",
- "posthog_alertconfiguration"."calculation_interval",
- "posthog_alertconfiguration"."threshold_id",
- "posthog_alertconfiguration"."condition",
- "posthog_alertconfiguration"."detector_config",
- "posthog_alertconfiguration"."state",
- "posthog_alertconfiguration"."enabled",
- "posthog_alertconfiguration"."last_notified_at",
- "posthog_alertconfiguration"."last_checked_at",
- "posthog_alertconfiguration"."next_check_at",
- "posthog_alertconfiguration"."snoozed_until",
- "posthog_alertconfiguration"."skip_weekend",
- "posthog_alertconfiguration"."schedule_restriction",
- "posthog_alertconfiguration"."investigation_agent_enabled",
- "posthog_alertconfiguration"."investigation_gates_notifications",
- "posthog_alertconfiguration"."investigation_inconclusive_action",
- "posthog_user"."id",
- "posthog_user"."password",
- "posthog_user"."last_login",
- "posthog_user"."first_name",
- "posthog_user"."last_name",
- "posthog_user"."is_staff",
- "posthog_user"."date_joined",
- "posthog_user"."uuid",
- "posthog_user"."current_organization_id",
- "posthog_user"."current_team_id",
- "posthog_user"."email",
- "posthog_user"."pending_email",
- "posthog_user"."distinct_id",
- "posthog_user"."is_email_verified",
- "posthog_user"."credentials_reviewed_at",
- "posthog_user"."requested_password_reset_at",
- "posthog_user"."requested_2fa_reset_at",
- "posthog_user"."has_seen_product_intro_for",
- "posthog_user"."strapi_id",
- "posthog_user"."is_active",
- "posthog_user"."role_at_organization",
- "posthog_user"."theme_mode",
- "posthog_user"."partial_notification_settings",
- "posthog_user"."anonymize_data",
- "posthog_user"."allow_impersonation",
- "posthog_user"."toolbar_mode",
- "posthog_user"."hedgehog_config",
- "posthog_user"."allow_sidebar_suggestions",
- "posthog_user"."shortcut_position",
- "posthog_user"."passkeys_enabled_for_2fa",
- "posthog_user"."hide_mcp_hints",
- "posthog_user"."onboarding_skipped_at",
- "posthog_user"."onboarding_skipped_reason",
- "posthog_user"."onboarding_skipped_organization_id",
- "posthog_user"."onboarding_delegated_to_invite_id",
- "posthog_user"."onboarding_delegated_to_organization_id",
- "posthog_user"."onboarding_delegation_accepted_at",
- "posthog_user"."events_column_config",
- "posthog_user"."email_opt_in",
- "posthog_threshold"."created_by_id",
- "posthog_threshold"."created_at",
- "posthog_threshold"."id",
- "posthog_threshold"."team_id",
- "posthog_threshold"."insight_id",
- "posthog_threshold"."name",
- "posthog_threshold"."configuration"
- FROM "posthog_alertconfiguration"
- LEFT OUTER JOIN "posthog_user" ON ("posthog_alertconfiguration"."created_by_id" = "posthog_user"."id")
- LEFT OUTER JOIN "posthog_threshold" ON ("posthog_alertconfiguration"."threshold_id" = "posthog_threshold"."id")
- WHERE "posthog_alertconfiguration"."insight_id" IN (1,
- 2,
- 3,
- 4,
- 5 /* ... */)
- '''
-# ---
-# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.147
- '''
- SELECT "posthog_dashboard"."id",
- "posthog_dashboard"."name",
- "posthog_dashboard"."description",
- "posthog_dashboard"."team_id",
- "posthog_dashboard"."pinned",
- "posthog_dashboard"."created_at",
- "posthog_dashboard"."created_by_id",
- "posthog_dashboard"."deleted",
- "posthog_dashboard"."last_accessed_at",
- "posthog_dashboard"."last_refresh",
- "posthog_dashboard"."filters",
- "posthog_dashboard"."variables",
- "posthog_dashboard"."breakdown_colors",
- "posthog_dashboard"."data_color_theme_id",
- "posthog_dashboard"."creation_mode",
- "posthog_dashboard"."restriction_level",
- "posthog_dashboard"."quick_filter_ids",
- "posthog_dashboard"."deprecated_tags",
- "posthog_dashboard"."tags",
- "posthog_dashboard"."share_token",
- "posthog_dashboard"."is_shared"
- FROM "posthog_dashboard"
- WHERE (NOT ("posthog_dashboard"."deleted")
- AND "posthog_dashboard"."id" IN (1,
- 2,
- 3,
- 4,
- 5 /* ... */))
- '''
-# ---
-# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.148
- '''
- SELECT COUNT(*) AS "__count"
- FROM "posthog_dashboardtile"
- INNER JOIN "posthog_dashboard" ON ("posthog_dashboardtile"."dashboard_id" = "posthog_dashboard"."id")
- WHERE (NOT ("posthog_dashboardtile"."deleted"
- AND "posthog_dashboardtile"."deleted" IS NOT NULL)
- AND NOT ("posthog_dashboard"."deleted")
- AND "posthog_dashboardtile"."dashboard_id" = 99999
- AND NOT ("posthog_dashboardtile"."deleted"
- AND "posthog_dashboardtile"."deleted" IS NOT NULL))
- '''
-# ---
-# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.149
- '''
- SELECT "posthog_dashboard"."id",
- "posthog_dashboard"."name",
- "posthog_dashboard"."description",
- "posthog_dashboard"."team_id",
- "posthog_dashboard"."pinned",
- "posthog_dashboard"."created_at",
- "posthog_dashboard"."created_by_id",
- "posthog_dashboard"."deleted",
- "posthog_dashboard"."last_accessed_at",
- "posthog_dashboard"."last_refresh",
- "posthog_dashboard"."filters",
- "posthog_dashboard"."variables",
- "posthog_dashboard"."breakdown_colors",
- "posthog_dashboard"."data_color_theme_id",
- "posthog_dashboard"."creation_mode",
- "posthog_dashboard"."restriction_level",
- "posthog_dashboard"."quick_filter_ids",
- "posthog_dashboard"."deprecated_tags",
- "posthog_dashboard"."tags",
- "posthog_dashboard"."share_token",
- "posthog_dashboard"."is_shared"
- FROM "posthog_dashboard"
- WHERE (NOT ("posthog_dashboard"."deleted")
- AND "posthog_dashboard"."id" IN (1,
- 2,
- 3,
- 4,
- 5 /* ... */))
- '''
-# ---
-# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.15
- '''
- SELECT "posthog_insightvariable"."created_by_id",
- "posthog_insightvariable"."created_at",
- "posthog_insightvariable"."updated_at",
- "posthog_insightvariable"."id",
- "posthog_insightvariable"."team_id",
- "posthog_insightvariable"."name",
- "posthog_insightvariable"."code_name",
- "posthog_insightvariable"."type",
- "posthog_insightvariable"."default_value",
- "posthog_insightvariable"."values"
- FROM "posthog_insightvariable"
- WHERE "posthog_insightvariable"."team_id" = 99999
- '''
-# ---
-# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.150
- '''
- SELECT "posthog_team"."id",
- "posthog_team"."uuid",
- "posthog_team"."organization_id",
- "posthog_team"."parent_team_id",
- "posthog_team"."project_id",
- "posthog_team"."api_token",
- "posthog_team"."app_urls",
- "posthog_team"."name",
- "posthog_team"."slack_incoming_webhook",
- "posthog_team"."created_at",
- "posthog_team"."updated_at",
- "posthog_team"."anonymize_ips",
- "posthog_team"."completed_snippet_onboarding",
- "posthog_team"."has_completed_onboarding_for",
- "posthog_team"."onboarding_tasks",
- "posthog_team"."ingested_event",
- "posthog_team"."ingested_production_event",
- "posthog_team"."ingested_production_event_last_checked_at",
- "posthog_team"."person_processing_opt_out",
- "posthog_team"."secret_api_token",
- "posthog_team"."secret_api_token_backup",
- "posthog_team"."session_recording_opt_in",
- "posthog_team"."session_recording_sample_rate",
- "posthog_team"."session_recording_minimum_duration_milliseconds",
- "posthog_team"."session_recording_linked_flag",
- "posthog_team"."session_recording_network_payload_capture_config",
- "posthog_team"."session_recording_masking_config",
- "posthog_team"."session_recording_url_trigger_config",
- "posthog_team"."session_recording_url_blocklist_config",
- "posthog_team"."session_recording_event_trigger_config",
- "posthog_team"."session_recording_trigger_match_type_config",
- "posthog_team"."session_recording_trigger_groups",
- "posthog_team"."session_replay_config",
- "posthog_team"."session_recording_retention_period",
- "posthog_team"."event_retention_months",
- "posthog_team"."conversations_enabled",
- "posthog_team"."conversations_settings",
- "posthog_team"."proactive_tasks_enabled",
- "posthog_team"."survey_config",
- "posthog_team"."surveys_opt_in",
- "posthog_team"."product_tours_opt_in",
- "posthog_team"."capture_console_log_opt_in",
- "posthog_team"."capture_performance_opt_in",
- "posthog_team"."capture_dead_clicks",
- "posthog_team"."autocapture_opt_out",
- "posthog_team"."autocapture_web_vitals_opt_in",
- "posthog_team"."autocapture_web_vitals_allowed_metrics",
- "posthog_team"."autocapture_exceptions_opt_in",
- "posthog_team"."autocapture_exceptions_errors_to_ignore",
- "posthog_team"."logs_settings",
- "posthog_team"."llm_gateway_enabled_at",
- "posthog_team"."llm_gateway_revoked_at",
- "posthog_team"."llm_gateway_overspend_allowance_usd",
- "posthog_team"."heatmaps_opt_in",
- "posthog_team"."receive_org_level_activity_logs",
- "posthog_team"."web_analytics_pre_aggregated_tables_enabled",
- "posthog_team"."web_analytics_pre_aggregated_tables_version",
- "posthog_team"."flags_persistence_default",
- "posthog_team"."feature_flag_confirmation_enabled",
- "posthog_team"."feature_flag_confirmation_message",
- "posthog_team"."default_evaluation_environments_enabled",
- "posthog_team"."require_evaluation_environment_tags",
- "posthog_team"."default_evaluation_contexts_enabled",
- "posthog_team"."require_evaluation_contexts",
- "posthog_team"."session_recording_version",
- "posthog_team"."signup_token",
- "posthog_team"."is_demo",
- "posthog_team"."access_control",
- "posthog_team"."week_start_day",
- "posthog_team"."inject_web_apps",
- "posthog_team"."test_account_filters",
- "posthog_team"."test_account_filters_default_checked",
- "posthog_team"."path_cleaning_filters",
- "posthog_team"."timezone",
- "posthog_team"."data_attributes",
- "posthog_team"."person_display_name_properties",
- "posthog_team"."live_events_columns",
- "posthog_team"."recording_domains",
- "posthog_team"."human_friendly_comparison_periods",
- "posthog_team"."cookieless_server_hash_mode",
- "posthog_team"."primary_dashboard_id",
- "posthog_team"."default_data_theme",
- "posthog_team"."extra_settings",
- "posthog_team"."modifiers",
- "posthog_team"."correlation_config",
- "posthog_team"."session_recording_retention_period_days",
- "posthog_team"."external_data_workspace_id",
- "posthog_team"."external_data_workspace_last_synced_at",
- "posthog_team"."api_query_rate_limit",
- "posthog_team"."drop_events_older_than",
- "posthog_team"."base_currency",
- "posthog_team"."experiment_recalculation_time",
- "posthog_team"."default_experiment_confidence_level",
- "posthog_team"."default_experiment_stats_method",
- "posthog_team"."business_model"
- FROM "posthog_team"
- WHERE "posthog_team"."id" = 99999
- LIMIT 21
- '''
-# ---
-# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.151
- '''
- SELECT "posthog_filesystem"."team_id",
- "posthog_filesystem"."id",
- "posthog_filesystem"."path",
- "posthog_filesystem"."depth",
- "posthog_filesystem"."type",
- "posthog_filesystem"."ref",
- "posthog_filesystem"."href",
- "posthog_filesystem"."shortcut",
- "posthog_filesystem"."meta",
- "posthog_filesystem"."created_at",
- "posthog_filesystem"."created_by_id",
- "posthog_filesystem"."surface",
- "posthog_filesystem"."project_id"
- FROM "posthog_filesystem"
- WHERE (("posthog_filesystem"."surface" IS NULL
- OR "posthog_filesystem"."surface" = 'web')
- AND "posthog_filesystem"."ref" = '0001'
- AND "posthog_filesystem"."team_id" = 99999
- AND "posthog_filesystem"."type" = 'insight'
- AND NOT ("posthog_filesystem"."shortcut"
- AND "posthog_filesystem"."shortcut" IS NOT NULL))
- '''
-# ---
-# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.152
- '''
- SELECT "posthog_team"."id",
- "posthog_team"."uuid",
- "posthog_team"."organization_id",
- "posthog_team"."parent_team_id",
- "posthog_team"."project_id",
- "posthog_team"."api_token",
- "posthog_team"."app_urls",
- "posthog_team"."name",
- "posthog_team"."slack_incoming_webhook",
- "posthog_team"."created_at",
- "posthog_team"."updated_at",
- "posthog_team"."anonymize_ips",
- "posthog_team"."completed_snippet_onboarding",
- "posthog_team"."has_completed_onboarding_for",
- "posthog_team"."onboarding_tasks",
- "posthog_team"."ingested_event",
- "posthog_team"."ingested_production_event",
- "posthog_team"."ingested_production_event_last_checked_at",
- "posthog_team"."person_processing_opt_out",
- "posthog_team"."secret_api_token",
- "posthog_team"."secret_api_token_backup",
- "posthog_team"."session_recording_opt_in",
- "posthog_team"."session_recording_sample_rate",
- "posthog_team"."session_recording_minimum_duration_milliseconds",
- "posthog_team"."session_recording_linked_flag",
- "posthog_team"."session_recording_network_payload_capture_config",
- "posthog_team"."session_recording_masking_config",
- "posthog_team"."session_recording_url_trigger_config",
- "posthog_team"."session_recording_url_blocklist_config",
- "posthog_team"."session_recording_event_trigger_config",
- "posthog_team"."session_recording_trigger_match_type_config",
- "posthog_team"."session_recording_trigger_groups",
- "posthog_team"."session_replay_config",
- "posthog_team"."session_recording_retention_period",
- "posthog_team"."event_retention_months",
- "posthog_team"."conversations_enabled",
- "posthog_team"."conversations_settings",
- "posthog_team"."proactive_tasks_enabled",
- "posthog_team"."survey_config",
- "posthog_team"."surveys_opt_in",
- "posthog_team"."product_tours_opt_in",
- "posthog_team"."capture_console_log_opt_in",
- "posthog_team"."capture_performance_opt_in",
- "posthog_team"."capture_dead_clicks",
- "posthog_team"."autocapture_opt_out",
- "posthog_team"."autocapture_web_vitals_opt_in",
- "posthog_team"."autocapture_web_vitals_allowed_metrics",
- "posthog_team"."autocapture_exceptions_opt_in",
- "posthog_team"."autocapture_exceptions_errors_to_ignore",
- "posthog_team"."logs_settings",
- "posthog_team"."llm_gateway_enabled_at",
- "posthog_team"."llm_gateway_revoked_at",
- "posthog_team"."llm_gateway_overspend_allowance_usd",
- "posthog_team"."heatmaps_opt_in",
- "posthog_team"."receive_org_level_activity_logs",
- "posthog_team"."web_analytics_pre_aggregated_tables_enabled",
- "posthog_team"."web_analytics_pre_aggregated_tables_version",
- "posthog_team"."flags_persistence_default",
- "posthog_team"."feature_flag_confirmation_enabled",
- "posthog_team"."feature_flag_confirmation_message",
- "posthog_team"."default_evaluation_environments_enabled",
- "posthog_team"."require_evaluation_environment_tags",
- "posthog_team"."default_evaluation_contexts_enabled",
- "posthog_team"."require_evaluation_contexts",
- "posthog_team"."session_recording_version",
- "posthog_team"."signup_token",
- "posthog_team"."is_demo",
- "posthog_team"."access_control",
- "posthog_team"."week_start_day",
- "posthog_team"."inject_web_apps",
- "posthog_team"."test_account_filters",
- "posthog_team"."test_account_filters_default_checked",
- "posthog_team"."path_cleaning_filters",
- "posthog_team"."timezone",
- "posthog_team"."data_attributes",
- "posthog_team"."person_display_name_properties",
- "posthog_team"."live_events_columns",
- "posthog_team"."recording_domains",
- "posthog_team"."human_friendly_comparison_periods",
- "posthog_team"."cookieless_server_hash_mode",
- "posthog_team"."primary_dashboard_id",
- "posthog_team"."default_data_theme",
- "posthog_team"."extra_settings",
- "posthog_team"."modifiers",
- "posthog_team"."correlation_config",
- "posthog_team"."session_recording_retention_period_days",
- "posthog_team"."external_data_workspace_id",
- "posthog_team"."external_data_workspace_last_synced_at",
- "posthog_team"."api_query_rate_limit",
- "posthog_team"."drop_events_older_than",
- "posthog_team"."base_currency",
- "posthog_team"."experiment_recalculation_time",
- "posthog_team"."default_experiment_confidence_level",
- "posthog_team"."default_experiment_stats_method",
- "posthog_team"."business_model"
- FROM "posthog_team"
- WHERE "posthog_team"."id" = 99999
- LIMIT 21
- '''
-# ---
-# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.153
- '''
- SELECT "posthog_dashboarditem"."id",
- "posthog_dashboarditem"."name",
- "posthog_dashboarditem"."derived_name",
- "posthog_dashboarditem"."description",
- "posthog_dashboarditem"."team_id",
- "posthog_dashboarditem"."filters",
- "posthog_dashboarditem"."filters_hash",
- "posthog_dashboarditem"."query",
- "posthog_dashboarditem"."query_metadata",
- "posthog_dashboarditem"."order",
- "posthog_dashboarditem"."deleted",
- "posthog_dashboarditem"."saved",
- "posthog_dashboarditem"."created_at",
- "posthog_dashboarditem"."refreshing",
- "posthog_dashboarditem"."created_by_id",
- "posthog_dashboarditem"."is_sample",
- "posthog_dashboarditem"."short_id",
- "posthog_dashboarditem"."favorited",
- "posthog_dashboarditem"."refresh_attempt",
- "posthog_dashboarditem"."last_modified_at",
- "posthog_dashboarditem"."last_modified_by_id",
- "posthog_dashboarditem"."dashboard_id",
- "posthog_dashboarditem"."last_refresh",
- "posthog_dashboarditem"."layouts",
- "posthog_dashboarditem"."color",
- "posthog_dashboarditem"."dive_dashboard_id",
- "posthog_dashboarditem"."updated_at",
- "posthog_dashboarditem"."deprecated_tags",
- "posthog_dashboarditem"."tags"
- FROM "posthog_dashboarditem"
- WHERE "posthog_dashboarditem"."id" = 99999
- LIMIT 21
- '''
-# ---
-# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.154
- '''
- SELECT "posthog_team"."id",
- "posthog_team"."uuid",
- "posthog_team"."organization_id",
- "posthog_team"."parent_team_id",
- "posthog_team"."project_id",
- "posthog_team"."api_token",
- "posthog_team"."app_urls",
- "posthog_team"."name",
- "posthog_team"."slack_incoming_webhook",
- "posthog_team"."created_at",
- "posthog_team"."updated_at",
- "posthog_team"."anonymize_ips",
- "posthog_team"."completed_snippet_onboarding",
- "posthog_team"."has_completed_onboarding_for",
- "posthog_team"."onboarding_tasks",
- "posthog_team"."ingested_event",
- "posthog_team"."ingested_production_event",
- "posthog_team"."ingested_production_event_last_checked_at",
- "posthog_team"."person_processing_opt_out",
- "posthog_team"."secret_api_token",
- "posthog_team"."secret_api_token_backup",
- "posthog_team"."session_recording_opt_in",
- "posthog_team"."session_recording_sample_rate",
- "posthog_team"."session_recording_minimum_duration_milliseconds",
- "posthog_team"."session_recording_linked_flag",
- "posthog_team"."session_recording_network_payload_capture_config",
- "posthog_team"."session_recording_masking_config",
- "posthog_team"."session_recording_url_trigger_config",
- "posthog_team"."session_recording_url_blocklist_config",
- "posthog_team"."session_recording_event_trigger_config",
- "posthog_team"."session_recording_trigger_match_type_config",
- "posthog_team"."session_recording_trigger_groups",
- "posthog_team"."session_replay_config",
- "posthog_team"."session_recording_retention_period",
- "posthog_team"."event_retention_months",
- "posthog_team"."conversations_enabled",
- "posthog_team"."conversations_settings",
- "posthog_team"."proactive_tasks_enabled",
- "posthog_team"."survey_config",
- "posthog_team"."surveys_opt_in",
- "posthog_team"."product_tours_opt_in",
- "posthog_team"."capture_console_log_opt_in",
- "posthog_team"."capture_performance_opt_in",
- "posthog_team"."capture_dead_clicks",
- "posthog_team"."autocapture_opt_out",
- "posthog_team"."autocapture_web_vitals_opt_in",
- "posthog_team"."autocapture_web_vitals_allowed_metrics",
- "posthog_team"."autocapture_exceptions_opt_in",
- "posthog_team"."autocapture_exceptions_errors_to_ignore",
- "posthog_team"."logs_settings",
- "posthog_team"."llm_gateway_enabled_at",
- "posthog_team"."llm_gateway_revoked_at",
- "posthog_team"."llm_gateway_overspend_allowance_usd",
- "posthog_team"."heatmaps_opt_in",
- "posthog_team"."receive_org_level_activity_logs",
- "posthog_team"."web_analytics_pre_aggregated_tables_enabled",
- "posthog_team"."web_analytics_pre_aggregated_tables_version",
- "posthog_team"."flags_persistence_default",
- "posthog_team"."feature_flag_confirmation_enabled",
- "posthog_team"."feature_flag_confirmation_message",
- "posthog_team"."default_evaluation_environments_enabled",
- "posthog_team"."require_evaluation_environment_tags",
- "posthog_team"."default_evaluation_contexts_enabled",
- "posthog_team"."require_evaluation_contexts",
- "posthog_team"."session_recording_version",
- "posthog_team"."signup_token",
- "posthog_team"."is_demo",
- "posthog_team"."access_control",
- "posthog_team"."week_start_day",
- "posthog_team"."inject_web_apps",
- "posthog_team"."test_account_filters",
- "posthog_team"."test_account_filters_default_checked",
- "posthog_team"."path_cleaning_filters",
- "posthog_team"."timezone",
- "posthog_team"."data_attributes",
- "posthog_team"."person_display_name_properties",
- "posthog_team"."live_events_columns",
- "posthog_team"."recording_domains",
- "posthog_team"."human_friendly_comparison_periods",
- "posthog_team"."cookieless_server_hash_mode",
- "posthog_team"."primary_dashboard_id",
- "posthog_team"."default_data_theme",
- "posthog_team"."extra_settings",
- "posthog_team"."modifiers",
- "posthog_team"."correlation_config",
- "posthog_team"."session_recording_retention_period_days",
- "posthog_team"."external_data_workspace_id",
- "posthog_team"."external_data_workspace_last_synced_at",
- "posthog_team"."api_query_rate_limit",
- "posthog_team"."drop_events_older_than",
- "posthog_team"."base_currency",
- "posthog_team"."experiment_recalculation_time",
- "posthog_team"."default_experiment_confidence_level",
- "posthog_team"."default_experiment_stats_method",
- "posthog_team"."business_model"
- FROM "posthog_team"
- WHERE "posthog_team"."id" = 99999
- LIMIT 21
- '''
-# ---
-# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.155
- '''
- SELECT "posthog_organization"."id",
- "posthog_organization"."name",
- "posthog_organization"."slug",
- "posthog_organization"."logo_media_id",
- "posthog_organization"."created_at",
- "posthog_organization"."updated_at",
- "posthog_organization"."is_active",
- "posthog_organization"."is_not_active_reason",
- "posthog_organization"."session_cookie_age",
- "posthog_organization"."is_member_join_email_enabled",
- "posthog_organization"."is_ai_data_processing_approved",
- "posthog_organization"."is_ai_training_opted_in",
- "posthog_organization"."is_ai_training_locked",
- "posthog_organization"."is_ai_training_cta_shown",
- "posthog_organization"."enforce_2fa",
- "posthog_organization"."members_can_invite",
- "posthog_organization"."members_can_create_projects",
- "posthog_organization"."members_can_use_personal_api_keys",
- "posthog_organization"."allow_publicly_shared_resources",
- "posthog_organization"."default_role_id",
- "posthog_organization"."plugins_access_level",
- "posthog_organization"."for_internal_metrics",
- "posthog_organization"."default_experiment_stats_method",
- "posthog_organization"."default_anonymize_ips",
- "posthog_organization"."is_hipaa",
- "posthog_organization"."is_pending_deletion",
- "posthog_organization"."customer_id",
- "posthog_organization"."available_product_features",
- "posthog_organization"."usage",
- "posthog_organization"."never_drop_data",
- "posthog_organization"."customer_trust_scores",
- "posthog_organization"."setup_section_2_completed",
- "posthog_organization"."personalization",
- "posthog_organization"."domain_whitelist",
- "posthog_organization"."is_platform"
- FROM "posthog_organization"
- WHERE "posthog_organization"."id" = '00000000-0000-0000-0000-000000000000'::uuid
- LIMIT 21
- '''
-# ---
-# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.156
- '''
- SELECT "posthog_team"."id",
- "posthog_team"."uuid",
- "posthog_team"."organization_id",
- "posthog_team"."parent_team_id",
- "posthog_team"."project_id",
- "posthog_team"."api_token",
- "posthog_team"."app_urls",
- "posthog_team"."name",
- "posthog_team"."slack_incoming_webhook",
- "posthog_team"."created_at",
- "posthog_team"."updated_at",
- "posthog_team"."anonymize_ips",
- "posthog_team"."completed_snippet_onboarding",
- "posthog_team"."has_completed_onboarding_for",
- "posthog_team"."onboarding_tasks",
- "posthog_team"."ingested_event",
- "posthog_team"."ingested_production_event",
- "posthog_team"."ingested_production_event_last_checked_at",
- "posthog_team"."person_processing_opt_out",
- "posthog_team"."secret_api_token",
- "posthog_team"."secret_api_token_backup",
- "posthog_team"."session_recording_opt_in",
- "posthog_team"."session_recording_sample_rate",
- "posthog_team"."session_recording_minimum_duration_milliseconds",
- "posthog_team"."session_recording_linked_flag",
- "posthog_team"."session_recording_network_payload_capture_config",
- "posthog_team"."session_recording_masking_config",
- "posthog_team"."session_recording_url_trigger_config",
- "posthog_team"."session_recording_url_blocklist_config",
- "posthog_team"."session_recording_event_trigger_config",
- "posthog_team"."session_recording_trigger_match_type_config",
- "posthog_team"."session_recording_trigger_groups",
- "posthog_team"."session_replay_config",
- "posthog_team"."session_recording_retention_period",
- "posthog_team"."event_retention_months",
- "posthog_team"."conversations_enabled",
- "posthog_team"."conversations_settings",
- "posthog_team"."proactive_tasks_enabled",
- "posthog_team"."survey_config",
- "posthog_team"."surveys_opt_in",
- "posthog_team"."product_tours_opt_in",
- "posthog_team"."capture_console_log_opt_in",
- "posthog_team"."capture_performance_opt_in",
- "posthog_team"."capture_dead_clicks",
- "posthog_team"."autocapture_opt_out",
- "posthog_team"."autocapture_web_vitals_opt_in",
- "posthog_team"."autocapture_web_vitals_allowed_metrics",
- "posthog_team"."autocapture_exceptions_opt_in",
- "posthog_team"."autocapture_exceptions_errors_to_ignore",
- "posthog_team"."logs_settings",
- "posthog_team"."llm_gateway_enabled_at",
- "posthog_team"."llm_gateway_revoked_at",
- "posthog_team"."llm_gateway_overspend_allowance_usd",
- "posthog_team"."heatmaps_opt_in",
- "posthog_team"."receive_org_level_activity_logs",
- "posthog_team"."web_analytics_pre_aggregated_tables_enabled",
- "posthog_team"."web_analytics_pre_aggregated_tables_version",
- "posthog_team"."flags_persistence_default",
- "posthog_team"."feature_flag_confirmation_enabled",
- "posthog_team"."feature_flag_confirmation_message",
- "posthog_team"."default_evaluation_environments_enabled",
- "posthog_team"."require_evaluation_environment_tags",
- "posthog_team"."default_evaluation_contexts_enabled",
- "posthog_team"."require_evaluation_contexts",
- "posthog_team"."session_recording_version",
- "posthog_team"."signup_token",
- "posthog_team"."is_demo",
- "posthog_team"."access_control",
- "posthog_team"."week_start_day",
- "posthog_team"."inject_web_apps",
- "posthog_team"."test_account_filters",
- "posthog_team"."test_account_filters_default_checked",
- "posthog_team"."path_cleaning_filters",
- "posthog_team"."timezone",
- "posthog_team"."data_attributes",
- "posthog_team"."person_display_name_properties",
- "posthog_team"."live_events_columns",
- "posthog_team"."recording_domains",
- "posthog_team"."human_friendly_comparison_periods",
- "posthog_team"."cookieless_server_hash_mode",
- "posthog_team"."primary_dashboard_id",
- "posthog_team"."default_data_theme",
- "posthog_team"."extra_settings",
- "posthog_team"."modifiers",
- "posthog_team"."correlation_config",
- "posthog_team"."session_recording_retention_period_days",
- "posthog_team"."external_data_workspace_id",
- "posthog_team"."external_data_workspace_last_synced_at",
- "posthog_team"."api_query_rate_limit",
- "posthog_team"."drop_events_older_than",
- "posthog_team"."base_currency",
- "posthog_team"."experiment_recalculation_time",
- "posthog_team"."default_experiment_confidence_level",
- "posthog_team"."default_experiment_stats_method",
- "posthog_team"."business_model"
- FROM "posthog_team"
- WHERE "posthog_team"."id" = 99999
- LIMIT 21
- '''
-# ---
-# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.157
- '''
- SELECT "posthog_dashboardtile"."id",
- "posthog_dashboardtile"."dashboard_id",
- "posthog_dashboardtile"."insight_id",
- "posthog_dashboardtile"."text_id",
- "posthog_dashboardtile"."button_tile_id",
- "posthog_dashboardtile"."widget_id",
- "posthog_dashboardtile"."team_id",
- "posthog_dashboardtile"."layouts",
- "posthog_dashboardtile"."color",
- "posthog_dashboardtile"."filters_hash",
- "posthog_dashboardtile"."last_refresh",
- "posthog_dashboardtile"."refreshing",
- "posthog_dashboardtile"."refresh_attempt",
- "posthog_dashboardtile"."filters_overrides",
- "posthog_dashboardtile"."show_description",
- "posthog_dashboardtile"."transparent_background",
- "posthog_dashboardtile"."deleted"
- FROM "posthog_dashboardtile"
- WHERE "posthog_dashboardtile"."id" = 99999
- LIMIT 21
- '''
-# ---
-# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.158
- '''
- SELECT "posthog_dashboarditem"."id",
- "posthog_dashboarditem"."name",
- "posthog_dashboarditem"."derived_name",
- "posthog_dashboarditem"."description",
- "posthog_dashboarditem"."team_id",
- "posthog_dashboarditem"."filters",
- "posthog_dashboarditem"."filters_hash",
- "posthog_dashboarditem"."query",
- "posthog_dashboarditem"."query_metadata",
- "posthog_dashboarditem"."order",
- "posthog_dashboarditem"."deleted",
- "posthog_dashboarditem"."saved",
- "posthog_dashboarditem"."created_at",
- "posthog_dashboarditem"."refreshing",
- "posthog_dashboarditem"."created_by_id",
- "posthog_dashboarditem"."is_sample",
- "posthog_dashboarditem"."short_id",
- "posthog_dashboarditem"."favorited",
- "posthog_dashboarditem"."refresh_attempt",
- "posthog_dashboarditem"."last_modified_at",
- "posthog_dashboarditem"."last_modified_by_id",
- "posthog_dashboarditem"."dashboard_id",
- "posthog_dashboarditem"."last_refresh",
- "posthog_dashboarditem"."layouts",
- "posthog_dashboarditem"."color",
- "posthog_dashboarditem"."dive_dashboard_id",
- "posthog_dashboarditem"."updated_at",
- "posthog_dashboarditem"."deprecated_tags",
- "posthog_dashboarditem"."tags"
- FROM "posthog_dashboarditem"
- WHERE "posthog_dashboarditem"."id" = 99999
- LIMIT 21
- '''
-# ---
-# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.159
- '''
- SELECT "posthog_dashboard"."id",
- "posthog_dashboard"."name",
- "posthog_dashboard"."description",
- "posthog_dashboard"."team_id",
- "posthog_dashboard"."pinned",
- "posthog_dashboard"."created_at",
- "posthog_dashboard"."created_by_id",
- "posthog_dashboard"."deleted",
- "posthog_dashboard"."last_accessed_at",
- "posthog_dashboard"."last_refresh",
- "posthog_dashboard"."filters",
- "posthog_dashboard"."variables",
- "posthog_dashboard"."breakdown_colors",
- "posthog_dashboard"."data_color_theme_id",
- "posthog_dashboard"."creation_mode",
- "posthog_dashboard"."restriction_level",
- "posthog_dashboard"."quick_filter_ids",
- "posthog_dashboard"."deprecated_tags",
- "posthog_dashboard"."tags",
- "posthog_dashboard"."share_token",
- "posthog_dashboard"."is_shared"
- FROM "posthog_dashboard"
- WHERE "posthog_dashboard"."id" = 99999
- LIMIT 21
- '''
-# ---
-# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.16
- '''
- SELECT "posthog_dashboardtile"."id",
- "posthog_dashboardtile"."dashboard_id",
- "posthog_dashboardtile"."insight_id",
- "posthog_dashboardtile"."text_id",
- "posthog_dashboardtile"."button_tile_id",
- "posthog_dashboardtile"."widget_id",
- "posthog_dashboardtile"."team_id",
- "posthog_dashboardtile"."layouts",
- "posthog_dashboardtile"."color",
- "posthog_dashboardtile"."filters_hash",
- "posthog_dashboardtile"."last_refresh",
- "posthog_dashboardtile"."refreshing",
- "posthog_dashboardtile"."refresh_attempt",
- "posthog_dashboardtile"."filters_overrides",
- "posthog_dashboardtile"."show_description",
- "posthog_dashboardtile"."transparent_background",
- "posthog_dashboardtile"."deleted",
- "posthog_dashboarditem"."id",
- "posthog_dashboarditem"."name",
- "posthog_dashboarditem"."derived_name",
- "posthog_dashboarditem"."description",
- "posthog_dashboarditem"."team_id",
- "posthog_dashboarditem"."filters",
- "posthog_dashboarditem"."filters_hash",
- "posthog_dashboarditem"."query",
- "posthog_dashboarditem"."query_metadata",
- "posthog_dashboarditem"."order",
- "posthog_dashboarditem"."deleted",
- "posthog_dashboarditem"."saved",
- "posthog_dashboarditem"."created_at",
- "posthog_dashboarditem"."refreshing",
- "posthog_dashboarditem"."created_by_id",
- "posthog_dashboarditem"."is_sample",
- "posthog_dashboarditem"."short_id",
- "posthog_dashboarditem"."favorited",
- "posthog_dashboarditem"."refresh_attempt",
- "posthog_dashboarditem"."last_modified_at",
- "posthog_dashboarditem"."last_modified_by_id",
- "posthog_dashboarditem"."dashboard_id",
- "posthog_dashboarditem"."last_refresh",
- "posthog_dashboarditem"."layouts",
- "posthog_dashboarditem"."color",
- "posthog_dashboarditem"."dive_dashboard_id",
- "posthog_dashboarditem"."updated_at",
- "posthog_dashboarditem"."deprecated_tags",
- "posthog_dashboarditem"."tags",
- "posthog_team"."id",
- "posthog_team"."uuid",
- "posthog_team"."organization_id",
- "posthog_team"."parent_team_id",
- "posthog_team"."project_id",
- "posthog_team"."api_token",
- "posthog_team"."app_urls",
- "posthog_team"."name",
- "posthog_team"."slack_incoming_webhook",
- "posthog_team"."created_at",
- "posthog_team"."updated_at",
- "posthog_team"."anonymize_ips",
- "posthog_team"."completed_snippet_onboarding",
- "posthog_team"."has_completed_onboarding_for",
- "posthog_team"."onboarding_tasks",
- "posthog_team"."ingested_event",
- "posthog_team"."ingested_production_event",
- "posthog_team"."ingested_production_event_last_checked_at",
- "posthog_team"."person_processing_opt_out",
- "posthog_team"."secret_api_token",
- "posthog_team"."secret_api_token_backup",
- "posthog_team"."session_recording_opt_in",
- "posthog_team"."session_recording_sample_rate",
- "posthog_team"."session_recording_minimum_duration_milliseconds",
- "posthog_team"."session_recording_linked_flag",
- "posthog_team"."session_recording_network_payload_capture_config",
- "posthog_team"."session_recording_masking_config",
- "posthog_team"."session_recording_url_trigger_config",
- "posthog_team"."session_recording_url_blocklist_config",
- "posthog_team"."session_recording_event_trigger_config",
- "posthog_team"."session_recording_trigger_match_type_config",
- "posthog_team"."session_recording_trigger_groups",
- "posthog_team"."session_replay_config",
- "posthog_team"."session_recording_retention_period",
- "posthog_team"."event_retention_months",
- "posthog_team"."conversations_enabled",
- "posthog_team"."conversations_settings",
- "posthog_team"."proactive_tasks_enabled",
- "posthog_team"."survey_config",
- "posthog_team"."surveys_opt_in",
- "posthog_team"."product_tours_opt_in",
- "posthog_team"."capture_console_log_opt_in",
- "posthog_team"."capture_performance_opt_in",
- "posthog_team"."capture_dead_clicks",
- "posthog_team"."autocapture_opt_out",
- "posthog_team"."autocapture_web_vitals_opt_in",
- "posthog_team"."autocapture_web_vitals_allowed_metrics",
- "posthog_team"."autocapture_exceptions_opt_in",
- "posthog_team"."autocapture_exceptions_errors_to_ignore",
- "posthog_team"."logs_settings",
- "posthog_team"."llm_gateway_enabled_at",
- "posthog_team"."llm_gateway_revoked_at",
- "posthog_team"."llm_gateway_overspend_allowance_usd",
- "posthog_team"."heatmaps_opt_in",
- "posthog_team"."receive_org_level_activity_logs",
- "posthog_team"."web_analytics_pre_aggregated_tables_enabled",
- "posthog_team"."web_analytics_pre_aggregated_tables_version",
- "posthog_team"."flags_persistence_default",
- "posthog_team"."feature_flag_confirmation_enabled",
- "posthog_team"."feature_flag_confirmation_message",
- "posthog_team"."default_evaluation_environments_enabled",
- "posthog_team"."require_evaluation_environment_tags",
- "posthog_team"."default_evaluation_contexts_enabled",
- "posthog_team"."require_evaluation_contexts",
- "posthog_team"."session_recording_version",
- "posthog_team"."signup_token",
- "posthog_team"."is_demo",
- "posthog_team"."access_control",
- "posthog_team"."week_start_day",
- "posthog_team"."inject_web_apps",
- "posthog_team"."test_account_filters",
- "posthog_team"."test_account_filters_default_checked",
- "posthog_team"."path_cleaning_filters",
- "posthog_team"."timezone",
- "posthog_team"."data_attributes",
- "posthog_team"."person_display_name_properties",
- "posthog_team"."live_events_columns",
- "posthog_team"."recording_domains",
- "posthog_team"."human_friendly_comparison_periods",
- "posthog_team"."cookieless_server_hash_mode",
- "posthog_team"."primary_dashboard_id",
- "posthog_team"."default_data_theme",
- "posthog_team"."extra_settings",
- "posthog_team"."modifiers",
- "posthog_team"."correlation_config",
- "posthog_team"."session_recording_retention_period_days",
- "posthog_team"."plugins_opt_in",
- "posthog_team"."opt_out_capture",
- "posthog_team"."event_names",
- "posthog_team"."event_names_with_usage",
- "posthog_team"."event_properties",
- "posthog_team"."event_properties_with_usage",
- "posthog_team"."event_properties_numerical",
- "posthog_team"."external_data_workspace_id",
- "posthog_team"."external_data_workspace_last_synced_at",
- "posthog_team"."api_query_rate_limit",
- "posthog_team"."revenue_tracking_config",
- "posthog_team"."drop_events_older_than",
- "posthog_team"."base_currency",
- "posthog_team"."experiment_recalculation_time",
- "posthog_team"."default_experiment_confidence_level",
- "posthog_team"."default_experiment_stats_method",
- "posthog_team"."business_model",
- "posthog_user"."id",
- "posthog_user"."password",
- "posthog_user"."last_login",
- "posthog_user"."first_name",
- "posthog_user"."last_name",
- "posthog_user"."is_staff",
- "posthog_user"."date_joined",
- "posthog_user"."uuid",
- "posthog_user"."current_organization_id",
- "posthog_user"."current_team_id",
- "posthog_user"."email",
- "posthog_user"."pending_email",
- "posthog_user"."distinct_id",
- "posthog_user"."is_email_verified",
- "posthog_user"."credentials_reviewed_at",
- "posthog_user"."requested_password_reset_at",
- "posthog_user"."requested_2fa_reset_at",
- "posthog_user"."has_seen_product_intro_for",
- "posthog_user"."strapi_id",
- "posthog_user"."is_active",
- "posthog_user"."role_at_organization",
- "posthog_user"."theme_mode",
- "posthog_user"."partial_notification_settings",
- "posthog_user"."anonymize_data",
- "posthog_user"."allow_impersonation",
- "posthog_user"."toolbar_mode",
- "posthog_user"."hedgehog_config",
- "posthog_user"."allow_sidebar_suggestions",
- "posthog_user"."shortcut_position",
- "posthog_user"."passkeys_enabled_for_2fa",
- "posthog_user"."hide_mcp_hints",
- "posthog_user"."onboarding_skipped_at",
- "posthog_user"."onboarding_skipped_reason",
- "posthog_user"."onboarding_skipped_organization_id",
- "posthog_user"."onboarding_delegated_to_invite_id",
- "posthog_user"."onboarding_delegated_to_organization_id",
- "posthog_user"."onboarding_delegation_accepted_at",
- "posthog_user"."events_column_config",
- "posthog_user"."email_opt_in",
- T6."id",
- T6."password",
- T6."last_login",
- T6."first_name",
- T6."last_name",
- T6."is_staff",
- T6."date_joined",
- T6."uuid",
- T6."current_organization_id",
- T6."current_team_id",
- T6."email",
- T6."pending_email",
- T6."distinct_id",
- T6."is_email_verified",
- T6."credentials_reviewed_at",
- T6."requested_password_reset_at",
- T6."requested_2fa_reset_at",
- T6."has_seen_product_intro_for",
- T6."strapi_id",
- T6."is_active",
- T6."role_at_organization",
- T6."theme_mode",
- T6."partial_notification_settings",
- T6."anonymize_data",
- T6."allow_impersonation",
- T6."toolbar_mode",
- T6."hedgehog_config",
- T6."allow_sidebar_suggestions",
- T6."shortcut_position",
- T6."passkeys_enabled_for_2fa",
- T6."hide_mcp_hints",
- T6."onboarding_skipped_at",
- T6."onboarding_skipped_reason",
- T6."onboarding_skipped_organization_id",
- T6."onboarding_delegated_to_invite_id",
- T6."onboarding_delegated_to_organization_id",
- T6."onboarding_delegation_accepted_at",
- T6."events_column_config",
- T6."email_opt_in",
- "posthog_text"."id",
- "posthog_text"."body",
- "posthog_text"."created_by_id",
- "posthog_text"."last_modified_at",
- "posthog_text"."last_modified_by_id",
- "posthog_text"."team_id",
- "posthog_buttontile"."id",
- "posthog_buttontile"."url",
- "posthog_buttontile"."text",
- "posthog_buttontile"."placement",
- "posthog_buttontile"."style",
- "posthog_buttontile"."created_by_id",
- "posthog_buttontile"."last_modified_at",
- "posthog_buttontile"."last_modified_by_id",
- "posthog_buttontile"."team_id",
- "posthog_dashboardwidget"."id",
- "posthog_dashboardwidget"."widget_type",
- "posthog_dashboardwidget"."name",
- "posthog_dashboardwidget"."description",
- "posthog_dashboardwidget"."config",
- "posthog_dashboardwidget"."created_by_id",
- "posthog_dashboardwidget"."last_modified_at",
- "posthog_dashboardwidget"."last_modified_by_id",
- "posthog_dashboardwidget"."team_id",
- T10."id",
- T10."password",
- T10."last_login",
- T10."first_name",
- T10."last_name",
- T10."is_staff",
- T10."date_joined",
- T10."uuid",
- T10."current_organization_id",
- T10."current_team_id",
- T10."email",
- T10."pending_email",
- T10."distinct_id",
- T10."is_email_verified",
- T10."credentials_reviewed_at",
- T10."requested_password_reset_at",
- T10."requested_2fa_reset_at",
- T10."has_seen_product_intro_for",
- T10."strapi_id",
- T10."is_active",
- T10."role_at_organization",
- T10."theme_mode",
- T10."partial_notification_settings",
- T10."anonymize_data",
- T10."allow_impersonation",
- T10."toolbar_mode",
- T10."hedgehog_config",
- T10."allow_sidebar_suggestions",
- T10."shortcut_position",
- T10."passkeys_enabled_for_2fa",
- T10."hide_mcp_hints",
- T10."onboarding_skipped_at",
- T10."onboarding_skipped_reason",
- T10."onboarding_skipped_organization_id",
- T10."onboarding_delegated_to_invite_id",
- T10."onboarding_delegated_to_organization_id",
- T10."onboarding_delegation_accepted_at",
- T10."events_column_config",
- T10."email_opt_in",
- T11."id",
- T11."password",
- T11."last_login",
- T11."first_name",
- T11."last_name",
- T11."is_staff",
- T11."date_joined",
- T11."uuid",
- T11."current_organization_id",
- T11."current_team_id",
- T11."email",
- T11."pending_email",
- T11."distinct_id",
- T11."is_email_verified",
- T11."credentials_reviewed_at",
- T11."requested_password_reset_at",
- T11."requested_2fa_reset_at",
- T11."has_seen_product_intro_for",
- T11."strapi_id",
- T11."is_active",
- T11."role_at_organization",
- T11."theme_mode",
- T11."partial_notification_settings",
- T11."anonymize_data",
- T11."allow_impersonation",
- T11."toolbar_mode",
- T11."hedgehog_config",
- T11."allow_sidebar_suggestions",
- T11."shortcut_position",
- T11."passkeys_enabled_for_2fa",
- T11."hide_mcp_hints",
- T11."onboarding_skipped_at",
- T11."onboarding_skipped_reason",
- T11."onboarding_skipped_organization_id",
- T11."onboarding_delegated_to_invite_id",
- T11."onboarding_delegated_to_organization_id",
- T11."onboarding_delegation_accepted_at",
- T11."events_column_config",
- T11."email_opt_in"
- FROM "posthog_dashboardtile"
- INNER JOIN "posthog_dashboard" ON ("posthog_dashboardtile"."dashboard_id" = "posthog_dashboard"."id")
- LEFT OUTER JOIN "posthog_dashboarditem" ON ("posthog_dashboardtile"."insight_id" = "posthog_dashboarditem"."id")
- LEFT OUTER JOIN "posthog_team" ON ("posthog_dashboarditem"."team_id" = "posthog_team"."id")
- LEFT OUTER JOIN "posthog_user" ON ("posthog_dashboarditem"."created_by_id" = "posthog_user"."id")
- LEFT OUTER JOIN "posthog_user" T6 ON ("posthog_dashboarditem"."last_modified_by_id" = T6."id")
- LEFT OUTER JOIN "posthog_text" ON ("posthog_dashboardtile"."text_id" = "posthog_text"."id")
- LEFT OUTER JOIN "posthog_buttontile" ON ("posthog_dashboardtile"."button_tile_id" = "posthog_buttontile"."id")
- LEFT OUTER JOIN "posthog_dashboardwidget" ON ("posthog_dashboardtile"."widget_id" = "posthog_dashboardwidget"."id")
- LEFT OUTER JOIN "posthog_user" T10 ON ("posthog_dashboardwidget"."created_by_id" = T10."id")
- LEFT OUTER JOIN "posthog_user" T11 ON ("posthog_dashboardwidget"."last_modified_by_id" = T11."id")
- WHERE (NOT ("posthog_dashboardtile"."deleted"
- AND "posthog_dashboardtile"."deleted" IS NOT NULL)
- AND NOT ("posthog_dashboard"."deleted")
- AND "posthog_dashboardtile"."dashboard_id" = 99999
- AND NOT ("posthog_dashboard"."deleted"
- AND "posthog_dashboardtile"."deleted"
- AND "posthog_dashboardtile"."deleted" IS NOT NULL)
- AND (NOT "posthog_dashboarditem"."deleted"
- OR "posthog_dashboardtile"."insight_id" IS NULL))
- ORDER BY "posthog_dashboarditem"."order" ASC
- '''
-# ---
-# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.160
- '''
- SELECT "posthog_team"."id",
- "posthog_team"."uuid",
- "posthog_team"."organization_id",
- "posthog_team"."parent_team_id",
- "posthog_team"."project_id",
- "posthog_team"."api_token",
- "posthog_team"."app_urls",
- "posthog_team"."name",
- "posthog_team"."slack_incoming_webhook",
- "posthog_team"."created_at",
- "posthog_team"."updated_at",
- "posthog_team"."anonymize_ips",
- "posthog_team"."completed_snippet_onboarding",
- "posthog_team"."has_completed_onboarding_for",
- "posthog_team"."onboarding_tasks",
- "posthog_team"."ingested_event",
- "posthog_team"."ingested_production_event",
- "posthog_team"."ingested_production_event_last_checked_at",
- "posthog_team"."person_processing_opt_out",
- "posthog_team"."secret_api_token",
- "posthog_team"."secret_api_token_backup",
- "posthog_team"."session_recording_opt_in",
- "posthog_team"."session_recording_sample_rate",
- "posthog_team"."session_recording_minimum_duration_milliseconds",
- "posthog_team"."session_recording_linked_flag",
- "posthog_team"."session_recording_network_payload_capture_config",
- "posthog_team"."session_recording_masking_config",
- "posthog_team"."session_recording_url_trigger_config",
- "posthog_team"."session_recording_url_blocklist_config",
- "posthog_team"."session_recording_event_trigger_config",
- "posthog_team"."session_recording_trigger_match_type_config",
- "posthog_team"."session_recording_trigger_groups",
- "posthog_team"."session_replay_config",
- "posthog_team"."session_recording_retention_period",
- "posthog_team"."event_retention_months",
- "posthog_team"."conversations_enabled",
- "posthog_team"."conversations_settings",
- "posthog_team"."proactive_tasks_enabled",
- "posthog_team"."survey_config",
- "posthog_team"."surveys_opt_in",
- "posthog_team"."product_tours_opt_in",
- "posthog_team"."capture_console_log_opt_in",
- "posthog_team"."capture_performance_opt_in",
- "posthog_team"."capture_dead_clicks",
- "posthog_team"."autocapture_opt_out",
- "posthog_team"."autocapture_web_vitals_opt_in",
- "posthog_team"."autocapture_web_vitals_allowed_metrics",
- "posthog_team"."autocapture_exceptions_opt_in",
- "posthog_team"."autocapture_exceptions_errors_to_ignore",
- "posthog_team"."logs_settings",
- "posthog_team"."llm_gateway_enabled_at",
- "posthog_team"."llm_gateway_revoked_at",
- "posthog_team"."llm_gateway_overspend_allowance_usd",
- "posthog_team"."heatmaps_opt_in",
- "posthog_team"."receive_org_level_activity_logs",
- "posthog_team"."web_analytics_pre_aggregated_tables_enabled",
- "posthog_team"."web_analytics_pre_aggregated_tables_version",
- "posthog_team"."flags_persistence_default",
- "posthog_team"."feature_flag_confirmation_enabled",
- "posthog_team"."feature_flag_confirmation_message",
- "posthog_team"."default_evaluation_environments_enabled",
- "posthog_team"."require_evaluation_environment_tags",
- "posthog_team"."default_evaluation_contexts_enabled",
- "posthog_team"."require_evaluation_contexts",
- "posthog_team"."session_recording_version",
- "posthog_team"."signup_token",
- "posthog_team"."is_demo",
- "posthog_team"."access_control",
- "posthog_team"."week_start_day",
- "posthog_team"."inject_web_apps",
- "posthog_team"."test_account_filters",
- "posthog_team"."test_account_filters_default_checked",
- "posthog_team"."path_cleaning_filters",
- "posthog_team"."timezone",
- "posthog_team"."data_attributes",
- "posthog_team"."person_display_name_properties",
- "posthog_team"."live_events_columns",
- "posthog_team"."recording_domains",
- "posthog_team"."human_friendly_comparison_periods",
- "posthog_team"."cookieless_server_hash_mode",
- "posthog_team"."primary_dashboard_id",
- "posthog_team"."default_data_theme",
- "posthog_team"."extra_settings",
- "posthog_team"."modifiers",
- "posthog_team"."correlation_config",
- "posthog_team"."session_recording_retention_period_days",
- "posthog_team"."external_data_workspace_id",
- "posthog_team"."external_data_workspace_last_synced_at",
- "posthog_team"."api_query_rate_limit",
- "posthog_team"."drop_events_older_than",
- "posthog_team"."base_currency",
- "posthog_team"."experiment_recalculation_time",
- "posthog_team"."default_experiment_confidence_level",
- "posthog_team"."default_experiment_stats_method",
- "posthog_team"."business_model"
- FROM "posthog_team"
- WHERE "posthog_team"."id" = 99999
- LIMIT 21
- '''
-# ---
-# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.161
- '''
- SELECT "posthog_organization"."id",
- "posthog_organization"."name",
- "posthog_organization"."slug",
- "posthog_organization"."logo_media_id",
- "posthog_organization"."created_at",
- "posthog_organization"."updated_at",
- "posthog_organization"."is_active",
- "posthog_organization"."is_not_active_reason",
- "posthog_organization"."session_cookie_age",
- "posthog_organization"."is_member_join_email_enabled",
- "posthog_organization"."is_ai_data_processing_approved",
- "posthog_organization"."is_ai_training_opted_in",
- "posthog_organization"."is_ai_training_locked",
- "posthog_organization"."is_ai_training_cta_shown",
- "posthog_organization"."enforce_2fa",
- "posthog_organization"."members_can_invite",
- "posthog_organization"."members_can_create_projects",
- "posthog_organization"."members_can_use_personal_api_keys",
- "posthog_organization"."allow_publicly_shared_resources",
- "posthog_organization"."default_role_id",
- "posthog_organization"."plugins_access_level",
- "posthog_organization"."for_internal_metrics",
- "posthog_organization"."default_experiment_stats_method",
- "posthog_organization"."default_anonymize_ips",
- "posthog_organization"."is_hipaa",
- "posthog_organization"."is_pending_deletion",
- "posthog_organization"."customer_id",
- "posthog_organization"."available_product_features",
- "posthog_organization"."usage",
- "posthog_organization"."never_drop_data",
- "posthog_organization"."customer_trust_scores",
- "posthog_organization"."setup_section_2_completed",
- "posthog_organization"."personalization",
- "posthog_organization"."domain_whitelist",
- "posthog_organization"."is_platform"
- FROM "posthog_organization"
- WHERE "posthog_organization"."id" = '00000000-0000-0000-0000-000000000000'::uuid
- LIMIT 21
- '''
-# ---
-# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.162
- '''
- SELECT "posthog_organization"."id",
- "posthog_organization"."name",
- "posthog_organization"."slug",
- "posthog_organization"."logo_media_id",
- "posthog_organization"."created_at",
- "posthog_organization"."updated_at",
- "posthog_organization"."is_active",
- "posthog_organization"."is_not_active_reason",
- "posthog_organization"."session_cookie_age",
- "posthog_organization"."is_member_join_email_enabled",
- "posthog_organization"."is_ai_data_processing_approved",
- "posthog_organization"."is_ai_training_opted_in",
- "posthog_organization"."is_ai_training_locked",
- "posthog_organization"."is_ai_training_cta_shown",
- "posthog_organization"."enforce_2fa",
- "posthog_organization"."members_can_invite",
- "posthog_organization"."members_can_create_projects",
- "posthog_organization"."members_can_use_personal_api_keys",
- "posthog_organization"."allow_publicly_shared_resources",
- "posthog_organization"."default_role_id",
- "posthog_organization"."plugins_access_level",
- "posthog_organization"."for_internal_metrics",
- "posthog_organization"."default_experiment_stats_method",
- "posthog_organization"."default_anonymize_ips",
- "posthog_organization"."is_hipaa",
- "posthog_organization"."is_pending_deletion",
- "posthog_organization"."customer_id",
- "posthog_organization"."available_product_features",
- "posthog_organization"."usage",
- "posthog_organization"."never_drop_data",
- "posthog_organization"."customer_trust_scores",
- "posthog_organization"."setup_section_2_completed",
- "posthog_organization"."personalization",
- "posthog_organization"."domain_whitelist",
- "posthog_organization"."is_platform"
- FROM "posthog_organization"
- WHERE "posthog_organization"."id" = '00000000-0000-0000-0000-000000000000'::uuid
- LIMIT 21
- '''
-# ---
-# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.163
- '''
- SELECT "posthog_team"."id",
- "posthog_team"."uuid",
- "posthog_team"."organization_id",
- "posthog_team"."parent_team_id",
- "posthog_team"."project_id",
- "posthog_team"."api_token",
- "posthog_team"."app_urls",
- "posthog_team"."name",
- "posthog_team"."slack_incoming_webhook",
- "posthog_team"."created_at",
- "posthog_team"."updated_at",
- "posthog_team"."anonymize_ips",
- "posthog_team"."completed_snippet_onboarding",
- "posthog_team"."has_completed_onboarding_for",
- "posthog_team"."onboarding_tasks",
- "posthog_team"."ingested_event",
- "posthog_team"."ingested_production_event",
- "posthog_team"."ingested_production_event_last_checked_at",
- "posthog_team"."person_processing_opt_out",
- "posthog_team"."secret_api_token",
- "posthog_team"."secret_api_token_backup",
- "posthog_team"."session_recording_opt_in",
- "posthog_team"."session_recording_sample_rate",
- "posthog_team"."session_recording_minimum_duration_milliseconds",
- "posthog_team"."session_recording_linked_flag",
- "posthog_team"."session_recording_network_payload_capture_config",
- "posthog_team"."session_recording_masking_config",
- "posthog_team"."session_recording_url_trigger_config",
- "posthog_team"."session_recording_url_blocklist_config",
- "posthog_team"."session_recording_event_trigger_config",
- "posthog_team"."session_recording_trigger_match_type_config",
- "posthog_team"."session_recording_trigger_groups",
- "posthog_team"."session_replay_config",
- "posthog_team"."session_recording_retention_period",
- "posthog_team"."event_retention_months",
- "posthog_team"."conversations_enabled",
- "posthog_team"."conversations_settings",
- "posthog_team"."proactive_tasks_enabled",
- "posthog_team"."survey_config",
- "posthog_team"."surveys_opt_in",
- "posthog_team"."product_tours_opt_in",
- "posthog_team"."capture_console_log_opt_in",
- "posthog_team"."capture_performance_opt_in",
- "posthog_team"."capture_dead_clicks",
- "posthog_team"."autocapture_opt_out",
- "posthog_team"."autocapture_web_vitals_opt_in",
- "posthog_team"."autocapture_web_vitals_allowed_metrics",
- "posthog_team"."autocapture_exceptions_opt_in",
- "posthog_team"."autocapture_exceptions_errors_to_ignore",
- "posthog_team"."logs_settings",
- "posthog_team"."llm_gateway_enabled_at",
- "posthog_team"."llm_gateway_revoked_at",
- "posthog_team"."llm_gateway_overspend_allowance_usd",
- "posthog_team"."heatmaps_opt_in",
- "posthog_team"."receive_org_level_activity_logs",
- "posthog_team"."web_analytics_pre_aggregated_tables_enabled",
- "posthog_team"."web_analytics_pre_aggregated_tables_version",
- "posthog_team"."flags_persistence_default",
- "posthog_team"."feature_flag_confirmation_enabled",
- "posthog_team"."feature_flag_confirmation_message",
- "posthog_team"."default_evaluation_environments_enabled",
- "posthog_team"."require_evaluation_environment_tags",
- "posthog_team"."default_evaluation_contexts_enabled",
- "posthog_team"."require_evaluation_contexts",
- "posthog_team"."session_recording_version",
- "posthog_team"."signup_token",
- "posthog_team"."is_demo",
- "posthog_team"."access_control",
- "posthog_team"."week_start_day",
- "posthog_team"."inject_web_apps",
- "posthog_team"."test_account_filters",
- "posthog_team"."test_account_filters_default_checked",
- "posthog_team"."path_cleaning_filters",
- "posthog_team"."timezone",
- "posthog_team"."data_attributes",
- "posthog_team"."person_display_name_properties",
- "posthog_team"."live_events_columns",
- "posthog_team"."recording_domains",
- "posthog_team"."human_friendly_comparison_periods",
- "posthog_team"."cookieless_server_hash_mode",
- "posthog_team"."primary_dashboard_id",
- "posthog_team"."default_data_theme",
- "posthog_team"."extra_settings",
- "posthog_team"."modifiers",
- "posthog_team"."correlation_config",
- "posthog_team"."session_recording_retention_period_days",
- "posthog_team"."external_data_workspace_id",
- "posthog_team"."external_data_workspace_last_synced_at",
- "posthog_team"."api_query_rate_limit",
- "posthog_team"."drop_events_older_than",
- "posthog_team"."base_currency",
- "posthog_team"."experiment_recalculation_time",
- "posthog_team"."default_experiment_confidence_level",
- "posthog_team"."default_experiment_stats_method",
- "posthog_team"."business_model"
- FROM "posthog_team"
- WHERE "posthog_team"."id" = 99999
- LIMIT 21
- '''
-# ---
-# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.164
- '''
- SELECT "posthog_dashboardtile"."id",
- "posthog_dashboardtile"."dashboard_id",
- "posthog_dashboardtile"."insight_id",
- "posthog_dashboardtile"."text_id",
- "posthog_dashboardtile"."button_tile_id",
- "posthog_dashboardtile"."widget_id",
- "posthog_dashboardtile"."team_id",
- "posthog_dashboardtile"."layouts",
- "posthog_dashboardtile"."color",
- "posthog_dashboardtile"."filters_hash",
- "posthog_dashboardtile"."last_refresh",
- "posthog_dashboardtile"."refreshing",
- "posthog_dashboardtile"."refresh_attempt",
- "posthog_dashboardtile"."filters_overrides",
- "posthog_dashboardtile"."show_description",
- "posthog_dashboardtile"."transparent_background",
- "posthog_dashboardtile"."deleted"
- FROM "posthog_dashboardtile"
- INNER JOIN "posthog_dashboard" ON ("posthog_dashboardtile"."dashboard_id" = "posthog_dashboard"."id")
- WHERE (NOT ("posthog_dashboardtile"."deleted"
- AND "posthog_dashboardtile"."deleted" IS NOT NULL)
- AND NOT ("posthog_dashboard"."deleted")
- AND "posthog_dashboardtile"."insight_id" = 99999)
- '''
-# ---
-# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.165
- '''
- SELECT "posthog_dashboardtile"."id",
- "posthog_dashboardtile"."dashboard_id",
- "posthog_dashboardtile"."insight_id",
- "posthog_dashboardtile"."text_id",
- "posthog_dashboardtile"."button_tile_id",
- "posthog_dashboardtile"."widget_id",
- "posthog_dashboardtile"."team_id",
- "posthog_dashboardtile"."layouts",
- "posthog_dashboardtile"."color",
- "posthog_dashboardtile"."filters_hash",
- "posthog_dashboardtile"."last_refresh",
- "posthog_dashboardtile"."refreshing",
- "posthog_dashboardtile"."refresh_attempt",
- "posthog_dashboardtile"."filters_overrides",
- "posthog_dashboardtile"."show_description",
- "posthog_dashboardtile"."transparent_background",
- "posthog_dashboardtile"."deleted"
- FROM "posthog_dashboardtile"
- INNER JOIN "posthog_dashboard" ON ("posthog_dashboardtile"."dashboard_id" = "posthog_dashboard"."id")
- WHERE (NOT ("posthog_dashboardtile"."deleted"
- AND "posthog_dashboardtile"."deleted" IS NOT NULL)
- AND NOT ("posthog_dashboard"."deleted")
- AND "posthog_dashboardtile"."insight_id" = 99999)
- '''
-# ---
-# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.166
- '''
- SELECT "posthog_insightvariable"."created_by_id",
- "posthog_insightvariable"."created_at",
- "posthog_insightvariable"."updated_at",
- "posthog_insightvariable"."id",
- "posthog_insightvariable"."team_id",
- "posthog_insightvariable"."name",
- "posthog_insightvariable"."code_name",
- "posthog_insightvariable"."type",
- "posthog_insightvariable"."default_value",
- "posthog_insightvariable"."values"
- FROM "posthog_insightvariable"
- WHERE "posthog_insightvariable"."team_id" = 99999
- '''
-# ---
-# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.167
- '''
- SELECT "posthog_dashboardtile"."dashboard_id" AS "dashboard_id"
- FROM "posthog_dashboardtile"
- INNER JOIN "posthog_dashboard" ON ("posthog_dashboardtile"."dashboard_id" = "posthog_dashboard"."id")
- WHERE (NOT ("posthog_dashboardtile"."deleted"
- AND "posthog_dashboardtile"."deleted" IS NOT NULL)
- AND NOT ("posthog_dashboard"."deleted")
- AND "posthog_dashboardtile"."insight_id" = 99999)
- '''
-# ---
-# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.168
- '''
- SELECT "posthog_dashboard"."id",
- "posthog_dashboard"."name",
- "posthog_dashboard"."description",
- "posthog_dashboard"."team_id",
- "posthog_dashboard"."pinned",
- "posthog_dashboard"."created_at",
- "posthog_dashboard"."created_by_id",
- "posthog_dashboard"."deleted",
- "posthog_dashboard"."last_accessed_at",
- "posthog_dashboard"."last_refresh",
- "posthog_dashboard"."filters",
- "posthog_dashboard"."variables",
- "posthog_dashboard"."breakdown_colors",
- "posthog_dashboard"."data_color_theme_id",
- "posthog_dashboard"."creation_mode",
- "posthog_dashboard"."restriction_level",
- "posthog_dashboard"."quick_filter_ids",
- "posthog_dashboard"."deprecated_tags",
- "posthog_dashboard"."tags",
- "posthog_dashboard"."share_token",
- "posthog_dashboard"."is_shared"
- FROM "posthog_dashboard"
- WHERE (NOT ("posthog_dashboard"."deleted")
- AND "posthog_dashboard"."id" IN (1,
- 2,
- 3,
- 4,
- 5 /* ... */))
- '''
-# ---
-# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.169
- '''
- SELECT "posthog_tag"."name" AS "tag__name"
- FROM "posthog_taggeditem"
- INNER JOIN "posthog_tag" ON ("posthog_taggeditem"."tag_id" = "posthog_tag"."id")
- WHERE "posthog_taggeditem"."insight_id" = 99999
- '''
-# ---
-# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.17
- '''
- SELECT "posthog_tag"."name" AS "tag__name"
- FROM "posthog_taggeditem"
- INNER JOIN "posthog_tag" ON ("posthog_taggeditem"."tag_id" = "posthog_tag"."id")
- WHERE "posthog_taggeditem"."dashboard_id" = 99999
- '''
-# ---
-# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.170
- '''
- SELECT "posthog_user"."id",
- "posthog_user"."password",
- "posthog_user"."last_login",
- "posthog_user"."first_name",
- "posthog_user"."last_name",
- "posthog_user"."is_staff",
- "posthog_user"."date_joined",
- "posthog_user"."uuid",
- "posthog_user"."current_organization_id",
- "posthog_user"."current_team_id",
- "posthog_user"."email",
- "posthog_user"."pending_email",
- "posthog_user"."distinct_id",
- "posthog_user"."is_email_verified",
- "posthog_user"."credentials_reviewed_at",
- "posthog_user"."requested_2fa_reset_at",
- "posthog_user"."has_seen_product_intro_for",
- "posthog_user"."strapi_id",
- "posthog_user"."is_active",
- "posthog_user"."role_at_organization",
- "posthog_user"."theme_mode",
- "posthog_user"."partial_notification_settings",
- "posthog_user"."anonymize_data",
- "posthog_user"."allow_impersonation",
- "posthog_user"."toolbar_mode",
- "posthog_user"."hedgehog_config",
- "posthog_user"."allow_sidebar_suggestions",
- "posthog_user"."shortcut_position",
- "posthog_user"."passkeys_enabled_for_2fa",
- "posthog_user"."hide_mcp_hints",
- "posthog_user"."onboarding_skipped_at",
- "posthog_user"."onboarding_skipped_reason",
- "posthog_user"."onboarding_skipped_organization_id",
- "posthog_user"."onboarding_delegated_to_invite_id",
- "posthog_user"."onboarding_delegated_to_organization_id",
- "posthog_user"."onboarding_delegation_accepted_at",
- "posthog_user"."events_column_config",
- "posthog_user"."email_opt_in"
- FROM "posthog_user"
- WHERE ("posthog_user"."is_active"
- AND "posthog_user"."id" = 99999)
- '''
-# ---
-# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.171
- '''
- SELECT "posthog_organization"."id",
- "posthog_organization"."name",
- "posthog_organization"."slug",
- "posthog_organization"."logo_media_id",
- "posthog_organization"."created_at",
- "posthog_organization"."updated_at",
- "posthog_organization"."is_active",
- "posthog_organization"."is_not_active_reason",
- "posthog_organization"."session_cookie_age",
- "posthog_organization"."is_member_join_email_enabled",
- "posthog_organization"."is_ai_data_processing_approved",
- "posthog_organization"."is_ai_training_opted_in",
- "posthog_organization"."is_ai_training_locked",
- "posthog_organization"."is_ai_training_cta_shown",
- "posthog_organization"."enforce_2fa",
- "posthog_organization"."members_can_invite",
- "posthog_organization"."members_can_create_projects",
- "posthog_organization"."members_can_use_personal_api_keys",
- "posthog_organization"."allow_publicly_shared_resources",
- "posthog_organization"."default_role_id",
- "posthog_organization"."plugins_access_level",
- "posthog_organization"."for_internal_metrics",
- "posthog_organization"."default_experiment_stats_method",
- "posthog_organization"."default_anonymize_ips",
- "posthog_organization"."is_hipaa",
- "posthog_organization"."is_pending_deletion",
- "posthog_organization"."customer_id",
- "posthog_organization"."available_product_features",
- "posthog_organization"."usage",
- "posthog_organization"."never_drop_data",
- "posthog_organization"."customer_trust_scores",
- "posthog_organization"."setup_section_2_completed",
- "posthog_organization"."personalization",
- "posthog_organization"."domain_whitelist",
- "posthog_organization"."is_platform"
- FROM "posthog_organization"
- WHERE "posthog_organization"."id" = '00000000-0000-0000-0000-000000000000'::uuid
- LIMIT 21
- '''
-# ---
-# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.172
- '''
- SELECT "posthog_team"."id",
- "posthog_team"."uuid",
- "posthog_team"."organization_id",
- "posthog_team"."parent_team_id",
- "posthog_team"."project_id",
- "posthog_team"."api_token",
- "posthog_team"."app_urls",
- "posthog_team"."name",
- "posthog_team"."slack_incoming_webhook",
- "posthog_team"."created_at",
- "posthog_team"."updated_at",
- "posthog_team"."anonymize_ips",
- "posthog_team"."completed_snippet_onboarding",
- "posthog_team"."has_completed_onboarding_for",
- "posthog_team"."onboarding_tasks",
- "posthog_team"."ingested_event",
- "posthog_team"."ingested_production_event",
- "posthog_team"."ingested_production_event_last_checked_at",
- "posthog_team"."person_processing_opt_out",
- "posthog_team"."secret_api_token",
- "posthog_team"."secret_api_token_backup",
- "posthog_team"."session_recording_opt_in",
- "posthog_team"."session_recording_sample_rate",
- "posthog_team"."session_recording_minimum_duration_milliseconds",
- "posthog_team"."session_recording_linked_flag",
- "posthog_team"."session_recording_network_payload_capture_config",
- "posthog_team"."session_recording_masking_config",
- "posthog_team"."session_recording_url_trigger_config",
- "posthog_team"."session_recording_url_blocklist_config",
- "posthog_team"."session_recording_event_trigger_config",
- "posthog_team"."session_recording_trigger_match_type_config",
- "posthog_team"."session_recording_trigger_groups",
- "posthog_team"."session_replay_config",
- "posthog_team"."session_recording_retention_period",
- "posthog_team"."event_retention_months",
- "posthog_team"."conversations_enabled",
- "posthog_team"."conversations_settings",
- "posthog_team"."proactive_tasks_enabled",
- "posthog_team"."survey_config",
- "posthog_team"."surveys_opt_in",
- "posthog_team"."product_tours_opt_in",
- "posthog_team"."capture_console_log_opt_in",
- "posthog_team"."capture_performance_opt_in",
- "posthog_team"."capture_dead_clicks",
- "posthog_team"."autocapture_opt_out",
- "posthog_team"."autocapture_web_vitals_opt_in",
- "posthog_team"."autocapture_web_vitals_allowed_metrics",
- "posthog_team"."autocapture_exceptions_opt_in",
- "posthog_team"."autocapture_exceptions_errors_to_ignore",
- "posthog_team"."logs_settings",
- "posthog_team"."llm_gateway_enabled_at",
- "posthog_team"."llm_gateway_revoked_at",
- "posthog_team"."llm_gateway_overspend_allowance_usd",
- "posthog_team"."heatmaps_opt_in",
- "posthog_team"."receive_org_level_activity_logs",
- "posthog_team"."web_analytics_pre_aggregated_tables_enabled",
- "posthog_team"."web_analytics_pre_aggregated_tables_version",
- "posthog_team"."flags_persistence_default",
- "posthog_team"."feature_flag_confirmation_enabled",
- "posthog_team"."feature_flag_confirmation_message",
- "posthog_team"."default_evaluation_environments_enabled",
- "posthog_team"."require_evaluation_environment_tags",
- "posthog_team"."default_evaluation_contexts_enabled",
- "posthog_team"."require_evaluation_contexts",
- "posthog_team"."session_recording_version",
- "posthog_team"."signup_token",
- "posthog_team"."is_demo",
- "posthog_team"."access_control",
- "posthog_team"."week_start_day",
- "posthog_team"."inject_web_apps",
- "posthog_team"."test_account_filters",
- "posthog_team"."test_account_filters_default_checked",
- "posthog_team"."path_cleaning_filters",
- "posthog_team"."timezone",
- "posthog_team"."data_attributes",
- "posthog_team"."person_display_name_properties",
- "posthog_team"."live_events_columns",
- "posthog_team"."recording_domains",
- "posthog_team"."human_friendly_comparison_periods",
- "posthog_team"."cookieless_server_hash_mode",
- "posthog_team"."primary_dashboard_id",
- "posthog_team"."default_data_theme",
- "posthog_team"."extra_settings",
- "posthog_team"."modifiers",
- "posthog_team"."correlation_config",
- "posthog_team"."session_recording_retention_period_days",
- "posthog_team"."external_data_workspace_id",
- "posthog_team"."external_data_workspace_last_synced_at",
- "posthog_team"."api_query_rate_limit",
- "posthog_team"."drop_events_older_than",
- "posthog_team"."base_currency",
- "posthog_team"."experiment_recalculation_time",
- "posthog_team"."default_experiment_confidence_level",
- "posthog_team"."default_experiment_stats_method",
- "posthog_team"."business_model",
- "posthog_organization"."id",
- "posthog_organization"."name",
- "posthog_organization"."slug",
- "posthog_organization"."logo_media_id",
- "posthog_organization"."created_at",
- "posthog_organization"."updated_at",
- "posthog_organization"."is_active",
- "posthog_organization"."is_not_active_reason",
- "posthog_organization"."session_cookie_age",
- "posthog_organization"."is_member_join_email_enabled",
- "posthog_organization"."is_ai_data_processing_approved",
- "posthog_organization"."is_ai_training_opted_in",
- "posthog_organization"."is_ai_training_locked",
- "posthog_organization"."is_ai_training_cta_shown",
- "posthog_organization"."enforce_2fa",
- "posthog_organization"."members_can_invite",
- "posthog_organization"."members_can_create_projects",
- "posthog_organization"."members_can_use_personal_api_keys",
- "posthog_organization"."allow_publicly_shared_resources",
- "posthog_organization"."default_role_id",
- "posthog_organization"."plugins_access_level",
- "posthog_organization"."for_internal_metrics",
- "posthog_organization"."default_experiment_stats_method",
- "posthog_organization"."default_anonymize_ips",
- "posthog_organization"."is_hipaa",
- "posthog_organization"."is_pending_deletion",
- "posthog_organization"."customer_id",
- "posthog_organization"."available_product_features",
- "posthog_organization"."usage",
- "posthog_organization"."never_drop_data",
- "posthog_organization"."customer_trust_scores",
- "posthog_organization"."setup_section_2_completed",
- "posthog_organization"."personalization",
- "posthog_organization"."domain_whitelist",
- "posthog_organization"."is_platform"
- FROM "posthog_team"
- INNER JOIN "posthog_organization" ON ("posthog_team"."organization_id" = "posthog_organization"."id")
- WHERE "posthog_team"."id" = 99999
- LIMIT 21
- '''
-# ---
-# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.173
- '''
- SELECT "posthog_organizationmembership"."id",
- "posthog_organizationmembership"."organization_id",
- "posthog_organizationmembership"."user_id",
- "posthog_organizationmembership"."level",
- "posthog_organizationmembership"."joined_at",
- "posthog_organizationmembership"."updated_at",
- "posthog_organizationmembership"."invited_by_id",
- "posthog_organization"."id",
- "posthog_organization"."name",
- "posthog_organization"."slug",
- "posthog_organization"."logo_media_id",
- "posthog_organization"."created_at",
- "posthog_organization"."updated_at",
- "posthog_organization"."is_active",
- "posthog_organization"."is_not_active_reason",
- "posthog_organization"."session_cookie_age",
- "posthog_organization"."is_member_join_email_enabled",
- "posthog_organization"."is_ai_data_processing_approved",
- "posthog_organization"."is_ai_training_opted_in",
- "posthog_organization"."is_ai_training_locked",
- "posthog_organization"."is_ai_training_cta_shown",
- "posthog_organization"."enforce_2fa",
- "posthog_organization"."members_can_invite",
- "posthog_organization"."members_can_create_projects",
- "posthog_organization"."members_can_use_personal_api_keys",
- "posthog_organization"."allow_publicly_shared_resources",
- "posthog_organization"."default_role_id",
- "posthog_organization"."plugins_access_level",
- "posthog_organization"."for_internal_metrics",
- "posthog_organization"."default_experiment_stats_method",
- "posthog_organization"."default_anonymize_ips",
- "posthog_organization"."is_hipaa",
- "posthog_organization"."is_pending_deletion",
- "posthog_organization"."customer_id",
- "posthog_organization"."available_product_features",
- "posthog_organization"."usage",
- "posthog_organization"."never_drop_data",
- "posthog_organization"."customer_trust_scores",
- "posthog_organization"."setup_section_2_completed",
- "posthog_organization"."personalization",
- "posthog_organization"."domain_whitelist",
- "posthog_organization"."is_platform"
- FROM "posthog_organizationmembership"
- INNER JOIN "posthog_organization" ON ("posthog_organizationmembership"."organization_id" = "posthog_organization"."id")
- WHERE ("posthog_organizationmembership"."organization_id" = '00000000-0000-0000-0000-000000000000'::uuid
- AND "posthog_organizationmembership"."user_id" = 99999)
- LIMIT 21
- '''
-# ---
-# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.174
- '''
- SELECT "ee_accesscontrol"."id",
- "ee_accesscontrol"."team_id",
- "ee_accesscontrol"."access_level",
- "ee_accesscontrol"."resource",
- "ee_accesscontrol"."resource_id",
- "ee_accesscontrol"."organization_member_id",
- "ee_accesscontrol"."role_id",
- "ee_accesscontrol"."created_by_id",
- "ee_accesscontrol"."created_at",
- "ee_accesscontrol"."updated_at",
- "posthog_team"."organization_id" AS "_team_organization_id"
- FROM "ee_accesscontrol"
- INNER JOIN "posthog_team" ON ("ee_accesscontrol"."team_id" = "posthog_team"."id")
- LEFT OUTER JOIN "posthog_organizationmembership" ON ("ee_accesscontrol"."organization_member_id" = "posthog_organizationmembership"."id")
- WHERE (("ee_accesscontrol"."organization_member_id" IS NULL
- AND "ee_accesscontrol"."role_id" IS NULL
- AND "ee_accesscontrol"."team_id" = 99999)
- OR ("posthog_organizationmembership"."user_id" = 99999
- AND "ee_accesscontrol"."role_id" IS NULL
- AND "ee_accesscontrol"."team_id" = 99999))
- '''
-# ---
-# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.175
- '''
- SELECT "posthog_organizationmembership"."id",
- "posthog_organizationmembership"."organization_id",
- "posthog_organizationmembership"."user_id",
- "posthog_organizationmembership"."level",
- "posthog_organizationmembership"."joined_at",
- "posthog_organizationmembership"."updated_at",
- "posthog_organizationmembership"."invited_by_id",
- "posthog_organization"."id",
- "posthog_organization"."name",
- "posthog_organization"."slug",
- "posthog_organization"."logo_media_id",
- "posthog_organization"."created_at",
- "posthog_organization"."updated_at",
- "posthog_organization"."is_active",
- "posthog_organization"."is_not_active_reason",
- "posthog_organization"."session_cookie_age",
- "posthog_organization"."is_member_join_email_enabled",
- "posthog_organization"."is_ai_data_processing_approved",
- "posthog_organization"."is_ai_training_opted_in",
- "posthog_organization"."is_ai_training_locked",
- "posthog_organization"."is_ai_training_cta_shown",
- "posthog_organization"."enforce_2fa",
- "posthog_organization"."members_can_invite",
- "posthog_organization"."members_can_create_projects",
- "posthog_organization"."members_can_use_personal_api_keys",
- "posthog_organization"."allow_publicly_shared_resources",
- "posthog_organization"."default_role_id",
- "posthog_organization"."plugins_access_level",
- "posthog_organization"."for_internal_metrics",
- "posthog_organization"."default_experiment_stats_method",
- "posthog_organization"."default_anonymize_ips",
- "posthog_organization"."is_hipaa",
- "posthog_organization"."is_pending_deletion",
- "posthog_organization"."customer_id",
- "posthog_organization"."available_product_features",
- "posthog_organization"."usage",
- "posthog_organization"."never_drop_data",
- "posthog_organization"."customer_trust_scores",
- "posthog_organization"."setup_section_2_completed",
- "posthog_organization"."personalization",
- "posthog_organization"."domain_whitelist",
- "posthog_organization"."is_platform"
- FROM "posthog_organizationmembership"
- INNER JOIN "posthog_organization" ON ("posthog_organizationmembership"."organization_id" = "posthog_organization"."id")
- WHERE "posthog_organizationmembership"."user_id" = 99999
- '''
-# ---
-# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.176
- '''
- SELECT "ee_accesscontrol"."team_id" AS "team_id",
- "ee_accesscontrol"."resource_id" AS "resource_id",
- "ee_accesscontrol"."organization_member_id" AS "organization_member_id",
- "ee_accesscontrol"."role_id" AS "role_id",
- "ee_accesscontrol"."access_level" AS "access_level"
- FROM "ee_accesscontrol"
- INNER JOIN "posthog_team" ON ("ee_accesscontrol"."team_id" = "posthog_team"."id")
- WHERE ("ee_accesscontrol"."resource" = 'project'
- AND "posthog_team"."organization_id" IN ('00000000-0000-0000-0000-000000000000'::uuid))
- '''
-# ---
-# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.177
- '''
- SELECT "ee_rolemembership"."organization_member_id" AS "organization_member_id",
- "ee_rolemembership"."role_id" AS "role_id"
- FROM "ee_rolemembership"
- WHERE "ee_rolemembership"."user_id" = 99999
- '''
-# ---
-# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.178
- '''
- SELECT "posthog_dashboard"."id",
- "posthog_dashboard"."name",
- "posthog_dashboard"."description",
- "posthog_dashboard"."team_id",
- "posthog_dashboard"."pinned",
- "posthog_dashboard"."created_at",
- "posthog_dashboard"."created_by_id",
- "posthog_dashboard"."deleted",
- "posthog_dashboard"."last_accessed_at",
- "posthog_dashboard"."last_refresh",
- "posthog_dashboard"."filters",
- "posthog_dashboard"."variables",
- "posthog_dashboard"."breakdown_colors",
- "posthog_dashboard"."data_color_theme_id",
- "posthog_dashboard"."creation_mode",
- "posthog_dashboard"."restriction_level",
- "posthog_dashboard"."quick_filter_ids",
- "posthog_dashboard"."deprecated_tags",
- "posthog_dashboard"."tags",
- "posthog_dashboard"."share_token",
- "posthog_dashboard"."is_shared",
- recent_dashboard_views."viewed_at" AS "last_viewed_at",
- ("posthog_dashboard"."id")::varchar AS "_ref_id",
-
- (SELECT U0."path" AS "path"
- FROM "posthog_filesystem" U0
- WHERE ((U0."surface" IS NULL
- OR U0."surface" = 'web')
- AND U0."ref" = ("posthog_dashboard"."id")::varchar
- AND U0."team_id" = ("posthog_dashboard"."team_id")
- AND U0."type" = 'dashboard'
- AND NOT (U0."shortcut"
- AND U0."shortcut" IS NOT NULL))
- ORDER BY U0."id" ASC
- LIMIT 1) AS "_folder_path",
- T6."id",
- T6."password",
- T6."last_login",
- T6."first_name",
- T6."last_name",
- T6."is_staff",
- T6."date_joined",
- T6."uuid",
- T6."current_organization_id",
- T6."current_team_id",
- T6."email",
- T6."pending_email",
- T6."distinct_id",
- T6."is_email_verified",
- T6."credentials_reviewed_at",
- T6."requested_password_reset_at",
- T6."requested_2fa_reset_at",
- T6."has_seen_product_intro_for",
- T6."strapi_id",
- T6."is_active",
- T6."role_at_organization",
- T6."theme_mode",
- T6."partial_notification_settings",
- T6."anonymize_data",
- T6."allow_impersonation",
- T6."toolbar_mode",
- T6."hedgehog_config",
- T6."allow_sidebar_suggestions",
- T6."shortcut_position",
- T6."passkeys_enabled_for_2fa",
- T6."hide_mcp_hints",
- T6."onboarding_skipped_at",
- T6."onboarding_skipped_reason",
- T6."onboarding_skipped_organization_id",
- T6."onboarding_delegated_to_invite_id",
- T6."onboarding_delegated_to_organization_id",
- T6."onboarding_delegation_accepted_at",
- T6."events_column_config",
- T6."email_opt_in"
- FROM "posthog_dashboard"
- INNER JOIN "posthog_team" ON ("posthog_dashboard"."team_id" = "posthog_team"."id")
- LEFT OUTER JOIN "posthog_filesystemviewlog" recent_dashboard_views ON ("posthog_team"."id" = recent_dashboard_views."team_id"
- AND ((recent_dashboard_views."user_id" = 99999
- AND recent_dashboard_views."type" = 'dashboard'
- AND recent_dashboard_views."ref" = ("posthog_dashboard"."id")::varchar)))
- LEFT OUTER JOIN "posthog_user" T6 ON ("posthog_dashboard"."created_by_id" = T6."id")
- WHERE ("posthog_team"."project_id" = 99999
- AND NOT ("posthog_dashboard"."deleted")
- AND "posthog_dashboard"."id" = 99999)
- LIMIT 21
- '''
-# ---
-# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.179
- '''
- SELECT "posthog_sharingconfiguration"."id",
- "posthog_sharingconfiguration"."team_id",
- "posthog_sharingconfiguration"."dashboard_id",
- "posthog_sharingconfiguration"."insight_id",
- "posthog_sharingconfiguration"."recording_id",
- "posthog_sharingconfiguration"."notebook_id",
- "posthog_sharingconfiguration"."interviewee_context_id",
- "posthog_sharingconfiguration"."created_at",
- "posthog_sharingconfiguration"."enabled",
- "posthog_sharingconfiguration"."access_token",
- "posthog_sharingconfiguration"."expires_at",
- "posthog_sharingconfiguration"."settings",
- "posthog_sharingconfiguration"."password_required"
- FROM "posthog_sharingconfiguration"
- WHERE "posthog_sharingconfiguration"."dashboard_id" IN (1,
- 2,
- 3,
- 4,
- 5 /* ... */)
- '''
-# ---
-# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.18
- '''
- SELECT "posthog_user"."id",
- "posthog_user"."password",
- "posthog_user"."last_login",
- "posthog_user"."first_name",
- "posthog_user"."last_name",
- "posthog_user"."is_staff",
- "posthog_user"."date_joined",
- "posthog_user"."uuid",
- "posthog_user"."current_organization_id",
- "posthog_user"."current_team_id",
- "posthog_user"."email",
- "posthog_user"."pending_email",
- "posthog_user"."distinct_id",
- "posthog_user"."is_email_verified",
- "posthog_user"."credentials_reviewed_at",
- "posthog_user"."requested_2fa_reset_at",
- "posthog_user"."has_seen_product_intro_for",
- "posthog_user"."strapi_id",
- "posthog_user"."is_active",
- "posthog_user"."role_at_organization",
- "posthog_user"."theme_mode",
- "posthog_user"."partial_notification_settings",
- "posthog_user"."anonymize_data",
- "posthog_user"."allow_impersonation",
- "posthog_user"."toolbar_mode",
- "posthog_user"."hedgehog_config",
- "posthog_user"."allow_sidebar_suggestions",
- "posthog_user"."shortcut_position",
- "posthog_user"."passkeys_enabled_for_2fa",
- "posthog_user"."hide_mcp_hints",
- "posthog_user"."onboarding_skipped_at",
- "posthog_user"."onboarding_skipped_reason",
- "posthog_user"."onboarding_skipped_organization_id",
- "posthog_user"."onboarding_delegated_to_invite_id",
- "posthog_user"."onboarding_delegated_to_organization_id",
- "posthog_user"."onboarding_delegation_accepted_at",
- "posthog_user"."events_column_config",
- "posthog_user"."email_opt_in"
- FROM "posthog_user"
- WHERE ("posthog_user"."is_active"
- AND "posthog_user"."id" = 99999)
- '''
-# ---
-# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.180
- '''
- SELECT "posthog_dashboardtile"."id",
- "posthog_dashboardtile"."dashboard_id",
- "posthog_dashboardtile"."insight_id",
- "posthog_dashboardtile"."text_id",
- "posthog_dashboardtile"."button_tile_id",
- "posthog_dashboardtile"."widget_id",
- "posthog_dashboardtile"."team_id",
- "posthog_dashboardtile"."layouts",
- "posthog_dashboardtile"."color",
- "posthog_dashboardtile"."filters_hash",
- "posthog_dashboardtile"."last_refresh",
- "posthog_dashboardtile"."refreshing",
- "posthog_dashboardtile"."refresh_attempt",
- "posthog_dashboardtile"."filters_overrides",
- "posthog_dashboardtile"."show_description",
- "posthog_dashboardtile"."transparent_background",
- "posthog_dashboardtile"."deleted",
- "posthog_dashboarditem"."id",
- "posthog_dashboarditem"."name",
- "posthog_dashboarditem"."derived_name",
- "posthog_dashboarditem"."description",
- "posthog_dashboarditem"."team_id",
- "posthog_dashboarditem"."filters",
- "posthog_dashboarditem"."filters_hash",
- "posthog_dashboarditem"."query",
- "posthog_dashboarditem"."query_metadata",
- "posthog_dashboarditem"."order",
- "posthog_dashboarditem"."deleted",
- "posthog_dashboarditem"."saved",
- "posthog_dashboarditem"."created_at",
- "posthog_dashboarditem"."refreshing",
- "posthog_dashboarditem"."created_by_id",
- "posthog_dashboarditem"."is_sample",
- "posthog_dashboarditem"."short_id",
- "posthog_dashboarditem"."favorited",
- "posthog_dashboarditem"."refresh_attempt",
- "posthog_dashboarditem"."last_modified_at",
- "posthog_dashboarditem"."last_modified_by_id",
- "posthog_dashboarditem"."dashboard_id",
- "posthog_dashboarditem"."last_refresh",
- "posthog_dashboarditem"."layouts",
- "posthog_dashboarditem"."color",
- "posthog_dashboarditem"."dive_dashboard_id",
- "posthog_dashboarditem"."updated_at",
- "posthog_dashboarditem"."deprecated_tags",
- "posthog_dashboarditem"."tags",
- "posthog_team"."id",
- "posthog_team"."uuid",
- "posthog_team"."organization_id",
- "posthog_team"."parent_team_id",
- "posthog_team"."project_id",
- "posthog_team"."api_token",
- "posthog_team"."app_urls",
- "posthog_team"."name",
- "posthog_team"."slack_incoming_webhook",
- "posthog_team"."created_at",
- "posthog_team"."updated_at",
- "posthog_team"."anonymize_ips",
- "posthog_team"."completed_snippet_onboarding",
- "posthog_team"."has_completed_onboarding_for",
- "posthog_team"."onboarding_tasks",
- "posthog_team"."ingested_event",
- "posthog_team"."ingested_production_event",
- "posthog_team"."ingested_production_event_last_checked_at",
- "posthog_team"."person_processing_opt_out",
- "posthog_team"."secret_api_token",
- "posthog_team"."secret_api_token_backup",
- "posthog_team"."session_recording_opt_in",
- "posthog_team"."session_recording_sample_rate",
- "posthog_team"."session_recording_minimum_duration_milliseconds",
- "posthog_team"."session_recording_linked_flag",
- "posthog_team"."session_recording_network_payload_capture_config",
- "posthog_team"."session_recording_masking_config",
- "posthog_team"."session_recording_url_trigger_config",
- "posthog_team"."session_recording_url_blocklist_config",
- "posthog_team"."session_recording_event_trigger_config",
- "posthog_team"."session_recording_trigger_match_type_config",
- "posthog_team"."session_recording_trigger_groups",
- "posthog_team"."session_replay_config",
- "posthog_team"."session_recording_retention_period",
- "posthog_team"."event_retention_months",
- "posthog_team"."conversations_enabled",
- "posthog_team"."conversations_settings",
- "posthog_team"."proactive_tasks_enabled",
- "posthog_team"."survey_config",
- "posthog_team"."surveys_opt_in",
- "posthog_team"."product_tours_opt_in",
- "posthog_team"."capture_console_log_opt_in",
- "posthog_team"."capture_performance_opt_in",
- "posthog_team"."capture_dead_clicks",
- "posthog_team"."autocapture_opt_out",
- "posthog_team"."autocapture_web_vitals_opt_in",
- "posthog_team"."autocapture_web_vitals_allowed_metrics",
- "posthog_team"."autocapture_exceptions_opt_in",
- "posthog_team"."autocapture_exceptions_errors_to_ignore",
- "posthog_team"."logs_settings",
- "posthog_team"."llm_gateway_enabled_at",
- "posthog_team"."llm_gateway_revoked_at",
- "posthog_team"."llm_gateway_overspend_allowance_usd",
- "posthog_team"."heatmaps_opt_in",
- "posthog_team"."receive_org_level_activity_logs",
- "posthog_team"."web_analytics_pre_aggregated_tables_enabled",
- "posthog_team"."web_analytics_pre_aggregated_tables_version",
- "posthog_team"."flags_persistence_default",
- "posthog_team"."feature_flag_confirmation_enabled",
- "posthog_team"."feature_flag_confirmation_message",
- "posthog_team"."default_evaluation_environments_enabled",
- "posthog_team"."require_evaluation_environment_tags",
- "posthog_team"."default_evaluation_contexts_enabled",
- "posthog_team"."require_evaluation_contexts",
- "posthog_team"."session_recording_version",
- "posthog_team"."signup_token",
- "posthog_team"."is_demo",
- "posthog_team"."access_control",
- "posthog_team"."week_start_day",
- "posthog_team"."inject_web_apps",
- "posthog_team"."test_account_filters",
- "posthog_team"."test_account_filters_default_checked",
- "posthog_team"."path_cleaning_filters",
- "posthog_team"."timezone",
- "posthog_team"."data_attributes",
- "posthog_team"."person_display_name_properties",
- "posthog_team"."live_events_columns",
- "posthog_team"."recording_domains",
- "posthog_team"."human_friendly_comparison_periods",
- "posthog_team"."cookieless_server_hash_mode",
- "posthog_team"."primary_dashboard_id",
- "posthog_team"."default_data_theme",
- "posthog_team"."extra_settings",
- "posthog_team"."modifiers",
- "posthog_team"."correlation_config",
- "posthog_team"."session_recording_retention_period_days",
- "posthog_team"."plugins_opt_in",
- "posthog_team"."opt_out_capture",
- "posthog_team"."event_names",
- "posthog_team"."event_names_with_usage",
- "posthog_team"."event_properties",
- "posthog_team"."event_properties_with_usage",
- "posthog_team"."event_properties_numerical",
- "posthog_team"."external_data_workspace_id",
- "posthog_team"."external_data_workspace_last_synced_at",
- "posthog_team"."api_query_rate_limit",
- "posthog_team"."revenue_tracking_config",
- "posthog_team"."drop_events_older_than",
- "posthog_team"."base_currency",
- "posthog_team"."experiment_recalculation_time",
- "posthog_team"."default_experiment_confidence_level",
- "posthog_team"."default_experiment_stats_method",
- "posthog_team"."business_model",
- "posthog_user"."id",
- "posthog_user"."password",
- "posthog_user"."last_login",
- "posthog_user"."first_name",
- "posthog_user"."last_name",
- "posthog_user"."is_staff",
- "posthog_user"."date_joined",
- "posthog_user"."uuid",
- "posthog_user"."current_organization_id",
- "posthog_user"."current_team_id",
- "posthog_user"."email",
- "posthog_user"."pending_email",
- "posthog_user"."distinct_id",
- "posthog_user"."is_email_verified",
- "posthog_user"."credentials_reviewed_at",
- "posthog_user"."requested_password_reset_at",
- "posthog_user"."requested_2fa_reset_at",
- "posthog_user"."has_seen_product_intro_for",
- "posthog_user"."strapi_id",
- "posthog_user"."is_active",
- "posthog_user"."role_at_organization",
- "posthog_user"."theme_mode",
- "posthog_user"."partial_notification_settings",
- "posthog_user"."anonymize_data",
- "posthog_user"."allow_impersonation",
- "posthog_user"."toolbar_mode",
- "posthog_user"."hedgehog_config",
- "posthog_user"."allow_sidebar_suggestions",
- "posthog_user"."shortcut_position",
- "posthog_user"."passkeys_enabled_for_2fa",
- "posthog_user"."hide_mcp_hints",
- "posthog_user"."onboarding_skipped_at",
- "posthog_user"."onboarding_skipped_reason",
- "posthog_user"."onboarding_skipped_organization_id",
- "posthog_user"."onboarding_delegated_to_invite_id",
- "posthog_user"."onboarding_delegated_to_organization_id",
- "posthog_user"."onboarding_delegation_accepted_at",
- "posthog_user"."events_column_config",
- "posthog_user"."email_opt_in",
- T6."id",
- T6."password",
- T6."last_login",
- T6."first_name",
- T6."last_name",
- T6."is_staff",
- T6."date_joined",
- T6."uuid",
- T6."current_organization_id",
- T6."current_team_id",
- T6."email",
- T6."pending_email",
- T6."distinct_id",
- T6."is_email_verified",
- T6."credentials_reviewed_at",
- T6."requested_password_reset_at",
- T6."requested_2fa_reset_at",
- T6."has_seen_product_intro_for",
- T6."strapi_id",
- T6."is_active",
- T6."role_at_organization",
- T6."theme_mode",
- T6."partial_notification_settings",
- T6."anonymize_data",
- T6."allow_impersonation",
- T6."toolbar_mode",
- T6."hedgehog_config",
- T6."allow_sidebar_suggestions",
- T6."shortcut_position",
- T6."passkeys_enabled_for_2fa",
- T6."hide_mcp_hints",
- T6."onboarding_skipped_at",
- T6."onboarding_skipped_reason",
- T6."onboarding_skipped_organization_id",
- T6."onboarding_delegated_to_invite_id",
- T6."onboarding_delegated_to_organization_id",
- T6."onboarding_delegation_accepted_at",
- T6."events_column_config",
- T6."email_opt_in",
- "posthog_text"."id",
- "posthog_text"."body",
- "posthog_text"."created_by_id",
- "posthog_text"."last_modified_at",
- "posthog_text"."last_modified_by_id",
- "posthog_text"."team_id",
- "posthog_buttontile"."id",
- "posthog_buttontile"."url",
- "posthog_buttontile"."text",
- "posthog_buttontile"."placement",
- "posthog_buttontile"."style",
- "posthog_buttontile"."created_by_id",
- "posthog_buttontile"."last_modified_at",
- "posthog_buttontile"."last_modified_by_id",
- "posthog_buttontile"."team_id",
- "posthog_dashboardwidget"."id",
- "posthog_dashboardwidget"."widget_type",
- "posthog_dashboardwidget"."name",
- "posthog_dashboardwidget"."description",
- "posthog_dashboardwidget"."config",
- "posthog_dashboardwidget"."created_by_id",
- "posthog_dashboardwidget"."last_modified_at",
- "posthog_dashboardwidget"."last_modified_by_id",
- "posthog_dashboardwidget"."team_id",
- T10."id",
- T10."password",
- T10."last_login",
- T10."first_name",
- T10."last_name",
- T10."is_staff",
- T10."date_joined",
- T10."uuid",
- T10."current_organization_id",
- T10."current_team_id",
- T10."email",
- T10."pending_email",
- T10."distinct_id",
- T10."is_email_verified",
- T10."credentials_reviewed_at",
- T10."requested_password_reset_at",
- T10."requested_2fa_reset_at",
- T10."has_seen_product_intro_for",
- T10."strapi_id",
- T10."is_active",
- T10."role_at_organization",
- T10."theme_mode",
- T10."partial_notification_settings",
- T10."anonymize_data",
- T10."allow_impersonation",
- T10."toolbar_mode",
- T10."hedgehog_config",
- T10."allow_sidebar_suggestions",
- T10."shortcut_position",
- T10."passkeys_enabled_for_2fa",
- T10."hide_mcp_hints",
- T10."onboarding_skipped_at",
- T10."onboarding_skipped_reason",
- T10."onboarding_skipped_organization_id",
- T10."onboarding_delegated_to_invite_id",
- T10."onboarding_delegated_to_organization_id",
- T10."onboarding_delegation_accepted_at",
- T10."events_column_config",
- T10."email_opt_in",
- T11."id",
- T11."password",
- T11."last_login",
- T11."first_name",
- T11."last_name",
- T11."is_staff",
- T11."date_joined",
- T11."uuid",
- T11."current_organization_id",
- T11."current_team_id",
- T11."email",
- T11."pending_email",
- T11."distinct_id",
- T11."is_email_verified",
- T11."credentials_reviewed_at",
- T11."requested_password_reset_at",
- T11."requested_2fa_reset_at",
- T11."has_seen_product_intro_for",
- T11."strapi_id",
- T11."is_active",
- T11."role_at_organization",
- T11."theme_mode",
- T11."partial_notification_settings",
- T11."anonymize_data",
- T11."allow_impersonation",
- T11."toolbar_mode",
- T11."hedgehog_config",
- T11."allow_sidebar_suggestions",
- T11."shortcut_position",
- T11."passkeys_enabled_for_2fa",
- T11."hide_mcp_hints",
- T11."onboarding_skipped_at",
- T11."onboarding_skipped_reason",
- T11."onboarding_skipped_organization_id",
- T11."onboarding_delegated_to_invite_id",
- T11."onboarding_delegated_to_organization_id",
- T11."onboarding_delegation_accepted_at",
- T11."events_column_config",
- T11."email_opt_in"
- FROM "posthog_dashboardtile"
- INNER JOIN "posthog_dashboard" ON ("posthog_dashboardtile"."dashboard_id" = "posthog_dashboard"."id")
- LEFT OUTER JOIN "posthog_dashboarditem" ON ("posthog_dashboardtile"."insight_id" = "posthog_dashboarditem"."id")
- LEFT OUTER JOIN "posthog_team" ON ("posthog_dashboarditem"."team_id" = "posthog_team"."id")
- LEFT OUTER JOIN "posthog_user" ON ("posthog_dashboarditem"."created_by_id" = "posthog_user"."id")
- LEFT OUTER JOIN "posthog_user" T6 ON ("posthog_dashboarditem"."last_modified_by_id" = T6."id")
- LEFT OUTER JOIN "posthog_text" ON ("posthog_dashboardtile"."text_id" = "posthog_text"."id")
- LEFT OUTER JOIN "posthog_buttontile" ON ("posthog_dashboardtile"."button_tile_id" = "posthog_buttontile"."id")
- LEFT OUTER JOIN "posthog_dashboardwidget" ON ("posthog_dashboardtile"."widget_id" = "posthog_dashboardwidget"."id")
- LEFT OUTER JOIN "posthog_user" T10 ON ("posthog_dashboardwidget"."created_by_id" = T10."id")
- LEFT OUTER JOIN "posthog_user" T11 ON ("posthog_dashboardwidget"."last_modified_by_id" = T11."id")
- WHERE (NOT ("posthog_dashboardtile"."deleted"
- AND "posthog_dashboardtile"."deleted" IS NOT NULL)
- AND NOT ("posthog_dashboard"."deleted")
- AND NOT ("posthog_dashboard"."deleted"
- AND "posthog_dashboardtile"."deleted"
- AND "posthog_dashboardtile"."deleted" IS NOT NULL)
- AND (NOT "posthog_dashboarditem"."deleted"
- OR "posthog_dashboardtile"."insight_id" IS NULL)
- AND "posthog_dashboardtile"."dashboard_id" = 99999
- AND "posthog_dashboardtile"."dashboard_id" IN (1,
- 2,
- 3,
- 4,
- 5 /* ... */))
- ORDER BY "posthog_dashboarditem"."order" ASC
- '''
-# ---
-# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.181
- '''
- SELECT "posthog_insightcachingstate"."id",
- "posthog_insightcachingstate"."team_id",
- "posthog_insightcachingstate"."insight_id",
- "posthog_insightcachingstate"."dashboard_tile_id",
- "posthog_insightcachingstate"."cache_key",
- "posthog_insightcachingstate"."target_cache_age_seconds",
- "posthog_insightcachingstate"."last_refresh",
- "posthog_insightcachingstate"."last_refresh_queued_at",
- "posthog_insightcachingstate"."refresh_attempt",
- "posthog_insightcachingstate"."created_at",
- "posthog_insightcachingstate"."updated_at"
- FROM "posthog_insightcachingstate"
- WHERE "posthog_insightcachingstate"."dashboard_tile_id" IN (1,
- 2,
- 3,
- 4,
- 5 /* ... */)
- '''
-# ---
-# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.182
- '''
- SELECT ("posthog_dashboardtile"."insight_id") AS "_prefetch_related_val_insight_id",
- "posthog_dashboard"."id",
- "posthog_dashboard"."name",
- "posthog_dashboard"."description",
- "posthog_dashboard"."team_id",
- "posthog_dashboard"."pinned",
- "posthog_dashboard"."created_at",
- "posthog_dashboard"."created_by_id",
- "posthog_dashboard"."deleted",
- "posthog_dashboard"."last_accessed_at",
- "posthog_dashboard"."last_refresh",
- "posthog_dashboard"."filters",
- "posthog_dashboard"."variables",
- "posthog_dashboard"."breakdown_colors",
- "posthog_dashboard"."data_color_theme_id",
- "posthog_dashboard"."creation_mode",
- "posthog_dashboard"."restriction_level",
- "posthog_dashboard"."quick_filter_ids",
- "posthog_dashboard"."deprecated_tags",
- "posthog_dashboard"."tags",
- "posthog_dashboard"."share_token",
- "posthog_dashboard"."is_shared"
- FROM "posthog_dashboard"
- INNER JOIN "posthog_dashboardtile" ON ("posthog_dashboard"."id" = "posthog_dashboardtile"."dashboard_id")
- WHERE (NOT ("posthog_dashboard"."deleted")
- AND "posthog_dashboard"."id" IN
- (SELECT U0."dashboard_id" AS "dashboard_id"
- FROM "posthog_dashboardtile" U0
- INNER JOIN "posthog_dashboard" U1 ON (U0."dashboard_id" = U1."id")
- WHERE (NOT (U0."deleted"
- AND U0."deleted" IS NOT NULL)
- AND NOT (U1."deleted")))
- AND "posthog_dashboardtile"."insight_id" IN (1,
- 2,
- 3,
- 4,
- 5 /* ... */))
- '''
-# ---
-# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.183
- '''
- SELECT "posthog_dashboardtile"."id",
- "posthog_dashboardtile"."dashboard_id",
- "posthog_dashboardtile"."insight_id",
- "posthog_dashboardtile"."text_id",
- "posthog_dashboardtile"."button_tile_id",
- "posthog_dashboardtile"."widget_id",
- "posthog_dashboardtile"."team_id",
- "posthog_dashboardtile"."layouts",
- "posthog_dashboardtile"."color",
- "posthog_dashboardtile"."filters_hash",
- "posthog_dashboardtile"."last_refresh",
- "posthog_dashboardtile"."refreshing",
- "posthog_dashboardtile"."refresh_attempt",
- "posthog_dashboardtile"."filters_overrides",
- "posthog_dashboardtile"."show_description",
- "posthog_dashboardtile"."transparent_background",
- "posthog_dashboardtile"."deleted"
- FROM "posthog_dashboardtile"
- INNER JOIN "posthog_dashboard" ON ("posthog_dashboardtile"."dashboard_id" = "posthog_dashboard"."id")
- WHERE (NOT ("posthog_dashboardtile"."deleted"
- AND "posthog_dashboardtile"."deleted" IS NOT NULL)
- AND NOT ("posthog_dashboard"."deleted")
- AND "posthog_dashboardtile"."insight_id" IN (1,
- 2,
- 3,
- 4,
- 5 /* ... */))
- '''
-# ---
-# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.184
- '''
- SELECT "posthog_dashboard"."id",
- "posthog_dashboard"."name",
- "posthog_dashboard"."description",
- "posthog_dashboard"."team_id",
- "posthog_dashboard"."pinned",
- "posthog_dashboard"."created_at",
- "posthog_dashboard"."created_by_id",
- "posthog_dashboard"."deleted",
- "posthog_dashboard"."last_accessed_at",
- "posthog_dashboard"."last_refresh",
- "posthog_dashboard"."filters",
- "posthog_dashboard"."variables",
- "posthog_dashboard"."breakdown_colors",
- "posthog_dashboard"."data_color_theme_id",
- "posthog_dashboard"."creation_mode",
- "posthog_dashboard"."restriction_level",
- "posthog_dashboard"."quick_filter_ids",
- "posthog_dashboard"."deprecated_tags",
- "posthog_dashboard"."tags",
- "posthog_dashboard"."share_token",
- "posthog_dashboard"."is_shared"
- FROM "posthog_dashboard"
- WHERE ("posthog_dashboard"."id") IN ((1,
- 2)/* ... */)
- '''
-# ---
-# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.185
- '''
- SELECT "posthog_taggeditem"."id",
- "posthog_taggeditem"."tag_id",
- "posthog_taggeditem"."dashboard_id",
- "posthog_taggeditem"."insight_id",
- "posthog_taggeditem"."event_definition_id",
- "posthog_taggeditem"."property_definition_id",
- "posthog_taggeditem"."action_id",
- "posthog_taggeditem"."feature_flag_id",
- "posthog_taggeditem"."experiment_saved_metric_id",
- "posthog_taggeditem"."ticket_id",
- "posthog_taggeditem"."account_id",
- "posthog_taggeditem"."endpoint_id",
- "posthog_tag"."id",
- "posthog_tag"."name",
- "posthog_tag"."team_id"
- FROM "posthog_taggeditem"
- INNER JOIN "posthog_tag" ON ("posthog_taggeditem"."tag_id" = "posthog_tag"."id")
- WHERE "posthog_taggeditem"."dashboard_id" IN (1,
- 2,
- 3,
- 4,
- 5 /* ... */)
- '''
-# ---
-# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.186
- '''
- SELECT "posthog_team"."id",
- "posthog_team"."uuid",
- "posthog_team"."organization_id",
- "posthog_team"."parent_team_id",
- "posthog_team"."project_id",
- "posthog_team"."api_token",
- "posthog_team"."app_urls",
- "posthog_team"."name",
- "posthog_team"."slack_incoming_webhook",
- "posthog_team"."created_at",
- "posthog_team"."updated_at",
- "posthog_team"."anonymize_ips",
- "posthog_team"."completed_snippet_onboarding",
- "posthog_team"."has_completed_onboarding_for",
- "posthog_team"."onboarding_tasks",
- "posthog_team"."ingested_event",
- "posthog_team"."ingested_production_event",
- "posthog_team"."ingested_production_event_last_checked_at",
- "posthog_team"."person_processing_opt_out",
- "posthog_team"."secret_api_token",
- "posthog_team"."secret_api_token_backup",
- "posthog_team"."session_recording_opt_in",
- "posthog_team"."session_recording_sample_rate",
- "posthog_team"."session_recording_minimum_duration_milliseconds",
- "posthog_team"."session_recording_linked_flag",
- "posthog_team"."session_recording_network_payload_capture_config",
- "posthog_team"."session_recording_masking_config",
- "posthog_team"."session_recording_url_trigger_config",
- "posthog_team"."session_recording_url_blocklist_config",
- "posthog_team"."session_recording_event_trigger_config",
- "posthog_team"."session_recording_trigger_match_type_config",
- "posthog_team"."session_recording_trigger_groups",
- "posthog_team"."session_replay_config",
- "posthog_team"."session_recording_retention_period",
- "posthog_team"."event_retention_months",
- "posthog_team"."conversations_enabled",
- "posthog_team"."conversations_settings",
- "posthog_team"."proactive_tasks_enabled",
- "posthog_team"."survey_config",
- "posthog_team"."surveys_opt_in",
- "posthog_team"."product_tours_opt_in",
- "posthog_team"."capture_console_log_opt_in",
- "posthog_team"."capture_performance_opt_in",
- "posthog_team"."capture_dead_clicks",
- "posthog_team"."autocapture_opt_out",
- "posthog_team"."autocapture_web_vitals_opt_in",
- "posthog_team"."autocapture_web_vitals_allowed_metrics",
- "posthog_team"."autocapture_exceptions_opt_in",
- "posthog_team"."autocapture_exceptions_errors_to_ignore",
- "posthog_team"."logs_settings",
- "posthog_team"."llm_gateway_enabled_at",
- "posthog_team"."llm_gateway_revoked_at",
- "posthog_team"."llm_gateway_overspend_allowance_usd",
- "posthog_team"."heatmaps_opt_in",
- "posthog_team"."receive_org_level_activity_logs",
- "posthog_team"."web_analytics_pre_aggregated_tables_enabled",
- "posthog_team"."web_analytics_pre_aggregated_tables_version",
- "posthog_team"."flags_persistence_default",
- "posthog_team"."feature_flag_confirmation_enabled",
- "posthog_team"."feature_flag_confirmation_message",
- "posthog_team"."default_evaluation_environments_enabled",
- "posthog_team"."require_evaluation_environment_tags",
- "posthog_team"."default_evaluation_contexts_enabled",
- "posthog_team"."require_evaluation_contexts",
- "posthog_team"."session_recording_version",
- "posthog_team"."signup_token",
- "posthog_team"."is_demo",
- "posthog_team"."access_control",
- "posthog_team"."week_start_day",
- "posthog_team"."inject_web_apps",
- "posthog_team"."test_account_filters",
- "posthog_team"."test_account_filters_default_checked",
- "posthog_team"."path_cleaning_filters",
- "posthog_team"."timezone",
- "posthog_team"."data_attributes",
- "posthog_team"."person_display_name_properties",
- "posthog_team"."live_events_columns",
- "posthog_team"."recording_domains",
- "posthog_team"."human_friendly_comparison_periods",
- "posthog_team"."cookieless_server_hash_mode",
- "posthog_team"."primary_dashboard_id",
- "posthog_team"."default_data_theme",
- "posthog_team"."extra_settings",
- "posthog_team"."modifiers",
- "posthog_team"."correlation_config",
- "posthog_team"."session_recording_retention_period_days",
- "posthog_team"."external_data_workspace_id",
- "posthog_team"."external_data_workspace_last_synced_at",
- "posthog_team"."api_query_rate_limit",
- "posthog_team"."drop_events_older_than",
- "posthog_team"."base_currency",
- "posthog_team"."experiment_recalculation_time",
- "posthog_team"."default_experiment_confidence_level",
- "posthog_team"."default_experiment_stats_method",
- "posthog_team"."business_model"
- FROM "posthog_team"
- WHERE "posthog_team"."id" = 99999
- LIMIT 21
- '''
-# ---
-# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.187
- '''
- SELECT "posthog_filesystem"."team_id",
- "posthog_filesystem"."id",
- "posthog_filesystem"."path",
- "posthog_filesystem"."depth",
- "posthog_filesystem"."type",
- "posthog_filesystem"."ref",
- "posthog_filesystem"."href",
- "posthog_filesystem"."shortcut",
- "posthog_filesystem"."meta",
- "posthog_filesystem"."created_at",
- "posthog_filesystem"."created_by_id",
- "posthog_filesystem"."surface",
- "posthog_filesystem"."project_id"
- FROM "posthog_filesystem"
- WHERE (("posthog_filesystem"."surface" IS NULL
- OR "posthog_filesystem"."surface" = 'web')
- AND "posthog_filesystem"."ref" = '0001'
- AND "posthog_filesystem"."team_id" = 99999
- AND "posthog_filesystem"."type" = 'dashboard'
- AND NOT ("posthog_filesystem"."shortcut"
- AND "posthog_filesystem"."shortcut" IS NOT NULL))
- '''
-# ---
-# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.188
- '''
- SELECT "posthog_filesystemshortcut"."id",
- "posthog_filesystemshortcut"."team_id",
- "posthog_filesystemshortcut"."user_id",
- "posthog_filesystemshortcut"."path",
- "posthog_filesystemshortcut"."type",
- "posthog_filesystemshortcut"."ref",
- "posthog_filesystemshortcut"."href",
- "posthog_filesystemshortcut"."order",
- "posthog_filesystemshortcut"."created_at",
- "posthog_filesystemshortcut"."surface"
- FROM "posthog_filesystemshortcut"
- WHERE (("posthog_filesystemshortcut"."surface" IS NULL
- OR "posthog_filesystemshortcut"."surface" = 'web')
- AND "posthog_filesystemshortcut"."ref" = '0001'
- AND "posthog_filesystemshortcut"."team_id" = 99999
- AND "posthog_filesystemshortcut"."type" = 'dashboard'
- AND NOT ("posthog_filesystemshortcut"."path" = 'dashboard-1'
- AND "posthog_filesystemshortcut"."href" = '__skipped__'
- AND "posthog_filesystemshortcut"."href" IS NOT NULL))
- '''
-# ---
-# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.189
- '''
- SELECT "posthog_insightvariable"."created_by_id",
- "posthog_insightvariable"."created_at",
- "posthog_insightvariable"."updated_at",
- "posthog_insightvariable"."id",
- "posthog_insightvariable"."team_id",
- "posthog_insightvariable"."name",
- "posthog_insightvariable"."code_name",
- "posthog_insightvariable"."type",
- "posthog_insightvariable"."default_value",
- "posthog_insightvariable"."values"
- FROM "posthog_insightvariable"
- WHERE "posthog_insightvariable"."team_id" = 99999
- '''
-# ---
-# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.19
- '''
- SELECT "posthog_organization"."id",
- "posthog_organization"."name",
- "posthog_organization"."slug",
- "posthog_organization"."logo_media_id",
- "posthog_organization"."created_at",
- "posthog_organization"."updated_at",
- "posthog_organization"."is_active",
- "posthog_organization"."is_not_active_reason",
- "posthog_organization"."session_cookie_age",
- "posthog_organization"."is_member_join_email_enabled",
- "posthog_organization"."is_ai_data_processing_approved",
- "posthog_organization"."is_ai_training_opted_in",
- "posthog_organization"."is_ai_training_locked",
- "posthog_organization"."is_ai_training_cta_shown",
- "posthog_organization"."enforce_2fa",
- "posthog_organization"."members_can_invite",
- "posthog_organization"."members_can_create_projects",
- "posthog_organization"."members_can_use_personal_api_keys",
- "posthog_organization"."allow_publicly_shared_resources",
- "posthog_organization"."default_role_id",
- "posthog_organization"."plugins_access_level",
- "posthog_organization"."for_internal_metrics",
- "posthog_organization"."default_experiment_stats_method",
- "posthog_organization"."default_anonymize_ips",
- "posthog_organization"."is_hipaa",
- "posthog_organization"."is_pending_deletion",
- "posthog_organization"."customer_id",
- "posthog_organization"."available_product_features",
- "posthog_organization"."usage",
- "posthog_organization"."never_drop_data",
- "posthog_organization"."customer_trust_scores",
- "posthog_organization"."setup_section_2_completed",
- "posthog_organization"."personalization",
- "posthog_organization"."domain_whitelist",
- "posthog_organization"."is_platform"
- FROM "posthog_organization"
- WHERE "posthog_organization"."id" = '00000000-0000-0000-0000-000000000000'::uuid
- LIMIT 21
- '''
-# ---
-# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.190
- '''
- SELECT "posthog_dashboardtile"."id",
- "posthog_dashboardtile"."dashboard_id",
- "posthog_dashboardtile"."insight_id",
- "posthog_dashboardtile"."text_id",
- "posthog_dashboardtile"."button_tile_id",
- "posthog_dashboardtile"."widget_id",
- "posthog_dashboardtile"."team_id",
- "posthog_dashboardtile"."layouts",
- "posthog_dashboardtile"."color",
- "posthog_dashboardtile"."filters_hash",
- "posthog_dashboardtile"."last_refresh",
- "posthog_dashboardtile"."refreshing",
- "posthog_dashboardtile"."refresh_attempt",
- "posthog_dashboardtile"."filters_overrides",
- "posthog_dashboardtile"."show_description",
- "posthog_dashboardtile"."transparent_background",
- "posthog_dashboardtile"."deleted",
- "posthog_dashboarditem"."id",
- "posthog_dashboarditem"."name",
- "posthog_dashboarditem"."derived_name",
- "posthog_dashboarditem"."description",
- "posthog_dashboarditem"."team_id",
- "posthog_dashboarditem"."filters",
- "posthog_dashboarditem"."filters_hash",
- "posthog_dashboarditem"."query",
- "posthog_dashboarditem"."query_metadata",
- "posthog_dashboarditem"."order",
- "posthog_dashboarditem"."deleted",
- "posthog_dashboarditem"."saved",
- "posthog_dashboarditem"."created_at",
- "posthog_dashboarditem"."refreshing",
- "posthog_dashboarditem"."created_by_id",
- "posthog_dashboarditem"."is_sample",
- "posthog_dashboarditem"."short_id",
- "posthog_dashboarditem"."favorited",
- "posthog_dashboarditem"."refresh_attempt",
- "posthog_dashboarditem"."last_modified_at",
- "posthog_dashboarditem"."last_modified_by_id",
- "posthog_dashboarditem"."dashboard_id",
- "posthog_dashboarditem"."last_refresh",
- "posthog_dashboarditem"."layouts",
- "posthog_dashboarditem"."color",
- "posthog_dashboarditem"."dive_dashboard_id",
- "posthog_dashboarditem"."updated_at",
- "posthog_dashboarditem"."deprecated_tags",
- "posthog_dashboarditem"."tags",
- "posthog_team"."id",
- "posthog_team"."uuid",
- "posthog_team"."organization_id",
- "posthog_team"."parent_team_id",
- "posthog_team"."project_id",
- "posthog_team"."api_token",
- "posthog_team"."app_urls",
- "posthog_team"."name",
- "posthog_team"."slack_incoming_webhook",
- "posthog_team"."created_at",
- "posthog_team"."updated_at",
- "posthog_team"."anonymize_ips",
- "posthog_team"."completed_snippet_onboarding",
- "posthog_team"."has_completed_onboarding_for",
- "posthog_team"."onboarding_tasks",
- "posthog_team"."ingested_event",
- "posthog_team"."ingested_production_event",
- "posthog_team"."ingested_production_event_last_checked_at",
- "posthog_team"."person_processing_opt_out",
- "posthog_team"."secret_api_token",
- "posthog_team"."secret_api_token_backup",
- "posthog_team"."session_recording_opt_in",
- "posthog_team"."session_recording_sample_rate",
- "posthog_team"."session_recording_minimum_duration_milliseconds",
- "posthog_team"."session_recording_linked_flag",
- "posthog_team"."session_recording_network_payload_capture_config",
- "posthog_team"."session_recording_masking_config",
- "posthog_team"."session_recording_url_trigger_config",
- "posthog_team"."session_recording_url_blocklist_config",
- "posthog_team"."session_recording_event_trigger_config",
- "posthog_team"."session_recording_trigger_match_type_config",
- "posthog_team"."session_recording_trigger_groups",
- "posthog_team"."session_replay_config",
- "posthog_team"."session_recording_retention_period",
- "posthog_team"."event_retention_months",
- "posthog_team"."conversations_enabled",
- "posthog_team"."conversations_settings",
- "posthog_team"."proactive_tasks_enabled",
- "posthog_team"."survey_config",
- "posthog_team"."surveys_opt_in",
- "posthog_team"."product_tours_opt_in",
- "posthog_team"."capture_console_log_opt_in",
- "posthog_team"."capture_performance_opt_in",
- "posthog_team"."capture_dead_clicks",
- "posthog_team"."autocapture_opt_out",
- "posthog_team"."autocapture_web_vitals_opt_in",
- "posthog_team"."autocapture_web_vitals_allowed_metrics",
- "posthog_team"."autocapture_exceptions_opt_in",
- "posthog_team"."autocapture_exceptions_errors_to_ignore",
- "posthog_team"."logs_settings",
- "posthog_team"."llm_gateway_enabled_at",
- "posthog_team"."llm_gateway_revoked_at",
- "posthog_team"."llm_gateway_overspend_allowance_usd",
- "posthog_team"."heatmaps_opt_in",
- "posthog_team"."receive_org_level_activity_logs",
- "posthog_team"."web_analytics_pre_aggregated_tables_enabled",
- "posthog_team"."web_analytics_pre_aggregated_tables_version",
- "posthog_team"."flags_persistence_default",
- "posthog_team"."feature_flag_confirmation_enabled",
- "posthog_team"."feature_flag_confirmation_message",
- "posthog_team"."default_evaluation_environments_enabled",
- "posthog_team"."require_evaluation_environment_tags",
- "posthog_team"."default_evaluation_contexts_enabled",
- "posthog_team"."require_evaluation_contexts",
- "posthog_team"."session_recording_version",
- "posthog_team"."signup_token",
- "posthog_team"."is_demo",
- "posthog_team"."access_control",
- "posthog_team"."week_start_day",
- "posthog_team"."inject_web_apps",
- "posthog_team"."test_account_filters",
- "posthog_team"."test_account_filters_default_checked",
- "posthog_team"."path_cleaning_filters",
- "posthog_team"."timezone",
- "posthog_team"."data_attributes",
- "posthog_team"."person_display_name_properties",
- "posthog_team"."live_events_columns",
- "posthog_team"."recording_domains",
- "posthog_team"."human_friendly_comparison_periods",
- "posthog_team"."cookieless_server_hash_mode",
- "posthog_team"."primary_dashboard_id",
- "posthog_team"."default_data_theme",
- "posthog_team"."extra_settings",
- "posthog_team"."modifiers",
- "posthog_team"."correlation_config",
- "posthog_team"."session_recording_retention_period_days",
- "posthog_team"."plugins_opt_in",
- "posthog_team"."opt_out_capture",
- "posthog_team"."event_names",
- "posthog_team"."event_names_with_usage",
- "posthog_team"."event_properties",
- "posthog_team"."event_properties_with_usage",
- "posthog_team"."event_properties_numerical",
- "posthog_team"."external_data_workspace_id",
- "posthog_team"."external_data_workspace_last_synced_at",
- "posthog_team"."api_query_rate_limit",
- "posthog_team"."revenue_tracking_config",
- "posthog_team"."drop_events_older_than",
- "posthog_team"."base_currency",
- "posthog_team"."experiment_recalculation_time",
- "posthog_team"."default_experiment_confidence_level",
- "posthog_team"."default_experiment_stats_method",
- "posthog_team"."business_model",
- "posthog_user"."id",
- "posthog_user"."password",
- "posthog_user"."last_login",
- "posthog_user"."first_name",
- "posthog_user"."last_name",
- "posthog_user"."is_staff",
- "posthog_user"."date_joined",
- "posthog_user"."uuid",
- "posthog_user"."current_organization_id",
- "posthog_user"."current_team_id",
- "posthog_user"."email",
- "posthog_user"."pending_email",
- "posthog_user"."distinct_id",
- "posthog_user"."is_email_verified",
- "posthog_user"."credentials_reviewed_at",
- "posthog_user"."requested_password_reset_at",
- "posthog_user"."requested_2fa_reset_at",
- "posthog_user"."has_seen_product_intro_for",
- "posthog_user"."strapi_id",
- "posthog_user"."is_active",
- "posthog_user"."role_at_organization",
- "posthog_user"."theme_mode",
- "posthog_user"."partial_notification_settings",
- "posthog_user"."anonymize_data",
- "posthog_user"."allow_impersonation",
- "posthog_user"."toolbar_mode",
- "posthog_user"."hedgehog_config",
- "posthog_user"."allow_sidebar_suggestions",
- "posthog_user"."shortcut_position",
- "posthog_user"."passkeys_enabled_for_2fa",
- "posthog_user"."hide_mcp_hints",
- "posthog_user"."onboarding_skipped_at",
- "posthog_user"."onboarding_skipped_reason",
- "posthog_user"."onboarding_skipped_organization_id",
- "posthog_user"."onboarding_delegated_to_invite_id",
- "posthog_user"."onboarding_delegated_to_organization_id",
- "posthog_user"."onboarding_delegation_accepted_at",
- "posthog_user"."events_column_config",
- "posthog_user"."email_opt_in",
- T6."id",
- T6."password",
- T6."last_login",
- T6."first_name",
- T6."last_name",
- T6."is_staff",
- T6."date_joined",
- T6."uuid",
- T6."current_organization_id",
- T6."current_team_id",
- T6."email",
- T6."pending_email",
- T6."distinct_id",
- T6."is_email_verified",
- T6."credentials_reviewed_at",
- T6."requested_password_reset_at",
- T6."requested_2fa_reset_at",
- T6."has_seen_product_intro_for",
- T6."strapi_id",
- T6."is_active",
- T6."role_at_organization",
- T6."theme_mode",
- T6."partial_notification_settings",
- T6."anonymize_data",
- T6."allow_impersonation",
- T6."toolbar_mode",
- T6."hedgehog_config",
- T6."allow_sidebar_suggestions",
- T6."shortcut_position",
- T6."passkeys_enabled_for_2fa",
- T6."hide_mcp_hints",
- T6."onboarding_skipped_at",
- T6."onboarding_skipped_reason",
- T6."onboarding_skipped_organization_id",
- T6."onboarding_delegated_to_invite_id",
- T6."onboarding_delegated_to_organization_id",
- T6."onboarding_delegation_accepted_at",
- T6."events_column_config",
- T6."email_opt_in",
- "posthog_text"."id",
- "posthog_text"."body",
- "posthog_text"."created_by_id",
- "posthog_text"."last_modified_at",
- "posthog_text"."last_modified_by_id",
- "posthog_text"."team_id",
- "posthog_buttontile"."id",
- "posthog_buttontile"."url",
- "posthog_buttontile"."text",
- "posthog_buttontile"."placement",
- "posthog_buttontile"."style",
- "posthog_buttontile"."created_by_id",
- "posthog_buttontile"."last_modified_at",
- "posthog_buttontile"."last_modified_by_id",
- "posthog_buttontile"."team_id",
- "posthog_dashboardwidget"."id",
- "posthog_dashboardwidget"."widget_type",
- "posthog_dashboardwidget"."name",
- "posthog_dashboardwidget"."description",
- "posthog_dashboardwidget"."config",
- "posthog_dashboardwidget"."created_by_id",
- "posthog_dashboardwidget"."last_modified_at",
- "posthog_dashboardwidget"."last_modified_by_id",
- "posthog_dashboardwidget"."team_id",
- T10."id",
- T10."password",
- T10."last_login",
- T10."first_name",
- T10."last_name",
- T10."is_staff",
- T10."date_joined",
- T10."uuid",
- T10."current_organization_id",
- T10."current_team_id",
- T10."email",
- T10."pending_email",
- T10."distinct_id",
- T10."is_email_verified",
- T10."credentials_reviewed_at",
- T10."requested_password_reset_at",
- T10."requested_2fa_reset_at",
- T10."has_seen_product_intro_for",
- T10."strapi_id",
- T10."is_active",
- T10."role_at_organization",
- T10."theme_mode",
- T10."partial_notification_settings",
- T10."anonymize_data",
- T10."allow_impersonation",
- T10."toolbar_mode",
- T10."hedgehog_config",
- T10."allow_sidebar_suggestions",
- T10."shortcut_position",
- T10."passkeys_enabled_for_2fa",
- T10."hide_mcp_hints",
- T10."onboarding_skipped_at",
- T10."onboarding_skipped_reason",
- T10."onboarding_skipped_organization_id",
- T10."onboarding_delegated_to_invite_id",
- T10."onboarding_delegated_to_organization_id",
- T10."onboarding_delegation_accepted_at",
- T10."events_column_config",
- T10."email_opt_in",
- T11."id",
- T11."password",
- T11."last_login",
- T11."first_name",
- T11."last_name",
- T11."is_staff",
- T11."date_joined",
- T11."uuid",
- T11."current_organization_id",
- T11."current_team_id",
- T11."email",
- T11."pending_email",
- T11."distinct_id",
- T11."is_email_verified",
- T11."credentials_reviewed_at",
- T11."requested_password_reset_at",
- T11."requested_2fa_reset_at",
- T11."has_seen_product_intro_for",
- T11."strapi_id",
- T11."is_active",
- T11."role_at_organization",
- T11."theme_mode",
- T11."partial_notification_settings",
- T11."anonymize_data",
- T11."allow_impersonation",
- T11."toolbar_mode",
- T11."hedgehog_config",
- T11."allow_sidebar_suggestions",
- T11."shortcut_position",
- T11."passkeys_enabled_for_2fa",
- T11."hide_mcp_hints",
- T11."onboarding_skipped_at",
- T11."onboarding_skipped_reason",
- T11."onboarding_skipped_organization_id",
- T11."onboarding_delegated_to_invite_id",
- T11."onboarding_delegated_to_organization_id",
- T11."onboarding_delegation_accepted_at",
- T11."events_column_config",
- T11."email_opt_in"
- FROM "posthog_dashboardtile"
- INNER JOIN "posthog_dashboard" ON ("posthog_dashboardtile"."dashboard_id" = "posthog_dashboard"."id")
- LEFT OUTER JOIN "posthog_dashboarditem" ON ("posthog_dashboardtile"."insight_id" = "posthog_dashboarditem"."id")
- LEFT OUTER JOIN "posthog_team" ON ("posthog_dashboarditem"."team_id" = "posthog_team"."id")
- LEFT OUTER JOIN "posthog_user" ON ("posthog_dashboarditem"."created_by_id" = "posthog_user"."id")
- LEFT OUTER JOIN "posthog_user" T6 ON ("posthog_dashboarditem"."last_modified_by_id" = T6."id")
- LEFT OUTER JOIN "posthog_text" ON ("posthog_dashboardtile"."text_id" = "posthog_text"."id")
- LEFT OUTER JOIN "posthog_buttontile" ON ("posthog_dashboardtile"."button_tile_id" = "posthog_buttontile"."id")
- LEFT OUTER JOIN "posthog_dashboardwidget" ON ("posthog_dashboardtile"."widget_id" = "posthog_dashboardwidget"."id")
- LEFT OUTER JOIN "posthog_user" T10 ON ("posthog_dashboardwidget"."created_by_id" = T10."id")
- LEFT OUTER JOIN "posthog_user" T11 ON ("posthog_dashboardwidget"."last_modified_by_id" = T11."id")
- WHERE (NOT ("posthog_dashboardtile"."deleted"
- AND "posthog_dashboardtile"."deleted" IS NOT NULL)
- AND NOT ("posthog_dashboard"."deleted")
- AND NOT ("posthog_dashboard"."deleted"
- AND "posthog_dashboardtile"."deleted"
- AND "posthog_dashboardtile"."deleted" IS NOT NULL)
- AND (NOT "posthog_dashboarditem"."deleted"
- OR "posthog_dashboardtile"."insight_id" IS NULL)
- AND "posthog_dashboardtile"."dashboard_id" = 99999
- AND "posthog_dashboardtile"."dashboard_id" = 99999
- AND NOT ("posthog_dashboard"."deleted"
- AND "posthog_dashboardtile"."deleted"
- AND "posthog_dashboardtile"."deleted" IS NOT NULL)
- AND (NOT "posthog_dashboarditem"."deleted"
- OR "posthog_dashboardtile"."insight_id" IS NULL))
- ORDER BY "posthog_dashboarditem"."order" ASC
- '''
-# ---
-# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.191
- '''
- SELECT "posthog_insightcachingstate"."id",
- "posthog_insightcachingstate"."team_id",
- "posthog_insightcachingstate"."insight_id",
- "posthog_insightcachingstate"."dashboard_tile_id",
- "posthog_insightcachingstate"."cache_key",
- "posthog_insightcachingstate"."target_cache_age_seconds",
- "posthog_insightcachingstate"."last_refresh",
- "posthog_insightcachingstate"."last_refresh_queued_at",
- "posthog_insightcachingstate"."refresh_attempt",
- "posthog_insightcachingstate"."created_at",
- "posthog_insightcachingstate"."updated_at"
- FROM "posthog_insightcachingstate"
- WHERE "posthog_insightcachingstate"."dashboard_tile_id" IN (1,
- 2,
- 3,
- 4,
- 5 /* ... */)
- '''
-# ---
-# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.192
- '''
- SELECT ("posthog_dashboardtile"."insight_id") AS "_prefetch_related_val_insight_id",
- "posthog_dashboard"."id",
- "posthog_dashboard"."name",
- "posthog_dashboard"."description",
- "posthog_dashboard"."team_id",
- "posthog_dashboard"."pinned",
- "posthog_dashboard"."created_at",
- "posthog_dashboard"."created_by_id",
- "posthog_dashboard"."deleted",
- "posthog_dashboard"."last_accessed_at",
- "posthog_dashboard"."last_refresh",
- "posthog_dashboard"."filters",
- "posthog_dashboard"."variables",
- "posthog_dashboard"."breakdown_colors",
- "posthog_dashboard"."data_color_theme_id",
- "posthog_dashboard"."creation_mode",
- "posthog_dashboard"."restriction_level",
- "posthog_dashboard"."quick_filter_ids",
- "posthog_dashboard"."deprecated_tags",
- "posthog_dashboard"."tags",
- "posthog_dashboard"."share_token",
- "posthog_dashboard"."is_shared"
- FROM "posthog_dashboard"
- INNER JOIN "posthog_dashboardtile" ON ("posthog_dashboard"."id" = "posthog_dashboardtile"."dashboard_id")
- WHERE (NOT ("posthog_dashboard"."deleted")
- AND "posthog_dashboard"."id" IN
- (SELECT U0."dashboard_id" AS "dashboard_id"
- FROM "posthog_dashboardtile" U0
- INNER JOIN "posthog_dashboard" U1 ON (U0."dashboard_id" = U1."id")
- WHERE (NOT (U0."deleted"
- AND U0."deleted" IS NOT NULL)
- AND NOT (U1."deleted")))
- AND "posthog_dashboardtile"."insight_id" IN (1,
- 2,
- 3,
- 4,
- 5 /* ... */))
- '''
-# ---
-# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.193
- '''
- SELECT "posthog_dashboardtile"."id",
- "posthog_dashboardtile"."dashboard_id",
- "posthog_dashboardtile"."insight_id",
- "posthog_dashboardtile"."text_id",
- "posthog_dashboardtile"."button_tile_id",
- "posthog_dashboardtile"."widget_id",
- "posthog_dashboardtile"."team_id",
- "posthog_dashboardtile"."layouts",
- "posthog_dashboardtile"."color",
- "posthog_dashboardtile"."filters_hash",
- "posthog_dashboardtile"."last_refresh",
- "posthog_dashboardtile"."refreshing",
- "posthog_dashboardtile"."refresh_attempt",
- "posthog_dashboardtile"."filters_overrides",
- "posthog_dashboardtile"."show_description",
- "posthog_dashboardtile"."transparent_background",
- "posthog_dashboardtile"."deleted"
- FROM "posthog_dashboardtile"
- INNER JOIN "posthog_dashboard" ON ("posthog_dashboardtile"."dashboard_id" = "posthog_dashboard"."id")
- WHERE (NOT ("posthog_dashboardtile"."deleted"
- AND "posthog_dashboardtile"."deleted" IS NOT NULL)
- AND NOT ("posthog_dashboard"."deleted")
- AND "posthog_dashboardtile"."insight_id" IN (1,
- 2,
- 3,
- 4,
- 5 /* ... */))
- '''
-# ---
-# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.194
- '''
- SELECT "posthog_dashboard"."id",
- "posthog_dashboard"."name",
- "posthog_dashboard"."description",
- "posthog_dashboard"."team_id",
- "posthog_dashboard"."pinned",
- "posthog_dashboard"."created_at",
- "posthog_dashboard"."created_by_id",
- "posthog_dashboard"."deleted",
- "posthog_dashboard"."last_accessed_at",
- "posthog_dashboard"."last_refresh",
- "posthog_dashboard"."filters",
- "posthog_dashboard"."variables",
- "posthog_dashboard"."breakdown_colors",
- "posthog_dashboard"."data_color_theme_id",
- "posthog_dashboard"."creation_mode",
- "posthog_dashboard"."restriction_level",
- "posthog_dashboard"."quick_filter_ids",
- "posthog_dashboard"."deprecated_tags",
- "posthog_dashboard"."tags",
- "posthog_dashboard"."share_token",
- "posthog_dashboard"."is_shared"
- FROM "posthog_dashboard"
- WHERE ("posthog_dashboard"."id") IN ((1,
- 2)/* ... */)
- '''
-# ---
-# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.195
- '''
- SELECT "posthog_taggeditem"."id",
- "posthog_taggeditem"."tag_id",
- "posthog_taggeditem"."dashboard_id",
- "posthog_taggeditem"."insight_id",
- "posthog_taggeditem"."event_definition_id",
- "posthog_taggeditem"."property_definition_id",
- "posthog_taggeditem"."action_id",
- "posthog_taggeditem"."feature_flag_id",
- "posthog_taggeditem"."experiment_saved_metric_id",
- "posthog_taggeditem"."ticket_id",
- "posthog_taggeditem"."account_id",
- "posthog_taggeditem"."endpoint_id",
- "posthog_tag"."id",
- "posthog_tag"."name",
- "posthog_tag"."team_id"
- FROM "posthog_taggeditem"
- INNER JOIN "posthog_tag" ON ("posthog_taggeditem"."tag_id" = "posthog_tag"."id")
- WHERE "posthog_taggeditem"."insight_id" IN (1,
- 2,
- 3,
- 4,
- 5 /* ... */)
- '''
-# ---
-# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.196
- '''
- SELECT "posthog_alertconfiguration"."created_by_id",
- "posthog_alertconfiguration"."created_at",
- "posthog_alertconfiguration"."id",
- "posthog_alertconfiguration"."team_id",
- "posthog_alertconfiguration"."insight_id",
- "posthog_alertconfiguration"."name",
- "posthog_alertconfiguration"."config",
- "posthog_alertconfiguration"."calculation_interval",
- "posthog_alertconfiguration"."threshold_id",
- "posthog_alertconfiguration"."condition",
- "posthog_alertconfiguration"."detector_config",
- "posthog_alertconfiguration"."state",
- "posthog_alertconfiguration"."enabled",
- "posthog_alertconfiguration"."last_notified_at",
- "posthog_alertconfiguration"."last_checked_at",
- "posthog_alertconfiguration"."next_check_at",
- "posthog_alertconfiguration"."snoozed_until",
- "posthog_alertconfiguration"."skip_weekend",
- "posthog_alertconfiguration"."schedule_restriction",
- "posthog_alertconfiguration"."investigation_agent_enabled",
- "posthog_alertconfiguration"."investigation_gates_notifications",
- "posthog_alertconfiguration"."investigation_inconclusive_action",
- "posthog_user"."id",
- "posthog_user"."password",
- "posthog_user"."last_login",
- "posthog_user"."first_name",
- "posthog_user"."last_name",
- "posthog_user"."is_staff",
- "posthog_user"."date_joined",
- "posthog_user"."uuid",
- "posthog_user"."current_organization_id",
- "posthog_user"."current_team_id",
- "posthog_user"."email",
- "posthog_user"."pending_email",
- "posthog_user"."distinct_id",
- "posthog_user"."is_email_verified",
- "posthog_user"."credentials_reviewed_at",
- "posthog_user"."requested_password_reset_at",
- "posthog_user"."requested_2fa_reset_at",
- "posthog_user"."has_seen_product_intro_for",
- "posthog_user"."strapi_id",
- "posthog_user"."is_active",
- "posthog_user"."role_at_organization",
- "posthog_user"."theme_mode",
- "posthog_user"."partial_notification_settings",
- "posthog_user"."anonymize_data",
- "posthog_user"."allow_impersonation",
- "posthog_user"."toolbar_mode",
- "posthog_user"."hedgehog_config",
- "posthog_user"."allow_sidebar_suggestions",
- "posthog_user"."shortcut_position",
- "posthog_user"."passkeys_enabled_for_2fa",
- "posthog_user"."hide_mcp_hints",
- "posthog_user"."onboarding_skipped_at",
- "posthog_user"."onboarding_skipped_reason",
- "posthog_user"."onboarding_skipped_organization_id",
- "posthog_user"."onboarding_delegated_to_invite_id",
- "posthog_user"."onboarding_delegated_to_organization_id",
- "posthog_user"."onboarding_delegation_accepted_at",
- "posthog_user"."events_column_config",
- "posthog_user"."email_opt_in"
- FROM "posthog_alertconfiguration"
- LEFT OUTER JOIN "posthog_user" ON ("posthog_alertconfiguration"."created_by_id" = "posthog_user"."id")
- WHERE "posthog_alertconfiguration"."insight_id" IN (1,
- 2,
- 3,
- 4,
- 5 /* ... */)
- '''
-# ---
-# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.197
- '''
- SELECT "posthog_dashboard"."id",
- "posthog_dashboard"."name",
- "posthog_dashboard"."description",
- "posthog_dashboard"."team_id",
- "posthog_dashboard"."pinned",
- "posthog_dashboard"."created_at",
- "posthog_dashboard"."created_by_id",
- "posthog_dashboard"."deleted",
- "posthog_dashboard"."last_accessed_at",
- "posthog_dashboard"."last_refresh",
- "posthog_dashboard"."filters",
- "posthog_dashboard"."variables",
- "posthog_dashboard"."breakdown_colors",
- "posthog_dashboard"."data_color_theme_id",
- "posthog_dashboard"."creation_mode",
- "posthog_dashboard"."restriction_level",
- "posthog_dashboard"."quick_filter_ids",
- "posthog_dashboard"."deprecated_tags",
- "posthog_dashboard"."tags",
- "posthog_dashboard"."share_token",
- "posthog_dashboard"."is_shared"
- FROM "posthog_dashboard"
- WHERE (NOT ("posthog_dashboard"."deleted")
- AND "posthog_dashboard"."id" IN (1,
- 2,
- 3,
- 4,
- 5 /* ... */))
- '''
-# ---
-# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.2
- '''
- SELECT "posthog_team"."id",
- "posthog_team"."uuid",
- "posthog_team"."organization_id",
- "posthog_team"."parent_team_id",
- "posthog_team"."project_id",
- "posthog_team"."api_token",
- "posthog_team"."app_urls",
- "posthog_team"."name",
- "posthog_team"."slack_incoming_webhook",
- "posthog_team"."created_at",
- "posthog_team"."updated_at",
- "posthog_team"."anonymize_ips",
- "posthog_team"."completed_snippet_onboarding",
- "posthog_team"."has_completed_onboarding_for",
- "posthog_team"."onboarding_tasks",
- "posthog_team"."ingested_event",
- "posthog_team"."ingested_production_event",
- "posthog_team"."ingested_production_event_last_checked_at",
- "posthog_team"."person_processing_opt_out",
- "posthog_team"."secret_api_token",
- "posthog_team"."secret_api_token_backup",
- "posthog_team"."session_recording_opt_in",
- "posthog_team"."session_recording_sample_rate",
- "posthog_team"."session_recording_minimum_duration_milliseconds",
- "posthog_team"."session_recording_linked_flag",
- "posthog_team"."session_recording_network_payload_capture_config",
- "posthog_team"."session_recording_masking_config",
- "posthog_team"."session_recording_url_trigger_config",
- "posthog_team"."session_recording_url_blocklist_config",
- "posthog_team"."session_recording_event_trigger_config",
- "posthog_team"."session_recording_trigger_match_type_config",
- "posthog_team"."session_recording_trigger_groups",
- "posthog_team"."session_replay_config",
- "posthog_team"."session_recording_retention_period",
- "posthog_team"."event_retention_months",
- "posthog_team"."conversations_enabled",
- "posthog_team"."conversations_settings",
- "posthog_team"."proactive_tasks_enabled",
- "posthog_team"."survey_config",
- "posthog_team"."surveys_opt_in",
- "posthog_team"."product_tours_opt_in",
- "posthog_team"."capture_console_log_opt_in",
- "posthog_team"."capture_performance_opt_in",
- "posthog_team"."capture_dead_clicks",
- "posthog_team"."autocapture_opt_out",
- "posthog_team"."autocapture_web_vitals_opt_in",
- "posthog_team"."autocapture_web_vitals_allowed_metrics",
- "posthog_team"."autocapture_exceptions_opt_in",
- "posthog_team"."autocapture_exceptions_errors_to_ignore",
- "posthog_team"."logs_settings",
- "posthog_team"."llm_gateway_enabled_at",
- "posthog_team"."llm_gateway_revoked_at",
- "posthog_team"."llm_gateway_overspend_allowance_usd",
- "posthog_team"."heatmaps_opt_in",
- "posthog_team"."receive_org_level_activity_logs",
- "posthog_team"."web_analytics_pre_aggregated_tables_enabled",
- "posthog_team"."web_analytics_pre_aggregated_tables_version",
- "posthog_team"."flags_persistence_default",
- "posthog_team"."feature_flag_confirmation_enabled",
- "posthog_team"."feature_flag_confirmation_message",
- "posthog_team"."default_evaluation_environments_enabled",
- "posthog_team"."require_evaluation_environment_tags",
- "posthog_team"."default_evaluation_contexts_enabled",
- "posthog_team"."require_evaluation_contexts",
- "posthog_team"."session_recording_version",
- "posthog_team"."signup_token",
- "posthog_team"."is_demo",
- "posthog_team"."access_control",
- "posthog_team"."week_start_day",
- "posthog_team"."inject_web_apps",
- "posthog_team"."test_account_filters",
- "posthog_team"."test_account_filters_default_checked",
- "posthog_team"."path_cleaning_filters",
- "posthog_team"."timezone",
- "posthog_team"."data_attributes",
- "posthog_team"."person_display_name_properties",
- "posthog_team"."live_events_columns",
- "posthog_team"."recording_domains",
- "posthog_team"."human_friendly_comparison_periods",
- "posthog_team"."cookieless_server_hash_mode",
- "posthog_team"."primary_dashboard_id",
- "posthog_team"."default_data_theme",
- "posthog_team"."extra_settings",
- "posthog_team"."modifiers",
- "posthog_team"."correlation_config",
- "posthog_team"."session_recording_retention_period_days",
- "posthog_team"."external_data_workspace_id",
- "posthog_team"."external_data_workspace_last_synced_at",
- "posthog_team"."api_query_rate_limit",
- "posthog_team"."drop_events_older_than",
- "posthog_team"."base_currency",
- "posthog_team"."experiment_recalculation_time",
- "posthog_team"."default_experiment_confidence_level",
- "posthog_team"."default_experiment_stats_method",
- "posthog_team"."business_model",
- "posthog_organization"."id",
- "posthog_organization"."name",
- "posthog_organization"."slug",
- "posthog_organization"."logo_media_id",
- "posthog_organization"."created_at",
- "posthog_organization"."updated_at",
- "posthog_organization"."is_active",
- "posthog_organization"."is_not_active_reason",
- "posthog_organization"."session_cookie_age",
- "posthog_organization"."is_member_join_email_enabled",
- "posthog_organization"."is_ai_data_processing_approved",
- "posthog_organization"."is_ai_training_opted_in",
- "posthog_organization"."is_ai_training_locked",
- "posthog_organization"."is_ai_training_cta_shown",
- "posthog_organization"."enforce_2fa",
- "posthog_organization"."members_can_invite",
- "posthog_organization"."members_can_create_projects",
- "posthog_organization"."members_can_use_personal_api_keys",
- "posthog_organization"."allow_publicly_shared_resources",
- "posthog_organization"."default_role_id",
- "posthog_organization"."plugins_access_level",
- "posthog_organization"."for_internal_metrics",
- "posthog_organization"."default_experiment_stats_method",
- "posthog_organization"."default_anonymize_ips",
- "posthog_organization"."is_hipaa",
- "posthog_organization"."is_pending_deletion",
- "posthog_organization"."customer_id",
- "posthog_organization"."available_product_features",
- "posthog_organization"."usage",
- "posthog_organization"."never_drop_data",
- "posthog_organization"."customer_trust_scores",
- "posthog_organization"."setup_section_2_completed",
- "posthog_organization"."personalization",
- "posthog_organization"."domain_whitelist",
- "posthog_organization"."is_platform"
- FROM "posthog_team"
- INNER JOIN "posthog_organization" ON ("posthog_team"."organization_id" = "posthog_organization"."id")
- WHERE "posthog_team"."id" = 99999
- LIMIT 21
- '''
-# ---
-# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.20
- '''
- SELECT "posthog_team"."id",
- "posthog_team"."uuid",
- "posthog_team"."organization_id",
- "posthog_team"."parent_team_id",
- "posthog_team"."project_id",
- "posthog_team"."api_token",
- "posthog_team"."app_urls",
- "posthog_team"."name",
- "posthog_team"."slack_incoming_webhook",
- "posthog_team"."created_at",
- "posthog_team"."updated_at",
- "posthog_team"."anonymize_ips",
- "posthog_team"."completed_snippet_onboarding",
- "posthog_team"."has_completed_onboarding_for",
- "posthog_team"."onboarding_tasks",
- "posthog_team"."ingested_event",
- "posthog_team"."ingested_production_event",
- "posthog_team"."ingested_production_event_last_checked_at",
- "posthog_team"."person_processing_opt_out",
- "posthog_team"."secret_api_token",
- "posthog_team"."secret_api_token_backup",
- "posthog_team"."session_recording_opt_in",
- "posthog_team"."session_recording_sample_rate",
- "posthog_team"."session_recording_minimum_duration_milliseconds",
- "posthog_team"."session_recording_linked_flag",
- "posthog_team"."session_recording_network_payload_capture_config",
- "posthog_team"."session_recording_masking_config",
- "posthog_team"."session_recording_url_trigger_config",
- "posthog_team"."session_recording_url_blocklist_config",
- "posthog_team"."session_recording_event_trigger_config",
- "posthog_team"."session_recording_trigger_match_type_config",
- "posthog_team"."session_recording_trigger_groups",
- "posthog_team"."session_replay_config",
- "posthog_team"."session_recording_retention_period",
- "posthog_team"."event_retention_months",
- "posthog_team"."conversations_enabled",
- "posthog_team"."conversations_settings",
- "posthog_team"."proactive_tasks_enabled",
- "posthog_team"."survey_config",
- "posthog_team"."surveys_opt_in",
- "posthog_team"."product_tours_opt_in",
- "posthog_team"."capture_console_log_opt_in",
- "posthog_team"."capture_performance_opt_in",
- "posthog_team"."capture_dead_clicks",
- "posthog_team"."autocapture_opt_out",
- "posthog_team"."autocapture_web_vitals_opt_in",
- "posthog_team"."autocapture_web_vitals_allowed_metrics",
- "posthog_team"."autocapture_exceptions_opt_in",
- "posthog_team"."autocapture_exceptions_errors_to_ignore",
- "posthog_team"."logs_settings",
- "posthog_team"."llm_gateway_enabled_at",
- "posthog_team"."llm_gateway_revoked_at",
- "posthog_team"."llm_gateway_overspend_allowance_usd",
- "posthog_team"."heatmaps_opt_in",
- "posthog_team"."receive_org_level_activity_logs",
- "posthog_team"."web_analytics_pre_aggregated_tables_enabled",
- "posthog_team"."web_analytics_pre_aggregated_tables_version",
- "posthog_team"."flags_persistence_default",
- "posthog_team"."feature_flag_confirmation_enabled",
- "posthog_team"."feature_flag_confirmation_message",
- "posthog_team"."default_evaluation_environments_enabled",
- "posthog_team"."require_evaluation_environment_tags",
- "posthog_team"."default_evaluation_contexts_enabled",
- "posthog_team"."require_evaluation_contexts",
- "posthog_team"."session_recording_version",
- "posthog_team"."signup_token",
- "posthog_team"."is_demo",
- "posthog_team"."access_control",
- "posthog_team"."week_start_day",
- "posthog_team"."inject_web_apps",
- "posthog_team"."test_account_filters",
- "posthog_team"."test_account_filters_default_checked",
- "posthog_team"."path_cleaning_filters",
- "posthog_team"."timezone",
- "posthog_team"."data_attributes",
- "posthog_team"."person_display_name_properties",
- "posthog_team"."live_events_columns",
- "posthog_team"."recording_domains",
- "posthog_team"."human_friendly_comparison_periods",
- "posthog_team"."cookieless_server_hash_mode",
- "posthog_team"."primary_dashboard_id",
- "posthog_team"."default_data_theme",
- "posthog_team"."extra_settings",
- "posthog_team"."modifiers",
- "posthog_team"."correlation_config",
- "posthog_team"."session_recording_retention_period_days",
- "posthog_team"."external_data_workspace_id",
- "posthog_team"."external_data_workspace_last_synced_at",
- "posthog_team"."api_query_rate_limit",
- "posthog_team"."drop_events_older_than",
- "posthog_team"."base_currency",
- "posthog_team"."experiment_recalculation_time",
- "posthog_team"."default_experiment_confidence_level",
- "posthog_team"."default_experiment_stats_method",
- "posthog_team"."business_model",
- "posthog_organization"."id",
- "posthog_organization"."name",
- "posthog_organization"."slug",
- "posthog_organization"."logo_media_id",
- "posthog_organization"."created_at",
- "posthog_organization"."updated_at",
- "posthog_organization"."is_active",
- "posthog_organization"."is_not_active_reason",
- "posthog_organization"."session_cookie_age",
- "posthog_organization"."is_member_join_email_enabled",
- "posthog_organization"."is_ai_data_processing_approved",
- "posthog_organization"."is_ai_training_opted_in",
- "posthog_organization"."is_ai_training_locked",
- "posthog_organization"."is_ai_training_cta_shown",
- "posthog_organization"."enforce_2fa",
- "posthog_organization"."members_can_invite",
- "posthog_organization"."members_can_create_projects",
- "posthog_organization"."members_can_use_personal_api_keys",
- "posthog_organization"."allow_publicly_shared_resources",
- "posthog_organization"."default_role_id",
- "posthog_organization"."plugins_access_level",
- "posthog_organization"."for_internal_metrics",
- "posthog_organization"."default_experiment_stats_method",
- "posthog_organization"."default_anonymize_ips",
- "posthog_organization"."is_hipaa",
- "posthog_organization"."is_pending_deletion",
- "posthog_organization"."customer_id",
- "posthog_organization"."available_product_features",
- "posthog_organization"."usage",
- "posthog_organization"."never_drop_data",
- "posthog_organization"."customer_trust_scores",
- "posthog_organization"."setup_section_2_completed",
- "posthog_organization"."personalization",
- "posthog_organization"."domain_whitelist",
- "posthog_organization"."is_platform"
- FROM "posthog_team"
- INNER JOIN "posthog_organization" ON ("posthog_team"."organization_id" = "posthog_organization"."id")
- WHERE "posthog_team"."id" = 99999
- LIMIT 21
- '''
-# ---
-# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.21
- '''
- SELECT "posthog_organizationmembership"."id",
- "posthog_organizationmembership"."organization_id",
- "posthog_organizationmembership"."user_id",
- "posthog_organizationmembership"."level",
- "posthog_organizationmembership"."joined_at",
- "posthog_organizationmembership"."updated_at",
- "posthog_organizationmembership"."invited_by_id",
- "posthog_organization"."id",
- "posthog_organization"."name",
- "posthog_organization"."slug",
- "posthog_organization"."logo_media_id",
- "posthog_organization"."created_at",
- "posthog_organization"."updated_at",
- "posthog_organization"."is_active",
- "posthog_organization"."is_not_active_reason",
- "posthog_organization"."session_cookie_age",
- "posthog_organization"."is_member_join_email_enabled",
- "posthog_organization"."is_ai_data_processing_approved",
- "posthog_organization"."is_ai_training_opted_in",
- "posthog_organization"."is_ai_training_locked",
- "posthog_organization"."is_ai_training_cta_shown",
- "posthog_organization"."enforce_2fa",
- "posthog_organization"."members_can_invite",
- "posthog_organization"."members_can_create_projects",
- "posthog_organization"."members_can_use_personal_api_keys",
- "posthog_organization"."allow_publicly_shared_resources",
- "posthog_organization"."default_role_id",
- "posthog_organization"."plugins_access_level",
- "posthog_organization"."for_internal_metrics",
- "posthog_organization"."default_experiment_stats_method",
- "posthog_organization"."default_anonymize_ips",
- "posthog_organization"."is_hipaa",
- "posthog_organization"."is_pending_deletion",
- "posthog_organization"."customer_id",
- "posthog_organization"."available_product_features",
- "posthog_organization"."usage",
- "posthog_organization"."never_drop_data",
- "posthog_organization"."customer_trust_scores",
- "posthog_organization"."setup_section_2_completed",
- "posthog_organization"."personalization",
- "posthog_organization"."domain_whitelist",
- "posthog_organization"."is_platform"
- FROM "posthog_organizationmembership"
- INNER JOIN "posthog_organization" ON ("posthog_organizationmembership"."organization_id" = "posthog_organization"."id")
- WHERE ("posthog_organizationmembership"."organization_id" = '00000000-0000-0000-0000-000000000000'::uuid
- AND "posthog_organizationmembership"."user_id" = 99999)
- LIMIT 21
- '''
-# ---
-# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.22
- '''
- SELECT "ee_accesscontrol"."id",
- "ee_accesscontrol"."team_id",
- "ee_accesscontrol"."access_level",
- "ee_accesscontrol"."resource",
- "ee_accesscontrol"."resource_id",
- "ee_accesscontrol"."organization_member_id",
- "ee_accesscontrol"."role_id",
- "ee_accesscontrol"."created_by_id",
- "ee_accesscontrol"."created_at",
- "ee_accesscontrol"."updated_at",
- "posthog_team"."organization_id" AS "_team_organization_id"
- FROM "ee_accesscontrol"
- INNER JOIN "posthog_team" ON ("ee_accesscontrol"."team_id" = "posthog_team"."id")
- LEFT OUTER JOIN "posthog_organizationmembership" ON ("ee_accesscontrol"."organization_member_id" = "posthog_organizationmembership"."id")
- WHERE (("ee_accesscontrol"."organization_member_id" IS NULL
- AND "ee_accesscontrol"."role_id" IS NULL
- AND "ee_accesscontrol"."team_id" = 99999)
- OR ("posthog_organizationmembership"."user_id" = 99999
- AND "ee_accesscontrol"."role_id" IS NULL
- AND "ee_accesscontrol"."team_id" = 99999))
- '''
-# ---
-# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.23
- '''
- SELECT "posthog_organizationmembership"."id",
- "posthog_organizationmembership"."organization_id",
- "posthog_organizationmembership"."user_id",
- "posthog_organizationmembership"."level",
- "posthog_organizationmembership"."joined_at",
- "posthog_organizationmembership"."updated_at",
- "posthog_organizationmembership"."invited_by_id",
- "posthog_organization"."id",
- "posthog_organization"."name",
- "posthog_organization"."slug",
- "posthog_organization"."logo_media_id",
- "posthog_organization"."created_at",
- "posthog_organization"."updated_at",
- "posthog_organization"."is_active",
- "posthog_organization"."is_not_active_reason",
- "posthog_organization"."session_cookie_age",
- "posthog_organization"."is_member_join_email_enabled",
- "posthog_organization"."is_ai_data_processing_approved",
- "posthog_organization"."is_ai_training_opted_in",
- "posthog_organization"."is_ai_training_locked",
- "posthog_organization"."is_ai_training_cta_shown",
- "posthog_organization"."enforce_2fa",
- "posthog_organization"."members_can_invite",
- "posthog_organization"."members_can_create_projects",
- "posthog_organization"."members_can_use_personal_api_keys",
- "posthog_organization"."allow_publicly_shared_resources",
- "posthog_organization"."default_role_id",
- "posthog_organization"."plugins_access_level",
- "posthog_organization"."for_internal_metrics",
- "posthog_organization"."default_experiment_stats_method",
- "posthog_organization"."default_anonymize_ips",
- "posthog_organization"."is_hipaa",
- "posthog_organization"."is_pending_deletion",
- "posthog_organization"."customer_id",
- "posthog_organization"."available_product_features",
- "posthog_organization"."usage",
- "posthog_organization"."never_drop_data",
- "posthog_organization"."customer_trust_scores",
- "posthog_organization"."setup_section_2_completed",
- "posthog_organization"."personalization",
- "posthog_organization"."domain_whitelist",
- "posthog_organization"."is_platform"
- FROM "posthog_organizationmembership"
- INNER JOIN "posthog_organization" ON ("posthog_organizationmembership"."organization_id" = "posthog_organization"."id")
- WHERE "posthog_organizationmembership"."user_id" = 99999
- '''
-# ---
-# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.24
- '''
- SELECT "ee_accesscontrol"."team_id" AS "team_id",
- "ee_accesscontrol"."resource_id" AS "resource_id",
- "ee_accesscontrol"."organization_member_id" AS "organization_member_id",
- "ee_accesscontrol"."role_id" AS "role_id",
- "ee_accesscontrol"."access_level" AS "access_level"
- FROM "ee_accesscontrol"
- INNER JOIN "posthog_team" ON ("ee_accesscontrol"."team_id" = "posthog_team"."id")
- WHERE ("ee_accesscontrol"."resource" = 'project'
- AND "posthog_team"."organization_id" IN ('00000000-0000-0000-0000-000000000000'::uuid))
- '''
-# ---
-# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.25
- '''
- SELECT "ee_rolemembership"."organization_member_id" AS "organization_member_id",
- "ee_rolemembership"."role_id" AS "role_id"
- FROM "ee_rolemembership"
- WHERE "ee_rolemembership"."user_id" = 99999
- '''
-# ---
-# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.26
- '''
- SELECT COUNT(*) AS "__count"
- FROM "posthog_dashboard"
- INNER JOIN "posthog_team" ON ("posthog_dashboard"."team_id" = "posthog_team"."id")
- WHERE (NOT ("posthog_dashboard"."deleted")
- AND ("posthog_dashboard"."team_id" =
- (SELECT U0."parent_team_id" AS "parent_team_id"
- FROM "posthog_team" U0
- WHERE U0."id" = 99999
- LIMIT 1)
- OR ("posthog_team"."parent_team_id" IS NULL
- AND "posthog_dashboard"."team_id" = 99999))
- AND NOT "posthog_dashboard"."deleted")
- '''
-# ---
-# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.27
- '''
- SELECT "posthog_team"."id",
- "posthog_team"."uuid",
- "posthog_team"."organization_id",
- "posthog_team"."parent_team_id",
- "posthog_team"."project_id",
- "posthog_team"."api_token",
- "posthog_team"."app_urls",
- "posthog_team"."name",
- "posthog_team"."slack_incoming_webhook",
- "posthog_team"."created_at",
- "posthog_team"."updated_at",
- "posthog_team"."anonymize_ips",
- "posthog_team"."completed_snippet_onboarding",
- "posthog_team"."has_completed_onboarding_for",
- "posthog_team"."onboarding_tasks",
- "posthog_team"."ingested_event",
- "posthog_team"."ingested_production_event",
- "posthog_team"."ingested_production_event_last_checked_at",
- "posthog_team"."person_processing_opt_out",
- "posthog_team"."secret_api_token",
- "posthog_team"."secret_api_token_backup",
- "posthog_team"."session_recording_opt_in",
- "posthog_team"."session_recording_sample_rate",
- "posthog_team"."session_recording_minimum_duration_milliseconds",
- "posthog_team"."session_recording_linked_flag",
- "posthog_team"."session_recording_network_payload_capture_config",
- "posthog_team"."session_recording_masking_config",
- "posthog_team"."session_recording_url_trigger_config",
- "posthog_team"."session_recording_url_blocklist_config",
- "posthog_team"."session_recording_event_trigger_config",
- "posthog_team"."session_recording_trigger_match_type_config",
- "posthog_team"."session_recording_trigger_groups",
- "posthog_team"."session_replay_config",
- "posthog_team"."session_recording_retention_period",
- "posthog_team"."event_retention_months",
- "posthog_team"."conversations_enabled",
- "posthog_team"."conversations_settings",
- "posthog_team"."proactive_tasks_enabled",
- "posthog_team"."survey_config",
- "posthog_team"."surveys_opt_in",
- "posthog_team"."product_tours_opt_in",
- "posthog_team"."capture_console_log_opt_in",
- "posthog_team"."capture_performance_opt_in",
- "posthog_team"."capture_dead_clicks",
- "posthog_team"."autocapture_opt_out",
- "posthog_team"."autocapture_web_vitals_opt_in",
- "posthog_team"."autocapture_web_vitals_allowed_metrics",
- "posthog_team"."autocapture_exceptions_opt_in",
- "posthog_team"."autocapture_exceptions_errors_to_ignore",
- "posthog_team"."logs_settings",
- "posthog_team"."llm_gateway_enabled_at",
- "posthog_team"."llm_gateway_revoked_at",
- "posthog_team"."llm_gateway_overspend_allowance_usd",
- "posthog_team"."heatmaps_opt_in",
- "posthog_team"."receive_org_level_activity_logs",
- "posthog_team"."web_analytics_pre_aggregated_tables_enabled",
- "posthog_team"."web_analytics_pre_aggregated_tables_version",
- "posthog_team"."flags_persistence_default",
- "posthog_team"."feature_flag_confirmation_enabled",
- "posthog_team"."feature_flag_confirmation_message",
- "posthog_team"."default_evaluation_environments_enabled",
- "posthog_team"."require_evaluation_environment_tags",
- "posthog_team"."default_evaluation_contexts_enabled",
- "posthog_team"."require_evaluation_contexts",
- "posthog_team"."session_recording_version",
- "posthog_team"."signup_token",
- "posthog_team"."is_demo",
- "posthog_team"."access_control",
- "posthog_team"."week_start_day",
- "posthog_team"."inject_web_apps",
- "posthog_team"."test_account_filters",
- "posthog_team"."test_account_filters_default_checked",
- "posthog_team"."path_cleaning_filters",
- "posthog_team"."timezone",
- "posthog_team"."data_attributes",
- "posthog_team"."person_display_name_properties",
- "posthog_team"."live_events_columns",
- "posthog_team"."recording_domains",
- "posthog_team"."human_friendly_comparison_periods",
- "posthog_team"."cookieless_server_hash_mode",
- "posthog_team"."primary_dashboard_id",
- "posthog_team"."default_data_theme",
- "posthog_team"."extra_settings",
- "posthog_team"."modifiers",
- "posthog_team"."correlation_config",
- "posthog_team"."session_recording_retention_period_days",
- "posthog_team"."external_data_workspace_id",
- "posthog_team"."external_data_workspace_last_synced_at",
- "posthog_team"."api_query_rate_limit",
- "posthog_team"."drop_events_older_than",
- "posthog_team"."base_currency",
- "posthog_team"."experiment_recalculation_time",
- "posthog_team"."default_experiment_confidence_level",
- "posthog_team"."default_experiment_stats_method",
- "posthog_team"."business_model"
- FROM "posthog_team"
- WHERE "posthog_team"."id" = 99999
- LIMIT 21
- '''
-# ---
-# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.28
- '''
- SELECT "posthog_filesystem"."team_id",
- "posthog_filesystem"."id",
- "posthog_filesystem"."path",
- "posthog_filesystem"."depth",
- "posthog_filesystem"."type",
- "posthog_filesystem"."ref",
- "posthog_filesystem"."href",
- "posthog_filesystem"."shortcut",
- "posthog_filesystem"."meta",
- "posthog_filesystem"."created_at",
- "posthog_filesystem"."created_by_id",
- "posthog_filesystem"."surface",
- "posthog_filesystem"."project_id"
- FROM "posthog_filesystem"
- WHERE (("posthog_filesystem"."surface" IS NULL
- OR "posthog_filesystem"."surface" = 'web')
- AND "posthog_filesystem"."ref" = '0001'
- AND "posthog_filesystem"."team_id" = 99999
- AND "posthog_filesystem"."type" = 'dashboard'
- AND NOT ("posthog_filesystem"."shortcut"
- AND "posthog_filesystem"."shortcut" IS NOT NULL))
+ "posthog_dashboard"."is_shared"
+ FROM "posthog_dashboard"
+ INNER JOIN "posthog_dashboardtile" ON ("posthog_dashboard"."id" = "posthog_dashboardtile"."dashboard_id")
+ WHERE (NOT ("posthog_dashboard"."deleted")
+ AND "posthog_dashboard"."id" IN
+ (SELECT U0."dashboard_id" AS "dashboard_id"
+ FROM "posthog_dashboardtile" U0
+ INNER JOIN "posthog_dashboard" U1 ON (U0."dashboard_id" = U1."id")
+ WHERE (NOT (U0."deleted"
+ AND U0."deleted" IS NOT NULL)
+ AND NOT (U1."deleted")))
+ AND "posthog_dashboardtile"."insight_id" IN (1,
+ 2,
+ 3,
+ 4,
+ 5 /* ... */))
'''
# ---
-# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.29
+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.143
'''
- SELECT COUNT(*) AS "__count"
+ SELECT "posthog_dashboardtile"."id",
+ "posthog_dashboardtile"."dashboard_id",
+ "posthog_dashboardtile"."insight_id",
+ "posthog_dashboardtile"."text_id",
+ "posthog_dashboardtile"."button_tile_id",
+ "posthog_dashboardtile"."widget_id",
+ "posthog_dashboardtile"."team_id",
+ "posthog_dashboardtile"."layouts",
+ "posthog_dashboardtile"."color",
+ "posthog_dashboardtile"."filters_hash",
+ "posthog_dashboardtile"."last_refresh",
+ "posthog_dashboardtile"."refreshing",
+ "posthog_dashboardtile"."refresh_attempt",
+ "posthog_dashboardtile"."filters_overrides",
+ "posthog_dashboardtile"."show_description",
+ "posthog_dashboardtile"."transparent_background",
+ "posthog_dashboardtile"."deleted"
FROM "posthog_dashboardtile"
INNER JOIN "posthog_dashboard" ON ("posthog_dashboardtile"."dashboard_id" = "posthog_dashboard"."id")
WHERE (NOT ("posthog_dashboardtile"."deleted"
AND "posthog_dashboardtile"."deleted" IS NOT NULL)
AND NOT ("posthog_dashboard"."deleted")
- AND "posthog_dashboardtile"."dashboard_id" = 99999
- AND NOT ("posthog_dashboardtile"."insight_id" IS NULL))
+ AND "posthog_dashboardtile"."insight_id" IN (1,
+ 2,
+ 3,
+ 4,
+ 5 /* ... */))
'''
# ---
-# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.3
+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.144
'''
- SELECT "posthog_organizationmembership"."id",
- "posthog_organizationmembership"."organization_id",
- "posthog_organizationmembership"."user_id",
- "posthog_organizationmembership"."level",
- "posthog_organizationmembership"."joined_at",
- "posthog_organizationmembership"."updated_at",
- "posthog_organizationmembership"."invited_by_id",
- "posthog_organization"."id",
- "posthog_organization"."name",
- "posthog_organization"."slug",
- "posthog_organization"."logo_media_id",
- "posthog_organization"."created_at",
- "posthog_organization"."updated_at",
- "posthog_organization"."is_active",
- "posthog_organization"."is_not_active_reason",
- "posthog_organization"."session_cookie_age",
- "posthog_organization"."is_member_join_email_enabled",
- "posthog_organization"."is_ai_data_processing_approved",
- "posthog_organization"."is_ai_training_opted_in",
- "posthog_organization"."is_ai_training_locked",
- "posthog_organization"."is_ai_training_cta_shown",
- "posthog_organization"."enforce_2fa",
- "posthog_organization"."members_can_invite",
- "posthog_organization"."members_can_create_projects",
- "posthog_organization"."members_can_use_personal_api_keys",
- "posthog_organization"."allow_publicly_shared_resources",
- "posthog_organization"."default_role_id",
- "posthog_organization"."plugins_access_level",
- "posthog_organization"."for_internal_metrics",
- "posthog_organization"."default_experiment_stats_method",
- "posthog_organization"."default_anonymize_ips",
- "posthog_organization"."is_hipaa",
- "posthog_organization"."is_pending_deletion",
- "posthog_organization"."customer_id",
- "posthog_organization"."available_product_features",
- "posthog_organization"."usage",
- "posthog_organization"."never_drop_data",
- "posthog_organization"."customer_trust_scores",
- "posthog_organization"."setup_section_2_completed",
- "posthog_organization"."personalization",
- "posthog_organization"."domain_whitelist",
- "posthog_organization"."is_platform"
- FROM "posthog_organizationmembership"
- INNER JOIN "posthog_organization" ON ("posthog_organizationmembership"."organization_id" = "posthog_organization"."id")
- WHERE ("posthog_organizationmembership"."organization_id" = '00000000-0000-0000-0000-000000000000'::uuid
- AND "posthog_organizationmembership"."user_id" = 99999)
- LIMIT 21
+ SELECT "posthog_dashboard"."id",
+ "posthog_dashboard"."name",
+ "posthog_dashboard"."description",
+ "posthog_dashboard"."team_id",
+ "posthog_dashboard"."pinned",
+ "posthog_dashboard"."created_at",
+ "posthog_dashboard"."created_by_id",
+ "posthog_dashboard"."deleted",
+ "posthog_dashboard"."last_accessed_at",
+ "posthog_dashboard"."last_refresh",
+ "posthog_dashboard"."filters",
+ "posthog_dashboard"."variables",
+ "posthog_dashboard"."breakdown_colors",
+ "posthog_dashboard"."data_color_theme_id",
+ "posthog_dashboard"."creation_mode",
+ "posthog_dashboard"."restriction_level",
+ "posthog_dashboard"."quick_filter_ids",
+ "posthog_dashboard"."deprecated_tags",
+ "posthog_dashboard"."tags",
+ "posthog_dashboard"."share_token",
+ "posthog_dashboard"."is_shared"
+ FROM "posthog_dashboard"
+ WHERE ("posthog_dashboard"."id") IN ((1,
+ 2)/* ... */)
'''
# ---
-# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.30
+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.145
'''
- SELECT "posthog_sharingconfiguration"."id",
- "posthog_sharingconfiguration"."team_id",
- "posthog_sharingconfiguration"."dashboard_id",
- "posthog_sharingconfiguration"."insight_id",
- "posthog_sharingconfiguration"."recording_id",
- "posthog_sharingconfiguration"."notebook_id",
- "posthog_sharingconfiguration"."interviewee_context_id",
- "posthog_sharingconfiguration"."created_at",
- "posthog_sharingconfiguration"."enabled",
- "posthog_sharingconfiguration"."access_token",
- "posthog_sharingconfiguration"."expires_at",
- "posthog_sharingconfiguration"."settings",
- "posthog_sharingconfiguration"."password_required"
- FROM "posthog_sharingconfiguration"
- WHERE "posthog_sharingconfiguration"."dashboard_id" = 99999
+ SELECT "posthog_taggeditem"."id",
+ "posthog_taggeditem"."tag_id",
+ "posthog_taggeditem"."dashboard_id",
+ "posthog_taggeditem"."insight_id",
+ "posthog_taggeditem"."event_definition_id",
+ "posthog_taggeditem"."property_definition_id",
+ "posthog_taggeditem"."action_id",
+ "posthog_taggeditem"."feature_flag_id",
+ "posthog_taggeditem"."experiment_saved_metric_id",
+ "posthog_taggeditem"."ticket_id",
+ "posthog_taggeditem"."account_id",
+ "posthog_taggeditem"."endpoint_id",
+ "posthog_tag"."id",
+ "posthog_tag"."name",
+ "posthog_tag"."team_id"
+ FROM "posthog_taggeditem"
+ INNER JOIN "posthog_tag" ON ("posthog_taggeditem"."tag_id" = "posthog_tag"."id")
+ WHERE "posthog_taggeditem"."insight_id" IN (1,
+ 2,
+ 3,
+ 4,
+ 5 /* ... */)
'''
# ---
-# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.31
+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.146
'''
- SELECT COUNT(*) AS "__count"
- FROM "posthog_taggeditem"
- WHERE "posthog_taggeditem"."dashboard_id" = 99999
+ SELECT "posthog_alertconfiguration"."created_by_id",
+ "posthog_alertconfiguration"."created_at",
+ "posthog_alertconfiguration"."id",
+ "posthog_alertconfiguration"."team_id",
+ "posthog_alertconfiguration"."insight_id",
+ "posthog_alertconfiguration"."name",
+ "posthog_alertconfiguration"."config",
+ "posthog_alertconfiguration"."calculation_interval",
+ "posthog_alertconfiguration"."threshold_id",
+ "posthog_alertconfiguration"."condition",
+ "posthog_alertconfiguration"."detector_config",
+ "posthog_alertconfiguration"."state",
+ "posthog_alertconfiguration"."enabled",
+ "posthog_alertconfiguration"."last_notified_at",
+ "posthog_alertconfiguration"."last_checked_at",
+ "posthog_alertconfiguration"."next_check_at",
+ "posthog_alertconfiguration"."snoozed_until",
+ "posthog_alertconfiguration"."skip_weekend",
+ "posthog_alertconfiguration"."schedule_restriction",
+ "posthog_alertconfiguration"."investigation_agent_enabled",
+ "posthog_alertconfiguration"."investigation_gates_notifications",
+ "posthog_alertconfiguration"."investigation_inconclusive_action",
+ "posthog_user"."id",
+ "posthog_user"."password",
+ "posthog_user"."last_login",
+ "posthog_user"."first_name",
+ "posthog_user"."last_name",
+ "posthog_user"."is_staff",
+ "posthog_user"."date_joined",
+ "posthog_user"."uuid",
+ "posthog_user"."current_organization_id",
+ "posthog_user"."current_team_id",
+ "posthog_user"."email",
+ "posthog_user"."pending_email",
+ "posthog_user"."distinct_id",
+ "posthog_user"."is_email_verified",
+ "posthog_user"."credentials_reviewed_at",
+ "posthog_user"."requested_password_reset_at",
+ "posthog_user"."requested_2fa_reset_at",
+ "posthog_user"."has_seen_product_intro_for",
+ "posthog_user"."strapi_id",
+ "posthog_user"."is_active",
+ "posthog_user"."role_at_organization",
+ "posthog_user"."theme_mode",
+ "posthog_user"."partial_notification_settings",
+ "posthog_user"."anonymize_data",
+ "posthog_user"."allow_impersonation",
+ "posthog_user"."toolbar_mode",
+ "posthog_user"."hedgehog_config",
+ "posthog_user"."allow_sidebar_suggestions",
+ "posthog_user"."shortcut_position",
+ "posthog_user"."passkeys_enabled_for_2fa",
+ "posthog_user"."hide_mcp_hints",
+ "posthog_user"."onboarding_skipped_at",
+ "posthog_user"."onboarding_skipped_reason",
+ "posthog_user"."onboarding_skipped_organization_id",
+ "posthog_user"."onboarding_delegated_to_invite_id",
+ "posthog_user"."onboarding_delegated_to_organization_id",
+ "posthog_user"."onboarding_delegation_accepted_at",
+ "posthog_user"."events_column_config",
+ "posthog_user"."email_opt_in",
+ "posthog_threshold"."created_by_id",
+ "posthog_threshold"."created_at",
+ "posthog_threshold"."id",
+ "posthog_threshold"."team_id",
+ "posthog_threshold"."insight_id",
+ "posthog_threshold"."name",
+ "posthog_threshold"."configuration"
+ FROM "posthog_alertconfiguration"
+ LEFT OUTER JOIN "posthog_user" ON ("posthog_alertconfiguration"."created_by_id" = "posthog_user"."id")
+ LEFT OUTER JOIN "posthog_threshold" ON ("posthog_alertconfiguration"."threshold_id" = "posthog_threshold"."id")
+ WHERE "posthog_alertconfiguration"."insight_id" IN (1,
+ 2,
+ 3,
+ 4,
+ 5 /* ... */)
'''
# ---
-# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.32
+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.147
'''
- SELECT "posthog_sharingconfiguration"."id",
- "posthog_sharingconfiguration"."team_id",
- "posthog_sharingconfiguration"."dashboard_id",
- "posthog_sharingconfiguration"."insight_id",
- "posthog_sharingconfiguration"."recording_id",
- "posthog_sharingconfiguration"."notebook_id",
- "posthog_sharingconfiguration"."interviewee_context_id",
- "posthog_sharingconfiguration"."created_at",
- "posthog_sharingconfiguration"."enabled",
- "posthog_sharingconfiguration"."access_token",
- "posthog_sharingconfiguration"."expires_at",
- "posthog_sharingconfiguration"."settings",
- "posthog_sharingconfiguration"."password_required"
- FROM "posthog_sharingconfiguration"
- WHERE "posthog_sharingconfiguration"."dashboard_id" = 99999
+ SELECT "posthog_dashboard"."id",
+ "posthog_dashboard"."name",
+ "posthog_dashboard"."description",
+ "posthog_dashboard"."team_id",
+ "posthog_dashboard"."pinned",
+ "posthog_dashboard"."created_at",
+ "posthog_dashboard"."created_by_id",
+ "posthog_dashboard"."deleted",
+ "posthog_dashboard"."last_accessed_at",
+ "posthog_dashboard"."last_refresh",
+ "posthog_dashboard"."filters",
+ "posthog_dashboard"."variables",
+ "posthog_dashboard"."breakdown_colors",
+ "posthog_dashboard"."data_color_theme_id",
+ "posthog_dashboard"."creation_mode",
+ "posthog_dashboard"."restriction_level",
+ "posthog_dashboard"."quick_filter_ids",
+ "posthog_dashboard"."deprecated_tags",
+ "posthog_dashboard"."tags",
+ "posthog_dashboard"."share_token",
+ "posthog_dashboard"."is_shared"
+ FROM "posthog_dashboard"
+ WHERE (NOT ("posthog_dashboard"."deleted")
+ AND "posthog_dashboard"."id" IN (1,
+ 2,
+ 3,
+ 4,
+ 5 /* ... */))
'''
# ---
-# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.33
+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.15
'''
SELECT "posthog_insightvariable"."created_by_id",
"posthog_insightvariable"."created_at",
@@ -11759,7 +6524,7 @@
WHERE "posthog_insightvariable"."team_id" = 99999
'''
# ---
-# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.34
+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.16
'''
SELECT "posthog_dashboardtile"."id",
"posthog_dashboardtile"."dashboard_id",
@@ -12113,7 +6878,7 @@
ORDER BY "posthog_dashboarditem"."order" ASC
'''
# ---
-# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.35
+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.17
'''
SELECT "posthog_tag"."name" AS "tag__name"
FROM "posthog_taggeditem"
@@ -12121,7 +6886,7 @@
WHERE "posthog_taggeditem"."dashboard_id" = 99999
'''
# ---
-# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.36
+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.18
'''
SELECT "posthog_user"."id",
"posthog_user"."password",
@@ -12166,7 +6931,7 @@
AND "posthog_user"."id" = 99999)
'''
# ---
-# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.37
+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.19
'''
SELECT "posthog_organization"."id",
"posthog_organization"."name",
@@ -12208,7 +6973,7 @@
LIMIT 21
'''
# ---
-# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.38
+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.2
'''
SELECT "posthog_team"."id",
"posthog_team"."uuid",
@@ -12346,7 +7111,145 @@
LIMIT 21
'''
# ---
-# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.39
+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.20
+ '''
+ SELECT "posthog_team"."id",
+ "posthog_team"."uuid",
+ "posthog_team"."organization_id",
+ "posthog_team"."parent_team_id",
+ "posthog_team"."project_id",
+ "posthog_team"."api_token",
+ "posthog_team"."app_urls",
+ "posthog_team"."name",
+ "posthog_team"."slack_incoming_webhook",
+ "posthog_team"."created_at",
+ "posthog_team"."updated_at",
+ "posthog_team"."anonymize_ips",
+ "posthog_team"."completed_snippet_onboarding",
+ "posthog_team"."has_completed_onboarding_for",
+ "posthog_team"."onboarding_tasks",
+ "posthog_team"."ingested_event",
+ "posthog_team"."ingested_production_event",
+ "posthog_team"."ingested_production_event_last_checked_at",
+ "posthog_team"."person_processing_opt_out",
+ "posthog_team"."secret_api_token",
+ "posthog_team"."secret_api_token_backup",
+ "posthog_team"."session_recording_opt_in",
+ "posthog_team"."session_recording_sample_rate",
+ "posthog_team"."session_recording_minimum_duration_milliseconds",
+ "posthog_team"."session_recording_linked_flag",
+ "posthog_team"."session_recording_network_payload_capture_config",
+ "posthog_team"."session_recording_masking_config",
+ "posthog_team"."session_recording_url_trigger_config",
+ "posthog_team"."session_recording_url_blocklist_config",
+ "posthog_team"."session_recording_event_trigger_config",
+ "posthog_team"."session_recording_trigger_match_type_config",
+ "posthog_team"."session_recording_trigger_groups",
+ "posthog_team"."session_replay_config",
+ "posthog_team"."session_recording_retention_period",
+ "posthog_team"."event_retention_months",
+ "posthog_team"."conversations_enabled",
+ "posthog_team"."conversations_settings",
+ "posthog_team"."proactive_tasks_enabled",
+ "posthog_team"."survey_config",
+ "posthog_team"."surveys_opt_in",
+ "posthog_team"."product_tours_opt_in",
+ "posthog_team"."capture_console_log_opt_in",
+ "posthog_team"."capture_performance_opt_in",
+ "posthog_team"."capture_dead_clicks",
+ "posthog_team"."autocapture_opt_out",
+ "posthog_team"."autocapture_web_vitals_opt_in",
+ "posthog_team"."autocapture_web_vitals_allowed_metrics",
+ "posthog_team"."autocapture_exceptions_opt_in",
+ "posthog_team"."autocapture_exceptions_errors_to_ignore",
+ "posthog_team"."logs_settings",
+ "posthog_team"."llm_gateway_enabled_at",
+ "posthog_team"."llm_gateway_revoked_at",
+ "posthog_team"."llm_gateway_overspend_allowance_usd",
+ "posthog_team"."heatmaps_opt_in",
+ "posthog_team"."receive_org_level_activity_logs",
+ "posthog_team"."web_analytics_pre_aggregated_tables_enabled",
+ "posthog_team"."web_analytics_pre_aggregated_tables_version",
+ "posthog_team"."flags_persistence_default",
+ "posthog_team"."feature_flag_confirmation_enabled",
+ "posthog_team"."feature_flag_confirmation_message",
+ "posthog_team"."default_evaluation_environments_enabled",
+ "posthog_team"."require_evaluation_environment_tags",
+ "posthog_team"."default_evaluation_contexts_enabled",
+ "posthog_team"."require_evaluation_contexts",
+ "posthog_team"."session_recording_version",
+ "posthog_team"."signup_token",
+ "posthog_team"."is_demo",
+ "posthog_team"."access_control",
+ "posthog_team"."week_start_day",
+ "posthog_team"."inject_web_apps",
+ "posthog_team"."test_account_filters",
+ "posthog_team"."test_account_filters_default_checked",
+ "posthog_team"."path_cleaning_filters",
+ "posthog_team"."timezone",
+ "posthog_team"."data_attributes",
+ "posthog_team"."person_display_name_properties",
+ "posthog_team"."live_events_columns",
+ "posthog_team"."recording_domains",
+ "posthog_team"."human_friendly_comparison_periods",
+ "posthog_team"."cookieless_server_hash_mode",
+ "posthog_team"."primary_dashboard_id",
+ "posthog_team"."default_data_theme",
+ "posthog_team"."extra_settings",
+ "posthog_team"."modifiers",
+ "posthog_team"."correlation_config",
+ "posthog_team"."session_recording_retention_period_days",
+ "posthog_team"."external_data_workspace_id",
+ "posthog_team"."external_data_workspace_last_synced_at",
+ "posthog_team"."api_query_rate_limit",
+ "posthog_team"."drop_events_older_than",
+ "posthog_team"."base_currency",
+ "posthog_team"."experiment_recalculation_time",
+ "posthog_team"."default_experiment_confidence_level",
+ "posthog_team"."default_experiment_stats_method",
+ "posthog_team"."business_model",
+ "posthog_organization"."id",
+ "posthog_organization"."name",
+ "posthog_organization"."slug",
+ "posthog_organization"."logo_media_id",
+ "posthog_organization"."created_at",
+ "posthog_organization"."updated_at",
+ "posthog_organization"."is_active",
+ "posthog_organization"."is_not_active_reason",
+ "posthog_organization"."session_cookie_age",
+ "posthog_organization"."is_member_join_email_enabled",
+ "posthog_organization"."is_ai_data_processing_approved",
+ "posthog_organization"."is_ai_training_opted_in",
+ "posthog_organization"."is_ai_training_locked",
+ "posthog_organization"."is_ai_training_cta_shown",
+ "posthog_organization"."enforce_2fa",
+ "posthog_organization"."members_can_invite",
+ "posthog_organization"."members_can_create_projects",
+ "posthog_organization"."members_can_use_personal_api_keys",
+ "posthog_organization"."allow_publicly_shared_resources",
+ "posthog_organization"."default_role_id",
+ "posthog_organization"."plugins_access_level",
+ "posthog_organization"."for_internal_metrics",
+ "posthog_organization"."default_experiment_stats_method",
+ "posthog_organization"."default_anonymize_ips",
+ "posthog_organization"."is_hipaa",
+ "posthog_organization"."is_pending_deletion",
+ "posthog_organization"."customer_id",
+ "posthog_organization"."available_product_features",
+ "posthog_organization"."usage",
+ "posthog_organization"."never_drop_data",
+ "posthog_organization"."customer_trust_scores",
+ "posthog_organization"."setup_section_2_completed",
+ "posthog_organization"."personalization",
+ "posthog_organization"."domain_whitelist",
+ "posthog_organization"."is_platform"
+ FROM "posthog_team"
+ INNER JOIN "posthog_organization" ON ("posthog_team"."organization_id" = "posthog_organization"."id")
+ WHERE "posthog_team"."id" = 99999
+ LIMIT 21
+ '''
+# ---
+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.21
'''
SELECT "posthog_organizationmembership"."id",
"posthog_organizationmembership"."organization_id",
@@ -12397,31 +7300,7 @@
LIMIT 21
'''
# ---
-# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.4
- '''
- SELECT "ee_accesscontrol"."id",
- "ee_accesscontrol"."team_id",
- "ee_accesscontrol"."access_level",
- "ee_accesscontrol"."resource",
- "ee_accesscontrol"."resource_id",
- "ee_accesscontrol"."organization_member_id",
- "ee_accesscontrol"."role_id",
- "ee_accesscontrol"."created_by_id",
- "ee_accesscontrol"."created_at",
- "ee_accesscontrol"."updated_at",
- "posthog_team"."organization_id" AS "_team_organization_id"
- FROM "ee_accesscontrol"
- INNER JOIN "posthog_team" ON ("ee_accesscontrol"."team_id" = "posthog_team"."id")
- LEFT OUTER JOIN "posthog_organizationmembership" ON ("ee_accesscontrol"."organization_member_id" = "posthog_organizationmembership"."id")
- WHERE (("ee_accesscontrol"."organization_member_id" IS NULL
- AND "ee_accesscontrol"."role_id" IS NULL
- AND "ee_accesscontrol"."team_id" = 99999)
- OR ("posthog_organizationmembership"."user_id" = 99999
- AND "ee_accesscontrol"."role_id" IS NULL
- AND "ee_accesscontrol"."team_id" = 99999))
- '''
-# ---
-# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.40
+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.22
'''
SELECT "ee_accesscontrol"."id",
"ee_accesscontrol"."team_id",
@@ -12445,7 +7324,7 @@
AND "ee_accesscontrol"."team_id" = 99999))
'''
# ---
-# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.41
+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.23
'''
SELECT "posthog_organizationmembership"."id",
"posthog_organizationmembership"."organization_id",
@@ -12494,87 +7373,30 @@
WHERE "posthog_organizationmembership"."user_id" = 99999
'''
# ---
-# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.42
+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.24
'''
SELECT "ee_accesscontrol"."team_id" AS "team_id",
"ee_accesscontrol"."resource_id" AS "resource_id",
"ee_accesscontrol"."organization_member_id" AS "organization_member_id",
"ee_accesscontrol"."role_id" AS "role_id",
"ee_accesscontrol"."access_level" AS "access_level"
- FROM "ee_accesscontrol"
- INNER JOIN "posthog_team" ON ("ee_accesscontrol"."team_id" = "posthog_team"."id")
- WHERE ("ee_accesscontrol"."resource" = 'project'
- AND "posthog_team"."organization_id" IN ('00000000-0000-0000-0000-000000000000'::uuid))
- '''
-# ---
-# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.43
- '''
- SELECT "ee_rolemembership"."organization_member_id" AS "organization_member_id",
- "ee_rolemembership"."role_id" AS "role_id"
- FROM "ee_rolemembership"
- WHERE "ee_rolemembership"."user_id" = 99999
- '''
-# ---
-# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.44
- '''
- SELECT "posthog_dashboard"."id",
- "posthog_dashboard"."name",
- "posthog_dashboard"."description",
- "posthog_dashboard"."team_id",
- "posthog_dashboard"."pinned",
- "posthog_dashboard"."created_at",
- "posthog_dashboard"."created_by_id",
- "posthog_dashboard"."deleted",
- "posthog_dashboard"."last_accessed_at",
- "posthog_dashboard"."last_refresh",
- "posthog_dashboard"."filters",
- "posthog_dashboard"."variables",
- "posthog_dashboard"."breakdown_colors",
- "posthog_dashboard"."data_color_theme_id",
- "posthog_dashboard"."creation_mode",
- "posthog_dashboard"."restriction_level",
- "posthog_dashboard"."quick_filter_ids",
- "posthog_dashboard"."deprecated_tags",
- "posthog_dashboard"."tags",
- "posthog_dashboard"."share_token",
- "posthog_dashboard"."is_shared"
- FROM "posthog_dashboard"
- INNER JOIN "posthog_team" ON ("posthog_dashboard"."team_id" = "posthog_team"."id")
- WHERE (NOT ("posthog_dashboard"."deleted")
- AND ("posthog_dashboard"."team_id" =
- (SELECT U0."parent_team_id" AS "parent_team_id"
- FROM "posthog_team" U0
- WHERE U0."id" = 99999
- LIMIT 1)
- OR ("posthog_team"."parent_team_id" IS NULL
- AND "posthog_dashboard"."team_id" = 99999))
- AND "posthog_dashboard"."id" = 99999)
- LIMIT 21
+ FROM "ee_accesscontrol"
+ INNER JOIN "posthog_team" ON ("ee_accesscontrol"."team_id" = "posthog_team"."id")
+ WHERE ("ee_accesscontrol"."resource" = 'project'
+ AND "posthog_team"."organization_id" IN ('00000000-0000-0000-0000-000000000000'::uuid))
'''
# ---
-# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.45
+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.25
'''
- SELECT "posthog_dashboard"."id",
- "posthog_dashboard"."name",
- "posthog_dashboard"."description",
- "posthog_dashboard"."team_id",
- "posthog_dashboard"."pinned",
- "posthog_dashboard"."created_at",
- "posthog_dashboard"."created_by_id",
- "posthog_dashboard"."deleted",
- "posthog_dashboard"."last_accessed_at",
- "posthog_dashboard"."last_refresh",
- "posthog_dashboard"."filters",
- "posthog_dashboard"."variables",
- "posthog_dashboard"."breakdown_colors",
- "posthog_dashboard"."data_color_theme_id",
- "posthog_dashboard"."creation_mode",
- "posthog_dashboard"."restriction_level",
- "posthog_dashboard"."quick_filter_ids",
- "posthog_dashboard"."deprecated_tags",
- "posthog_dashboard"."tags",
- "posthog_dashboard"."share_token",
- "posthog_dashboard"."is_shared"
+ SELECT "ee_rolemembership"."organization_member_id" AS "organization_member_id",
+ "ee_rolemembership"."role_id" AS "role_id"
+ FROM "ee_rolemembership"
+ WHERE "ee_rolemembership"."user_id" = 99999
+ '''
+# ---
+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.26
+ '''
+ SELECT COUNT(*) AS "__count"
FROM "posthog_dashboard"
INNER JOIN "posthog_team" ON ("posthog_dashboard"."team_id" = "posthog_team"."id")
WHERE (NOT ("posthog_dashboard"."deleted")
@@ -12585,69 +7407,10 @@
LIMIT 1)
OR ("posthog_team"."parent_team_id" IS NULL
AND "posthog_dashboard"."team_id" = 99999))
- AND "posthog_dashboard"."id" = 99999)
- LIMIT 21
- '''
-# ---
-# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.46
- '''
- SELECT COUNT(*) AS "__count"
- FROM "posthog_dashboardtile"
- INNER JOIN "posthog_dashboard" ON ("posthog_dashboardtile"."dashboard_id" = "posthog_dashboard"."id")
- WHERE (NOT ("posthog_dashboardtile"."deleted"
- AND "posthog_dashboardtile"."deleted" IS NOT NULL)
- AND NOT ("posthog_dashboard"."deleted")
- AND "posthog_dashboardtile"."dashboard_id" = 99999
- AND NOT ("posthog_dashboardtile"."deleted"
- AND "posthog_dashboardtile"."deleted" IS NOT NULL))
- '''
-# ---
-# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.47
- '''
- SELECT COUNT(*) AS "__count"
- FROM "posthog_dashboardtile"
- INNER JOIN "posthog_dashboard" ON ("posthog_dashboardtile"."dashboard_id" = "posthog_dashboard"."id")
- WHERE (NOT ("posthog_dashboardtile"."deleted"
- AND "posthog_dashboardtile"."deleted" IS NOT NULL)
- AND NOT ("posthog_dashboard"."deleted")
- AND "posthog_dashboardtile"."dashboard_id" = 99999
- AND NOT ("posthog_dashboardtile"."deleted"
- AND "posthog_dashboardtile"."deleted" IS NOT NULL))
- '''
-# ---
-# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.48
- '''
- SELECT "posthog_dashboard"."id",
- "posthog_dashboard"."name",
- "posthog_dashboard"."description",
- "posthog_dashboard"."team_id",
- "posthog_dashboard"."pinned",
- "posthog_dashboard"."created_at",
- "posthog_dashboard"."created_by_id",
- "posthog_dashboard"."deleted",
- "posthog_dashboard"."last_accessed_at",
- "posthog_dashboard"."last_refresh",
- "posthog_dashboard"."filters",
- "posthog_dashboard"."variables",
- "posthog_dashboard"."breakdown_colors",
- "posthog_dashboard"."data_color_theme_id",
- "posthog_dashboard"."creation_mode",
- "posthog_dashboard"."restriction_level",
- "posthog_dashboard"."quick_filter_ids",
- "posthog_dashboard"."deprecated_tags",
- "posthog_dashboard"."tags",
- "posthog_dashboard"."share_token",
- "posthog_dashboard"."is_shared"
- FROM "posthog_dashboard"
- WHERE (NOT ("posthog_dashboard"."deleted")
- AND "posthog_dashboard"."id" IN (1,
- 2,
- 3,
- 4,
- 5 /* ... */))
+ AND NOT "posthog_dashboard"."deleted")
'''
# ---
-# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.49
+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.27
'''
SELECT "posthog_team"."id",
"posthog_team"."uuid",
@@ -12749,56 +7512,7 @@
LIMIT 21
'''
# ---
-# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.5
- '''
- SELECT "posthog_organizationmembership"."id",
- "posthog_organizationmembership"."organization_id",
- "posthog_organizationmembership"."user_id",
- "posthog_organizationmembership"."level",
- "posthog_organizationmembership"."joined_at",
- "posthog_organizationmembership"."updated_at",
- "posthog_organizationmembership"."invited_by_id",
- "posthog_organization"."id",
- "posthog_organization"."name",
- "posthog_organization"."slug",
- "posthog_organization"."logo_media_id",
- "posthog_organization"."created_at",
- "posthog_organization"."updated_at",
- "posthog_organization"."is_active",
- "posthog_organization"."is_not_active_reason",
- "posthog_organization"."session_cookie_age",
- "posthog_organization"."is_member_join_email_enabled",
- "posthog_organization"."is_ai_data_processing_approved",
- "posthog_organization"."is_ai_training_opted_in",
- "posthog_organization"."is_ai_training_locked",
- "posthog_organization"."is_ai_training_cta_shown",
- "posthog_organization"."enforce_2fa",
- "posthog_organization"."members_can_invite",
- "posthog_organization"."members_can_create_projects",
- "posthog_organization"."members_can_use_personal_api_keys",
- "posthog_organization"."allow_publicly_shared_resources",
- "posthog_organization"."default_role_id",
- "posthog_organization"."plugins_access_level",
- "posthog_organization"."for_internal_metrics",
- "posthog_organization"."default_experiment_stats_method",
- "posthog_organization"."default_anonymize_ips",
- "posthog_organization"."is_hipaa",
- "posthog_organization"."is_pending_deletion",
- "posthog_organization"."customer_id",
- "posthog_organization"."available_product_features",
- "posthog_organization"."usage",
- "posthog_organization"."never_drop_data",
- "posthog_organization"."customer_trust_scores",
- "posthog_organization"."setup_section_2_completed",
- "posthog_organization"."personalization",
- "posthog_organization"."domain_whitelist",
- "posthog_organization"."is_platform"
- FROM "posthog_organizationmembership"
- INNER JOIN "posthog_organization" ON ("posthog_organizationmembership"."organization_id" = "posthog_organization"."id")
- WHERE "posthog_organizationmembership"."user_id" = 99999
- '''
-# ---
-# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.50
+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.28
'''
SELECT "posthog_filesystem"."team_id",
"posthog_filesystem"."id",
@@ -12818,14 +7532,33 @@
OR "posthog_filesystem"."surface" = 'web')
AND "posthog_filesystem"."ref" = '0001'
AND "posthog_filesystem"."team_id" = 99999
- AND "posthog_filesystem"."type" = 'insight'
+ AND "posthog_filesystem"."type" = 'dashboard'
AND NOT ("posthog_filesystem"."shortcut"
AND "posthog_filesystem"."shortcut" IS NOT NULL))
'''
# ---
-# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.51
+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.29
'''
- SELECT "posthog_organization"."id",
+ SELECT COUNT(*) AS "__count"
+ FROM "posthog_dashboardtile"
+ INNER JOIN "posthog_dashboard" ON ("posthog_dashboardtile"."dashboard_id" = "posthog_dashboard"."id")
+ WHERE (NOT ("posthog_dashboardtile"."deleted"
+ AND "posthog_dashboardtile"."deleted" IS NOT NULL)
+ AND NOT ("posthog_dashboard"."deleted")
+ AND "posthog_dashboardtile"."dashboard_id" = 99999
+ AND NOT ("posthog_dashboardtile"."insight_id" IS NULL))
+ '''
+# ---
+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.3
+ '''
+ SELECT "posthog_organizationmembership"."id",
+ "posthog_organizationmembership"."organization_id",
+ "posthog_organizationmembership"."user_id",
+ "posthog_organizationmembership"."level",
+ "posthog_organizationmembership"."joined_at",
+ "posthog_organizationmembership"."updated_at",
+ "posthog_organizationmembership"."invited_by_id",
+ "posthog_organization"."id",
"posthog_organization"."name",
"posthog_organization"."slug",
"posthog_organization"."logo_media_id",
@@ -12860,14 +7593,123 @@
"posthog_organization"."personalization",
"posthog_organization"."domain_whitelist",
"posthog_organization"."is_platform"
- FROM "posthog_organization"
- WHERE "posthog_organization"."id" = '00000000-0000-0000-0000-000000000000'::uuid
+ FROM "posthog_organizationmembership"
+ INNER JOIN "posthog_organization" ON ("posthog_organizationmembership"."organization_id" = "posthog_organization"."id")
+ WHERE ("posthog_organizationmembership"."organization_id" = '00000000-0000-0000-0000-000000000000'::uuid
+ AND "posthog_organizationmembership"."user_id" = 99999)
LIMIT 21
'''
# ---
-# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.52
+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.30
'''
- SELECT "posthog_team"."id",
+ SELECT "posthog_sharingconfiguration"."id",
+ "posthog_sharingconfiguration"."team_id",
+ "posthog_sharingconfiguration"."dashboard_id",
+ "posthog_sharingconfiguration"."insight_id",
+ "posthog_sharingconfiguration"."recording_id",
+ "posthog_sharingconfiguration"."notebook_id",
+ "posthog_sharingconfiguration"."interviewee_context_id",
+ "posthog_sharingconfiguration"."created_at",
+ "posthog_sharingconfiguration"."enabled",
+ "posthog_sharingconfiguration"."access_token",
+ "posthog_sharingconfiguration"."expires_at",
+ "posthog_sharingconfiguration"."settings",
+ "posthog_sharingconfiguration"."password_required"
+ FROM "posthog_sharingconfiguration"
+ WHERE "posthog_sharingconfiguration"."dashboard_id" = 99999
+ '''
+# ---
+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.31
+ '''
+ SELECT COUNT(*) AS "__count"
+ FROM "posthog_taggeditem"
+ WHERE "posthog_taggeditem"."dashboard_id" = 99999
+ '''
+# ---
+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.32
+ '''
+ SELECT "posthog_sharingconfiguration"."id",
+ "posthog_sharingconfiguration"."team_id",
+ "posthog_sharingconfiguration"."dashboard_id",
+ "posthog_sharingconfiguration"."insight_id",
+ "posthog_sharingconfiguration"."recording_id",
+ "posthog_sharingconfiguration"."notebook_id",
+ "posthog_sharingconfiguration"."interviewee_context_id",
+ "posthog_sharingconfiguration"."created_at",
+ "posthog_sharingconfiguration"."enabled",
+ "posthog_sharingconfiguration"."access_token",
+ "posthog_sharingconfiguration"."expires_at",
+ "posthog_sharingconfiguration"."settings",
+ "posthog_sharingconfiguration"."password_required"
+ FROM "posthog_sharingconfiguration"
+ WHERE "posthog_sharingconfiguration"."dashboard_id" = 99999
+ '''
+# ---
+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.33
+ '''
+ SELECT "posthog_insightvariable"."created_by_id",
+ "posthog_insightvariable"."created_at",
+ "posthog_insightvariable"."updated_at",
+ "posthog_insightvariable"."id",
+ "posthog_insightvariable"."team_id",
+ "posthog_insightvariable"."name",
+ "posthog_insightvariable"."code_name",
+ "posthog_insightvariable"."type",
+ "posthog_insightvariable"."default_value",
+ "posthog_insightvariable"."values"
+ FROM "posthog_insightvariable"
+ WHERE "posthog_insightvariable"."team_id" = 99999
+ '''
+# ---
+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.34
+ '''
+ SELECT "posthog_dashboardtile"."id",
+ "posthog_dashboardtile"."dashboard_id",
+ "posthog_dashboardtile"."insight_id",
+ "posthog_dashboardtile"."text_id",
+ "posthog_dashboardtile"."button_tile_id",
+ "posthog_dashboardtile"."widget_id",
+ "posthog_dashboardtile"."team_id",
+ "posthog_dashboardtile"."layouts",
+ "posthog_dashboardtile"."color",
+ "posthog_dashboardtile"."filters_hash",
+ "posthog_dashboardtile"."last_refresh",
+ "posthog_dashboardtile"."refreshing",
+ "posthog_dashboardtile"."refresh_attempt",
+ "posthog_dashboardtile"."filters_overrides",
+ "posthog_dashboardtile"."show_description",
+ "posthog_dashboardtile"."transparent_background",
+ "posthog_dashboardtile"."deleted",
+ "posthog_dashboarditem"."id",
+ "posthog_dashboarditem"."name",
+ "posthog_dashboarditem"."derived_name",
+ "posthog_dashboarditem"."description",
+ "posthog_dashboarditem"."team_id",
+ "posthog_dashboarditem"."filters",
+ "posthog_dashboarditem"."filters_hash",
+ "posthog_dashboarditem"."query",
+ "posthog_dashboarditem"."query_metadata",
+ "posthog_dashboarditem"."order",
+ "posthog_dashboarditem"."deleted",
+ "posthog_dashboarditem"."saved",
+ "posthog_dashboarditem"."created_at",
+ "posthog_dashboarditem"."refreshing",
+ "posthog_dashboarditem"."created_by_id",
+ "posthog_dashboarditem"."is_sample",
+ "posthog_dashboarditem"."short_id",
+ "posthog_dashboarditem"."favorited",
+ "posthog_dashboarditem"."refresh_attempt",
+ "posthog_dashboarditem"."last_modified_at",
+ "posthog_dashboarditem"."last_modified_by_id",
+ "posthog_dashboarditem"."dashboard_id",
+ "posthog_dashboarditem"."last_refresh",
+ "posthog_dashboarditem"."layouts",
+ "posthog_dashboarditem"."color",
+ "posthog_dashboarditem"."dive_dashboard_id",
+ "posthog_dashboarditem"."updated_at",
+ "posthog_dashboarditem"."deprecated_tags",
+ "posthog_dashboarditem"."tags",
+ "posthog_team"."id",
"posthog_team"."uuid",
"posthog_team"."organization_id",
"posthog_team"."parent_team_id",
@@ -12953,142 +7795,235 @@
"posthog_team"."modifiers",
"posthog_team"."correlation_config",
"posthog_team"."session_recording_retention_period_days",
+ "posthog_team"."plugins_opt_in",
+ "posthog_team"."opt_out_capture",
+ "posthog_team"."event_names",
+ "posthog_team"."event_names_with_usage",
+ "posthog_team"."event_properties",
+ "posthog_team"."event_properties_with_usage",
+ "posthog_team"."event_properties_numerical",
"posthog_team"."external_data_workspace_id",
"posthog_team"."external_data_workspace_last_synced_at",
"posthog_team"."api_query_rate_limit",
+ "posthog_team"."revenue_tracking_config",
"posthog_team"."drop_events_older_than",
"posthog_team"."base_currency",
"posthog_team"."experiment_recalculation_time",
"posthog_team"."default_experiment_confidence_level",
"posthog_team"."default_experiment_stats_method",
- "posthog_team"."business_model"
- FROM "posthog_team"
- WHERE "posthog_team"."id" = 99999
- LIMIT 21
- '''
-# ---
-# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.53
- '''
- SELECT "posthog_dashboardtile"."id",
- "posthog_dashboardtile"."dashboard_id",
- "posthog_dashboardtile"."insight_id",
- "posthog_dashboardtile"."text_id",
- "posthog_dashboardtile"."button_tile_id",
- "posthog_dashboardtile"."widget_id",
- "posthog_dashboardtile"."team_id",
- "posthog_dashboardtile"."layouts",
- "posthog_dashboardtile"."color",
- "posthog_dashboardtile"."filters_hash",
- "posthog_dashboardtile"."last_refresh",
- "posthog_dashboardtile"."refreshing",
- "posthog_dashboardtile"."refresh_attempt",
- "posthog_dashboardtile"."filters_overrides",
- "posthog_dashboardtile"."show_description",
- "posthog_dashboardtile"."transparent_background",
- "posthog_dashboardtile"."deleted"
- FROM "posthog_dashboardtile"
- INNER JOIN "posthog_dashboard" ON ("posthog_dashboardtile"."dashboard_id" = "posthog_dashboard"."id")
- WHERE (NOT ("posthog_dashboardtile"."deleted"
- AND "posthog_dashboardtile"."deleted" IS NOT NULL)
- AND NOT ("posthog_dashboard"."deleted")
- AND "posthog_dashboardtile"."insight_id" = 99999)
- '''
-# ---
-# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.54
- '''
- SELECT "posthog_dashboardtile"."id",
- "posthog_dashboardtile"."dashboard_id",
- "posthog_dashboardtile"."insight_id",
- "posthog_dashboardtile"."text_id",
- "posthog_dashboardtile"."button_tile_id",
- "posthog_dashboardtile"."widget_id",
- "posthog_dashboardtile"."team_id",
- "posthog_dashboardtile"."layouts",
- "posthog_dashboardtile"."color",
- "posthog_dashboardtile"."filters_hash",
- "posthog_dashboardtile"."last_refresh",
- "posthog_dashboardtile"."refreshing",
- "posthog_dashboardtile"."refresh_attempt",
- "posthog_dashboardtile"."filters_overrides",
- "posthog_dashboardtile"."show_description",
- "posthog_dashboardtile"."transparent_background",
- "posthog_dashboardtile"."deleted"
- FROM "posthog_dashboardtile"
- INNER JOIN "posthog_dashboard" ON ("posthog_dashboardtile"."dashboard_id" = "posthog_dashboard"."id")
- WHERE (NOT ("posthog_dashboardtile"."deleted"
- AND "posthog_dashboardtile"."deleted" IS NOT NULL)
- AND NOT ("posthog_dashboard"."deleted")
- AND "posthog_dashboardtile"."insight_id" = 99999)
- '''
-# ---
-# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.55
- '''
- SELECT "posthog_insightvariable"."created_by_id",
- "posthog_insightvariable"."created_at",
- "posthog_insightvariable"."updated_at",
- "posthog_insightvariable"."id",
- "posthog_insightvariable"."team_id",
- "posthog_insightvariable"."name",
- "posthog_insightvariable"."code_name",
- "posthog_insightvariable"."type",
- "posthog_insightvariable"."default_value",
- "posthog_insightvariable"."values"
- FROM "posthog_insightvariable"
- WHERE "posthog_insightvariable"."team_id" = 99999
- '''
-# ---
-# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.56
- '''
- SELECT "posthog_dashboardtile"."dashboard_id" AS "dashboard_id"
+ "posthog_team"."business_model",
+ "posthog_user"."id",
+ "posthog_user"."password",
+ "posthog_user"."last_login",
+ "posthog_user"."first_name",
+ "posthog_user"."last_name",
+ "posthog_user"."is_staff",
+ "posthog_user"."date_joined",
+ "posthog_user"."uuid",
+ "posthog_user"."current_organization_id",
+ "posthog_user"."current_team_id",
+ "posthog_user"."email",
+ "posthog_user"."pending_email",
+ "posthog_user"."distinct_id",
+ "posthog_user"."is_email_verified",
+ "posthog_user"."credentials_reviewed_at",
+ "posthog_user"."requested_password_reset_at",
+ "posthog_user"."requested_2fa_reset_at",
+ "posthog_user"."has_seen_product_intro_for",
+ "posthog_user"."strapi_id",
+ "posthog_user"."is_active",
+ "posthog_user"."role_at_organization",
+ "posthog_user"."theme_mode",
+ "posthog_user"."partial_notification_settings",
+ "posthog_user"."anonymize_data",
+ "posthog_user"."allow_impersonation",
+ "posthog_user"."toolbar_mode",
+ "posthog_user"."hedgehog_config",
+ "posthog_user"."allow_sidebar_suggestions",
+ "posthog_user"."shortcut_position",
+ "posthog_user"."passkeys_enabled_for_2fa",
+ "posthog_user"."hide_mcp_hints",
+ "posthog_user"."onboarding_skipped_at",
+ "posthog_user"."onboarding_skipped_reason",
+ "posthog_user"."onboarding_skipped_organization_id",
+ "posthog_user"."onboarding_delegated_to_invite_id",
+ "posthog_user"."onboarding_delegated_to_organization_id",
+ "posthog_user"."onboarding_delegation_accepted_at",
+ "posthog_user"."events_column_config",
+ "posthog_user"."email_opt_in",
+ T6."id",
+ T6."password",
+ T6."last_login",
+ T6."first_name",
+ T6."last_name",
+ T6."is_staff",
+ T6."date_joined",
+ T6."uuid",
+ T6."current_organization_id",
+ T6."current_team_id",
+ T6."email",
+ T6."pending_email",
+ T6."distinct_id",
+ T6."is_email_verified",
+ T6."credentials_reviewed_at",
+ T6."requested_password_reset_at",
+ T6."requested_2fa_reset_at",
+ T6."has_seen_product_intro_for",
+ T6."strapi_id",
+ T6."is_active",
+ T6."role_at_organization",
+ T6."theme_mode",
+ T6."partial_notification_settings",
+ T6."anonymize_data",
+ T6."allow_impersonation",
+ T6."toolbar_mode",
+ T6."hedgehog_config",
+ T6."allow_sidebar_suggestions",
+ T6."shortcut_position",
+ T6."passkeys_enabled_for_2fa",
+ T6."hide_mcp_hints",
+ T6."onboarding_skipped_at",
+ T6."onboarding_skipped_reason",
+ T6."onboarding_skipped_organization_id",
+ T6."onboarding_delegated_to_invite_id",
+ T6."onboarding_delegated_to_organization_id",
+ T6."onboarding_delegation_accepted_at",
+ T6."events_column_config",
+ T6."email_opt_in",
+ "posthog_text"."id",
+ "posthog_text"."body",
+ "posthog_text"."created_by_id",
+ "posthog_text"."last_modified_at",
+ "posthog_text"."last_modified_by_id",
+ "posthog_text"."team_id",
+ "posthog_buttontile"."id",
+ "posthog_buttontile"."url",
+ "posthog_buttontile"."text",
+ "posthog_buttontile"."placement",
+ "posthog_buttontile"."style",
+ "posthog_buttontile"."created_by_id",
+ "posthog_buttontile"."last_modified_at",
+ "posthog_buttontile"."last_modified_by_id",
+ "posthog_buttontile"."team_id",
+ "posthog_dashboardwidget"."id",
+ "posthog_dashboardwidget"."widget_type",
+ "posthog_dashboardwidget"."name",
+ "posthog_dashboardwidget"."description",
+ "posthog_dashboardwidget"."config",
+ "posthog_dashboardwidget"."created_by_id",
+ "posthog_dashboardwidget"."last_modified_at",
+ "posthog_dashboardwidget"."last_modified_by_id",
+ "posthog_dashboardwidget"."team_id",
+ T10."id",
+ T10."password",
+ T10."last_login",
+ T10."first_name",
+ T10."last_name",
+ T10."is_staff",
+ T10."date_joined",
+ T10."uuid",
+ T10."current_organization_id",
+ T10."current_team_id",
+ T10."email",
+ T10."pending_email",
+ T10."distinct_id",
+ T10."is_email_verified",
+ T10."credentials_reviewed_at",
+ T10."requested_password_reset_at",
+ T10."requested_2fa_reset_at",
+ T10."has_seen_product_intro_for",
+ T10."strapi_id",
+ T10."is_active",
+ T10."role_at_organization",
+ T10."theme_mode",
+ T10."partial_notification_settings",
+ T10."anonymize_data",
+ T10."allow_impersonation",
+ T10."toolbar_mode",
+ T10."hedgehog_config",
+ T10."allow_sidebar_suggestions",
+ T10."shortcut_position",
+ T10."passkeys_enabled_for_2fa",
+ T10."hide_mcp_hints",
+ T10."onboarding_skipped_at",
+ T10."onboarding_skipped_reason",
+ T10."onboarding_skipped_organization_id",
+ T10."onboarding_delegated_to_invite_id",
+ T10."onboarding_delegated_to_organization_id",
+ T10."onboarding_delegation_accepted_at",
+ T10."events_column_config",
+ T10."email_opt_in",
+ T11."id",
+ T11."password",
+ T11."last_login",
+ T11."first_name",
+ T11."last_name",
+ T11."is_staff",
+ T11."date_joined",
+ T11."uuid",
+ T11."current_organization_id",
+ T11."current_team_id",
+ T11."email",
+ T11."pending_email",
+ T11."distinct_id",
+ T11."is_email_verified",
+ T11."credentials_reviewed_at",
+ T11."requested_password_reset_at",
+ T11."requested_2fa_reset_at",
+ T11."has_seen_product_intro_for",
+ T11."strapi_id",
+ T11."is_active",
+ T11."role_at_organization",
+ T11."theme_mode",
+ T11."partial_notification_settings",
+ T11."anonymize_data",
+ T11."allow_impersonation",
+ T11."toolbar_mode",
+ T11."hedgehog_config",
+ T11."allow_sidebar_suggestions",
+ T11."shortcut_position",
+ T11."passkeys_enabled_for_2fa",
+ T11."hide_mcp_hints",
+ T11."onboarding_skipped_at",
+ T11."onboarding_skipped_reason",
+ T11."onboarding_skipped_organization_id",
+ T11."onboarding_delegated_to_invite_id",
+ T11."onboarding_delegated_to_organization_id",
+ T11."onboarding_delegation_accepted_at",
+ T11."events_column_config",
+ T11."email_opt_in"
FROM "posthog_dashboardtile"
INNER JOIN "posthog_dashboard" ON ("posthog_dashboardtile"."dashboard_id" = "posthog_dashboard"."id")
+ LEFT OUTER JOIN "posthog_dashboarditem" ON ("posthog_dashboardtile"."insight_id" = "posthog_dashboarditem"."id")
+ LEFT OUTER JOIN "posthog_team" ON ("posthog_dashboarditem"."team_id" = "posthog_team"."id")
+ LEFT OUTER JOIN "posthog_user" ON ("posthog_dashboarditem"."created_by_id" = "posthog_user"."id")
+ LEFT OUTER JOIN "posthog_user" T6 ON ("posthog_dashboarditem"."last_modified_by_id" = T6."id")
+ LEFT OUTER JOIN "posthog_text" ON ("posthog_dashboardtile"."text_id" = "posthog_text"."id")
+ LEFT OUTER JOIN "posthog_buttontile" ON ("posthog_dashboardtile"."button_tile_id" = "posthog_buttontile"."id")
+ LEFT OUTER JOIN "posthog_dashboardwidget" ON ("posthog_dashboardtile"."widget_id" = "posthog_dashboardwidget"."id")
+ LEFT OUTER JOIN "posthog_user" T10 ON ("posthog_dashboardwidget"."created_by_id" = T10."id")
+ LEFT OUTER JOIN "posthog_user" T11 ON ("posthog_dashboardwidget"."last_modified_by_id" = T11."id")
WHERE (NOT ("posthog_dashboardtile"."deleted"
AND "posthog_dashboardtile"."deleted" IS NOT NULL)
AND NOT ("posthog_dashboard"."deleted")
- AND "posthog_dashboardtile"."insight_id" = 99999)
- '''
-# ---
-# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.57
- '''
- SELECT "posthog_dashboard"."id",
- "posthog_dashboard"."name",
- "posthog_dashboard"."description",
- "posthog_dashboard"."team_id",
- "posthog_dashboard"."pinned",
- "posthog_dashboard"."created_at",
- "posthog_dashboard"."created_by_id",
- "posthog_dashboard"."deleted",
- "posthog_dashboard"."last_accessed_at",
- "posthog_dashboard"."last_refresh",
- "posthog_dashboard"."filters",
- "posthog_dashboard"."variables",
- "posthog_dashboard"."breakdown_colors",
- "posthog_dashboard"."data_color_theme_id",
- "posthog_dashboard"."creation_mode",
- "posthog_dashboard"."restriction_level",
- "posthog_dashboard"."quick_filter_ids",
- "posthog_dashboard"."deprecated_tags",
- "posthog_dashboard"."tags",
- "posthog_dashboard"."share_token",
- "posthog_dashboard"."is_shared"
- FROM "posthog_dashboard"
- WHERE (NOT ("posthog_dashboard"."deleted")
- AND "posthog_dashboard"."id" IN (1,
- 2,
- 3,
- 4,
- 5 /* ... */))
+ AND "posthog_dashboardtile"."dashboard_id" = 99999
+ AND NOT ("posthog_dashboard"."deleted"
+ AND "posthog_dashboardtile"."deleted"
+ AND "posthog_dashboardtile"."deleted" IS NOT NULL)
+ AND (NOT "posthog_dashboarditem"."deleted"
+ OR "posthog_dashboardtile"."insight_id" IS NULL))
+ ORDER BY "posthog_dashboarditem"."order" ASC
'''
# ---
-# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.58
+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.35
'''
SELECT "posthog_tag"."name" AS "tag__name"
FROM "posthog_taggeditem"
INNER JOIN "posthog_tag" ON ("posthog_taggeditem"."tag_id" = "posthog_tag"."id")
- WHERE "posthog_taggeditem"."insight_id" = 99999
+ WHERE "posthog_taggeditem"."dashboard_id" = 99999
'''
# ---
-# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.59
+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.36
'''
SELECT "posthog_user"."id",
"posthog_user"."password",
@@ -13133,20 +8068,7 @@
AND "posthog_user"."id" = 99999)
'''
# ---
-# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.6
- '''
- SELECT "ee_accesscontrol"."team_id" AS "team_id",
- "ee_accesscontrol"."resource_id" AS "resource_id",
- "ee_accesscontrol"."organization_member_id" AS "organization_member_id",
- "ee_accesscontrol"."role_id" AS "role_id",
- "ee_accesscontrol"."access_level" AS "access_level"
- FROM "ee_accesscontrol"
- INNER JOIN "posthog_team" ON ("ee_accesscontrol"."team_id" = "posthog_team"."id")
- WHERE ("ee_accesscontrol"."resource" = 'project'
- AND "posthog_team"."organization_id" IN ('00000000-0000-0000-0000-000000000000'::uuid))
- '''
-# ---
-# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.60
+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.37
'''
SELECT "posthog_organization"."id",
"posthog_organization"."name",
@@ -13188,7 +8110,7 @@
LIMIT 21
'''
# ---
-# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.61
+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.38
'''
SELECT "posthog_team"."id",
"posthog_team"."uuid",
@@ -13326,7 +8248,7 @@
LIMIT 21
'''
# ---
-# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.62
+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.39
'''
SELECT "posthog_organizationmembership"."id",
"posthog_organizationmembership"."organization_id",
@@ -13377,7 +8299,7 @@
LIMIT 21
'''
# ---
-# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.63
+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.4
'''
SELECT "ee_accesscontrol"."id",
"ee_accesscontrol"."team_id",
@@ -13401,7 +8323,31 @@
AND "ee_accesscontrol"."team_id" = 99999))
'''
# ---
-# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.64
+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.40
+ '''
+ SELECT "ee_accesscontrol"."id",
+ "ee_accesscontrol"."team_id",
+ "ee_accesscontrol"."access_level",
+ "ee_accesscontrol"."resource",
+ "ee_accesscontrol"."resource_id",
+ "ee_accesscontrol"."organization_member_id",
+ "ee_accesscontrol"."role_id",
+ "ee_accesscontrol"."created_by_id",
+ "ee_accesscontrol"."created_at",
+ "ee_accesscontrol"."updated_at",
+ "posthog_team"."organization_id" AS "_team_organization_id"
+ FROM "ee_accesscontrol"
+ INNER JOIN "posthog_team" ON ("ee_accesscontrol"."team_id" = "posthog_team"."id")
+ LEFT OUTER JOIN "posthog_organizationmembership" ON ("ee_accesscontrol"."organization_member_id" = "posthog_organizationmembership"."id")
+ WHERE (("ee_accesscontrol"."organization_member_id" IS NULL
+ AND "ee_accesscontrol"."role_id" IS NULL
+ AND "ee_accesscontrol"."team_id" = 99999)
+ OR ("posthog_organizationmembership"."user_id" = 99999
+ AND "ee_accesscontrol"."role_id" IS NULL
+ AND "ee_accesscontrol"."team_id" = 99999))
+ '''
+# ---
+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.41
'''
SELECT "posthog_organizationmembership"."id",
"posthog_organizationmembership"."organization_id",
@@ -13450,7 +8396,7 @@
WHERE "posthog_organizationmembership"."user_id" = 99999
'''
# ---
-# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.65
+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.42
'''
SELECT "ee_accesscontrol"."team_id" AS "team_id",
"ee_accesscontrol"."resource_id" AS "resource_id",
@@ -13463,7 +8409,7 @@
AND "posthog_team"."organization_id" IN ('00000000-0000-0000-0000-000000000000'::uuid))
'''
# ---
-# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.66
+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.43
'''
SELECT "ee_rolemembership"."organization_member_id" AS "organization_member_id",
"ee_rolemembership"."role_id" AS "role_id"
@@ -13471,7 +8417,7 @@
WHERE "ee_rolemembership"."user_id" = 99999
'''
# ---
-# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.67
+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.44
'''
SELECT "posthog_dashboard"."id",
"posthog_dashboard"."name",
@@ -13508,7 +8454,44 @@
LIMIT 21
'''
# ---
-# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.68
+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.45
+ '''
+ SELECT "posthog_dashboard"."id",
+ "posthog_dashboard"."name",
+ "posthog_dashboard"."description",
+ "posthog_dashboard"."team_id",
+ "posthog_dashboard"."pinned",
+ "posthog_dashboard"."created_at",
+ "posthog_dashboard"."created_by_id",
+ "posthog_dashboard"."deleted",
+ "posthog_dashboard"."last_accessed_at",
+ "posthog_dashboard"."last_refresh",
+ "posthog_dashboard"."filters",
+ "posthog_dashboard"."variables",
+ "posthog_dashboard"."breakdown_colors",
+ "posthog_dashboard"."data_color_theme_id",
+ "posthog_dashboard"."creation_mode",
+ "posthog_dashboard"."restriction_level",
+ "posthog_dashboard"."quick_filter_ids",
+ "posthog_dashboard"."deprecated_tags",
+ "posthog_dashboard"."tags",
+ "posthog_dashboard"."share_token",
+ "posthog_dashboard"."is_shared"
+ FROM "posthog_dashboard"
+ INNER JOIN "posthog_team" ON ("posthog_dashboard"."team_id" = "posthog_team"."id")
+ WHERE (NOT ("posthog_dashboard"."deleted")
+ AND ("posthog_dashboard"."team_id" =
+ (SELECT U0."parent_team_id" AS "parent_team_id"
+ FROM "posthog_team" U0
+ WHERE U0."id" = 99999
+ LIMIT 1)
+ OR ("posthog_team"."parent_team_id" IS NULL
+ AND "posthog_dashboard"."team_id" = 99999))
+ AND "posthog_dashboard"."id" = 99999)
+ LIMIT 21
+ '''
+# ---
+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.46
'''
SELECT COUNT(*) AS "__count"
FROM "posthog_dashboardtile"
@@ -13521,7 +8504,20 @@
AND "posthog_dashboardtile"."deleted" IS NOT NULL))
'''
# ---
-# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.69
+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.47
+ '''
+ SELECT COUNT(*) AS "__count"
+ FROM "posthog_dashboardtile"
+ INNER JOIN "posthog_dashboard" ON ("posthog_dashboardtile"."dashboard_id" = "posthog_dashboard"."id")
+ WHERE (NOT ("posthog_dashboardtile"."deleted"
+ AND "posthog_dashboardtile"."deleted" IS NOT NULL)
+ AND NOT ("posthog_dashboard"."deleted")
+ AND "posthog_dashboardtile"."dashboard_id" = 99999
+ AND NOT ("posthog_dashboardtile"."deleted"
+ AND "posthog_dashboardtile"."deleted" IS NOT NULL))
+ '''
+# ---
+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.48
'''
SELECT "posthog_dashboard"."id",
"posthog_dashboard"."name",
@@ -13553,15 +8549,7 @@
5 /* ... */))
'''
# ---
-# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.7
- '''
- SELECT "ee_rolemembership"."organization_member_id" AS "organization_member_id",
- "ee_rolemembership"."role_id" AS "role_id"
- FROM "ee_rolemembership"
- WHERE "ee_rolemembership"."user_id" = 99999
- '''
-# ---
-# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.70
+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.49
'''
SELECT "posthog_team"."id",
"posthog_team"."uuid",
@@ -13663,7 +8651,56 @@
LIMIT 21
'''
# ---
-# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.71
+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.5
+ '''
+ SELECT "posthog_organizationmembership"."id",
+ "posthog_organizationmembership"."organization_id",
+ "posthog_organizationmembership"."user_id",
+ "posthog_organizationmembership"."level",
+ "posthog_organizationmembership"."joined_at",
+ "posthog_organizationmembership"."updated_at",
+ "posthog_organizationmembership"."invited_by_id",
+ "posthog_organization"."id",
+ "posthog_organization"."name",
+ "posthog_organization"."slug",
+ "posthog_organization"."logo_media_id",
+ "posthog_organization"."created_at",
+ "posthog_organization"."updated_at",
+ "posthog_organization"."is_active",
+ "posthog_organization"."is_not_active_reason",
+ "posthog_organization"."session_cookie_age",
+ "posthog_organization"."is_member_join_email_enabled",
+ "posthog_organization"."is_ai_data_processing_approved",
+ "posthog_organization"."is_ai_training_opted_in",
+ "posthog_organization"."is_ai_training_locked",
+ "posthog_organization"."is_ai_training_cta_shown",
+ "posthog_organization"."enforce_2fa",
+ "posthog_organization"."members_can_invite",
+ "posthog_organization"."members_can_create_projects",
+ "posthog_organization"."members_can_use_personal_api_keys",
+ "posthog_organization"."allow_publicly_shared_resources",
+ "posthog_organization"."default_role_id",
+ "posthog_organization"."plugins_access_level",
+ "posthog_organization"."for_internal_metrics",
+ "posthog_organization"."default_experiment_stats_method",
+ "posthog_organization"."default_anonymize_ips",
+ "posthog_organization"."is_hipaa",
+ "posthog_organization"."is_pending_deletion",
+ "posthog_organization"."customer_id",
+ "posthog_organization"."available_product_features",
+ "posthog_organization"."usage",
+ "posthog_organization"."never_drop_data",
+ "posthog_organization"."customer_trust_scores",
+ "posthog_organization"."setup_section_2_completed",
+ "posthog_organization"."personalization",
+ "posthog_organization"."domain_whitelist",
+ "posthog_organization"."is_platform"
+ FROM "posthog_organizationmembership"
+ INNER JOIN "posthog_organization" ON ("posthog_organizationmembership"."organization_id" = "posthog_organization"."id")
+ WHERE "posthog_organizationmembership"."user_id" = 99999
+ '''
+# ---
+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.50
'''
SELECT "posthog_filesystem"."team_id",
"posthog_filesystem"."id",
@@ -13688,7 +8725,7 @@
AND "posthog_filesystem"."shortcut" IS NOT NULL))
'''
# ---
-# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.72
+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.51
'''
SELECT "posthog_organization"."id",
"posthog_organization"."name",
@@ -13730,7 +8767,7 @@
LIMIT 21
'''
# ---
-# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.73
+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.52
'''
SELECT "posthog_team"."id",
"posthog_team"."uuid",
@@ -13832,7 +8869,7 @@
LIMIT 21
'''
# ---
-# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.74
+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.53
'''
SELECT "posthog_dashboardtile"."id",
"posthog_dashboardtile"."dashboard_id",
@@ -13859,7 +8896,7 @@
AND "posthog_dashboardtile"."insight_id" = 99999)
'''
# ---
-# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.75
+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.54
'''
SELECT "posthog_dashboardtile"."id",
"posthog_dashboardtile"."dashboard_id",
@@ -13886,7 +8923,7 @@
AND "posthog_dashboardtile"."insight_id" = 99999)
'''
# ---
-# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.76
+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.55
'''
SELECT "posthog_insightvariable"."created_by_id",
"posthog_insightvariable"."created_at",
@@ -13902,7 +8939,7 @@
WHERE "posthog_insightvariable"."team_id" = 99999
'''
# ---
-# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.77
+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.56
'''
SELECT "posthog_dashboardtile"."dashboard_id" AS "dashboard_id"
FROM "posthog_dashboardtile"
@@ -13913,7 +8950,7 @@
AND "posthog_dashboardtile"."insight_id" = 99999)
'''
# ---
-# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.78
+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.57
'''
SELECT "posthog_dashboard"."id",
"posthog_dashboard"."name",
@@ -13945,7 +8982,7 @@
5 /* ... */))
'''
# ---
-# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.79
+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.58
'''
SELECT "posthog_tag"."name" AS "tag__name"
FROM "posthog_taggeditem"
@@ -13953,23 +8990,7 @@
WHERE "posthog_taggeditem"."insight_id" = 99999
'''
# ---
-# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.8
- '''
- SELECT COUNT(*) AS "__count"
- FROM "posthog_dashboard"
- INNER JOIN "posthog_team" ON ("posthog_dashboard"."team_id" = "posthog_team"."id")
- WHERE (NOT ("posthog_dashboard"."deleted")
- AND ("posthog_dashboard"."team_id" =
- (SELECT U0."parent_team_id" AS "parent_team_id"
- FROM "posthog_team" U0
- WHERE U0."id" = 99999
- LIMIT 1)
- OR ("posthog_team"."parent_team_id" IS NULL
- AND "posthog_dashboard"."team_id" = 99999))
- AND NOT "posthog_dashboard"."deleted")
- '''
-# ---
-# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.80
+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.59
'''
SELECT "posthog_user"."id",
"posthog_user"."password",
@@ -14014,7 +9035,20 @@
AND "posthog_user"."id" = 99999)
'''
# ---
-# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.81
+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.6
+ '''
+ SELECT "ee_accesscontrol"."team_id" AS "team_id",
+ "ee_accesscontrol"."resource_id" AS "resource_id",
+ "ee_accesscontrol"."organization_member_id" AS "organization_member_id",
+ "ee_accesscontrol"."role_id" AS "role_id",
+ "ee_accesscontrol"."access_level" AS "access_level"
+ FROM "ee_accesscontrol"
+ INNER JOIN "posthog_team" ON ("ee_accesscontrol"."team_id" = "posthog_team"."id")
+ WHERE ("ee_accesscontrol"."resource" = 'project'
+ AND "posthog_team"."organization_id" IN ('00000000-0000-0000-0000-000000000000'::uuid))
+ '''
+# ---
+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.60
'''
SELECT "posthog_organization"."id",
"posthog_organization"."name",
@@ -14056,7 +9090,7 @@
LIMIT 21
'''
# ---
-# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.82
+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.61
'''
SELECT "posthog_team"."id",
"posthog_team"."uuid",
@@ -14194,7 +9228,7 @@
LIMIT 21
'''
# ---
-# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.83
+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.62
'''
SELECT "posthog_organizationmembership"."id",
"posthog_organizationmembership"."organization_id",
@@ -14245,7 +9279,7 @@
LIMIT 21
'''
# ---
-# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.84
+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.63
'''
SELECT "ee_accesscontrol"."id",
"ee_accesscontrol"."team_id",
@@ -14269,7 +9303,7 @@
AND "ee_accesscontrol"."team_id" = 99999))
'''
# ---
-# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.85
+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.64
'''
SELECT "posthog_organizationmembership"."id",
"posthog_organizationmembership"."organization_id",
@@ -14318,7 +9352,7 @@
WHERE "posthog_organizationmembership"."user_id" = 99999
'''
# ---
-# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.86
+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.65
'''
SELECT "ee_accesscontrol"."team_id" AS "team_id",
"ee_accesscontrol"."resource_id" AS "resource_id",
@@ -14331,7 +9365,7 @@
AND "posthog_team"."organization_id" IN ('00000000-0000-0000-0000-000000000000'::uuid))
'''
# ---
-# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.87
+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.66
'''
SELECT "ee_rolemembership"."organization_member_id" AS "organization_member_id",
"ee_rolemembership"."role_id" AS "role_id"
@@ -14339,7 +9373,7 @@
WHERE "ee_rolemembership"."user_id" = 99999
'''
# ---
-# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.88
+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.67
'''
SELECT "posthog_dashboard"."id",
"posthog_dashboard"."name",
@@ -14376,20 +9410,229 @@
LIMIT 21
'''
# ---
-# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.89
+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.68
+ '''
+ SELECT COUNT(*) AS "__count"
+ FROM "posthog_dashboardtile"
+ INNER JOIN "posthog_dashboard" ON ("posthog_dashboardtile"."dashboard_id" = "posthog_dashboard"."id")
+ WHERE (NOT ("posthog_dashboardtile"."deleted"
+ AND "posthog_dashboardtile"."deleted" IS NOT NULL)
+ AND NOT ("posthog_dashboard"."deleted")
+ AND "posthog_dashboardtile"."dashboard_id" = 99999
+ AND NOT ("posthog_dashboardtile"."deleted"
+ AND "posthog_dashboardtile"."deleted" IS NOT NULL))
+ '''
+# ---
+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.69
+ '''
+ SELECT "posthog_dashboard"."id",
+ "posthog_dashboard"."name",
+ "posthog_dashboard"."description",
+ "posthog_dashboard"."team_id",
+ "posthog_dashboard"."pinned",
+ "posthog_dashboard"."created_at",
+ "posthog_dashboard"."created_by_id",
+ "posthog_dashboard"."deleted",
+ "posthog_dashboard"."last_accessed_at",
+ "posthog_dashboard"."last_refresh",
+ "posthog_dashboard"."filters",
+ "posthog_dashboard"."variables",
+ "posthog_dashboard"."breakdown_colors",
+ "posthog_dashboard"."data_color_theme_id",
+ "posthog_dashboard"."creation_mode",
+ "posthog_dashboard"."restriction_level",
+ "posthog_dashboard"."quick_filter_ids",
+ "posthog_dashboard"."deprecated_tags",
+ "posthog_dashboard"."tags",
+ "posthog_dashboard"."share_token",
+ "posthog_dashboard"."is_shared"
+ FROM "posthog_dashboard"
+ WHERE (NOT ("posthog_dashboard"."deleted")
+ AND "posthog_dashboard"."id" IN (1,
+ 2,
+ 3,
+ 4,
+ 5 /* ... */))
+ '''
+# ---
+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.7
+ '''
+ SELECT "ee_rolemembership"."organization_member_id" AS "organization_member_id",
+ "ee_rolemembership"."role_id" AS "role_id"
+ FROM "ee_rolemembership"
+ WHERE "ee_rolemembership"."user_id" = 99999
+ '''
+# ---
+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.70
+ '''
+ SELECT "posthog_team"."id",
+ "posthog_team"."uuid",
+ "posthog_team"."organization_id",
+ "posthog_team"."parent_team_id",
+ "posthog_team"."project_id",
+ "posthog_team"."api_token",
+ "posthog_team"."app_urls",
+ "posthog_team"."name",
+ "posthog_team"."slack_incoming_webhook",
+ "posthog_team"."created_at",
+ "posthog_team"."updated_at",
+ "posthog_team"."anonymize_ips",
+ "posthog_team"."completed_snippet_onboarding",
+ "posthog_team"."has_completed_onboarding_for",
+ "posthog_team"."onboarding_tasks",
+ "posthog_team"."ingested_event",
+ "posthog_team"."ingested_production_event",
+ "posthog_team"."ingested_production_event_last_checked_at",
+ "posthog_team"."person_processing_opt_out",
+ "posthog_team"."secret_api_token",
+ "posthog_team"."secret_api_token_backup",
+ "posthog_team"."session_recording_opt_in",
+ "posthog_team"."session_recording_sample_rate",
+ "posthog_team"."session_recording_minimum_duration_milliseconds",
+ "posthog_team"."session_recording_linked_flag",
+ "posthog_team"."session_recording_network_payload_capture_config",
+ "posthog_team"."session_recording_masking_config",
+ "posthog_team"."session_recording_url_trigger_config",
+ "posthog_team"."session_recording_url_blocklist_config",
+ "posthog_team"."session_recording_event_trigger_config",
+ "posthog_team"."session_recording_trigger_match_type_config",
+ "posthog_team"."session_recording_trigger_groups",
+ "posthog_team"."session_replay_config",
+ "posthog_team"."session_recording_retention_period",
+ "posthog_team"."event_retention_months",
+ "posthog_team"."conversations_enabled",
+ "posthog_team"."conversations_settings",
+ "posthog_team"."proactive_tasks_enabled",
+ "posthog_team"."survey_config",
+ "posthog_team"."surveys_opt_in",
+ "posthog_team"."product_tours_opt_in",
+ "posthog_team"."capture_console_log_opt_in",
+ "posthog_team"."capture_performance_opt_in",
+ "posthog_team"."capture_dead_clicks",
+ "posthog_team"."autocapture_opt_out",
+ "posthog_team"."autocapture_web_vitals_opt_in",
+ "posthog_team"."autocapture_web_vitals_allowed_metrics",
+ "posthog_team"."autocapture_exceptions_opt_in",
+ "posthog_team"."autocapture_exceptions_errors_to_ignore",
+ "posthog_team"."logs_settings",
+ "posthog_team"."llm_gateway_enabled_at",
+ "posthog_team"."llm_gateway_revoked_at",
+ "posthog_team"."llm_gateway_overspend_allowance_usd",
+ "posthog_team"."heatmaps_opt_in",
+ "posthog_team"."receive_org_level_activity_logs",
+ "posthog_team"."web_analytics_pre_aggregated_tables_enabled",
+ "posthog_team"."web_analytics_pre_aggregated_tables_version",
+ "posthog_team"."flags_persistence_default",
+ "posthog_team"."feature_flag_confirmation_enabled",
+ "posthog_team"."feature_flag_confirmation_message",
+ "posthog_team"."default_evaluation_environments_enabled",
+ "posthog_team"."require_evaluation_environment_tags",
+ "posthog_team"."default_evaluation_contexts_enabled",
+ "posthog_team"."require_evaluation_contexts",
+ "posthog_team"."session_recording_version",
+ "posthog_team"."signup_token",
+ "posthog_team"."is_demo",
+ "posthog_team"."access_control",
+ "posthog_team"."week_start_day",
+ "posthog_team"."inject_web_apps",
+ "posthog_team"."test_account_filters",
+ "posthog_team"."test_account_filters_default_checked",
+ "posthog_team"."path_cleaning_filters",
+ "posthog_team"."timezone",
+ "posthog_team"."data_attributes",
+ "posthog_team"."person_display_name_properties",
+ "posthog_team"."live_events_columns",
+ "posthog_team"."recording_domains",
+ "posthog_team"."human_friendly_comparison_periods",
+ "posthog_team"."cookieless_server_hash_mode",
+ "posthog_team"."primary_dashboard_id",
+ "posthog_team"."default_data_theme",
+ "posthog_team"."extra_settings",
+ "posthog_team"."modifiers",
+ "posthog_team"."correlation_config",
+ "posthog_team"."session_recording_retention_period_days",
+ "posthog_team"."external_data_workspace_id",
+ "posthog_team"."external_data_workspace_last_synced_at",
+ "posthog_team"."api_query_rate_limit",
+ "posthog_team"."drop_events_older_than",
+ "posthog_team"."base_currency",
+ "posthog_team"."experiment_recalculation_time",
+ "posthog_team"."default_experiment_confidence_level",
+ "posthog_team"."default_experiment_stats_method",
+ "posthog_team"."business_model"
+ FROM "posthog_team"
+ WHERE "posthog_team"."id" = 99999
+ LIMIT 21
+ '''
+# ---
+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.71
+ '''
+ SELECT "posthog_filesystem"."team_id",
+ "posthog_filesystem"."id",
+ "posthog_filesystem"."path",
+ "posthog_filesystem"."depth",
+ "posthog_filesystem"."type",
+ "posthog_filesystem"."ref",
+ "posthog_filesystem"."href",
+ "posthog_filesystem"."shortcut",
+ "posthog_filesystem"."meta",
+ "posthog_filesystem"."created_at",
+ "posthog_filesystem"."created_by_id",
+ "posthog_filesystem"."surface",
+ "posthog_filesystem"."project_id"
+ FROM "posthog_filesystem"
+ WHERE (("posthog_filesystem"."surface" IS NULL
+ OR "posthog_filesystem"."surface" = 'web')
+ AND "posthog_filesystem"."ref" = '0001'
+ AND "posthog_filesystem"."team_id" = 99999
+ AND "posthog_filesystem"."type" = 'insight'
+ AND NOT ("posthog_filesystem"."shortcut"
+ AND "posthog_filesystem"."shortcut" IS NOT NULL))
+ '''
+# ---
+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.72
'''
- SELECT COUNT(*) AS "__count"
- FROM "posthog_dashboardtile"
- INNER JOIN "posthog_dashboard" ON ("posthog_dashboardtile"."dashboard_id" = "posthog_dashboard"."id")
- WHERE (NOT ("posthog_dashboardtile"."deleted"
- AND "posthog_dashboardtile"."deleted" IS NOT NULL)
- AND NOT ("posthog_dashboard"."deleted")
- AND "posthog_dashboardtile"."dashboard_id" = 99999
- AND NOT ("posthog_dashboardtile"."deleted"
- AND "posthog_dashboardtile"."deleted" IS NOT NULL))
+ SELECT "posthog_organization"."id",
+ "posthog_organization"."name",
+ "posthog_organization"."slug",
+ "posthog_organization"."logo_media_id",
+ "posthog_organization"."created_at",
+ "posthog_organization"."updated_at",
+ "posthog_organization"."is_active",
+ "posthog_organization"."is_not_active_reason",
+ "posthog_organization"."session_cookie_age",
+ "posthog_organization"."is_member_join_email_enabled",
+ "posthog_organization"."is_ai_data_processing_approved",
+ "posthog_organization"."is_ai_training_opted_in",
+ "posthog_organization"."is_ai_training_locked",
+ "posthog_organization"."is_ai_training_cta_shown",
+ "posthog_organization"."enforce_2fa",
+ "posthog_organization"."members_can_invite",
+ "posthog_organization"."members_can_create_projects",
+ "posthog_organization"."members_can_use_personal_api_keys",
+ "posthog_organization"."allow_publicly_shared_resources",
+ "posthog_organization"."default_role_id",
+ "posthog_organization"."plugins_access_level",
+ "posthog_organization"."for_internal_metrics",
+ "posthog_organization"."default_experiment_stats_method",
+ "posthog_organization"."default_anonymize_ips",
+ "posthog_organization"."is_hipaa",
+ "posthog_organization"."is_pending_deletion",
+ "posthog_organization"."customer_id",
+ "posthog_organization"."available_product_features",
+ "posthog_organization"."usage",
+ "posthog_organization"."never_drop_data",
+ "posthog_organization"."customer_trust_scores",
+ "posthog_organization"."setup_section_2_completed",
+ "posthog_organization"."personalization",
+ "posthog_organization"."domain_whitelist",
+ "posthog_organization"."is_platform"
+ FROM "posthog_organization"
+ WHERE "posthog_organization"."id" = '00000000-0000-0000-0000-000000000000'::uuid
+ LIMIT 21
'''
# ---
-# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.9
+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.73
'''
SELECT "posthog_team"."id",
"posthog_team"."uuid",
@@ -14491,39 +9734,231 @@
LIMIT 21
'''
# ---
-# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.90
- '''
- SELECT "posthog_dashboard"."id",
- "posthog_dashboard"."name",
- "posthog_dashboard"."description",
- "posthog_dashboard"."team_id",
- "posthog_dashboard"."pinned",
- "posthog_dashboard"."created_at",
- "posthog_dashboard"."created_by_id",
- "posthog_dashboard"."deleted",
- "posthog_dashboard"."last_accessed_at",
- "posthog_dashboard"."last_refresh",
- "posthog_dashboard"."filters",
- "posthog_dashboard"."variables",
- "posthog_dashboard"."breakdown_colors",
- "posthog_dashboard"."data_color_theme_id",
- "posthog_dashboard"."creation_mode",
- "posthog_dashboard"."restriction_level",
- "posthog_dashboard"."quick_filter_ids",
- "posthog_dashboard"."deprecated_tags",
- "posthog_dashboard"."tags",
- "posthog_dashboard"."share_token",
- "posthog_dashboard"."is_shared"
- FROM "posthog_dashboard"
- WHERE (NOT ("posthog_dashboard"."deleted")
- AND "posthog_dashboard"."id" IN (1,
- 2,
- 3,
- 4,
- 5 /* ... */))
- '''
-# ---
-# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.91
+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.74
+ '''
+ SELECT "posthog_dashboardtile"."id",
+ "posthog_dashboardtile"."dashboard_id",
+ "posthog_dashboardtile"."insight_id",
+ "posthog_dashboardtile"."text_id",
+ "posthog_dashboardtile"."button_tile_id",
+ "posthog_dashboardtile"."widget_id",
+ "posthog_dashboardtile"."team_id",
+ "posthog_dashboardtile"."layouts",
+ "posthog_dashboardtile"."color",
+ "posthog_dashboardtile"."filters_hash",
+ "posthog_dashboardtile"."last_refresh",
+ "posthog_dashboardtile"."refreshing",
+ "posthog_dashboardtile"."refresh_attempt",
+ "posthog_dashboardtile"."filters_overrides",
+ "posthog_dashboardtile"."show_description",
+ "posthog_dashboardtile"."transparent_background",
+ "posthog_dashboardtile"."deleted"
+ FROM "posthog_dashboardtile"
+ INNER JOIN "posthog_dashboard" ON ("posthog_dashboardtile"."dashboard_id" = "posthog_dashboard"."id")
+ WHERE (NOT ("posthog_dashboardtile"."deleted"
+ AND "posthog_dashboardtile"."deleted" IS NOT NULL)
+ AND NOT ("posthog_dashboard"."deleted")
+ AND "posthog_dashboardtile"."insight_id" = 99999)
+ '''
+# ---
+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.75
+ '''
+ SELECT "posthog_dashboardtile"."id",
+ "posthog_dashboardtile"."dashboard_id",
+ "posthog_dashboardtile"."insight_id",
+ "posthog_dashboardtile"."text_id",
+ "posthog_dashboardtile"."button_tile_id",
+ "posthog_dashboardtile"."widget_id",
+ "posthog_dashboardtile"."team_id",
+ "posthog_dashboardtile"."layouts",
+ "posthog_dashboardtile"."color",
+ "posthog_dashboardtile"."filters_hash",
+ "posthog_dashboardtile"."last_refresh",
+ "posthog_dashboardtile"."refreshing",
+ "posthog_dashboardtile"."refresh_attempt",
+ "posthog_dashboardtile"."filters_overrides",
+ "posthog_dashboardtile"."show_description",
+ "posthog_dashboardtile"."transparent_background",
+ "posthog_dashboardtile"."deleted"
+ FROM "posthog_dashboardtile"
+ INNER JOIN "posthog_dashboard" ON ("posthog_dashboardtile"."dashboard_id" = "posthog_dashboard"."id")
+ WHERE (NOT ("posthog_dashboardtile"."deleted"
+ AND "posthog_dashboardtile"."deleted" IS NOT NULL)
+ AND NOT ("posthog_dashboard"."deleted")
+ AND "posthog_dashboardtile"."insight_id" = 99999)
+ '''
+# ---
+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.76
+ '''
+ SELECT "posthog_insightvariable"."created_by_id",
+ "posthog_insightvariable"."created_at",
+ "posthog_insightvariable"."updated_at",
+ "posthog_insightvariable"."id",
+ "posthog_insightvariable"."team_id",
+ "posthog_insightvariable"."name",
+ "posthog_insightvariable"."code_name",
+ "posthog_insightvariable"."type",
+ "posthog_insightvariable"."default_value",
+ "posthog_insightvariable"."values"
+ FROM "posthog_insightvariable"
+ WHERE "posthog_insightvariable"."team_id" = 99999
+ '''
+# ---
+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.77
+ '''
+ SELECT "posthog_dashboardtile"."dashboard_id" AS "dashboard_id"
+ FROM "posthog_dashboardtile"
+ INNER JOIN "posthog_dashboard" ON ("posthog_dashboardtile"."dashboard_id" = "posthog_dashboard"."id")
+ WHERE (NOT ("posthog_dashboardtile"."deleted"
+ AND "posthog_dashboardtile"."deleted" IS NOT NULL)
+ AND NOT ("posthog_dashboard"."deleted")
+ AND "posthog_dashboardtile"."insight_id" = 99999)
+ '''
+# ---
+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.78
+ '''
+ SELECT "posthog_dashboard"."id",
+ "posthog_dashboard"."name",
+ "posthog_dashboard"."description",
+ "posthog_dashboard"."team_id",
+ "posthog_dashboard"."pinned",
+ "posthog_dashboard"."created_at",
+ "posthog_dashboard"."created_by_id",
+ "posthog_dashboard"."deleted",
+ "posthog_dashboard"."last_accessed_at",
+ "posthog_dashboard"."last_refresh",
+ "posthog_dashboard"."filters",
+ "posthog_dashboard"."variables",
+ "posthog_dashboard"."breakdown_colors",
+ "posthog_dashboard"."data_color_theme_id",
+ "posthog_dashboard"."creation_mode",
+ "posthog_dashboard"."restriction_level",
+ "posthog_dashboard"."quick_filter_ids",
+ "posthog_dashboard"."deprecated_tags",
+ "posthog_dashboard"."tags",
+ "posthog_dashboard"."share_token",
+ "posthog_dashboard"."is_shared"
+ FROM "posthog_dashboard"
+ WHERE (NOT ("posthog_dashboard"."deleted")
+ AND "posthog_dashboard"."id" IN (1,
+ 2,
+ 3,
+ 4,
+ 5 /* ... */))
+ '''
+# ---
+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.79
+ '''
+ SELECT "posthog_tag"."name" AS "tag__name"
+ FROM "posthog_taggeditem"
+ INNER JOIN "posthog_tag" ON ("posthog_taggeditem"."tag_id" = "posthog_tag"."id")
+ WHERE "posthog_taggeditem"."insight_id" = 99999
+ '''
+# ---
+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.8
+ '''
+ SELECT COUNT(*) AS "__count"
+ FROM "posthog_dashboard"
+ INNER JOIN "posthog_team" ON ("posthog_dashboard"."team_id" = "posthog_team"."id")
+ WHERE (NOT ("posthog_dashboard"."deleted")
+ AND ("posthog_dashboard"."team_id" =
+ (SELECT U0."parent_team_id" AS "parent_team_id"
+ FROM "posthog_team" U0
+ WHERE U0."id" = 99999
+ LIMIT 1)
+ OR ("posthog_team"."parent_team_id" IS NULL
+ AND "posthog_dashboard"."team_id" = 99999))
+ AND NOT "posthog_dashboard"."deleted")
+ '''
+# ---
+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.80
+ '''
+ SELECT "posthog_user"."id",
+ "posthog_user"."password",
+ "posthog_user"."last_login",
+ "posthog_user"."first_name",
+ "posthog_user"."last_name",
+ "posthog_user"."is_staff",
+ "posthog_user"."date_joined",
+ "posthog_user"."uuid",
+ "posthog_user"."current_organization_id",
+ "posthog_user"."current_team_id",
+ "posthog_user"."email",
+ "posthog_user"."pending_email",
+ "posthog_user"."distinct_id",
+ "posthog_user"."is_email_verified",
+ "posthog_user"."credentials_reviewed_at",
+ "posthog_user"."requested_2fa_reset_at",
+ "posthog_user"."has_seen_product_intro_for",
+ "posthog_user"."strapi_id",
+ "posthog_user"."is_active",
+ "posthog_user"."role_at_organization",
+ "posthog_user"."theme_mode",
+ "posthog_user"."partial_notification_settings",
+ "posthog_user"."anonymize_data",
+ "posthog_user"."allow_impersonation",
+ "posthog_user"."toolbar_mode",
+ "posthog_user"."hedgehog_config",
+ "posthog_user"."allow_sidebar_suggestions",
+ "posthog_user"."shortcut_position",
+ "posthog_user"."passkeys_enabled_for_2fa",
+ "posthog_user"."hide_mcp_hints",
+ "posthog_user"."onboarding_skipped_at",
+ "posthog_user"."onboarding_skipped_reason",
+ "posthog_user"."onboarding_skipped_organization_id",
+ "posthog_user"."onboarding_delegated_to_invite_id",
+ "posthog_user"."onboarding_delegated_to_organization_id",
+ "posthog_user"."onboarding_delegation_accepted_at",
+ "posthog_user"."events_column_config",
+ "posthog_user"."email_opt_in"
+ FROM "posthog_user"
+ WHERE ("posthog_user"."is_active"
+ AND "posthog_user"."id" = 99999)
+ '''
+# ---
+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.81
+ '''
+ SELECT "posthog_organization"."id",
+ "posthog_organization"."name",
+ "posthog_organization"."slug",
+ "posthog_organization"."logo_media_id",
+ "posthog_organization"."created_at",
+ "posthog_organization"."updated_at",
+ "posthog_organization"."is_active",
+ "posthog_organization"."is_not_active_reason",
+ "posthog_organization"."session_cookie_age",
+ "posthog_organization"."is_member_join_email_enabled",
+ "posthog_organization"."is_ai_data_processing_approved",
+ "posthog_organization"."is_ai_training_opted_in",
+ "posthog_organization"."is_ai_training_locked",
+ "posthog_organization"."is_ai_training_cta_shown",
+ "posthog_organization"."enforce_2fa",
+ "posthog_organization"."members_can_invite",
+ "posthog_organization"."members_can_create_projects",
+ "posthog_organization"."members_can_use_personal_api_keys",
+ "posthog_organization"."allow_publicly_shared_resources",
+ "posthog_organization"."default_role_id",
+ "posthog_organization"."plugins_access_level",
+ "posthog_organization"."for_internal_metrics",
+ "posthog_organization"."default_experiment_stats_method",
+ "posthog_organization"."default_anonymize_ips",
+ "posthog_organization"."is_hipaa",
+ "posthog_organization"."is_pending_deletion",
+ "posthog_organization"."customer_id",
+ "posthog_organization"."available_product_features",
+ "posthog_organization"."usage",
+ "posthog_organization"."never_drop_data",
+ "posthog_organization"."customer_trust_scores",
+ "posthog_organization"."setup_section_2_completed",
+ "posthog_organization"."personalization",
+ "posthog_organization"."domain_whitelist",
+ "posthog_organization"."is_platform"
+ FROM "posthog_organization"
+ WHERE "posthog_organization"."id" = '00000000-0000-0000-0000-000000000000'::uuid
+ LIMIT 21
+ '''
+# ---
+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.82
'''
SELECT "posthog_team"."id",
"posthog_team"."uuid",
@@ -14619,40 +10054,133 @@
"posthog_team"."experiment_recalculation_time",
"posthog_team"."default_experiment_confidence_level",
"posthog_team"."default_experiment_stats_method",
- "posthog_team"."business_model"
+ "posthog_team"."business_model",
+ "posthog_organization"."id",
+ "posthog_organization"."name",
+ "posthog_organization"."slug",
+ "posthog_organization"."logo_media_id",
+ "posthog_organization"."created_at",
+ "posthog_organization"."updated_at",
+ "posthog_organization"."is_active",
+ "posthog_organization"."is_not_active_reason",
+ "posthog_organization"."session_cookie_age",
+ "posthog_organization"."is_member_join_email_enabled",
+ "posthog_organization"."is_ai_data_processing_approved",
+ "posthog_organization"."is_ai_training_opted_in",
+ "posthog_organization"."is_ai_training_locked",
+ "posthog_organization"."is_ai_training_cta_shown",
+ "posthog_organization"."enforce_2fa",
+ "posthog_organization"."members_can_invite",
+ "posthog_organization"."members_can_create_projects",
+ "posthog_organization"."members_can_use_personal_api_keys",
+ "posthog_organization"."allow_publicly_shared_resources",
+ "posthog_organization"."default_role_id",
+ "posthog_organization"."plugins_access_level",
+ "posthog_organization"."for_internal_metrics",
+ "posthog_organization"."default_experiment_stats_method",
+ "posthog_organization"."default_anonymize_ips",
+ "posthog_organization"."is_hipaa",
+ "posthog_organization"."is_pending_deletion",
+ "posthog_organization"."customer_id",
+ "posthog_organization"."available_product_features",
+ "posthog_organization"."usage",
+ "posthog_organization"."never_drop_data",
+ "posthog_organization"."customer_trust_scores",
+ "posthog_organization"."setup_section_2_completed",
+ "posthog_organization"."personalization",
+ "posthog_organization"."domain_whitelist",
+ "posthog_organization"."is_platform"
FROM "posthog_team"
+ INNER JOIN "posthog_organization" ON ("posthog_team"."organization_id" = "posthog_organization"."id")
WHERE "posthog_team"."id" = 99999
LIMIT 21
'''
# ---
-# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.92
+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.83
'''
- SELECT "posthog_filesystem"."team_id",
- "posthog_filesystem"."id",
- "posthog_filesystem"."path",
- "posthog_filesystem"."depth",
- "posthog_filesystem"."type",
- "posthog_filesystem"."ref",
- "posthog_filesystem"."href",
- "posthog_filesystem"."shortcut",
- "posthog_filesystem"."meta",
- "posthog_filesystem"."created_at",
- "posthog_filesystem"."created_by_id",
- "posthog_filesystem"."surface",
- "posthog_filesystem"."project_id"
- FROM "posthog_filesystem"
- WHERE (("posthog_filesystem"."surface" IS NULL
- OR "posthog_filesystem"."surface" = 'web')
- AND "posthog_filesystem"."ref" = '0001'
- AND "posthog_filesystem"."team_id" = 99999
- AND "posthog_filesystem"."type" = 'insight'
- AND NOT ("posthog_filesystem"."shortcut"
- AND "posthog_filesystem"."shortcut" IS NOT NULL))
+ SELECT "posthog_organizationmembership"."id",
+ "posthog_organizationmembership"."organization_id",
+ "posthog_organizationmembership"."user_id",
+ "posthog_organizationmembership"."level",
+ "posthog_organizationmembership"."joined_at",
+ "posthog_organizationmembership"."updated_at",
+ "posthog_organizationmembership"."invited_by_id",
+ "posthog_organization"."id",
+ "posthog_organization"."name",
+ "posthog_organization"."slug",
+ "posthog_organization"."logo_media_id",
+ "posthog_organization"."created_at",
+ "posthog_organization"."updated_at",
+ "posthog_organization"."is_active",
+ "posthog_organization"."is_not_active_reason",
+ "posthog_organization"."session_cookie_age",
+ "posthog_organization"."is_member_join_email_enabled",
+ "posthog_organization"."is_ai_data_processing_approved",
+ "posthog_organization"."is_ai_training_opted_in",
+ "posthog_organization"."is_ai_training_locked",
+ "posthog_organization"."is_ai_training_cta_shown",
+ "posthog_organization"."enforce_2fa",
+ "posthog_organization"."members_can_invite",
+ "posthog_organization"."members_can_create_projects",
+ "posthog_organization"."members_can_use_personal_api_keys",
+ "posthog_organization"."allow_publicly_shared_resources",
+ "posthog_organization"."default_role_id",
+ "posthog_organization"."plugins_access_level",
+ "posthog_organization"."for_internal_metrics",
+ "posthog_organization"."default_experiment_stats_method",
+ "posthog_organization"."default_anonymize_ips",
+ "posthog_organization"."is_hipaa",
+ "posthog_organization"."is_pending_deletion",
+ "posthog_organization"."customer_id",
+ "posthog_organization"."available_product_features",
+ "posthog_organization"."usage",
+ "posthog_organization"."never_drop_data",
+ "posthog_organization"."customer_trust_scores",
+ "posthog_organization"."setup_section_2_completed",
+ "posthog_organization"."personalization",
+ "posthog_organization"."domain_whitelist",
+ "posthog_organization"."is_platform"
+ FROM "posthog_organizationmembership"
+ INNER JOIN "posthog_organization" ON ("posthog_organizationmembership"."organization_id" = "posthog_organization"."id")
+ WHERE ("posthog_organizationmembership"."organization_id" = '00000000-0000-0000-0000-000000000000'::uuid
+ AND "posthog_organizationmembership"."user_id" = 99999)
+ LIMIT 21
'''
# ---
-# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.93
+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.84
'''
- SELECT "posthog_organization"."id",
+ SELECT "ee_accesscontrol"."id",
+ "ee_accesscontrol"."team_id",
+ "ee_accesscontrol"."access_level",
+ "ee_accesscontrol"."resource",
+ "ee_accesscontrol"."resource_id",
+ "ee_accesscontrol"."organization_member_id",
+ "ee_accesscontrol"."role_id",
+ "ee_accesscontrol"."created_by_id",
+ "ee_accesscontrol"."created_at",
+ "ee_accesscontrol"."updated_at",
+ "posthog_team"."organization_id" AS "_team_organization_id"
+ FROM "ee_accesscontrol"
+ INNER JOIN "posthog_team" ON ("ee_accesscontrol"."team_id" = "posthog_team"."id")
+ LEFT OUTER JOIN "posthog_organizationmembership" ON ("ee_accesscontrol"."organization_member_id" = "posthog_organizationmembership"."id")
+ WHERE (("ee_accesscontrol"."organization_member_id" IS NULL
+ AND "ee_accesscontrol"."role_id" IS NULL
+ AND "ee_accesscontrol"."team_id" = 99999)
+ OR ("posthog_organizationmembership"."user_id" = 99999
+ AND "ee_accesscontrol"."role_id" IS NULL
+ AND "ee_accesscontrol"."team_id" = 99999))
+ '''
+# ---
+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.85
+ '''
+ SELECT "posthog_organizationmembership"."id",
+ "posthog_organizationmembership"."organization_id",
+ "posthog_organizationmembership"."user_id",
+ "posthog_organizationmembership"."level",
+ "posthog_organizationmembership"."joined_at",
+ "posthog_organizationmembership"."updated_at",
+ "posthog_organizationmembership"."invited_by_id",
+ "posthog_organization"."id",
"posthog_organization"."name",
"posthog_organization"."slug",
"posthog_organization"."logo_media_id",
@@ -14687,12 +10215,83 @@
"posthog_organization"."personalization",
"posthog_organization"."domain_whitelist",
"posthog_organization"."is_platform"
- FROM "posthog_organization"
- WHERE "posthog_organization"."id" = '00000000-0000-0000-0000-000000000000'::uuid
+ FROM "posthog_organizationmembership"
+ INNER JOIN "posthog_organization" ON ("posthog_organizationmembership"."organization_id" = "posthog_organization"."id")
+ WHERE "posthog_organizationmembership"."user_id" = 99999
+ '''
+# ---
+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.86
+ '''
+ SELECT "ee_accesscontrol"."team_id" AS "team_id",
+ "ee_accesscontrol"."resource_id" AS "resource_id",
+ "ee_accesscontrol"."organization_member_id" AS "organization_member_id",
+ "ee_accesscontrol"."role_id" AS "role_id",
+ "ee_accesscontrol"."access_level" AS "access_level"
+ FROM "ee_accesscontrol"
+ INNER JOIN "posthog_team" ON ("ee_accesscontrol"."team_id" = "posthog_team"."id")
+ WHERE ("ee_accesscontrol"."resource" = 'project'
+ AND "posthog_team"."organization_id" IN ('00000000-0000-0000-0000-000000000000'::uuid))
+ '''
+# ---
+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.87
+ '''
+ SELECT "ee_rolemembership"."organization_member_id" AS "organization_member_id",
+ "ee_rolemembership"."role_id" AS "role_id"
+ FROM "ee_rolemembership"
+ WHERE "ee_rolemembership"."user_id" = 99999
+ '''
+# ---
+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.88
+ '''
+ SELECT "posthog_dashboard"."id",
+ "posthog_dashboard"."name",
+ "posthog_dashboard"."description",
+ "posthog_dashboard"."team_id",
+ "posthog_dashboard"."pinned",
+ "posthog_dashboard"."created_at",
+ "posthog_dashboard"."created_by_id",
+ "posthog_dashboard"."deleted",
+ "posthog_dashboard"."last_accessed_at",
+ "posthog_dashboard"."last_refresh",
+ "posthog_dashboard"."filters",
+ "posthog_dashboard"."variables",
+ "posthog_dashboard"."breakdown_colors",
+ "posthog_dashboard"."data_color_theme_id",
+ "posthog_dashboard"."creation_mode",
+ "posthog_dashboard"."restriction_level",
+ "posthog_dashboard"."quick_filter_ids",
+ "posthog_dashboard"."deprecated_tags",
+ "posthog_dashboard"."tags",
+ "posthog_dashboard"."share_token",
+ "posthog_dashboard"."is_shared"
+ FROM "posthog_dashboard"
+ INNER JOIN "posthog_team" ON ("posthog_dashboard"."team_id" = "posthog_team"."id")
+ WHERE (NOT ("posthog_dashboard"."deleted")
+ AND ("posthog_dashboard"."team_id" =
+ (SELECT U0."parent_team_id" AS "parent_team_id"
+ FROM "posthog_team" U0
+ WHERE U0."id" = 99999
+ LIMIT 1)
+ OR ("posthog_team"."parent_team_id" IS NULL
+ AND "posthog_dashboard"."team_id" = 99999))
+ AND "posthog_dashboard"."id" = 99999)
LIMIT 21
'''
# ---
-# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.94
+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.89
+ '''
+ SELECT COUNT(*) AS "__count"
+ FROM "posthog_dashboardtile"
+ INNER JOIN "posthog_dashboard" ON ("posthog_dashboardtile"."dashboard_id" = "posthog_dashboard"."id")
+ WHERE (NOT ("posthog_dashboardtile"."deleted"
+ AND "posthog_dashboardtile"."deleted" IS NOT NULL)
+ AND NOT ("posthog_dashboard"."deleted")
+ AND "posthog_dashboardtile"."dashboard_id" = 99999
+ AND NOT ("posthog_dashboardtile"."deleted"
+ AND "posthog_dashboardtile"."deleted" IS NOT NULL))
+ '''
+# ---
+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.9
'''
SELECT "posthog_team"."id",
"posthog_team"."uuid",
@@ -14794,88 +10393,7 @@
LIMIT 21
'''
# ---
-# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.95
- '''
- SELECT "posthog_dashboardtile"."id",
- "posthog_dashboardtile"."dashboard_id",
- "posthog_dashboardtile"."insight_id",
- "posthog_dashboardtile"."text_id",
- "posthog_dashboardtile"."button_tile_id",
- "posthog_dashboardtile"."widget_id",
- "posthog_dashboardtile"."team_id",
- "posthog_dashboardtile"."layouts",
- "posthog_dashboardtile"."color",
- "posthog_dashboardtile"."filters_hash",
- "posthog_dashboardtile"."last_refresh",
- "posthog_dashboardtile"."refreshing",
- "posthog_dashboardtile"."refresh_attempt",
- "posthog_dashboardtile"."filters_overrides",
- "posthog_dashboardtile"."show_description",
- "posthog_dashboardtile"."transparent_background",
- "posthog_dashboardtile"."deleted"
- FROM "posthog_dashboardtile"
- INNER JOIN "posthog_dashboard" ON ("posthog_dashboardtile"."dashboard_id" = "posthog_dashboard"."id")
- WHERE (NOT ("posthog_dashboardtile"."deleted"
- AND "posthog_dashboardtile"."deleted" IS NOT NULL)
- AND NOT ("posthog_dashboard"."deleted")
- AND "posthog_dashboardtile"."insight_id" = 99999)
- '''
-# ---
-# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.96
- '''
- SELECT "posthog_dashboardtile"."id",
- "posthog_dashboardtile"."dashboard_id",
- "posthog_dashboardtile"."insight_id",
- "posthog_dashboardtile"."text_id",
- "posthog_dashboardtile"."button_tile_id",
- "posthog_dashboardtile"."widget_id",
- "posthog_dashboardtile"."team_id",
- "posthog_dashboardtile"."layouts",
- "posthog_dashboardtile"."color",
- "posthog_dashboardtile"."filters_hash",
- "posthog_dashboardtile"."last_refresh",
- "posthog_dashboardtile"."refreshing",
- "posthog_dashboardtile"."refresh_attempt",
- "posthog_dashboardtile"."filters_overrides",
- "posthog_dashboardtile"."show_description",
- "posthog_dashboardtile"."transparent_background",
- "posthog_dashboardtile"."deleted"
- FROM "posthog_dashboardtile"
- INNER JOIN "posthog_dashboard" ON ("posthog_dashboardtile"."dashboard_id" = "posthog_dashboard"."id")
- WHERE (NOT ("posthog_dashboardtile"."deleted"
- AND "posthog_dashboardtile"."deleted" IS NOT NULL)
- AND NOT ("posthog_dashboard"."deleted")
- AND "posthog_dashboardtile"."insight_id" = 99999)
- '''
-# ---
-# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.97
- '''
- SELECT "posthog_insightvariable"."created_by_id",
- "posthog_insightvariable"."created_at",
- "posthog_insightvariable"."updated_at",
- "posthog_insightvariable"."id",
- "posthog_insightvariable"."team_id",
- "posthog_insightvariable"."name",
- "posthog_insightvariable"."code_name",
- "posthog_insightvariable"."type",
- "posthog_insightvariable"."default_value",
- "posthog_insightvariable"."values"
- FROM "posthog_insightvariable"
- WHERE "posthog_insightvariable"."team_id" = 99999
- '''
-# ---
-# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.98
- '''
- SELECT "posthog_dashboardtile"."dashboard_id" AS "dashboard_id"
- FROM "posthog_dashboardtile"
- INNER JOIN "posthog_dashboard" ON ("posthog_dashboardtile"."dashboard_id" = "posthog_dashboard"."id")
- WHERE (NOT ("posthog_dashboardtile"."deleted"
- AND "posthog_dashboardtile"."deleted" IS NOT NULL)
- AND NOT ("posthog_dashboard"."deleted")
- AND "posthog_dashboardtile"."insight_id" = 99999)
- '''
-# ---
-# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.99
+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.90
'''
SELECT "posthog_dashboard"."id",
"posthog_dashboard"."name",
@@ -14907,148 +10425,9 @@
5 /* ... */))
'''
# ---
-# name: TestDashboard.test_retrieve_dashboard
- '''
- SELECT "posthog_filesystem"."team_id",
- "posthog_filesystem"."id",
- "posthog_filesystem"."path",
- "posthog_filesystem"."depth",
- "posthog_filesystem"."type",
- "posthog_filesystem"."ref",
- "posthog_filesystem"."href",
- "posthog_filesystem"."shortcut",
- "posthog_filesystem"."meta",
- "posthog_filesystem"."created_at",
- "posthog_filesystem"."created_by_id",
- "posthog_filesystem"."surface",
- "posthog_filesystem"."project_id"
- FROM "posthog_filesystem"
- WHERE (("posthog_filesystem"."surface" IS NULL
- OR "posthog_filesystem"."surface" = 'web')
- AND "posthog_filesystem"."ref" = '0001'
- AND "posthog_filesystem"."team_id" = 99999
- AND "posthog_filesystem"."type" = 'dashboard'
- AND NOT ("posthog_filesystem"."shortcut"
- AND "posthog_filesystem"."shortcut" IS NOT NULL))
- '''
-# ---
-# name: TestDashboard.test_retrieve_dashboard.1
- '''
- SELECT "posthog_user"."id",
- "posthog_user"."password",
- "posthog_user"."last_login",
- "posthog_user"."first_name",
- "posthog_user"."last_name",
- "posthog_user"."is_staff",
- "posthog_user"."date_joined",
- "posthog_user"."uuid",
- "posthog_user"."current_organization_id",
- "posthog_user"."current_team_id",
- "posthog_user"."email",
- "posthog_user"."pending_email",
- "posthog_user"."distinct_id",
- "posthog_user"."is_email_verified",
- "posthog_user"."credentials_reviewed_at",
- "posthog_user"."requested_2fa_reset_at",
- "posthog_user"."has_seen_product_intro_for",
- "posthog_user"."strapi_id",
- "posthog_user"."is_active",
- "posthog_user"."role_at_organization",
- "posthog_user"."theme_mode",
- "posthog_user"."partial_notification_settings",
- "posthog_user"."anonymize_data",
- "posthog_user"."allow_impersonation",
- "posthog_user"."toolbar_mode",
- "posthog_user"."hedgehog_config",
- "posthog_user"."allow_sidebar_suggestions",
- "posthog_user"."shortcut_position",
- "posthog_user"."passkeys_enabled_for_2fa",
- "posthog_user"."hide_mcp_hints",
- "posthog_user"."onboarding_skipped_at",
- "posthog_user"."onboarding_skipped_reason",
- "posthog_user"."onboarding_skipped_organization_id",
- "posthog_user"."onboarding_delegated_to_invite_id",
- "posthog_user"."onboarding_delegated_to_organization_id",
- "posthog_user"."onboarding_delegation_accepted_at",
- "posthog_user"."events_column_config",
- "posthog_user"."email_opt_in"
- FROM "posthog_user"
- WHERE ("posthog_user"."is_active"
- AND "posthog_user"."id" = 99999)
- '''
-# ---
-# name: TestDashboard.test_retrieve_dashboard.10
- '''
- SELECT "posthog_sharingconfiguration"."id",
- "posthog_sharingconfiguration"."team_id",
- "posthog_sharingconfiguration"."dashboard_id",
- "posthog_sharingconfiguration"."insight_id",
- "posthog_sharingconfiguration"."recording_id",
- "posthog_sharingconfiguration"."notebook_id",
- "posthog_sharingconfiguration"."interviewee_context_id",
- "posthog_sharingconfiguration"."created_at",
- "posthog_sharingconfiguration"."enabled",
- "posthog_sharingconfiguration"."access_token",
- "posthog_sharingconfiguration"."expires_at",
- "posthog_sharingconfiguration"."settings",
- "posthog_sharingconfiguration"."password_required"
- FROM "posthog_sharingconfiguration"
- WHERE "posthog_sharingconfiguration"."dashboard_id" IN (1,
- 2,
- 3,
- 4,
- 5 /* ... */)
- '''
-# ---
-# name: TestDashboard.test_retrieve_dashboard.11
+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.91
'''
- SELECT "posthog_dashboardtile"."id",
- "posthog_dashboardtile"."dashboard_id",
- "posthog_dashboardtile"."insight_id",
- "posthog_dashboardtile"."text_id",
- "posthog_dashboardtile"."button_tile_id",
- "posthog_dashboardtile"."widget_id",
- "posthog_dashboardtile"."team_id",
- "posthog_dashboardtile"."layouts",
- "posthog_dashboardtile"."color",
- "posthog_dashboardtile"."filters_hash",
- "posthog_dashboardtile"."last_refresh",
- "posthog_dashboardtile"."refreshing",
- "posthog_dashboardtile"."refresh_attempt",
- "posthog_dashboardtile"."filters_overrides",
- "posthog_dashboardtile"."show_description",
- "posthog_dashboardtile"."transparent_background",
- "posthog_dashboardtile"."deleted",
- "posthog_dashboarditem"."id",
- "posthog_dashboarditem"."name",
- "posthog_dashboarditem"."derived_name",
- "posthog_dashboarditem"."description",
- "posthog_dashboarditem"."team_id",
- "posthog_dashboarditem"."filters",
- "posthog_dashboarditem"."filters_hash",
- "posthog_dashboarditem"."query",
- "posthog_dashboarditem"."query_metadata",
- "posthog_dashboarditem"."order",
- "posthog_dashboarditem"."deleted",
- "posthog_dashboarditem"."saved",
- "posthog_dashboarditem"."created_at",
- "posthog_dashboarditem"."refreshing",
- "posthog_dashboarditem"."created_by_id",
- "posthog_dashboarditem"."is_sample",
- "posthog_dashboarditem"."short_id",
- "posthog_dashboarditem"."favorited",
- "posthog_dashboarditem"."refresh_attempt",
- "posthog_dashboarditem"."last_modified_at",
- "posthog_dashboarditem"."last_modified_by_id",
- "posthog_dashboarditem"."dashboard_id",
- "posthog_dashboarditem"."last_refresh",
- "posthog_dashboarditem"."layouts",
- "posthog_dashboarditem"."color",
- "posthog_dashboarditem"."dive_dashboard_id",
- "posthog_dashboarditem"."updated_at",
- "posthog_dashboarditem"."deprecated_tags",
- "posthog_dashboarditem"."tags",
- "posthog_team"."id",
+ SELECT "posthog_team"."id",
"posthog_team"."uuid",
"posthog_team"."organization_id",
"posthog_team"."parent_team_id",
@@ -15130,262 +10509,92 @@
"posthog_team"."cookieless_server_hash_mode",
"posthog_team"."primary_dashboard_id",
"posthog_team"."default_data_theme",
- "posthog_team"."extra_settings",
- "posthog_team"."modifiers",
- "posthog_team"."correlation_config",
- "posthog_team"."session_recording_retention_period_days",
- "posthog_team"."plugins_opt_in",
- "posthog_team"."opt_out_capture",
- "posthog_team"."event_names",
- "posthog_team"."event_names_with_usage",
- "posthog_team"."event_properties",
- "posthog_team"."event_properties_with_usage",
- "posthog_team"."event_properties_numerical",
+ "posthog_team"."extra_settings",
+ "posthog_team"."modifiers",
+ "posthog_team"."correlation_config",
+ "posthog_team"."session_recording_retention_period_days",
"posthog_team"."external_data_workspace_id",
"posthog_team"."external_data_workspace_last_synced_at",
"posthog_team"."api_query_rate_limit",
- "posthog_team"."revenue_tracking_config",
"posthog_team"."drop_events_older_than",
"posthog_team"."base_currency",
"posthog_team"."experiment_recalculation_time",
"posthog_team"."default_experiment_confidence_level",
"posthog_team"."default_experiment_stats_method",
- "posthog_team"."business_model",
- "posthog_user"."id",
- "posthog_user"."password",
- "posthog_user"."last_login",
- "posthog_user"."first_name",
- "posthog_user"."last_name",
- "posthog_user"."is_staff",
- "posthog_user"."date_joined",
- "posthog_user"."uuid",
- "posthog_user"."current_organization_id",
- "posthog_user"."current_team_id",
- "posthog_user"."email",
- "posthog_user"."pending_email",
- "posthog_user"."distinct_id",
- "posthog_user"."is_email_verified",
- "posthog_user"."credentials_reviewed_at",
- "posthog_user"."requested_password_reset_at",
- "posthog_user"."requested_2fa_reset_at",
- "posthog_user"."has_seen_product_intro_for",
- "posthog_user"."strapi_id",
- "posthog_user"."is_active",
- "posthog_user"."role_at_organization",
- "posthog_user"."theme_mode",
- "posthog_user"."partial_notification_settings",
- "posthog_user"."anonymize_data",
- "posthog_user"."allow_impersonation",
- "posthog_user"."toolbar_mode",
- "posthog_user"."hedgehog_config",
- "posthog_user"."allow_sidebar_suggestions",
- "posthog_user"."shortcut_position",
- "posthog_user"."passkeys_enabled_for_2fa",
- "posthog_user"."hide_mcp_hints",
- "posthog_user"."onboarding_skipped_at",
- "posthog_user"."onboarding_skipped_reason",
- "posthog_user"."onboarding_skipped_organization_id",
- "posthog_user"."onboarding_delegated_to_invite_id",
- "posthog_user"."onboarding_delegated_to_organization_id",
- "posthog_user"."onboarding_delegation_accepted_at",
- "posthog_user"."events_column_config",
- "posthog_user"."email_opt_in",
- T6."id",
- T6."password",
- T6."last_login",
- T6."first_name",
- T6."last_name",
- T6."is_staff",
- T6."date_joined",
- T6."uuid",
- T6."current_organization_id",
- T6."current_team_id",
- T6."email",
- T6."pending_email",
- T6."distinct_id",
- T6."is_email_verified",
- T6."credentials_reviewed_at",
- T6."requested_password_reset_at",
- T6."requested_2fa_reset_at",
- T6."has_seen_product_intro_for",
- T6."strapi_id",
- T6."is_active",
- T6."role_at_organization",
- T6."theme_mode",
- T6."partial_notification_settings",
- T6."anonymize_data",
- T6."allow_impersonation",
- T6."toolbar_mode",
- T6."hedgehog_config",
- T6."allow_sidebar_suggestions",
- T6."shortcut_position",
- T6."passkeys_enabled_for_2fa",
- T6."hide_mcp_hints",
- T6."onboarding_skipped_at",
- T6."onboarding_skipped_reason",
- T6."onboarding_skipped_organization_id",
- T6."onboarding_delegated_to_invite_id",
- T6."onboarding_delegated_to_organization_id",
- T6."onboarding_delegation_accepted_at",
- T6."events_column_config",
- T6."email_opt_in",
- "posthog_text"."id",
- "posthog_text"."body",
- "posthog_text"."created_by_id",
- "posthog_text"."last_modified_at",
- "posthog_text"."last_modified_by_id",
- "posthog_text"."team_id",
- "posthog_buttontile"."id",
- "posthog_buttontile"."url",
- "posthog_buttontile"."text",
- "posthog_buttontile"."placement",
- "posthog_buttontile"."style",
- "posthog_buttontile"."created_by_id",
- "posthog_buttontile"."last_modified_at",
- "posthog_buttontile"."last_modified_by_id",
- "posthog_buttontile"."team_id",
- "posthog_dashboardwidget"."id",
- "posthog_dashboardwidget"."widget_type",
- "posthog_dashboardwidget"."name",
- "posthog_dashboardwidget"."description",
- "posthog_dashboardwidget"."config",
- "posthog_dashboardwidget"."created_by_id",
- "posthog_dashboardwidget"."last_modified_at",
- "posthog_dashboardwidget"."last_modified_by_id",
- "posthog_dashboardwidget"."team_id",
- T10."id",
- T10."password",
- T10."last_login",
- T10."first_name",
- T10."last_name",
- T10."is_staff",
- T10."date_joined",
- T10."uuid",
- T10."current_organization_id",
- T10."current_team_id",
- T10."email",
- T10."pending_email",
- T10."distinct_id",
- T10."is_email_verified",
- T10."credentials_reviewed_at",
- T10."requested_password_reset_at",
- T10."requested_2fa_reset_at",
- T10."has_seen_product_intro_for",
- T10."strapi_id",
- T10."is_active",
- T10."role_at_organization",
- T10."theme_mode",
- T10."partial_notification_settings",
- T10."anonymize_data",
- T10."allow_impersonation",
- T10."toolbar_mode",
- T10."hedgehog_config",
- T10."allow_sidebar_suggestions",
- T10."shortcut_position",
- T10."passkeys_enabled_for_2fa",
- T10."hide_mcp_hints",
- T10."onboarding_skipped_at",
- T10."onboarding_skipped_reason",
- T10."onboarding_skipped_organization_id",
- T10."onboarding_delegated_to_invite_id",
- T10."onboarding_delegated_to_organization_id",
- T10."onboarding_delegation_accepted_at",
- T10."events_column_config",
- T10."email_opt_in",
- T11."id",
- T11."password",
- T11."last_login",
- T11."first_name",
- T11."last_name",
- T11."is_staff",
- T11."date_joined",
- T11."uuid",
- T11."current_organization_id",
- T11."current_team_id",
- T11."email",
- T11."pending_email",
- T11."distinct_id",
- T11."is_email_verified",
- T11."credentials_reviewed_at",
- T11."requested_password_reset_at",
- T11."requested_2fa_reset_at",
- T11."has_seen_product_intro_for",
- T11."strapi_id",
- T11."is_active",
- T11."role_at_organization",
- T11."theme_mode",
- T11."partial_notification_settings",
- T11."anonymize_data",
- T11."allow_impersonation",
- T11."toolbar_mode",
- T11."hedgehog_config",
- T11."allow_sidebar_suggestions",
- T11."shortcut_position",
- T11."passkeys_enabled_for_2fa",
- T11."hide_mcp_hints",
- T11."onboarding_skipped_at",
- T11."onboarding_skipped_reason",
- T11."onboarding_skipped_organization_id",
- T11."onboarding_delegated_to_invite_id",
- T11."onboarding_delegated_to_organization_id",
- T11."onboarding_delegation_accepted_at",
- T11."events_column_config",
- T11."email_opt_in"
- FROM "posthog_dashboardtile"
- INNER JOIN "posthog_dashboard" ON ("posthog_dashboardtile"."dashboard_id" = "posthog_dashboard"."id")
- LEFT OUTER JOIN "posthog_dashboarditem" ON ("posthog_dashboardtile"."insight_id" = "posthog_dashboarditem"."id")
- LEFT OUTER JOIN "posthog_team" ON ("posthog_dashboarditem"."team_id" = "posthog_team"."id")
- LEFT OUTER JOIN "posthog_user" ON ("posthog_dashboarditem"."created_by_id" = "posthog_user"."id")
- LEFT OUTER JOIN "posthog_user" T6 ON ("posthog_dashboarditem"."last_modified_by_id" = T6."id")
- LEFT OUTER JOIN "posthog_text" ON ("posthog_dashboardtile"."text_id" = "posthog_text"."id")
- LEFT OUTER JOIN "posthog_buttontile" ON ("posthog_dashboardtile"."button_tile_id" = "posthog_buttontile"."id")
- LEFT OUTER JOIN "posthog_dashboardwidget" ON ("posthog_dashboardtile"."widget_id" = "posthog_dashboardwidget"."id")
- LEFT OUTER JOIN "posthog_user" T10 ON ("posthog_dashboardwidget"."created_by_id" = T10."id")
- LEFT OUTER JOIN "posthog_user" T11 ON ("posthog_dashboardwidget"."last_modified_by_id" = T11."id")
- WHERE (NOT ("posthog_dashboardtile"."deleted"
- AND "posthog_dashboardtile"."deleted" IS NOT NULL)
- AND NOT ("posthog_dashboard"."deleted")
- AND NOT ("posthog_dashboard"."deleted"
- AND "posthog_dashboardtile"."deleted"
- AND "posthog_dashboardtile"."deleted" IS NOT NULL)
- AND (NOT "posthog_dashboarditem"."deleted"
- OR "posthog_dashboardtile"."insight_id" IS NULL)
- AND "posthog_dashboardtile"."dashboard_id" = 99999
- AND "posthog_dashboardtile"."dashboard_id" IN (1,
- 2,
- 3,
- 4,
- 5 /* ... */))
- ORDER BY "posthog_dashboarditem"."order" ASC
+ "posthog_team"."business_model"
+ FROM "posthog_team"
+ WHERE "posthog_team"."id" = 99999
+ LIMIT 21
'''
# ---
-# name: TestDashboard.test_retrieve_dashboard.12
+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.92
'''
- SELECT "posthog_taggeditem"."id",
- "posthog_taggeditem"."tag_id",
- "posthog_taggeditem"."dashboard_id",
- "posthog_taggeditem"."insight_id",
- "posthog_taggeditem"."event_definition_id",
- "posthog_taggeditem"."property_definition_id",
- "posthog_taggeditem"."action_id",
- "posthog_taggeditem"."feature_flag_id",
- "posthog_taggeditem"."experiment_saved_metric_id",
- "posthog_taggeditem"."ticket_id",
- "posthog_taggeditem"."account_id",
- "posthog_taggeditem"."endpoint_id",
- "posthog_tag"."id",
- "posthog_tag"."name",
- "posthog_tag"."team_id"
- FROM "posthog_taggeditem"
- INNER JOIN "posthog_tag" ON ("posthog_taggeditem"."tag_id" = "posthog_tag"."id")
- WHERE "posthog_taggeditem"."dashboard_id" IN (1,
- 2,
- 3,
- 4,
- 5 /* ... */)
+ SELECT "posthog_filesystem"."team_id",
+ "posthog_filesystem"."id",
+ "posthog_filesystem"."path",
+ "posthog_filesystem"."depth",
+ "posthog_filesystem"."type",
+ "posthog_filesystem"."ref",
+ "posthog_filesystem"."href",
+ "posthog_filesystem"."shortcut",
+ "posthog_filesystem"."meta",
+ "posthog_filesystem"."created_at",
+ "posthog_filesystem"."created_by_id",
+ "posthog_filesystem"."surface",
+ "posthog_filesystem"."project_id"
+ FROM "posthog_filesystem"
+ WHERE (("posthog_filesystem"."surface" IS NULL
+ OR "posthog_filesystem"."surface" = 'web')
+ AND "posthog_filesystem"."ref" = '0001'
+ AND "posthog_filesystem"."team_id" = 99999
+ AND "posthog_filesystem"."type" = 'insight'
+ AND NOT ("posthog_filesystem"."shortcut"
+ AND "posthog_filesystem"."shortcut" IS NOT NULL))
'''
# ---
-# name: TestDashboard.test_retrieve_dashboard.13
+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.93
+ '''
+ SELECT "posthog_organization"."id",
+ "posthog_organization"."name",
+ "posthog_organization"."slug",
+ "posthog_organization"."logo_media_id",
+ "posthog_organization"."created_at",
+ "posthog_organization"."updated_at",
+ "posthog_organization"."is_active",
+ "posthog_organization"."is_not_active_reason",
+ "posthog_organization"."session_cookie_age",
+ "posthog_organization"."is_member_join_email_enabled",
+ "posthog_organization"."is_ai_data_processing_approved",
+ "posthog_organization"."is_ai_training_opted_in",
+ "posthog_organization"."is_ai_training_locked",
+ "posthog_organization"."is_ai_training_cta_shown",
+ "posthog_organization"."enforce_2fa",
+ "posthog_organization"."members_can_invite",
+ "posthog_organization"."members_can_create_projects",
+ "posthog_organization"."members_can_use_personal_api_keys",
+ "posthog_organization"."allow_publicly_shared_resources",
+ "posthog_organization"."default_role_id",
+ "posthog_organization"."plugins_access_level",
+ "posthog_organization"."for_internal_metrics",
+ "posthog_organization"."default_experiment_stats_method",
+ "posthog_organization"."default_anonymize_ips",
+ "posthog_organization"."is_hipaa",
+ "posthog_organization"."is_pending_deletion",
+ "posthog_organization"."customer_id",
+ "posthog_organization"."available_product_features",
+ "posthog_organization"."usage",
+ "posthog_organization"."never_drop_data",
+ "posthog_organization"."customer_trust_scores",
+ "posthog_organization"."setup_section_2_completed",
+ "posthog_organization"."personalization",
+ "posthog_organization"."domain_whitelist",
+ "posthog_organization"."is_platform"
+ FROM "posthog_organization"
+ WHERE "posthog_organization"."id" = '00000000-0000-0000-0000-000000000000'::uuid
+ LIMIT 21
+ '''
+# ---
+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.94
'''
SELECT "posthog_team"."id",
"posthog_team"."uuid",
@@ -15487,7 +10696,120 @@
LIMIT 21
'''
# ---
-# name: TestDashboard.test_retrieve_dashboard.14
+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.95
+ '''
+ SELECT "posthog_dashboardtile"."id",
+ "posthog_dashboardtile"."dashboard_id",
+ "posthog_dashboardtile"."insight_id",
+ "posthog_dashboardtile"."text_id",
+ "posthog_dashboardtile"."button_tile_id",
+ "posthog_dashboardtile"."widget_id",
+ "posthog_dashboardtile"."team_id",
+ "posthog_dashboardtile"."layouts",
+ "posthog_dashboardtile"."color",
+ "posthog_dashboardtile"."filters_hash",
+ "posthog_dashboardtile"."last_refresh",
+ "posthog_dashboardtile"."refreshing",
+ "posthog_dashboardtile"."refresh_attempt",
+ "posthog_dashboardtile"."filters_overrides",
+ "posthog_dashboardtile"."show_description",
+ "posthog_dashboardtile"."transparent_background",
+ "posthog_dashboardtile"."deleted"
+ FROM "posthog_dashboardtile"
+ INNER JOIN "posthog_dashboard" ON ("posthog_dashboardtile"."dashboard_id" = "posthog_dashboard"."id")
+ WHERE (NOT ("posthog_dashboardtile"."deleted"
+ AND "posthog_dashboardtile"."deleted" IS NOT NULL)
+ AND NOT ("posthog_dashboard"."deleted")
+ AND "posthog_dashboardtile"."insight_id" = 99999)
+ '''
+# ---
+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.96
+ '''
+ SELECT "posthog_dashboardtile"."id",
+ "posthog_dashboardtile"."dashboard_id",
+ "posthog_dashboardtile"."insight_id",
+ "posthog_dashboardtile"."text_id",
+ "posthog_dashboardtile"."button_tile_id",
+ "posthog_dashboardtile"."widget_id",
+ "posthog_dashboardtile"."team_id",
+ "posthog_dashboardtile"."layouts",
+ "posthog_dashboardtile"."color",
+ "posthog_dashboardtile"."filters_hash",
+ "posthog_dashboardtile"."last_refresh",
+ "posthog_dashboardtile"."refreshing",
+ "posthog_dashboardtile"."refresh_attempt",
+ "posthog_dashboardtile"."filters_overrides",
+ "posthog_dashboardtile"."show_description",
+ "posthog_dashboardtile"."transparent_background",
+ "posthog_dashboardtile"."deleted"
+ FROM "posthog_dashboardtile"
+ INNER JOIN "posthog_dashboard" ON ("posthog_dashboardtile"."dashboard_id" = "posthog_dashboard"."id")
+ WHERE (NOT ("posthog_dashboardtile"."deleted"
+ AND "posthog_dashboardtile"."deleted" IS NOT NULL)
+ AND NOT ("posthog_dashboard"."deleted")
+ AND "posthog_dashboardtile"."insight_id" = 99999)
+ '''
+# ---
+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.97
+ '''
+ SELECT "posthog_insightvariable"."created_by_id",
+ "posthog_insightvariable"."created_at",
+ "posthog_insightvariable"."updated_at",
+ "posthog_insightvariable"."id",
+ "posthog_insightvariable"."team_id",
+ "posthog_insightvariable"."name",
+ "posthog_insightvariable"."code_name",
+ "posthog_insightvariable"."type",
+ "posthog_insightvariable"."default_value",
+ "posthog_insightvariable"."values"
+ FROM "posthog_insightvariable"
+ WHERE "posthog_insightvariable"."team_id" = 99999
+ '''
+# ---
+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.98
+ '''
+ SELECT "posthog_dashboardtile"."dashboard_id" AS "dashboard_id"
+ FROM "posthog_dashboardtile"
+ INNER JOIN "posthog_dashboard" ON ("posthog_dashboardtile"."dashboard_id" = "posthog_dashboard"."id")
+ WHERE (NOT ("posthog_dashboardtile"."deleted"
+ AND "posthog_dashboardtile"."deleted" IS NOT NULL)
+ AND NOT ("posthog_dashboard"."deleted")
+ AND "posthog_dashboardtile"."insight_id" = 99999)
+ '''
+# ---
+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.99
+ '''
+ SELECT "posthog_dashboard"."id",
+ "posthog_dashboard"."name",
+ "posthog_dashboard"."description",
+ "posthog_dashboard"."team_id",
+ "posthog_dashboard"."pinned",
+ "posthog_dashboard"."created_at",
+ "posthog_dashboard"."created_by_id",
+ "posthog_dashboard"."deleted",
+ "posthog_dashboard"."last_accessed_at",
+ "posthog_dashboard"."last_refresh",
+ "posthog_dashboard"."filters",
+ "posthog_dashboard"."variables",
+ "posthog_dashboard"."breakdown_colors",
+ "posthog_dashboard"."data_color_theme_id",
+ "posthog_dashboard"."creation_mode",
+ "posthog_dashboard"."restriction_level",
+ "posthog_dashboard"."quick_filter_ids",
+ "posthog_dashboard"."deprecated_tags",
+ "posthog_dashboard"."tags",
+ "posthog_dashboard"."share_token",
+ "posthog_dashboard"."is_shared"
+ FROM "posthog_dashboard"
+ WHERE (NOT ("posthog_dashboard"."deleted")
+ AND "posthog_dashboard"."id" IN (1,
+ 2,
+ 3,
+ 4,
+ 5 /* ... */))
+ '''
+# ---
+# name: TestDashboard.test_retrieve_dashboard
'''
SELECT "posthog_filesystem"."team_id",
"posthog_filesystem"."id",
@@ -15512,46 +10834,75 @@
AND "posthog_filesystem"."shortcut" IS NOT NULL))
'''
# ---
-# name: TestDashboard.test_retrieve_dashboard.15
+# name: TestDashboard.test_retrieve_dashboard.1
'''
- SELECT "posthog_filesystemshortcut"."id",
- "posthog_filesystemshortcut"."team_id",
- "posthog_filesystemshortcut"."user_id",
- "posthog_filesystemshortcut"."path",
- "posthog_filesystemshortcut"."type",
- "posthog_filesystemshortcut"."ref",
- "posthog_filesystemshortcut"."href",
- "posthog_filesystemshortcut"."order",
- "posthog_filesystemshortcut"."created_at",
- "posthog_filesystemshortcut"."surface"
- FROM "posthog_filesystemshortcut"
- WHERE (("posthog_filesystemshortcut"."surface" IS NULL
- OR "posthog_filesystemshortcut"."surface" = 'web')
- AND "posthog_filesystemshortcut"."ref" = '0001'
- AND "posthog_filesystemshortcut"."team_id" = 99999
- AND "posthog_filesystemshortcut"."type" = 'dashboard'
- AND NOT ("posthog_filesystemshortcut"."path" = 'private dashboard'
- AND "posthog_filesystemshortcut"."href" = '__skipped__'
- AND "posthog_filesystemshortcut"."href" IS NOT NULL))
+ SELECT "posthog_user"."id",
+ "posthog_user"."password",
+ "posthog_user"."last_login",
+ "posthog_user"."first_name",
+ "posthog_user"."last_name",
+ "posthog_user"."is_staff",
+ "posthog_user"."date_joined",
+ "posthog_user"."uuid",
+ "posthog_user"."current_organization_id",
+ "posthog_user"."current_team_id",
+ "posthog_user"."email",
+ "posthog_user"."pending_email",
+ "posthog_user"."distinct_id",
+ "posthog_user"."is_email_verified",
+ "posthog_user"."credentials_reviewed_at",
+ "posthog_user"."requested_2fa_reset_at",
+ "posthog_user"."has_seen_product_intro_for",
+ "posthog_user"."strapi_id",
+ "posthog_user"."is_active",
+ "posthog_user"."role_at_organization",
+ "posthog_user"."theme_mode",
+ "posthog_user"."partial_notification_settings",
+ "posthog_user"."anonymize_data",
+ "posthog_user"."allow_impersonation",
+ "posthog_user"."toolbar_mode",
+ "posthog_user"."hedgehog_config",
+ "posthog_user"."allow_sidebar_suggestions",
+ "posthog_user"."shortcut_position",
+ "posthog_user"."passkeys_enabled_for_2fa",
+ "posthog_user"."hide_mcp_hints",
+ "posthog_user"."onboarding_skipped_at",
+ "posthog_user"."onboarding_skipped_reason",
+ "posthog_user"."onboarding_skipped_organization_id",
+ "posthog_user"."onboarding_delegated_to_invite_id",
+ "posthog_user"."onboarding_delegated_to_organization_id",
+ "posthog_user"."onboarding_delegation_accepted_at",
+ "posthog_user"."events_column_config",
+ "posthog_user"."email_opt_in"
+ FROM "posthog_user"
+ WHERE ("posthog_user"."is_active"
+ AND "posthog_user"."id" = 99999)
'''
# ---
-# name: TestDashboard.test_retrieve_dashboard.16
+# name: TestDashboard.test_retrieve_dashboard.10
'''
- SELECT "posthog_insightvariable"."created_by_id",
- "posthog_insightvariable"."created_at",
- "posthog_insightvariable"."updated_at",
- "posthog_insightvariable"."id",
- "posthog_insightvariable"."team_id",
- "posthog_insightvariable"."name",
- "posthog_insightvariable"."code_name",
- "posthog_insightvariable"."type",
- "posthog_insightvariable"."default_value",
- "posthog_insightvariable"."values"
- FROM "posthog_insightvariable"
- WHERE "posthog_insightvariable"."team_id" = 99999
+ SELECT "posthog_sharingconfiguration"."id",
+ "posthog_sharingconfiguration"."team_id",
+ "posthog_sharingconfiguration"."dashboard_id",
+ "posthog_sharingconfiguration"."insight_id",
+ "posthog_sharingconfiguration"."recording_id",
+ "posthog_sharingconfiguration"."notebook_id",
+ "posthog_sharingconfiguration"."interviewee_context_id",
+ "posthog_sharingconfiguration"."created_at",
+ "posthog_sharingconfiguration"."enabled",
+ "posthog_sharingconfiguration"."access_token",
+ "posthog_sharingconfiguration"."expires_at",
+ "posthog_sharingconfiguration"."settings",
+ "posthog_sharingconfiguration"."password_required"
+ FROM "posthog_sharingconfiguration"
+ WHERE "posthog_sharingconfiguration"."dashboard_id" IN (1,
+ 2,
+ 3,
+ 4,
+ 5 /* ... */)
'''
# ---
-# name: TestDashboard.test_retrieve_dashboard.17
+# name: TestDashboard.test_retrieve_dashboard.11
'''
SELECT "posthog_dashboardtile"."id",
"posthog_dashboardtile"."dashboard_id",
@@ -15902,16 +11253,207 @@
AND (NOT "posthog_dashboarditem"."deleted"
OR "posthog_dashboardtile"."insight_id" IS NULL)
AND "posthog_dashboardtile"."dashboard_id" = 99999
- AND "posthog_dashboardtile"."dashboard_id" = 99999
- AND NOT ("posthog_dashboard"."deleted"
- AND "posthog_dashboardtile"."deleted"
- AND "posthog_dashboardtile"."deleted" IS NOT NULL)
- AND (NOT "posthog_dashboarditem"."deleted"
- OR "posthog_dashboardtile"."insight_id" IS NULL))
+ AND "posthog_dashboardtile"."dashboard_id" IN (1,
+ 2,
+ 3,
+ 4,
+ 5 /* ... */))
ORDER BY "posthog_dashboarditem"."order" ASC
'''
# ---
-# name: TestDashboard.test_retrieve_dashboard.18
+# name: TestDashboard.test_retrieve_dashboard.12
+ '''
+ SELECT "posthog_taggeditem"."id",
+ "posthog_taggeditem"."tag_id",
+ "posthog_taggeditem"."dashboard_id",
+ "posthog_taggeditem"."insight_id",
+ "posthog_taggeditem"."event_definition_id",
+ "posthog_taggeditem"."property_definition_id",
+ "posthog_taggeditem"."action_id",
+ "posthog_taggeditem"."feature_flag_id",
+ "posthog_taggeditem"."experiment_saved_metric_id",
+ "posthog_taggeditem"."ticket_id",
+ "posthog_taggeditem"."account_id",
+ "posthog_taggeditem"."endpoint_id",
+ "posthog_tag"."id",
+ "posthog_tag"."name",
+ "posthog_tag"."team_id"
+ FROM "posthog_taggeditem"
+ INNER JOIN "posthog_tag" ON ("posthog_taggeditem"."tag_id" = "posthog_tag"."id")
+ WHERE "posthog_taggeditem"."dashboard_id" IN (1,
+ 2,
+ 3,
+ 4,
+ 5 /* ... */)
+ '''
+# ---
+# name: TestDashboard.test_retrieve_dashboard.13
+ '''
+ SELECT "posthog_team"."id",
+ "posthog_team"."uuid",
+ "posthog_team"."organization_id",
+ "posthog_team"."parent_team_id",
+ "posthog_team"."project_id",
+ "posthog_team"."api_token",
+ "posthog_team"."app_urls",
+ "posthog_team"."name",
+ "posthog_team"."slack_incoming_webhook",
+ "posthog_team"."created_at",
+ "posthog_team"."updated_at",
+ "posthog_team"."anonymize_ips",
+ "posthog_team"."completed_snippet_onboarding",
+ "posthog_team"."has_completed_onboarding_for",
+ "posthog_team"."onboarding_tasks",
+ "posthog_team"."ingested_event",
+ "posthog_team"."ingested_production_event",
+ "posthog_team"."ingested_production_event_last_checked_at",
+ "posthog_team"."person_processing_opt_out",
+ "posthog_team"."secret_api_token",
+ "posthog_team"."secret_api_token_backup",
+ "posthog_team"."session_recording_opt_in",
+ "posthog_team"."session_recording_sample_rate",
+ "posthog_team"."session_recording_minimum_duration_milliseconds",
+ "posthog_team"."session_recording_linked_flag",
+ "posthog_team"."session_recording_network_payload_capture_config",
+ "posthog_team"."session_recording_masking_config",
+ "posthog_team"."session_recording_url_trigger_config",
+ "posthog_team"."session_recording_url_blocklist_config",
+ "posthog_team"."session_recording_event_trigger_config",
+ "posthog_team"."session_recording_trigger_match_type_config",
+ "posthog_team"."session_recording_trigger_groups",
+ "posthog_team"."session_replay_config",
+ "posthog_team"."session_recording_retention_period",
+ "posthog_team"."event_retention_months",
+ "posthog_team"."conversations_enabled",
+ "posthog_team"."conversations_settings",
+ "posthog_team"."proactive_tasks_enabled",
+ "posthog_team"."survey_config",
+ "posthog_team"."surveys_opt_in",
+ "posthog_team"."product_tours_opt_in",
+ "posthog_team"."capture_console_log_opt_in",
+ "posthog_team"."capture_performance_opt_in",
+ "posthog_team"."capture_dead_clicks",
+ "posthog_team"."autocapture_opt_out",
+ "posthog_team"."autocapture_web_vitals_opt_in",
+ "posthog_team"."autocapture_web_vitals_allowed_metrics",
+ "posthog_team"."autocapture_exceptions_opt_in",
+ "posthog_team"."autocapture_exceptions_errors_to_ignore",
+ "posthog_team"."logs_settings",
+ "posthog_team"."llm_gateway_enabled_at",
+ "posthog_team"."llm_gateway_revoked_at",
+ "posthog_team"."llm_gateway_overspend_allowance_usd",
+ "posthog_team"."heatmaps_opt_in",
+ "posthog_team"."receive_org_level_activity_logs",
+ "posthog_team"."web_analytics_pre_aggregated_tables_enabled",
+ "posthog_team"."web_analytics_pre_aggregated_tables_version",
+ "posthog_team"."flags_persistence_default",
+ "posthog_team"."feature_flag_confirmation_enabled",
+ "posthog_team"."feature_flag_confirmation_message",
+ "posthog_team"."default_evaluation_environments_enabled",
+ "posthog_team"."require_evaluation_environment_tags",
+ "posthog_team"."default_evaluation_contexts_enabled",
+ "posthog_team"."require_evaluation_contexts",
+ "posthog_team"."session_recording_version",
+ "posthog_team"."signup_token",
+ "posthog_team"."is_demo",
+ "posthog_team"."access_control",
+ "posthog_team"."week_start_day",
+ "posthog_team"."inject_web_apps",
+ "posthog_team"."test_account_filters",
+ "posthog_team"."test_account_filters_default_checked",
+ "posthog_team"."path_cleaning_filters",
+ "posthog_team"."timezone",
+ "posthog_team"."data_attributes",
+ "posthog_team"."person_display_name_properties",
+ "posthog_team"."live_events_columns",
+ "posthog_team"."recording_domains",
+ "posthog_team"."human_friendly_comparison_periods",
+ "posthog_team"."cookieless_server_hash_mode",
+ "posthog_team"."primary_dashboard_id",
+ "posthog_team"."default_data_theme",
+ "posthog_team"."extra_settings",
+ "posthog_team"."modifiers",
+ "posthog_team"."correlation_config",
+ "posthog_team"."session_recording_retention_period_days",
+ "posthog_team"."external_data_workspace_id",
+ "posthog_team"."external_data_workspace_last_synced_at",
+ "posthog_team"."api_query_rate_limit",
+ "posthog_team"."drop_events_older_than",
+ "posthog_team"."base_currency",
+ "posthog_team"."experiment_recalculation_time",
+ "posthog_team"."default_experiment_confidence_level",
+ "posthog_team"."default_experiment_stats_method",
+ "posthog_team"."business_model"
+ FROM "posthog_team"
+ WHERE "posthog_team"."id" = 99999
+ LIMIT 21
+ '''
+# ---
+# name: TestDashboard.test_retrieve_dashboard.14
+ '''
+ SELECT "posthog_filesystem"."team_id",
+ "posthog_filesystem"."id",
+ "posthog_filesystem"."path",
+ "posthog_filesystem"."depth",
+ "posthog_filesystem"."type",
+ "posthog_filesystem"."ref",
+ "posthog_filesystem"."href",
+ "posthog_filesystem"."shortcut",
+ "posthog_filesystem"."meta",
+ "posthog_filesystem"."created_at",
+ "posthog_filesystem"."created_by_id",
+ "posthog_filesystem"."surface",
+ "posthog_filesystem"."project_id"
+ FROM "posthog_filesystem"
+ WHERE (("posthog_filesystem"."surface" IS NULL
+ OR "posthog_filesystem"."surface" = 'web')
+ AND "posthog_filesystem"."ref" = '0001'
+ AND "posthog_filesystem"."team_id" = 99999
+ AND "posthog_filesystem"."type" = 'dashboard'
+ AND NOT ("posthog_filesystem"."shortcut"
+ AND "posthog_filesystem"."shortcut" IS NOT NULL))
+ '''
+# ---
+# name: TestDashboard.test_retrieve_dashboard.15
+ '''
+ SELECT "posthog_filesystemshortcut"."id",
+ "posthog_filesystemshortcut"."team_id",
+ "posthog_filesystemshortcut"."user_id",
+ "posthog_filesystemshortcut"."path",
+ "posthog_filesystemshortcut"."type",
+ "posthog_filesystemshortcut"."ref",
+ "posthog_filesystemshortcut"."href",
+ "posthog_filesystemshortcut"."order",
+ "posthog_filesystemshortcut"."created_at",
+ "posthog_filesystemshortcut"."surface"
+ FROM "posthog_filesystemshortcut"
+ WHERE (("posthog_filesystemshortcut"."surface" IS NULL
+ OR "posthog_filesystemshortcut"."surface" = 'web')
+ AND "posthog_filesystemshortcut"."ref" = '0001'
+ AND "posthog_filesystemshortcut"."team_id" = 99999
+ AND "posthog_filesystemshortcut"."type" = 'dashboard'
+ AND NOT ("posthog_filesystemshortcut"."path" = 'private dashboard'
+ AND "posthog_filesystemshortcut"."href" = '__skipped__'
+ AND "posthog_filesystemshortcut"."href" IS NOT NULL))
+ '''
+# ---
+# name: TestDashboard.test_retrieve_dashboard.16
+ '''
+ SELECT "posthog_insightvariable"."created_by_id",
+ "posthog_insightvariable"."created_at",
+ "posthog_insightvariable"."updated_at",
+ "posthog_insightvariable"."id",
+ "posthog_insightvariable"."team_id",
+ "posthog_insightvariable"."name",
+ "posthog_insightvariable"."code_name",
+ "posthog_insightvariable"."type",
+ "posthog_insightvariable"."default_value",
+ "posthog_insightvariable"."values"
+ FROM "posthog_insightvariable"
+ WHERE "posthog_insightvariable"."team_id" = 99999
+ '''
+# ---
+# name: TestDashboard.test_retrieve_dashboard.17
'''
SELECT "posthog_dashboardtile"."id",
"posthog_dashboardtile"."dashboard_id",
@@ -18917,55 +14459,6 @@
5 /* ... */)
'''
# ---
-# name: TestDashboard.test_retrieve_dashboard_list.48
- '''
- SELECT "posthog_sharingconfiguration"."id",
- "posthog_sharingconfiguration"."team_id",
- "posthog_sharingconfiguration"."dashboard_id",
- "posthog_sharingconfiguration"."insight_id",
- "posthog_sharingconfiguration"."recording_id",
- "posthog_sharingconfiguration"."notebook_id",
- "posthog_sharingconfiguration"."interviewee_context_id",
- "posthog_sharingconfiguration"."created_at",
- "posthog_sharingconfiguration"."enabled",
- "posthog_sharingconfiguration"."access_token",
- "posthog_sharingconfiguration"."expires_at",
- "posthog_sharingconfiguration"."settings",
- "posthog_sharingconfiguration"."password_required"
- FROM "posthog_sharingconfiguration"
- WHERE "posthog_sharingconfiguration"."dashboard_id" IN (1,
- 2,
- 3,
- 4,
- 5 /* ... */)
- '''
-# ---
-# name: TestDashboard.test_retrieve_dashboard_list.49
- '''
- SELECT "posthog_taggeditem"."id",
- "posthog_taggeditem"."tag_id",
- "posthog_taggeditem"."dashboard_id",
- "posthog_taggeditem"."insight_id",
- "posthog_taggeditem"."event_definition_id",
- "posthog_taggeditem"."property_definition_id",
- "posthog_taggeditem"."action_id",
- "posthog_taggeditem"."feature_flag_id",
- "posthog_taggeditem"."experiment_saved_metric_id",
- "posthog_taggeditem"."ticket_id",
- "posthog_taggeditem"."account_id",
- "posthog_taggeditem"."endpoint_id",
- "posthog_tag"."id",
- "posthog_tag"."name",
- "posthog_tag"."team_id"
- FROM "posthog_taggeditem"
- INNER JOIN "posthog_tag" ON ("posthog_taggeditem"."tag_id" = "posthog_tag"."id")
- WHERE "posthog_taggeditem"."dashboard_id" IN (1,
- 2,
- 3,
- 4,
- 5 /* ... */)
- '''
-# ---
# name: TestDashboard.test_retrieve_dashboard_list.5
'''
SELECT "posthog_organizationmembership"."id",
diff --git a/posthog/migrations/1259_globalratelimitthresholdconfig.py b/posthog/migrations/1259_globalratelimitthresholdconfig.py
new file mode 100644
index 000000000000..1dbfd9aff51f
--- /dev/null
+++ b/posthog/migrations/1259_globalratelimitthresholdconfig.py
@@ -0,0 +1,50 @@
+# Generated by Django 5.2.14 on 2026-07-16 03:19
+
+from django.db import migrations, models
+
+import posthog.models.utils
+
+
+class Migration(migrations.Migration):
+ dependencies = [("posthog", "1258_duckgressinkschemastate_queue_last_applied_at")]
+
+ operations = [
+ migrations.CreateModel(
+ name="GlobalRateLimitThresholdConfig",
+ fields=[
+ (
+ "id",
+ models.UUIDField(
+ default=posthog.models.utils.uuid7, editable=False, primary_key=True, serialize=False
+ ),
+ ),
+ ("token", models.CharField(max_length=200)),
+ (
+ "distinct_id",
+ models.CharField(
+ blank=True,
+ default="",
+ help_text="Optional. Empty applies the threshold to the whole token; set applies it only to this token and distinct_id.",
+ max_length=450,
+ ),
+ ),
+ (
+ "threshold",
+ models.PositiveBigIntegerField(
+ help_text="Max events allowed per rate-limit window for this key. 0 rate-limits the key to zero, but the limiter is cache-based so an isolated event may still pass on a cold cache miss; to block a key permanently use an EventRestriction in the Django admin."
+ ),
+ ),
+ (
+ "note",
+ models.TextField(
+ blank=True, help_text="Optional note explaining why this override exists", null=True
+ ),
+ ),
+ ("created_at", models.DateTimeField(auto_now_add=True)),
+ ("updated_at", models.DateTimeField(auto_now=True)),
+ ],
+ options={
+ "unique_together": {("token", "distinct_id")},
+ },
+ ),
+ ]
diff --git a/posthog/migrations/max_migration.txt b/posthog/migrations/max_migration.txt
index 1b7bef7b2072..f80969f726cf 100644
--- a/posthog/migrations/max_migration.txt
+++ b/posthog/migrations/max_migration.txt
@@ -1 +1 @@
-1258_duckgressinkschemastate_queue_last_applied_at
+1259_globalratelimitthresholdconfig
diff --git a/posthog/models/__init__.py b/posthog/models/__init__.py
index 6248a96a2ca5..c29d02f3ed28 100644
--- a/posthog/models/__init__.py
+++ b/posthog/models/__init__.py
@@ -68,6 +68,7 @@ from .tag import Tag
from .tagged_item import TaggedItem
from .team import Team, TeamRevenueAnalyticsConfig, TeamMarketingAnalyticsConfig
from .event_ingestion_restriction_config import EventIngestionRestrictionConfig
+from .global_rate_limit_threshold_config import GlobalRateLimitThresholdConfig
from .uploaded_media import UploadedMedia
from .user import User, UserManager
from .user_group import UserGroup, UserGroupMembership
@@ -175,6 +176,7 @@ __all__ = [
"TeamRevenueAnalyticsConfig",
"TeamMarketingAnalyticsConfig",
"EventIngestionRestrictionConfig",
+ "GlobalRateLimitThresholdConfig",
"UploadedMedia",
"User",
"RepoRoutingRule",
diff --git a/posthog/models/global_rate_limit_threshold_config.py b/posthog/models/global_rate_limit_threshold_config.py
new file mode 100644
index 000000000000..5754e9d0c20c
--- /dev/null
+++ b/posthog/models/global_rate_limit_threshold_config.py
@@ -0,0 +1,88 @@
+import json
+
+from django.db import models, transaction
+from django.db.models.signals import post_delete, post_save
+from django.dispatch import receiver
+
+from posthog.models.utils import UUIDModel
+from posthog.redis import get_client
+from posthog.settings import PLUGINS_RELOAD_REDIS_URL
+
+# Single Redis key holding the JSON blob of dynamic custom rate-limit thresholds.
+# Must equal capture's GLOBAL_RATE_LIMIT_CUSTOM_THRESHOLD_KEY env var so the
+# refresh loop reads what this writer produces.
+CUSTOM_THRESHOLDS_REDIS_KEY = "capture_global_rate_limit_custom_thresholds"
+
+# Keep in sync with capture's MAX_DISTINCT_ID_CHARS. Capture truncates the
+# distinct_id to this many characters when building its rate-limit cache key, so
+# the resolved key written here must truncate identically to match at lookup time.
+MAX_DISTINCT_ID_CHARS = 128
+
+
+class GlobalRateLimitThresholdConfig(UUIDModel):
+ """
+ Ops-managed custom per-key thresholds for the capture global rate limiter.
+
+ Each row maps a token (optionally scoped to a single distinct_id) to a
+ threshold that overrides the limiter's global default. All rows serialize to a
+ single Redis key that capture refreshes on a timer. Internal ops tooling only:
+ no customer-facing API or UI.
+ """
+
+ # Matches Team.api_token's max_length so any valid capture token can get an override.
+ token = models.CharField(max_length=200)
+ distinct_id = models.CharField(
+ max_length=450,
+ blank=True,
+ default="",
+ help_text=(
+ "Optional. Empty applies the threshold to the whole token; "
+ "set applies it only to this token and distinct_id."
+ ),
+ )
+ threshold = models.PositiveBigIntegerField(
+ help_text=(
+ "Max events allowed per rate-limit window for this key. 0 rate-limits the key to zero, but the "
+ "limiter is cache-based so an isolated event may still pass on a cold cache miss; to block a key "
+ "permanently use an EventRestriction in the Django admin."
+ )
+ )
+ note = models.TextField(blank=True, null=True, help_text="Optional note explaining why this override exists")
+ created_at = models.DateTimeField(auto_now_add=True)
+ updated_at = models.DateTimeField(auto_now=True)
+
+ class Meta:
+ unique_together = ("token", "distinct_id")
+
+ @property
+ def resolved_key(self) -> str:
+ """The key capture looks up: ``token`` or ``token:distinct_id`` (truncated)."""
+ if self.distinct_id:
+ return f"{self.token}:{self.distinct_id[:MAX_DISTINCT_ID_CHARS]}"
+ return self.token
+
+
+def regenerate_redis_thresholds() -> None:
+ """Rebuild the Redis threshold blob from all rows.
+
+ Writes an explicit empty blob (``{}``) when no rows remain rather than
+ deleting the key: capture treats an absent key as fail-static (keeps its
+ current map), so a deliberate clear must be a written state.
+ """
+ redis_client = get_client(PLUGINS_RELOAD_REDIS_URL)
+
+ configs = GlobalRateLimitThresholdConfig.objects.all().order_by("id")
+ thresholds = {config.resolved_key: config.threshold for config in configs}
+ redis_client.set(CUSTOM_THRESHOLDS_REDIS_KEY, json.dumps(thresholds))
+
+
+@receiver(post_save, sender=GlobalRateLimitThresholdConfig)
+def update_redis_thresholds_on_save(sender, instance, created=False, **kwargs) -> None:
+ # Defer to commit: the admin wraps save_model in a transaction, so publishing
+ # inside the signal would leak a threshold to capture that a rollback erases.
+ transaction.on_commit(regenerate_redis_thresholds)
+
+
+@receiver(post_delete, sender=GlobalRateLimitThresholdConfig)
+def update_redis_thresholds_on_delete(sender, instance, **kwargs) -> None:
+ transaction.on_commit(regenerate_redis_thresholds)
diff --git a/posthog/models/test/test_global_rate_limit_threshold_config.py b/posthog/models/test/test_global_rate_limit_threshold_config.py
new file mode 100644
index 000000000000..052f7388550d
--- /dev/null
+++ b/posthog/models/test/test_global_rate_limit_threshold_config.py
@@ -0,0 +1,91 @@
+import json
+
+from posthog.test.base import BaseTest
+
+from django.db import transaction
+
+from parameterized import parameterized
+
+from posthog.models.global_rate_limit_threshold_config import (
+ CUSTOM_THRESHOLDS_REDIS_KEY,
+ MAX_DISTINCT_ID_CHARS,
+ GlobalRateLimitThresholdConfig,
+)
+from posthog.redis import get_client
+from posthog.settings import PLUGINS_RELOAD_REDIS_URL
+
+
+class TestGlobalRateLimitThresholdConfig(BaseTest):
+ def setUp(self):
+ super().setUp()
+ self.redis_client = get_client(PLUGINS_RELOAD_REDIS_URL)
+ self.redis_client.delete(CUSTOM_THRESHOLDS_REDIS_KEY)
+
+ def _blob(self) -> dict:
+ raw = self.redis_client.get(CUSTOM_THRESHOLDS_REDIS_KEY)
+ return json.loads(raw) if raw is not None else {}
+
+ @parameterized.expand(
+ [
+ ("token_only", "phc_abc", "", "phc_abc"),
+ ("token_and_distinct_id", "phc_abc", "noisy_user", "phc_abc:noisy_user"),
+ ]
+ )
+ def test_resolved_key_format(self, _name, token, distinct_id, expected):
+ config = GlobalRateLimitThresholdConfig(token=token, distinct_id=distinct_id, threshold=10)
+ self.assertEqual(config.resolved_key, expected)
+
+ def test_resolved_key_truncates_long_distinct_id(self):
+ long_distinct_id = "d" * (MAX_DISTINCT_ID_CHARS + 50)
+ config = GlobalRateLimitThresholdConfig(token="phc_abc", distinct_id=long_distinct_id, threshold=10)
+ self.assertEqual(config.resolved_key, f"phc_abc:{'d' * MAX_DISTINCT_ID_CHARS}")
+
+ def test_post_save_writes_blob(self):
+ with self.captureOnCommitCallbacks(execute=True):
+ GlobalRateLimitThresholdConfig.objects.create(token="phc_abc", threshold=1000)
+ GlobalRateLimitThresholdConfig.objects.create(token="phc_abc", distinct_id="noisy_user", threshold=50)
+
+ self.assertEqual(self._blob(), {"phc_abc": 1000, "phc_abc:noisy_user": 50})
+
+ def test_update_threshold_updates_blob(self):
+ with self.captureOnCommitCallbacks(execute=True):
+ config = GlobalRateLimitThresholdConfig.objects.create(token="phc_abc", threshold=1000)
+ self.assertEqual(self._blob(), {"phc_abc": 1000})
+
+ with self.captureOnCommitCallbacks(execute=True):
+ config.threshold = 25
+ config.save()
+ self.assertEqual(self._blob(), {"phc_abc": 25})
+
+ def test_delete_regenerates_blob(self):
+ with self.captureOnCommitCallbacks(execute=True):
+ config = GlobalRateLimitThresholdConfig.objects.create(token="phc_abc", threshold=1000)
+ GlobalRateLimitThresholdConfig.objects.create(token="phc_xyz", threshold=2000)
+
+ with self.captureOnCommitCallbacks(execute=True):
+ config.delete()
+ self.assertEqual(self._blob(), {"phc_xyz": 2000})
+
+ def test_delete_last_row_writes_empty_blob(self):
+ with self.captureOnCommitCallbacks(execute=True):
+ config = GlobalRateLimitThresholdConfig.objects.create(token="phc_abc", threshold=1000)
+ self.assertEqual(self._blob(), {"phc_abc": 1000})
+
+ # Clearing the last row writes an explicit empty blob, not a delete: capture
+ # treats an absent key as fail-static, so a clear must be a written state.
+ with self.captureOnCommitCallbacks(execute=True):
+ config.delete()
+ self.assertIsNotNone(self.redis_client.get(CUSTOM_THRESHOLDS_REDIS_KEY))
+ self.assertEqual(self._blob(), {})
+
+ def test_rollback_discards_redis_write(self):
+ # The publish is deferred to commit, so a rolled-back save must never leak
+ # a threshold to capture (Redis is not part of the DB transaction).
+ class Boom(Exception):
+ pass
+
+ with self.assertRaises(Boom), transaction.atomic():
+ GlobalRateLimitThresholdConfig.objects.create(token="phc_abc", threshold=1000)
+ raise Boom()
+
+ self.assertIsNone(self.redis_client.get(CUSTOM_THRESHOLDS_REDIS_KEY))
diff --git a/posthog/test/setup_receivers_baseline.txt b/posthog/test/setup_receivers_baseline.txt
index 4706ab6dcedc..10bfb9658e01 100644
--- a/posthog/test/setup_receivers_baseline.txt
+++ b/posthog/test/setup_receivers_baseline.txt
@@ -44,6 +44,7 @@ post_delete:posthog.caching.organization_serializer_cache._connect_invalidation.
post_delete:posthog.models.event_ingestion_restriction_config.delete_redis_cache_with_config
post_delete:posthog.models.file_system.file_system_mixin.FileSystemSyncMixin.__init_subclass__.<locals>._file_system_post_delete
post_delete:posthog.models.file_system.file_system_view_log._drop_view_logs_when_file_deleted
+post_delete:posthog.models.global_rate_limit_threshold_config.update_redis_thresholds_on_delete
post_delete:posthog.models.integration.cleanup_ses_identity_on_integration_delete
post_delete:posthog.models.oauth._block_cimd_url_on_application_delete
post_delete:posthog.models.organization.clean_up_alert_subscriptions_on_membership_removal
@@ -100,6 +101,7 @@ post_save:posthog.models.comment.comment.log_comment_activity
post_save:posthog.models.event_ingestion_restriction_config.update_redis_cache_with_config
post_save:posthog.models.file_system.file_system_mixin.FileSystemSyncMixin.__init_subclass__.<locals>._file_system_post_save
post_save:posthog.models.file_system.user_product_list.access_control_created
+post_save:posthog.models.global_rate_limit_threshold_config.update_redis_thresholds_on_save
post_save:posthog.models.organization.cache_organization_session_age
post_save:posthog.models.organization.sync_billing_on_membership_save
post_save:posthog.models.product_intent.product_intent._invalidate_product_intents_on_save