: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.
Python ab-testingai-analyticsanalyticscdpdata-warehouseexperimentsfeature-flagsjavascriptproduct-analyticspythonreactsession-replaysurveystypescriptweb-analytics
fix(dashboards): load dashboard tiles once per request (#119084)
Phil Haack63b029a2af36
diff --git a/posthog/api/test/dashboards/__snapshots__/test_dashboard.ambr b/posthog/api/test/dashboards/__snapshots__/test_dashboard.ambrindex 0d1396f5c000..c87ed623a2f5 100644--- a/posthog/api/test/dashboards/__snapshots__/test_dashboard.ambr+++ b/posthog/api/test/dashboards/__snapshots__/test_dashboard.ambr@@ -1330,6 +1330,217 @@'''# ---# name: TestDashboard.test_adding_insights_is_not_nplus1_for_gets.37+ '''+ SELECT "posthog_taggeditem"."id",+ "posthog_taggeditem"."tag_id",+ "posthog_taggeditem"."content_type_id",+ "posthog_taggeditem"."object_id",+ "posthog_taggeditem"."object_uuid",+ "posthog_taggeditem"."team_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"."content_type_id" = 99999+ AND "posthog_taggeditem"."object_id" IN (1,+ 2,+ 3,+ 4,+ 5 /* ... */))+ '''+# ---+# name: TestDashboard.test_adding_insights_is_not_nplus1_for_gets.38+ '''+ 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"."business_model"+ FROM "posthog_team"+ WHERE "posthog_team"."id" = 99999+ LIMIT 21+ '''+# ---+# name: TestDashboard.test_adding_insights_is_not_nplus1_for_gets.39+ '''+ 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_adding_insights_is_not_nplus1_for_gets.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"+ FROM "ee_accesscontrol"+ 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"."organization_id" = '00000000-0000-0000-0000-000000000000'::uuid+ AND "posthog_organizationmembership"."user_id" = 99999+ AND "ee_accesscontrol"."role_id" IS NULL+ AND "ee_accesscontrol"."team_id" = 99999))+ '''+# ---+# name: TestDashboard.test_adding_insights_is_not_nplus1_for_gets.40+ '''+ 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))+ '''+# ---+# name: TestDashboard.test_adding_insights_is_not_nplus1_for_gets.41+ '''+ SELECT "posthog_insightvariable"."id",+ "posthog_insightvariable"."name",+ "posthog_insightvariable"."code_name",+ "posthog_insightvariable"."type",+ "posthog_insightvariable"."default_value",+ "posthog_insightvariable"."is_multi"+ FROM "posthog_insightvariable"+ INNER JOIN "posthog_team" ON ("posthog_insightvariable"."team_id" = "posthog_team"."id")+ WHERE ("posthog_insightvariable"."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_insightvariable"."team_id" = 99999))+ ORDER BY "posthog_insightvariable"."name" ASC+ '''+# ---+# name: TestDashboard.test_adding_insights_is_not_nplus1_for_gets.42'''SELECT "posthog_dashboardtile"."id","posthog_dashboardtile"."dashboard_id",@@ -1678,55 +1889,26 @@WHERE (NOT ("posthog_dashboardtile"."deleted"AND "posthog_dashboardtile"."deleted" IS NOT NULL)AND NOT ("posthog_dashboard"."deleted")+ AND "posthog_dashboardtile"."dashboard_id" = 99999AND 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 /* ... */))+ OR "posthog_dashboardtile"."insight_id" IS NULL))ORDER BY "posthog_dashboarditem"."order" ASC'''# ----# name: TestDashboard.test_adding_insights_is_not_nplus1_for_gets.38+# name: TestDashboard.test_adding_insights_is_not_nplus1_for_gets.43'''- 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"."customization",- "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")))+ SELECT "posthog_dashboardtile"."id",+ "posthog_dashboardtile"."dashboard_id",+ "posthog_dashboardtile"."insight_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,@@ -1734,63 +1916,157 @@5 /* ... */))'''# ----# name: TestDashboard.test_adding_insights_is_not_nplus1_for_gets.39+# name: TestDashboard.test_adding_insights_is_not_nplus1_for_gets.44'''- 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"."group_key",- "posthog_dashboardtile"."badge",- "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,+ SELECT "posthog_taggeditem"."id",+ "posthog_taggeditem"."tag_id",+ "posthog_taggeditem"."content_type_id",+ "posthog_taggeditem"."object_id",+ "posthog_taggeditem"."object_uuid",+ "posthog_taggeditem"."team_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"."content_type_id" = 99999+ AND "posthog_taggeditem"."object_id" IN (1,+ 2,+ 3,+ 4,+ 5 /* ... */))+ '''+# ---+# name: TestDashboard.test_adding_insights_is_not_nplus1_for_gets.45+ '''+ 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"."evaluation_delay_intervals",+ "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"."schedule_start_time",+ "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"."ui_configuration",+ "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 /* ... */))+ 5 /* ... */)'''# ----# name: TestDashboard.test_adding_insights_is_not_nplus1_for_gets.4+# name: TestDashboard.test_adding_insights_is_not_nplus1_for_gets.46'''- 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"- FROM "ee_accesscontrol"- 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"."organization_id" = '00000000-0000-0000-0000-000000000000'::uuid- AND "posthog_organizationmembership"."user_id" = 99999- AND "ee_accesscontrol"."role_id" IS NULL- AND "ee_accesscontrol"."team_id" = 99999))+ SELECT "posthog_teamrevenueanalyticsconfig"."team_id",+ "posthog_teamrevenueanalyticsconfig"."filter_test_accounts",+ "posthog_teamrevenueanalyticsconfig"."notified_first_sync",+ "posthog_teamrevenueanalyticsconfig"."events",+ "posthog_teamrevenueanalyticsconfig"."goals",+ "posthog_teamrevenueanalyticsconfig"."base_currency"+ FROM "posthog_teamrevenueanalyticsconfig"+ WHERE "posthog_teamrevenueanalyticsconfig"."team_id" = 99999+ LIMIT 21'''# ----# name: TestDashboard.test_adding_insights_is_not_nplus1_for_gets.40+# name: TestDashboard.test_adding_insights_is_not_nplus1_for_gets.47+ '''+ SELECT "posthog_teammarketinganalyticsconfig"."team_id",+ "posthog_teammarketinganalyticsconfig"."attribution_window_days",+ "posthog_teammarketinganalyticsconfig"."attribution_mode",+ "posthog_teammarketinganalyticsconfig"."filter_test_accounts",+ "posthog_teammarketinganalyticsconfig"."sources_map",+ "posthog_teammarketinganalyticsconfig"."conversion_goals",+ "posthog_teammarketinganalyticsconfig"."campaign_name_mappings",+ "posthog_teammarketinganalyticsconfig"."custom_source_mappings",+ "posthog_teammarketinganalyticsconfig"."campaign_field_preferences"+ FROM "posthog_teammarketinganalyticsconfig"+ WHERE "posthog_teammarketinganalyticsconfig"."team_id" = 99999+ LIMIT 21+ '''+# ---+# name: TestDashboard.test_adding_insights_is_not_nplus1_for_gets.48+ '''+ SELECT "customer_analytics_teamcustomeranalyticsconfig"."team_id",+ "customer_analytics_teamcustomeranalyticsconfig"."activity_event",+ "customer_analytics_teamcustomeranalyticsconfig"."signup_pageview_event",+ "customer_analytics_teamcustomeranalyticsconfig"."signup_event",+ "customer_analytics_teamcustomeranalyticsconfig"."subscription_event",+ "customer_analytics_teamcustomeranalyticsconfig"."payment_event",+ "customer_analytics_teamcustomeranalyticsconfig"."account_group_type_index",+ "customer_analytics_teamcustomeranalyticsconfig"."default_pinned_properties",+ "customer_analytics_teamcustomeranalyticsconfig"."account_track_rules",+ "customer_analytics_teamcustomeranalyticsconfig"."account_track_rules_enabled_at"+ FROM "customer_analytics_teamcustomeranalyticsconfig"+ WHERE "customer_analytics_teamcustomeranalyticsconfig"."team_id" = 99999+ LIMIT 21+ '''+# ---+# name: TestDashboard.test_adding_insights_is_not_nplus1_for_gets.49'''SELECT "posthog_dashboard"."id","posthog_dashboard"."name",@@ -1815,32 +2091,227 @@"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.41+# name: TestDashboard.test_adding_insights_is_not_nplus1_for_gets.5'''- SELECT "posthog_taggeditem"."id",- "posthog_taggeditem"."tag_id",- "posthog_taggeditem"."content_type_id",- "posthog_taggeditem"."object_id",- "posthog_taggeditem"."object_uuid",- "posthog_taggeditem"."team_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"."content_type_id" = 99999- AND "posthog_taggeditem"."object_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"."enforce_verified_domains",+ "posthog_organization"."members_can_invite",+ "posthog_organization"."members_can_create_projects",+ "posthog_organization"."members_can_use_personal_api_keys",+ "posthog_organization"."members_can_see_org_members",+ "posthog_organization"."uses_most_specific_access_resolution",+ "posthog_organization"."allow_publicly_shared_resources",+ "posthog_organization"."member_notice",+ "posthog_organization"."read_only_mcp_access",+ "posthog_organization"."default_role_id",+ "posthog_organization"."plugins_access_level",+ "posthog_organization"."for_internal_metrics",+ "posthog_organization"."default_anonymize_ips",+ "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"."has_active_subscription",+ "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.42+# name: TestDashboard.test_adding_insights_is_not_nplus1_for_gets.6+ '''+ SELECT "ee_role"."organization_id" AS "role__organization_id",+ "ee_rolemembership"."role_id" AS "role_id"+ FROM "ee_rolemembership"+ LEFT OUTER JOIN "posthog_organizationmembership" ON ("ee_rolemembership"."organization_member_id" = "posthog_organizationmembership"."id")+ INNER JOIN "ee_role" ON ("ee_rolemembership"."role_id" = "ee_role"."id")+ WHERE ("ee_rolemembership"."user_id" = 99999+ AND ("ee_rolemembership"."organization_member_id" IS NULL+ OR "posthog_organizationmembership"."organization_id" = ("ee_role"."organization_id")))+ '''+# ---+# name: TestDashboard.test_adding_insights_is_not_nplus1_for_gets.7+ '''+ 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"+ 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"."resource" = 'project'+ AND "posthog_team"."organization_id" IN ('00000000-0000-0000-0000-000000000000'::uuid)+ AND ("posthog_organizationmembership"."user_id" = 99999+ OR ("ee_accesscontrol"."organization_member_id" IS NULL+ AND "ee_accesscontrol"."role_id" IS NULL)))+ '''+# ---+# name: TestDashboard.test_adding_insights_is_not_nplus1_for_gets.8+ '''+ SELECT "posthog_dashboard"."id" AS "id"+ 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" IN (1,+ 2,+ 3,+ 4,+ 5 /* ... */))+ '''+# ---+# name: TestDashboard.test_adding_insights_is_not_nplus1_for_gets.9+ '''+ SELECT "posthog_dashboard"."id" AS "id",+ "posthog_dashboard"."name" AS "name"+ 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+ '''+ 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"."ui_configuration",+ "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"."enforce_verified_domains",+ "posthog_organization"."members_can_invite",+ "posthog_organization"."members_can_create_projects",+ "posthog_organization"."members_can_use_personal_api_keys",+ "posthog_organization"."members_can_see_org_members",+ "posthog_organization"."uses_most_specific_access_resolution",+ "posthog_organization"."allow_publicly_shared_resources",+ "posthog_organization"."member_notice",+ "posthog_organization"."read_only_mcp_access",+ "posthog_organization"."default_role_id",+ "posthog_organization"."plugins_access_level",+ "posthog_organization"."for_internal_metrics",+ "posthog_organization"."default_anonymize_ips",+ "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"."has_active_subscription",+ "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_team"."id","posthog_team"."uuid",@@ -1939,125 +2410,243 @@LIMIT 21'''# ----# name: TestDashboard.test_adding_insights_is_not_nplus1_for_gets.43- '''- 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_adding_insights_is_not_nplus1_for_gets.44+# name: TestDashboard.test_listing_dashboards_is_not_nplus1.11'''- 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 "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"."enforce_verified_domains",+ "posthog_organization"."members_can_invite",+ "posthog_organization"."members_can_create_projects",+ "posthog_organization"."members_can_use_personal_api_keys",+ "posthog_organization"."members_can_see_org_members",+ "posthog_organization"."uses_most_specific_access_resolution",+ "posthog_organization"."allow_publicly_shared_resources",+ "posthog_organization"."member_notice",+ "posthog_organization"."read_only_mcp_access",+ "posthog_organization"."default_role_id",+ "posthog_organization"."plugins_access_level",+ "posthog_organization"."for_internal_metrics",+ "posthog_organization"."default_anonymize_ips",+ "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"."has_active_subscription",+ "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_adding_insights_is_not_nplus1_for_gets.45+# name: TestDashboard.test_listing_dashboards_is_not_nplus1.12'''- SELECT "posthog_insightvariable"."id",- "posthog_insightvariable"."name",- "posthog_insightvariable"."code_name",- "posthog_insightvariable"."type",- "posthog_insightvariable"."default_value",- "posthog_insightvariable"."is_multi"- FROM "posthog_insightvariable"- INNER JOIN "posthog_team" ON ("posthog_insightvariable"."team_id" = "posthog_team"."id")- WHERE ("posthog_insightvariable"."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_insightvariable"."team_id" = 99999))- ORDER BY "posthog_insightvariable"."name" ASC+ 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"."business_model"+ FROM "posthog_team"+ WHERE "posthog_team"."id" = 99999+ LIMIT 21'''# ----# name: TestDashboard.test_adding_insights_is_not_nplus1_for_gets.46+# 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"."group_key",- "posthog_dashboardtile"."badge",- "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_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.14+ '''+ SELECT "posthog_insightviewed"."id",+ "posthog_insightviewed"."team_id",+ "posthog_insightviewed"."user_id",+ "posthog_insightviewed"."insight_id",+ "posthog_insightviewed"."last_viewed_at",+ "posthog_insightviewed"."source",+ "posthog_insightviewed"."dashboard_id"+ FROM "posthog_insightviewed"+ WHERE ("posthog_insightviewed"."insight_id" = 99999+ AND "posthog_insightviewed"."team_id" = 99999+ AND "posthog_insightviewed"."user_id" = 99999)+ LIMIT 21+ FOR+ UPDATE+ '''+# ---+# name: TestDashboard.test_listing_dashboards_is_not_nplus1.15+ '''+ 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"."enforce_verified_domains",+ "posthog_organization"."members_can_invite",+ "posthog_organization"."members_can_create_projects",+ "posthog_organization"."members_can_use_personal_api_keys",+ "posthog_organization"."members_can_see_org_members",+ "posthog_organization"."uses_most_specific_access_resolution",+ "posthog_organization"."allow_publicly_shared_resources",+ "posthog_organization"."member_notice",+ "posthog_organization"."read_only_mcp_access",+ "posthog_organization"."default_role_id",+ "posthog_organization"."plugins_access_level",+ "posthog_organization"."for_internal_metrics",+ "posthog_organization"."default_anonymize_ips",+ "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"."has_active_subscription",+ "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.16+ '''+ SELECT "posthog_team"."id","posthog_team"."uuid","posthog_team"."organization_id","posthog_team"."parent_team_id",@@ -2143,277 +2732,18 @@"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"."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"."ui_configuration",- "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."ui_configuration",- 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"."agent_context",- "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."ui_configuration",- 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."ui_configuration",- 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_adding_insights_is_not_nplus1_for_gets.47- '''- 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"."customization",- "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 /* ... */))+ "posthog_team"."business_model"+ FROM "posthog_team"+ WHERE "posthog_team"."id" = 99999+ LIMIT 21'''# ----# name: TestDashboard.test_adding_insights_is_not_nplus1_for_gets.48+# name: TestDashboard.test_listing_dashboards_is_not_nplus1.17'''SELECT "posthog_dashboardtile"."id","posthog_dashboardtile"."dashboard_id",@@ -2439,51 +2769,152 @@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.49+# name: TestDashboard.test_listing_dashboards_is_not_nplus1.18'''- 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"."customization",- "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)/* ... */)+ 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"."group_key",+ "posthog_dashboardtile"."badge",+ "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.5+# name: TestDashboard.test_listing_dashboards_is_not_nplus1.19'''- 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",+ SELECT "posthog_insightvariable"."id",+ "posthog_insightvariable"."name",+ "posthog_insightvariable"."code_name",+ "posthog_insightvariable"."type",+ "posthog_insightvariable"."default_value",+ "posthog_insightvariable"."is_multi"+ FROM "posthog_insightvariable"+ INNER JOIN "posthog_team" ON ("posthog_insightvariable"."team_id" = "posthog_team"."id")+ WHERE ("posthog_insightvariable"."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_insightvariable"."team_id" = 99999))+ ORDER BY "posthog_insightvariable"."name" ASC+ '''+# ---+# 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"."business_model","posthog_organization"."id","posthog_organization"."name","posthog_organization"."slug",@@ -2523,129 +2954,26 @@"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_team"+ INNER JOIN "posthog_organization" ON ("posthog_team"."organization_id" = "posthog_organization"."id")+ WHERE "posthog_team"."id" = 99999+ LIMIT 21'''# ----# name: TestDashboard.test_adding_insights_is_not_nplus1_for_gets.50+# name: TestDashboard.test_listing_dashboards_is_not_nplus1.20'''- SELECT "posthog_taggeditem"."id",- "posthog_taggeditem"."tag_id",- "posthog_taggeditem"."content_type_id",- "posthog_taggeditem"."object_id",- "posthog_taggeditem"."object_uuid",- "posthog_taggeditem"."team_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"."content_type_id" = 99999- AND "posthog_taggeditem"."object_id" IN (1,- 2,- 3,- 4,- 5 /* ... */))+ SELECT "posthog_teamrevenueanalyticsconfig"."team_id",+ "posthog_teamrevenueanalyticsconfig"."filter_test_accounts",+ "posthog_teamrevenueanalyticsconfig"."notified_first_sync",+ "posthog_teamrevenueanalyticsconfig"."events",+ "posthog_teamrevenueanalyticsconfig"."goals",+ "posthog_teamrevenueanalyticsconfig"."base_currency"+ FROM "posthog_teamrevenueanalyticsconfig"+ WHERE "posthog_teamrevenueanalyticsconfig"."team_id" = 99999+ LIMIT 21'''# ----# name: TestDashboard.test_adding_insights_is_not_nplus1_for_gets.51- '''- 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"."evaluation_delay_intervals",- "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"."schedule_start_time",- "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"."ui_configuration",- "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_adding_insights_is_not_nplus1_for_gets.52- '''- SELECT "posthog_teamrevenueanalyticsconfig"."team_id",- "posthog_teamrevenueanalyticsconfig"."filter_test_accounts",- "posthog_teamrevenueanalyticsconfig"."notified_first_sync",- "posthog_teamrevenueanalyticsconfig"."events",- "posthog_teamrevenueanalyticsconfig"."goals",- "posthog_teamrevenueanalyticsconfig"."base_currency"- FROM "posthog_teamrevenueanalyticsconfig"- WHERE "posthog_teamrevenueanalyticsconfig"."team_id" = 99999- LIMIT 21- '''-# ----# name: TestDashboard.test_adding_insights_is_not_nplus1_for_gets.53+# name: TestDashboard.test_listing_dashboards_is_not_nplus1.21'''SELECT "posthog_teammarketinganalyticsconfig"."team_id","posthog_teammarketinganalyticsconfig"."attribution_window_days",@@ -2661,7 +2989,7 @@LIMIT 21'''# ----# name: TestDashboard.test_adding_insights_is_not_nplus1_for_gets.54+# name: TestDashboard.test_listing_dashboards_is_not_nplus1.22'''SELECT "customer_analytics_teamcustomeranalyticsconfig"."team_id","customer_analytics_teamcustomeranalyticsconfig"."activity_event",@@ -2678,7 +3006,18 @@LIMIT 21'''# ----# name: TestDashboard.test_adding_insights_is_not_nplus1_for_gets.55+# name: TestDashboard.test_listing_dashboards_is_not_nplus1.23+ '''+ 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.24'''SELECT "posthog_dashboard"."id","posthog_dashboard"."name",@@ -2711,74 +3050,16 @@5 /* ... */))'''# ----# name: TestDashboard.test_adding_insights_is_not_nplus1_for_gets.6- '''- SELECT "ee_role"."organization_id" AS "role__organization_id",- "ee_rolemembership"."role_id" AS "role_id"- FROM "ee_rolemembership"- LEFT OUTER JOIN "posthog_organizationmembership" ON ("ee_rolemembership"."organization_member_id" = "posthog_organizationmembership"."id")- INNER JOIN "ee_role" ON ("ee_rolemembership"."role_id" = "ee_role"."id")- WHERE ("ee_rolemembership"."user_id" = 99999- AND ("ee_rolemembership"."organization_member_id" IS NULL- OR "posthog_organizationmembership"."organization_id" = ("ee_role"."organization_id")))- '''-# ----# name: TestDashboard.test_adding_insights_is_not_nplus1_for_gets.7- '''- 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"- 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"."resource" = 'project'- AND "posthog_team"."organization_id" IN ('00000000-0000-0000-0000-000000000000'::uuid)- AND ("posthog_organizationmembership"."user_id" = 99999- OR ("ee_accesscontrol"."organization_member_id" IS NULL- AND "ee_accesscontrol"."role_id" IS NULL)))- '''-# ----# name: TestDashboard.test_adding_insights_is_not_nplus1_for_gets.8- '''- SELECT "posthog_dashboard"."id" AS "id"- 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" IN (1,- 2,- 3,- 4,- 5 /* ... */))- '''-# ----# name: TestDashboard.test_adding_insights_is_not_nplus1_for_gets.9+# name: TestDashboard.test_listing_dashboards_is_not_nplus1.25'''- SELECT "posthog_dashboard"."id" AS "id",- "posthog_dashboard"."name" AS "name"- FROM "posthog_dashboard"- WHERE (NOT ("posthog_dashboard"."deleted")- AND "posthog_dashboard"."id" IN (1,- 2,- 3,- 4,- 5 /* ... */))+ 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"."content_type_id" = 99999+ AND "posthog_taggeditem"."object_id" = 99999)'''# ----# name: TestDashboard.test_listing_dashboards_is_not_nplus1+# name: TestDashboard.test_listing_dashboards_is_not_nplus1.26'''SELECT "posthog_user"."id","posthog_user"."password",@@ -2824,7 +3105,7 @@AND "posthog_user"."id" = 99999)'''# ----# name: TestDashboard.test_listing_dashboards_is_not_nplus1.1+# name: TestDashboard.test_listing_dashboards_is_not_nplus1.27'''SELECT "posthog_organization"."id","posthog_organization"."name",@@ -2870,7 +3151,7 @@LIMIT 21'''# ----# name: TestDashboard.test_listing_dashboards_is_not_nplus1.10+# name: TestDashboard.test_listing_dashboards_is_not_nplus1.28'''SELECT "posthog_team"."id","posthog_team"."uuid",@@ -2963,15 +3244,62 @@"posthog_team"."api_query_rate_limit","posthog_team"."drop_events_older_than","posthog_team"."base_currency",- "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"."enforce_verified_domains",+ "posthog_organization"."members_can_invite",+ "posthog_organization"."members_can_create_projects",+ "posthog_organization"."members_can_use_personal_api_keys",+ "posthog_organization"."members_can_see_org_members",+ "posthog_organization"."uses_most_specific_access_resolution",+ "posthog_organization"."allow_publicly_shared_resources",+ "posthog_organization"."member_notice",+ "posthog_organization"."read_only_mcp_access",+ "posthog_organization"."default_role_id",+ "posthog_organization"."plugins_access_level",+ "posthog_organization"."for_internal_metrics",+ "posthog_organization"."default_anonymize_ips",+ "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"."has_active_subscription",+ "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" = 99999LIMIT 21'''# ----# name: TestDashboard.test_listing_dashboards_is_not_nplus1.11+# name: TestDashboard.test_listing_dashboards_is_not_nplus1.29'''- 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",@@ -3010,156 +3338,101 @@"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_listing_dashboards_is_not_nplus1.12+# name: TestDashboard.test_listing_dashboards_is_not_nplus1.3'''- 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"."business_model"- FROM "posthog_team"- WHERE "posthog_team"."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"."enforce_verified_domains",+ "posthog_organization"."members_can_invite",+ "posthog_organization"."members_can_create_projects",+ "posthog_organization"."members_can_use_personal_api_keys",+ "posthog_organization"."members_can_see_org_members",+ "posthog_organization"."uses_most_specific_access_resolution",+ "posthog_organization"."allow_publicly_shared_resources",+ "posthog_organization"."member_notice",+ "posthog_organization"."read_only_mcp_access",+ "posthog_organization"."default_role_id",+ "posthog_organization"."plugins_access_level",+ "posthog_organization"."for_internal_metrics",+ "posthog_organization"."default_anonymize_ips",+ "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"."has_active_subscription",+ "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.13- '''- 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.14+# name: TestDashboard.test_listing_dashboards_is_not_nplus1.30'''- SELECT "posthog_insightviewed"."id",- "posthog_insightviewed"."team_id",- "posthog_insightviewed"."user_id",- "posthog_insightviewed"."insight_id",- "posthog_insightviewed"."last_viewed_at",- "posthog_insightviewed"."source",- "posthog_insightviewed"."dashboard_id"- FROM "posthog_insightviewed"- WHERE ("posthog_insightviewed"."insight_id" = 99999- AND "posthog_insightviewed"."team_id" = 99999- AND "posthog_insightviewed"."user_id" = 99999)- LIMIT 21- FOR- UPDATE+ 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"+ FROM "ee_accesscontrol"+ 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"."organization_id" = '00000000-0000-0000-0000-000000000000'::uuid+ AND "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.15+# name: TestDashboard.test_listing_dashboards_is_not_nplus1.31'''- 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",@@ -3198,282 +3471,207 @@"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+ 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.16- '''- 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"."business_model"- FROM "posthog_team"- WHERE "posthog_team"."id" = 99999- LIMIT 21+# name: TestDashboard.test_listing_dashboards_is_not_nplus1.32+ '''+ 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'))'''# ----# name: TestDashboard.test_listing_dashboards_is_not_nplus1.17+# name: TestDashboard.test_listing_dashboards_is_not_nplus1.33'''- 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"."group_key",- "posthog_dashboardtile"."badge",- "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)+ 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"."customization",+ "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",++ (SELECT U0."id" AS "id"+ 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 1 ASC+ LIMIT 1) AS "_folder_id",+ 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."ui_configuration",+ 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" = 99999AND NOT ("posthog_dashboard"."deleted")- AND "posthog_dashboardtile"."insight_id" = 99999)+ AND NOT ("posthog_dashboard"."creation_mode" = 'unlisted'))+ ORDER BY "posthog_dashboard"."pinned" DESC,+ "posthog_dashboard"."name" ASC,+ "posthog_dashboard"."id" ASC+ LIMIT 300'''# ----# name: TestDashboard.test_listing_dashboards_is_not_nplus1.18+# name: TestDashboard.test_listing_dashboards_is_not_nplus1.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"."group_key",- "posthog_dashboardtile"."badge",- "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_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.19+# name: TestDashboard.test_listing_dashboards_is_not_nplus1.35'''- SELECT "posthog_insightvariable"."id",- "posthog_insightvariable"."name",- "posthog_insightvariable"."code_name",- "posthog_insightvariable"."type",- "posthog_insightvariable"."default_value",- "posthog_insightvariable"."is_multi"- FROM "posthog_insightvariable"- INNER JOIN "posthog_team" ON ("posthog_insightvariable"."team_id" = "posthog_team"."id")- WHERE ("posthog_insightvariable"."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_insightvariable"."team_id" = 99999))- ORDER BY "posthog_insightvariable"."name" ASC+ SELECT "posthog_taggeditem"."id",+ "posthog_taggeditem"."tag_id",+ "posthog_taggeditem"."content_type_id",+ "posthog_taggeditem"."object_id",+ "posthog_taggeditem"."object_uuid",+ "posthog_taggeditem"."team_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"."content_type_id" = 99999+ AND "posthog_taggeditem"."object_id" IN (1,+ 2,+ 3,+ 4,+ 5 /* ... */))'''# ----# name: TestDashboard.test_listing_dashboards_is_not_nplus1.2+# name: TestDashboard.test_listing_dashboards_is_not_nplus1.4'''- 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"."business_model",+ 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"+ FROM "ee_accesscontrol"+ 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"."organization_id" = '00000000-0000-0000-0000-000000000000'::uuid+ AND "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",@@ -3513,70 +3711,58 @@"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.20- '''- SELECT "posthog_teamrevenueanalyticsconfig"."team_id",- "posthog_teamrevenueanalyticsconfig"."filter_test_accounts",- "posthog_teamrevenueanalyticsconfig"."notified_first_sync",- "posthog_teamrevenueanalyticsconfig"."events",- "posthog_teamrevenueanalyticsconfig"."goals",- "posthog_teamrevenueanalyticsconfig"."base_currency"- FROM "posthog_teamrevenueanalyticsconfig"- WHERE "posthog_teamrevenueanalyticsconfig"."team_id" = 99999- LIMIT 21+ 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.21+# name: TestDashboard.test_listing_dashboards_is_not_nplus1.6'''- SELECT "posthog_teammarketinganalyticsconfig"."team_id",- "posthog_teammarketinganalyticsconfig"."attribution_window_days",- "posthog_teammarketinganalyticsconfig"."attribution_mode",- "posthog_teammarketinganalyticsconfig"."filter_test_accounts",- "posthog_teammarketinganalyticsconfig"."sources_map",- "posthog_teammarketinganalyticsconfig"."conversion_goals",- "posthog_teammarketinganalyticsconfig"."campaign_name_mappings",- "posthog_teammarketinganalyticsconfig"."custom_source_mappings",- "posthog_teammarketinganalyticsconfig"."campaign_field_preferences"- FROM "posthog_teammarketinganalyticsconfig"- WHERE "posthog_teammarketinganalyticsconfig"."team_id" = 99999- LIMIT 21+ SELECT "posthog_dashboard"."id" AS "id"+ 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" IN (1,+ 2,+ 3,+ 4,+ 5 /* ... */))'''# ----# name: TestDashboard.test_listing_dashboards_is_not_nplus1.22+# name: TestDashboard.test_listing_dashboards_is_not_nplus1.7'''- SELECT "customer_analytics_teamcustomeranalyticsconfig"."team_id",- "customer_analytics_teamcustomeranalyticsconfig"."activity_event",- "customer_analytics_teamcustomeranalyticsconfig"."signup_pageview_event",- "customer_analytics_teamcustomeranalyticsconfig"."signup_event",- "customer_analytics_teamcustomeranalyticsconfig"."subscription_event",- "customer_analytics_teamcustomeranalyticsconfig"."payment_event",- "customer_analytics_teamcustomeranalyticsconfig"."account_group_type_index",- "customer_analytics_teamcustomeranalyticsconfig"."default_pinned_properties",- "customer_analytics_teamcustomeranalyticsconfig"."account_track_rules",- "customer_analytics_teamcustomeranalyticsconfig"."account_track_rules_enabled_at"- FROM "customer_analytics_teamcustomeranalyticsconfig"- WHERE "customer_analytics_teamcustomeranalyticsconfig"."team_id" = 99999- LIMIT 21+ SELECT "posthog_dashboard"."id" AS "id",+ "posthog_dashboard"."name" AS "name"+ 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.23+# name: TestDashboard.test_listing_dashboards_is_not_nplus1.8'''- SELECT "posthog_dashboardtile"."dashboard_id" AS "dashboard_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"."insight_id" = 99999)+ 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.24+# name: TestDashboard.test_listing_dashboards_is_not_nplus1.9'''SELECT "posthog_dashboard"."id","posthog_dashboard"."name",@@ -3609,16 +3795,7 @@5 /* ... */))'''# ----# name: TestDashboard.test_listing_dashboards_is_not_nplus1.25- '''- 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"."content_type_id" = 99999- AND "posthog_taggeditem"."object_id" = 99999)- '''-# ----# name: TestDashboard.test_listing_dashboards_is_not_nplus1.26+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles'''SELECT "posthog_user"."id","posthog_user"."password",@@ -3664,7 +3841,7 @@AND "posthog_user"."id" = 99999)'''# ----# name: TestDashboard.test_listing_dashboards_is_not_nplus1.27+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.1'''SELECT "posthog_organization"."id","posthog_organization"."name",@@ -3710,155 +3887,150 @@LIMIT 21'''# ----# name: TestDashboard.test_listing_dashboards_is_not_nplus1.28+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.10'''- 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"."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"."enforce_verified_domains",- "posthog_organization"."members_can_invite",- "posthog_organization"."members_can_create_projects",- "posthog_organization"."members_can_use_personal_api_keys",- "posthog_organization"."members_can_see_org_members",- "posthog_organization"."uses_most_specific_access_resolution",- "posthog_organization"."allow_publicly_shared_resources",- "posthog_organization"."member_notice",- "posthog_organization"."read_only_mcp_access",- "posthog_organization"."default_role_id",- "posthog_organization"."plugins_access_level",- "posthog_organization"."for_internal_metrics",- "posthog_organization"."default_anonymize_ips",- "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"."has_active_subscription",- "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+ 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 "customer_analytics_teamcustomeranalyticsconfig"."team_id",+ "customer_analytics_teamcustomeranalyticsconfig"."activity_event",+ "customer_analytics_teamcustomeranalyticsconfig"."signup_pageview_event",+ "customer_analytics_teamcustomeranalyticsconfig"."signup_event",+ "customer_analytics_teamcustomeranalyticsconfig"."subscription_event",+ "customer_analytics_teamcustomeranalyticsconfig"."payment_event",+ "customer_analytics_teamcustomeranalyticsconfig"."account_group_type_index",+ "customer_analytics_teamcustomeranalyticsconfig"."default_pinned_properties",+ "customer_analytics_teamcustomeranalyticsconfig"."account_track_rules",+ "customer_analytics_teamcustomeranalyticsconfig"."account_track_rules_enabled_at"+ FROM "customer_analytics_teamcustomeranalyticsconfig"+ WHERE "customer_analytics_teamcustomeranalyticsconfig"."team_id" = 99999LIMIT 21'''# ----# name: TestDashboard.test_listing_dashboards_is_not_nplus1.29+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.101'''- 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_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.102+ '''+ 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"."customization",+ "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.103+ '''+ 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"."content_type_id" = 99999+ AND "posthog_taggeditem"."object_id" = 99999)+ '''+# ---+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.104+ '''+ 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"."ui_configuration",+ "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.105+ '''+ SELECT "posthog_organization"."id","posthog_organization"."name","posthog_organization"."slug","posthog_organization"."logo_media_id",@@ -3897,52 +4069,189 @@"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'::uuidLIMIT 21'''# ----# name: TestDashboard.test_listing_dashboards_is_not_nplus1.3+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.106'''- 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"."enforce_verified_domains",- "posthog_organization"."members_can_invite",- "posthog_organization"."members_can_create_projects",- "posthog_organization"."members_can_use_personal_api_keys",- "posthog_organization"."members_can_see_org_members",- "posthog_organization"."uses_most_specific_access_resolution",- "posthog_organization"."allow_publicly_shared_resources",- "posthog_organization"."member_notice",- "posthog_organization"."read_only_mcp_access",- "posthog_organization"."default_role_id",- "posthog_organization"."plugins_access_level",- "posthog_organization"."for_internal_metrics",- "posthog_organization"."default_anonymize_ips",- "posthog_organization"."is_pending_deletion",- "posthog_organization"."customer_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"."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"."enforce_verified_domains",+ "posthog_organization"."members_can_invite",+ "posthog_organization"."members_can_create_projects",+ "posthog_organization"."members_can_use_personal_api_keys",+ "posthog_organization"."members_can_see_org_members",+ "posthog_organization"."uses_most_specific_access_resolution",+ "posthog_organization"."allow_publicly_shared_resources",+ "posthog_organization"."member_notice",+ "posthog_organization"."read_only_mcp_access",+ "posthog_organization"."default_role_id",+ "posthog_organization"."plugins_access_level",+ "posthog_organization"."for_internal_metrics",+ "posthog_organization"."default_anonymize_ips",+ "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"."has_active_subscription",+ "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.107+ '''+ 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"."enforce_verified_domains",+ "posthog_organization"."members_can_invite",+ "posthog_organization"."members_can_create_projects",+ "posthog_organization"."members_can_use_personal_api_keys",+ "posthog_organization"."members_can_see_org_members",+ "posthog_organization"."uses_most_specific_access_resolution",+ "posthog_organization"."allow_publicly_shared_resources",+ "posthog_organization"."member_notice",+ "posthog_organization"."read_only_mcp_access",+ "posthog_organization"."default_role_id",+ "posthog_organization"."plugins_access_level",+ "posthog_organization"."for_internal_metrics",+ "posthog_organization"."default_anonymize_ips",+ "posthog_organization"."is_pending_deletion",+ "posthog_organization"."customer_id","posthog_organization"."available_product_features","posthog_organization"."usage","posthog_organization"."never_drop_data",@@ -3959,7 +4268,7 @@LIMIT 21'''# ----# name: TestDashboard.test_listing_dashboards_is_not_nplus1.30+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.108'''SELECT "ee_accesscontrol"."id","ee_accesscontrol"."team_id",@@ -3982,7 +4291,7 @@AND "ee_accesscontrol"."team_id" = 99999))'''# ----# name: TestDashboard.test_listing_dashboards_is_not_nplus1.31+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.109'''SELECT "posthog_organizationmembership"."id","posthog_organizationmembership"."organization_id",@@ -4035,267 +4344,73 @@WHERE "posthog_organizationmembership"."user_id" = 99999'''# ----# name: TestDashboard.test_listing_dashboards_is_not_nplus1.32+# 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 "ee_role"."organization_id" AS "role__organization_id",+ "ee_rolemembership"."role_id" AS "role_id"+ FROM "ee_rolemembership"+ LEFT OUTER JOIN "posthog_organizationmembership" ON ("ee_rolemembership"."organization_member_id" = "posthog_organizationmembership"."id")+ INNER JOIN "ee_role" ON ("ee_rolemembership"."role_id" = "ee_role"."id")+ WHERE ("ee_rolemembership"."user_id" = 99999+ AND ("ee_rolemembership"."organization_member_id" IS NULL+ OR "posthog_organizationmembership"."organization_id" = ("ee_role"."organization_id")))+ '''+# ---+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.111+ '''+ 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"+ 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"."resource" = 'project'+ AND "posthog_team"."organization_id" IN ('00000000-0000-0000-0000-000000000000'::uuid)+ AND ("posthog_organizationmembership"."user_id" = 99999+ OR ("ee_accesscontrol"."organization_member_id" IS NULL+ AND "ee_accesscontrol"."role_id" IS NULL)))+ '''+# ---+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.112+ '''+ SELECT "posthog_dashboard"."id" AS "id"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'))+ 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" IN (1,+ 2,+ 3,+ 4,+ 5 /* ... */))'''# ----# name: TestDashboard.test_listing_dashboards_is_not_nplus1.33- '''- 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"."customization",- "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",-- (SELECT U0."id" AS "id"- 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 1 ASC- LIMIT 1) AS "_folder_id",- 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."ui_configuration",- 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,- "posthog_dashboard"."id" ASC- LIMIT 300- '''-# ----# name: TestDashboard.test_listing_dashboards_is_not_nplus1.34- '''- 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.35- '''- SELECT "posthog_taggeditem"."id",- "posthog_taggeditem"."tag_id",- "posthog_taggeditem"."content_type_id",- "posthog_taggeditem"."object_id",- "posthog_taggeditem"."object_uuid",- "posthog_taggeditem"."team_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"."content_type_id" = 99999- AND "posthog_taggeditem"."object_id" IN (1,- 2,- 3,- 4,- 5 /* ... */))- '''-# ----# name: TestDashboard.test_listing_dashboards_is_not_nplus1.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"- FROM "ee_accesscontrol"- 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"."organization_id" = '00000000-0000-0000-0000-000000000000'::uuid- AND "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",- "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"."enforce_verified_domains",- "posthog_organization"."members_can_invite",- "posthog_organization"."members_can_create_projects",- "posthog_organization"."members_can_use_personal_api_keys",- "posthog_organization"."members_can_see_org_members",- "posthog_organization"."uses_most_specific_access_resolution",- "posthog_organization"."allow_publicly_shared_resources",- "posthog_organization"."member_notice",- "posthog_organization"."read_only_mcp_access",- "posthog_organization"."default_role_id",- "posthog_organization"."plugins_access_level",- "posthog_organization"."for_internal_metrics",- "posthog_organization"."default_anonymize_ips",- "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"."has_active_subscription",- "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_listing_dashboards_is_not_nplus1.6- '''- SELECT "posthog_dashboard"."id" AS "id"- 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" IN (1,- 2,- 3,- 4,- 5 /* ... */))- '''-# ----# name: TestDashboard.test_listing_dashboards_is_not_nplus1.7+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.113'''SELECT "posthog_dashboard"."id" AS "id","posthog_dashboard"."name" AS "name"@@ -4308,7 +4423,7 @@5 /* ... */))'''# ----# name: TestDashboard.test_listing_dashboards_is_not_nplus1.8+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.114'''SELECT COUNT(*) AS "__count"FROM "posthog_dashboardtile"@@ -4321,7 +4436,7 @@AND "posthog_dashboardtile"."deleted" IS NOT NULL))'''# ----# name: TestDashboard.test_listing_dashboards_is_not_nplus1.9+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.115'''SELECT "posthog_dashboard"."id","posthog_dashboard"."name",@@ -4354,53 +4469,106 @@5 /* ... */))'''# ----# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.116'''- 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"."ui_configuration",- "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)+ 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"."business_model"+ FROM "posthog_team"+ WHERE "posthog_team"."id" = 99999+ LIMIT 21'''# ----# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.1+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.117'''SELECT "posthog_organization"."id","posthog_organization"."name",@@ -4446,148 +4614,180 @@LIMIT 21'''# ----# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.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" = '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 "customer_analytics_teamcustomeranalyticsconfig"."team_id",- "customer_analytics_teamcustomeranalyticsconfig"."activity_event",- "customer_analytics_teamcustomeranalyticsconfig"."signup_pageview_event",- "customer_analytics_teamcustomeranalyticsconfig"."signup_event",- "customer_analytics_teamcustomeranalyticsconfig"."subscription_event",- "customer_analytics_teamcustomeranalyticsconfig"."payment_event",- "customer_analytics_teamcustomeranalyticsconfig"."account_group_type_index",- "customer_analytics_teamcustomeranalyticsconfig"."default_pinned_properties",- "customer_analytics_teamcustomeranalyticsconfig"."account_track_rules",- "customer_analytics_teamcustomeranalyticsconfig"."account_track_rules_enabled_at"- FROM "customer_analytics_teamcustomeranalyticsconfig"- WHERE "customer_analytics_teamcustomeranalyticsconfig"."team_id" = 99999- LIMIT 21- '''-# ----# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.101- '''- 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.102- '''- 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"."customization",- "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.103+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.118'''- 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"."content_type_id" = 99999- AND "posthog_taggeditem"."object_id" = 99999)+ SELECT 1 AS "a"+ FROM "posthog_sharingconfiguration"+ WHERE ("posthog_sharingconfiguration"."enabled"+ AND ("posthog_sharingconfiguration"."expires_at" IS NULL+ OR "posthog_sharingconfiguration"."expires_at" > 'SHARING-EXPIRY-TIMESTAMP'::timestamptz)+ AND "posthog_sharingconfiguration"."dashboard_id" = 99999+ AND "posthog_sharingconfiguration"."team_id" = 99999)+ LIMIT 1'''# ----# 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.119'''- 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"."ui_configuration",- "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)+ 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"."business_model"+ FROM "posthog_team"+ WHERE "posthog_team"."id" = 99999+ LIMIT 21'''# ----# 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.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_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.121+ '''+ SELECT "posthog_insightviewed"."id",+ "posthog_insightviewed"."team_id",+ "posthog_insightviewed"."user_id",+ "posthog_insightviewed"."insight_id",+ "posthog_insightviewed"."last_viewed_at",+ "posthog_insightviewed"."source",+ "posthog_insightviewed"."dashboard_id"+ FROM "posthog_insightviewed"+ WHERE ("posthog_insightviewed"."insight_id" = 99999+ AND "posthog_insightviewed"."team_id" = 99999+ AND "posthog_insightviewed"."user_id" = 99999)+ LIMIT 21+ FOR+ UPDATE+ '''+# ---+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.122'''SELECT "posthog_organization"."id","posthog_organization"."name",@@ -4633,7 +4833,7 @@LIMIT 21'''# ----# 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.123'''SELECT "posthog_team"."id","posthog_team"."uuid",@@ -4726,276 +4926,156 @@"posthog_team"."api_query_rate_limit","posthog_team"."drop_events_older_than","posthog_team"."base_currency",- "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"."enforce_verified_domains",- "posthog_organization"."members_can_invite",- "posthog_organization"."members_can_create_projects",- "posthog_organization"."members_can_use_personal_api_keys",- "posthog_organization"."members_can_see_org_members",- "posthog_organization"."uses_most_specific_access_resolution",- "posthog_organization"."allow_publicly_shared_resources",- "posthog_organization"."member_notice",- "posthog_organization"."read_only_mcp_access",- "posthog_organization"."default_role_id",- "posthog_organization"."plugins_access_level",- "posthog_organization"."for_internal_metrics",- "posthog_organization"."default_anonymize_ips",- "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"."has_active_subscription",- "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" = 99999LIMIT 21'''# ----# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.107+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.124'''- 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"."enforce_verified_domains",- "posthog_organization"."members_can_invite",- "posthog_organization"."members_can_create_projects",- "posthog_organization"."members_can_use_personal_api_keys",- "posthog_organization"."members_can_see_org_members",- "posthog_organization"."uses_most_specific_access_resolution",- "posthog_organization"."allow_publicly_shared_resources",- "posthog_organization"."member_notice",- "posthog_organization"."read_only_mcp_access",- "posthog_organization"."default_role_id",- "posthog_organization"."plugins_access_level",- "posthog_organization"."for_internal_metrics",- "posthog_organization"."default_anonymize_ips",- "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"."has_active_subscription",- "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.108- '''- 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"- FROM "ee_accesscontrol"- 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"."organization_id" = '00000000-0000-0000-0000-000000000000'::uuid- AND "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.109- '''- 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"."enforce_verified_domains",- "posthog_organization"."members_can_invite",- "posthog_organization"."members_can_create_projects",- "posthog_organization"."members_can_use_personal_api_keys",- "posthog_organization"."members_can_see_org_members",- "posthog_organization"."uses_most_specific_access_resolution",- "posthog_organization"."allow_publicly_shared_resources",- "posthog_organization"."member_notice",- "posthog_organization"."read_only_mcp_access",- "posthog_organization"."default_role_id",- "posthog_organization"."plugins_access_level",- "posthog_organization"."for_internal_metrics",- "posthog_organization"."default_anonymize_ips",- "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"."has_active_subscription",- "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"."group_key",+ "posthog_dashboardtile"."badge",+ "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.11+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.125'''- 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"."group_key",+ "posthog_dashboardtile"."badge",+ "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" = 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.126'''- SELECT "ee_role"."organization_id" AS "role__organization_id",- "ee_rolemembership"."role_id" AS "role_id"- FROM "ee_rolemembership"- LEFT OUTER JOIN "posthog_organizationmembership" ON ("ee_rolemembership"."organization_member_id" = "posthog_organizationmembership"."id")- INNER JOIN "ee_role" ON ("ee_rolemembership"."role_id" = "ee_role"."id")- WHERE ("ee_rolemembership"."user_id" = 99999- AND ("ee_rolemembership"."organization_member_id" IS NULL- OR "posthog_organizationmembership"."organization_id" = ("ee_role"."organization_id")))+ SELECT "posthog_insightvariable"."id",+ "posthog_insightvariable"."name",+ "posthog_insightvariable"."code_name",+ "posthog_insightvariable"."type",+ "posthog_insightvariable"."default_value",+ "posthog_insightvariable"."is_multi"+ FROM "posthog_insightvariable"+ INNER JOIN "posthog_team" ON ("posthog_insightvariable"."team_id" = "posthog_team"."id")+ WHERE ("posthog_insightvariable"."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_insightvariable"."team_id" = 99999))+ ORDER BY "posthog_insightvariable"."name" ASC'''# ----# 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.127'''- 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"- 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"."resource" = 'project'- AND "posthog_team"."organization_id" IN ('00000000-0000-0000-0000-000000000000'::uuid)- AND ("posthog_organizationmembership"."user_id" = 99999- OR ("ee_accesscontrol"."organization_member_id" IS NULL- AND "ee_accesscontrol"."role_id" IS NULL)))+ SELECT "posthog_teamrevenueanalyticsconfig"."team_id",+ "posthog_teamrevenueanalyticsconfig"."filter_test_accounts",+ "posthog_teamrevenueanalyticsconfig"."notified_first_sync",+ "posthog_teamrevenueanalyticsconfig"."events",+ "posthog_teamrevenueanalyticsconfig"."goals",+ "posthog_teamrevenueanalyticsconfig"."base_currency"+ FROM "posthog_teamrevenueanalyticsconfig"+ WHERE "posthog_teamrevenueanalyticsconfig"."team_id" = 99999+ LIMIT 21'''# ----# 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.128'''- SELECT "posthog_dashboard"."id" AS "id"- 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" IN (1,- 2,- 3,- 4,- 5 /* ... */))+ SELECT "posthog_teammarketinganalyticsconfig"."team_id",+ "posthog_teammarketinganalyticsconfig"."attribution_window_days",+ "posthog_teammarketinganalyticsconfig"."attribution_mode",+ "posthog_teammarketinganalyticsconfig"."filter_test_accounts",+ "posthog_teammarketinganalyticsconfig"."sources_map",+ "posthog_teammarketinganalyticsconfig"."conversion_goals",+ "posthog_teammarketinganalyticsconfig"."campaign_name_mappings",+ "posthog_teammarketinganalyticsconfig"."custom_source_mappings",+ "posthog_teammarketinganalyticsconfig"."campaign_field_preferences"+ FROM "posthog_teammarketinganalyticsconfig"+ WHERE "posthog_teammarketinganalyticsconfig"."team_id" = 99999+ LIMIT 21'''# ----# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.113+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.129'''- SELECT "posthog_dashboard"."id" AS "id",- "posthog_dashboard"."name" AS "name"- FROM "posthog_dashboard"- WHERE (NOT ("posthog_dashboard"."deleted")- AND "posthog_dashboard"."id" IN (1,- 2,- 3,- 4,- 5 /* ... */))+ SELECT "customer_analytics_teamcustomeranalyticsconfig"."team_id",+ "customer_analytics_teamcustomeranalyticsconfig"."activity_event",+ "customer_analytics_teamcustomeranalyticsconfig"."signup_pageview_event",+ "customer_analytics_teamcustomeranalyticsconfig"."signup_event",+ "customer_analytics_teamcustomeranalyticsconfig"."subscription_event",+ "customer_analytics_teamcustomeranalyticsconfig"."payment_event",+ "customer_analytics_teamcustomeranalyticsconfig"."account_group_type_index",+ "customer_analytics_teamcustomeranalyticsconfig"."default_pinned_properties",+ "customer_analytics_teamcustomeranalyticsconfig"."account_track_rules",+ "customer_analytics_teamcustomeranalyticsconfig"."account_track_rules_enabled_at"+ FROM "customer_analytics_teamcustomeranalyticsconfig"+ WHERE "customer_analytics_teamcustomeranalyticsconfig"."team_id" = 99999+ LIMIT 21'''# ----# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.114+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.13'''SELECT COUNT(*) AS "__count"- FROM "posthog_dashboardtile"+ FROM "posthog_taggeditem"+ WHERE ("posthog_taggeditem"."content_type_id" = 99999+ AND "posthog_taggeditem"."object_id" = 99999)+ '''+# ---+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.130+ '''+ 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"."deleted"- AND "posthog_dashboardtile"."deleted" IS NOT NULL))+ AND "posthog_dashboardtile"."insight_id" = 99999)'''# ----# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.115+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.131'''SELECT "posthog_dashboard"."id","posthog_dashboard"."name",@@ -5028,106 +5108,62 @@5 /* ... */))'''# ----# 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.132'''- 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"."business_model"- FROM "posthog_team"- WHERE "posthog_team"."id" = 99999- LIMIT 21+ 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"."content_type_id" = 99999+ AND "posthog_taggeditem"."object_id" = 99999)'''# ----# 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.133+ '''+ 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"."ui_configuration",+ "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.134'''SELECT "posthog_organization"."id","posthog_organization"."name",@@ -5173,19 +5209,7 @@LIMIT 21'''# ----# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.118- '''- SELECT 1 AS "a"- FROM "posthog_sharingconfiguration"- WHERE ("posthog_sharingconfiguration"."enabled"- AND ("posthog_sharingconfiguration"."expires_at" IS NULL- OR "posthog_sharingconfiguration"."expires_at" > 'SHARING-EXPIRY-TIMESTAMP'::timestamptz)- AND "posthog_sharingconfiguration"."dashboard_id" = 99999- AND "posthog_sharingconfiguration"."team_id" = 99999)- LIMIT 1- '''-# ----# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.119+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.135'''SELECT "posthog_team"."id","posthog_team"."uuid",@@ -5278,77 +5302,8 @@"posthog_team"."api_query_rate_limit","posthog_team"."drop_events_older_than","posthog_team"."base_currency",- "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.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_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.121- '''- SELECT "posthog_insightviewed"."id",- "posthog_insightviewed"."team_id",- "posthog_insightviewed"."user_id",- "posthog_insightviewed"."insight_id",- "posthog_insightviewed"."last_viewed_at",- "posthog_insightviewed"."source",- "posthog_insightviewed"."dashboard_id"- FROM "posthog_insightviewed"- WHERE ("posthog_insightviewed"."insight_id" = 99999- AND "posthog_insightviewed"."team_id" = 99999- AND "posthog_insightviewed"."user_id" = 99999)- LIMIT 21- FOR- UPDATE- '''-# ----# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.122- '''- SELECT "posthog_organization"."id",+ "posthog_team"."business_model",+ "posthog_organization"."id","posthog_organization"."name","posthog_organization"."slug","posthog_organization"."logo_media_id",@@ -5387,254 +5342,240 @@"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.123- '''- 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"."business_model"FROM "posthog_team"+ INNER JOIN "posthog_organization" ON ("posthog_team"."organization_id" = "posthog_organization"."id")WHERE "posthog_team"."id" = 99999LIMIT 21'''# ----# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.124- '''- 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"."group_key",- "posthog_dashboardtile"."badge",- "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.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"."group_key",- "posthog_dashboardtile"."badge",- "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.126+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.136'''- SELECT "posthog_insightvariable"."id",- "posthog_insightvariable"."name",- "posthog_insightvariable"."code_name",- "posthog_insightvariable"."type",- "posthog_insightvariable"."default_value",- "posthog_insightvariable"."is_multi"- FROM "posthog_insightvariable"- INNER JOIN "posthog_team" ON ("posthog_insightvariable"."team_id" = "posthog_team"."id")- WHERE ("posthog_insightvariable"."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_insightvariable"."team_id" = 99999))- ORDER BY "posthog_insightvariable"."name" ASC+ 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"."enforce_verified_domains",+ "posthog_organization"."members_can_invite",+ "posthog_organization"."members_can_create_projects",+ "posthog_organization"."members_can_use_personal_api_keys",+ "posthog_organization"."members_can_see_org_members",+ "posthog_organization"."uses_most_specific_access_resolution",+ "posthog_organization"."allow_publicly_shared_resources",+ "posthog_organization"."member_notice",+ "posthog_organization"."read_only_mcp_access",+ "posthog_organization"."default_role_id",+ "posthog_organization"."plugins_access_level",+ "posthog_organization"."for_internal_metrics",+ "posthog_organization"."default_anonymize_ips",+ "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"."has_active_subscription",+ "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.127+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.137'''- SELECT "posthog_teamrevenueanalyticsconfig"."team_id",- "posthog_teamrevenueanalyticsconfig"."filter_test_accounts",- "posthog_teamrevenueanalyticsconfig"."notified_first_sync",- "posthog_teamrevenueanalyticsconfig"."events",- "posthog_teamrevenueanalyticsconfig"."goals",- "posthog_teamrevenueanalyticsconfig"."base_currency"- FROM "posthog_teamrevenueanalyticsconfig"- WHERE "posthog_teamrevenueanalyticsconfig"."team_id" = 99999- LIMIT 21+ 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"+ FROM "ee_accesscontrol"+ 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"."organization_id" = '00000000-0000-0000-0000-000000000000'::uuid+ AND "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.128+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.138'''- SELECT "posthog_teammarketinganalyticsconfig"."team_id",- "posthog_teammarketinganalyticsconfig"."attribution_window_days",- "posthog_teammarketinganalyticsconfig"."attribution_mode",- "posthog_teammarketinganalyticsconfig"."filter_test_accounts",- "posthog_teammarketinganalyticsconfig"."sources_map",- "posthog_teammarketinganalyticsconfig"."conversion_goals",- "posthog_teammarketinganalyticsconfig"."campaign_name_mappings",- "posthog_teammarketinganalyticsconfig"."custom_source_mappings",- "posthog_teammarketinganalyticsconfig"."campaign_field_preferences"- FROM "posthog_teammarketinganalyticsconfig"- WHERE "posthog_teammarketinganalyticsconfig"."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"."enforce_verified_domains",+ "posthog_organization"."members_can_invite",+ "posthog_organization"."members_can_create_projects",+ "posthog_organization"."members_can_use_personal_api_keys",+ "posthog_organization"."members_can_see_org_members",+ "posthog_organization"."uses_most_specific_access_resolution",+ "posthog_organization"."allow_publicly_shared_resources",+ "posthog_organization"."member_notice",+ "posthog_organization"."read_only_mcp_access",+ "posthog_organization"."default_role_id",+ "posthog_organization"."plugins_access_level",+ "posthog_organization"."for_internal_metrics",+ "posthog_organization"."default_anonymize_ips",+ "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"."has_active_subscription",+ "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.129+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.139'''- SELECT "customer_analytics_teamcustomeranalyticsconfig"."team_id",- "customer_analytics_teamcustomeranalyticsconfig"."activity_event",- "customer_analytics_teamcustomeranalyticsconfig"."signup_pageview_event",- "customer_analytics_teamcustomeranalyticsconfig"."signup_event",- "customer_analytics_teamcustomeranalyticsconfig"."subscription_event",- "customer_analytics_teamcustomeranalyticsconfig"."payment_event",- "customer_analytics_teamcustomeranalyticsconfig"."account_group_type_index",- "customer_analytics_teamcustomeranalyticsconfig"."default_pinned_properties",- "customer_analytics_teamcustomeranalyticsconfig"."account_track_rules",- "customer_analytics_teamcustomeranalyticsconfig"."account_track_rules_enabled_at"- FROM "customer_analytics_teamcustomeranalyticsconfig"- WHERE "customer_analytics_teamcustomeranalyticsconfig"."team_id" = 99999- LIMIT 21+ SELECT "ee_role"."organization_id" AS "role__organization_id",+ "ee_rolemembership"."role_id" AS "role_id"+ FROM "ee_rolemembership"+ LEFT OUTER JOIN "posthog_organizationmembership" ON ("ee_rolemembership"."organization_member_id" = "posthog_organizationmembership"."id")+ INNER JOIN "ee_role" ON ("ee_rolemembership"."role_id" = "ee_role"."id")+ WHERE ("ee_rolemembership"."user_id" = 99999+ AND ("ee_rolemembership"."organization_member_id" IS NULL+ OR "posthog_organizationmembership"."organization_id" = ("ee_role"."organization_id")))'''# ----# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.13+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.14'''- SELECT COUNT(*) AS "__count"- FROM "posthog_taggeditem"- WHERE ("posthog_taggeditem"."content_type_id" = 99999- AND "posthog_taggeditem"."object_id" = 99999)+ SELECT "posthog_filesystem"."id" AS "id",+ "posthog_filesystem"."path" AS "path"+ 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))+ ORDER BY 1 ASC+ LIMIT 1'''# ----# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.130+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.140'''- SELECT "posthog_dashboardtile"."dashboard_id" AS "dashboard_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"+ 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"."resource" = 'project'+ AND "posthog_team"."organization_id" IN ('00000000-0000-0000-0000-000000000000'::uuid)+ AND ("posthog_organizationmembership"."user_id" = 99999+ OR ("ee_accesscontrol"."organization_member_id" IS NULL+ AND "ee_accesscontrol"."role_id" IS NULL)))+ '''+# ---+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.141+ '''+ SELECT "posthog_dashboard"."id" AS "id"+ 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" IN (1,+ 2,+ 3,+ 4,+ 5 /* ... */))+ '''+# ---+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.142+ '''+ SELECT "posthog_dashboard"."id" AS "id",+ "posthog_dashboard"."name" AS "name"+ 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.143+ '''+ 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"."insight_id" = 99999)+ 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.131+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.144'''SELECT "posthog_dashboard"."id","posthog_dashboard"."name",@@ -5667,108 +5608,7 @@5 /* ... */))'''# ----# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.132- '''- 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"."content_type_id" = 99999- AND "posthog_taggeditem"."object_id" = 99999)- '''-# ----# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.133- '''- 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"."ui_configuration",- "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.134- '''- 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"."enforce_verified_domains",- "posthog_organization"."members_can_invite",- "posthog_organization"."members_can_create_projects",- "posthog_organization"."members_can_use_personal_api_keys",- "posthog_organization"."members_can_see_org_members",- "posthog_organization"."uses_most_specific_access_resolution",- "posthog_organization"."allow_publicly_shared_resources",- "posthog_organization"."member_notice",- "posthog_organization"."read_only_mcp_access",- "posthog_organization"."default_role_id",- "posthog_organization"."plugins_access_level",- "posthog_organization"."for_internal_metrics",- "posthog_organization"."default_anonymize_ips",- "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"."has_active_subscription",- "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.135+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.145'''SELECT "posthog_team"."id","posthog_team"."uuid",@@ -5861,8 +5701,15 @@"posthog_team"."api_query_rate_limit","posthog_team"."drop_events_older_than","posthog_team"."base_currency",- "posthog_team"."business_model",- "posthog_organization"."id",+ "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.146+ '''+ SELECT "posthog_organization"."id","posthog_organization"."name","posthog_organization"."slug","posthog_organization"."logo_media_id",@@ -5901,22 +5748,184 @@"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.147+ '''+ SELECT 1 AS "a"+ FROM "posthog_sharingconfiguration"+ WHERE ("posthog_sharingconfiguration"."enabled"+ AND ("posthog_sharingconfiguration"."expires_at" IS NULL+ OR "posthog_sharingconfiguration"."expires_at" > 'SHARING-EXPIRY-TIMESTAMP'::timestamptz)+ AND "posthog_sharingconfiguration"."dashboard_id" = 99999+ AND "posthog_sharingconfiguration"."team_id" = 99999)+ LIMIT 1+ '''+# ---+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.148+ '''+ 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"."business_model"FROM "posthog_team"- INNER JOIN "posthog_organization" ON ("posthog_team"."organization_id" = "posthog_organization"."id")WHERE "posthog_team"."id" = 99999LIMIT 21'''# ----# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.136+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.149'''- 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_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.15+ '''+ SELECT "posthog_filesystem"."id" AS "id",+ "posthog_filesystem"."path" AS "path"+ 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))+ ORDER BY 1 ASC+ LIMIT 1+ '''+# ---+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.150+ '''+ SELECT "posthog_insightviewed"."id",+ "posthog_insightviewed"."team_id",+ "posthog_insightviewed"."user_id",+ "posthog_insightviewed"."insight_id",+ "posthog_insightviewed"."last_viewed_at",+ "posthog_insightviewed"."source",+ "posthog_insightviewed"."dashboard_id"+ FROM "posthog_insightviewed"+ WHERE ("posthog_insightviewed"."insight_id" = 99999+ AND "posthog_insightviewed"."team_id" = 99999+ AND "posthog_insightviewed"."user_id" = 99999)+ LIMIT 21+ FOR+ UPDATE+ '''+# ---+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.151+ '''+ SELECT "posthog_organization"."id","posthog_organization"."name","posthog_organization"."slug","posthog_organization"."logo_media_id",@@ -5955,219 +5964,12 @@"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'::uuidLIMIT 21'''# ----# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.137- '''- 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"- FROM "ee_accesscontrol"- 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"."organization_id" = '00000000-0000-0000-0000-000000000000'::uuid- AND "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.138- '''- 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"."enforce_verified_domains",- "posthog_organization"."members_can_invite",- "posthog_organization"."members_can_create_projects",- "posthog_organization"."members_can_use_personal_api_keys",- "posthog_organization"."members_can_see_org_members",- "posthog_organization"."uses_most_specific_access_resolution",- "posthog_organization"."allow_publicly_shared_resources",- "posthog_organization"."member_notice",- "posthog_organization"."read_only_mcp_access",- "posthog_organization"."default_role_id",- "posthog_organization"."plugins_access_level",- "posthog_organization"."for_internal_metrics",- "posthog_organization"."default_anonymize_ips",- "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"."has_active_subscription",- "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.139- '''- SELECT "ee_role"."organization_id" AS "role__organization_id",- "ee_rolemembership"."role_id" AS "role_id"- FROM "ee_rolemembership"- LEFT OUTER JOIN "posthog_organizationmembership" ON ("ee_rolemembership"."organization_member_id" = "posthog_organizationmembership"."id")- INNER JOIN "ee_role" ON ("ee_rolemembership"."role_id" = "ee_role"."id")- WHERE ("ee_rolemembership"."user_id" = 99999- AND ("ee_rolemembership"."organization_member_id" IS NULL- OR "posthog_organizationmembership"."organization_id" = ("ee_role"."organization_id")))- '''-# ----# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.14- '''- SELECT "posthog_filesystem"."id" AS "id",- "posthog_filesystem"."path" AS "path"- 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))- ORDER BY 1 ASC- LIMIT 1- '''-# ----# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.140- '''- 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"- 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"."resource" = 'project'- AND "posthog_team"."organization_id" IN ('00000000-0000-0000-0000-000000000000'::uuid)- AND ("posthog_organizationmembership"."user_id" = 99999- OR ("ee_accesscontrol"."organization_member_id" IS NULL- AND "ee_accesscontrol"."role_id" IS NULL)))- '''-# ----# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.141- '''- SELECT "posthog_dashboard"."id" AS "id"- 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" IN (1,- 2,- 3,- 4,- 5 /* ... */))- '''-# ----# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.142- '''- SELECT "posthog_dashboard"."id" AS "id",- "posthog_dashboard"."name" AS "name"- 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.143- '''- 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.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"."customization",- "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.145+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.152'''SELECT "posthog_team"."id","posthog_team"."uuid",@@ -6266,189 +6068,142 @@LIMIT 21'''# ----# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.146- '''- 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"."enforce_verified_domains",- "posthog_organization"."members_can_invite",- "posthog_organization"."members_can_create_projects",- "posthog_organization"."members_can_use_personal_api_keys",- "posthog_organization"."members_can_see_org_members",- "posthog_organization"."uses_most_specific_access_resolution",- "posthog_organization"."allow_publicly_shared_resources",- "posthog_organization"."member_notice",- "posthog_organization"."read_only_mcp_access",- "posthog_organization"."default_role_id",- "posthog_organization"."plugins_access_level",- "posthog_organization"."for_internal_metrics",- "posthog_organization"."default_anonymize_ips",- "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"."has_active_subscription",- "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.147+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.153'''- SELECT 1 AS "a"- FROM "posthog_sharingconfiguration"- WHERE ("posthog_sharingconfiguration"."enabled"- AND ("posthog_sharingconfiguration"."expires_at" IS NULL- OR "posthog_sharingconfiguration"."expires_at" > 'SHARING-EXPIRY-TIMESTAMP'::timestamptz)- AND "posthog_sharingconfiguration"."dashboard_id" = 99999- AND "posthog_sharingconfiguration"."team_id" = 99999)- LIMIT 1+ 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"."group_key",+ "posthog_dashboardtile"."badge",+ "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.148+# 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"."business_model"- FROM "posthog_team"- WHERE "posthog_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"."group_key",+ "posthog_dashboardtile"."badge",+ "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.155+ '''+ SELECT "posthog_insightvariable"."id",+ "posthog_insightvariable"."name",+ "posthog_insightvariable"."code_name",+ "posthog_insightvariable"."type",+ "posthog_insightvariable"."default_value",+ "posthog_insightvariable"."is_multi"+ FROM "posthog_insightvariable"+ INNER JOIN "posthog_team" ON ("posthog_insightvariable"."team_id" = "posthog_team"."id")+ WHERE ("posthog_insightvariable"."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_insightvariable"."team_id" = 99999))+ ORDER BY "posthog_insightvariable"."name" ASC+ '''+# ---+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.156+ '''+ SELECT "posthog_teamrevenueanalyticsconfig"."team_id",+ "posthog_teamrevenueanalyticsconfig"."filter_test_accounts",+ "posthog_teamrevenueanalyticsconfig"."notified_first_sync",+ "posthog_teamrevenueanalyticsconfig"."events",+ "posthog_teamrevenueanalyticsconfig"."goals",+ "posthog_teamrevenueanalyticsconfig"."base_currency"+ FROM "posthog_teamrevenueanalyticsconfig"+ WHERE "posthog_teamrevenueanalyticsconfig"."team_id" = 99999LIMIT 21'''# ----# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.149+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.157'''- 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_teammarketinganalyticsconfig"."team_id",+ "posthog_teammarketinganalyticsconfig"."attribution_window_days",+ "posthog_teammarketinganalyticsconfig"."attribution_mode",+ "posthog_teammarketinganalyticsconfig"."filter_test_accounts",+ "posthog_teammarketinganalyticsconfig"."sources_map",+ "posthog_teammarketinganalyticsconfig"."conversion_goals",+ "posthog_teammarketinganalyticsconfig"."campaign_name_mappings",+ "posthog_teammarketinganalyticsconfig"."custom_source_mappings",+ "posthog_teammarketinganalyticsconfig"."campaign_field_preferences"+ FROM "posthog_teammarketinganalyticsconfig"+ WHERE "posthog_teammarketinganalyticsconfig"."team_id" = 99999+ LIMIT 21'''# ----# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.15+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.158+ '''+ SELECT "customer_analytics_teamcustomeranalyticsconfig"."team_id",+ "customer_analytics_teamcustomeranalyticsconfig"."activity_event",+ "customer_analytics_teamcustomeranalyticsconfig"."signup_pageview_event",+ "customer_analytics_teamcustomeranalyticsconfig"."signup_event",+ "customer_analytics_teamcustomeranalyticsconfig"."subscription_event",+ "customer_analytics_teamcustomeranalyticsconfig"."payment_event",+ "customer_analytics_teamcustomeranalyticsconfig"."account_group_type_index",+ "customer_analytics_teamcustomeranalyticsconfig"."default_pinned_properties",+ "customer_analytics_teamcustomeranalyticsconfig"."account_track_rules",+ "customer_analytics_teamcustomeranalyticsconfig"."account_track_rules_enabled_at"+ FROM "customer_analytics_teamcustomeranalyticsconfig"+ WHERE "customer_analytics_teamcustomeranalyticsconfig"."team_id" = 99999+ LIMIT 21+ '''+# ---+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.159+ '''+ 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.16'''SELECT "posthog_filesystem"."id" AS "id","posthog_filesystem"."path" AS "path"@@ -6464,29 +6219,99 @@LIMIT 1'''# ----# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.150+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.160'''- SELECT "posthog_insightviewed"."id",- "posthog_insightviewed"."team_id",- "posthog_insightviewed"."user_id",- "posthog_insightviewed"."insight_id",- "posthog_insightviewed"."last_viewed_at",- "posthog_insightviewed"."source",- "posthog_insightviewed"."dashboard_id"- FROM "posthog_insightviewed"- WHERE ("posthog_insightviewed"."insight_id" = 99999- AND "posthog_insightviewed"."team_id" = 99999- AND "posthog_insightviewed"."user_id" = 99999)- LIMIT 21- FOR- UPDATE+ 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"."customization",+ "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.151+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.161'''- SELECT "posthog_organization"."id",- "posthog_organization"."name",- "posthog_organization"."slug",+ 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"."content_type_id" = 99999+ AND "posthog_taggeditem"."object_id" = 99999)+ '''+# ---+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.162+ '''+ 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"."ui_configuration",+ "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.163+ '''+ SELECT "posthog_organization"."id",+ "posthog_organization"."name",+ "posthog_organization"."slug","posthog_organization"."logo_media_id","posthog_organization"."created_at","posthog_organization"."updated_at",@@ -6528,7 +6353,7 @@LIMIT 21'''# ----# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.152+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.164'''SELECT "posthog_team"."id","posthog_team"."uuid",@@ -6621,524 +6446,140 @@"posthog_team"."api_query_rate_limit","posthog_team"."drop_events_older_than","posthog_team"."base_currency",- "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"."enforce_verified_domains",+ "posthog_organization"."members_can_invite",+ "posthog_organization"."members_can_create_projects",+ "posthog_organization"."members_can_use_personal_api_keys",+ "posthog_organization"."members_can_see_org_members",+ "posthog_organization"."uses_most_specific_access_resolution",+ "posthog_organization"."allow_publicly_shared_resources",+ "posthog_organization"."member_notice",+ "posthog_organization"."read_only_mcp_access",+ "posthog_organization"."default_role_id",+ "posthog_organization"."plugins_access_level",+ "posthog_organization"."for_internal_metrics",+ "posthog_organization"."default_anonymize_ips",+ "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"."has_active_subscription",+ "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" = 99999LIMIT 21'''# ----# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.153- '''- 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"."group_key",- "posthog_dashboardtile"."badge",- "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.154+# 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"."group_key",- "posthog_dashboardtile"."badge",- "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"."enforce_verified_domains",+ "posthog_organization"."members_can_invite",+ "posthog_organization"."members_can_create_projects",+ "posthog_organization"."members_can_use_personal_api_keys",+ "posthog_organization"."members_can_see_org_members",+ "posthog_organization"."uses_most_specific_access_resolution",+ "posthog_organization"."allow_publicly_shared_resources",+ "posthog_organization"."member_notice",+ "posthog_organization"."read_only_mcp_access",+ "posthog_organization"."default_role_id",+ "posthog_organization"."plugins_access_level",+ "posthog_organization"."for_internal_metrics",+ "posthog_organization"."default_anonymize_ips",+ "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"."has_active_subscription",+ "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.155+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.166'''- SELECT "posthog_insightvariable"."id",- "posthog_insightvariable"."name",- "posthog_insightvariable"."code_name",- "posthog_insightvariable"."type",- "posthog_insightvariable"."default_value",- "posthog_insightvariable"."is_multi"- FROM "posthog_insightvariable"- INNER JOIN "posthog_team" ON ("posthog_insightvariable"."team_id" = "posthog_team"."id")- WHERE ("posthog_insightvariable"."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_insightvariable"."team_id" = 99999))- ORDER BY "posthog_insightvariable"."name" ASC+ 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"+ FROM "ee_accesscontrol"+ 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"."organization_id" = '00000000-0000-0000-0000-000000000000'::uuid+ AND "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.156+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.167'''- SELECT "posthog_teamrevenueanalyticsconfig"."team_id",- "posthog_teamrevenueanalyticsconfig"."filter_test_accounts",- "posthog_teamrevenueanalyticsconfig"."notified_first_sync",- "posthog_teamrevenueanalyticsconfig"."events",- "posthog_teamrevenueanalyticsconfig"."goals",- "posthog_teamrevenueanalyticsconfig"."base_currency"- FROM "posthog_teamrevenueanalyticsconfig"- WHERE "posthog_teamrevenueanalyticsconfig"."team_id" = 99999- LIMIT 21- '''-# ----# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.157- '''- SELECT "posthog_teammarketinganalyticsconfig"."team_id",- "posthog_teammarketinganalyticsconfig"."attribution_window_days",- "posthog_teammarketinganalyticsconfig"."attribution_mode",- "posthog_teammarketinganalyticsconfig"."filter_test_accounts",- "posthog_teammarketinganalyticsconfig"."sources_map",- "posthog_teammarketinganalyticsconfig"."conversion_goals",- "posthog_teammarketinganalyticsconfig"."campaign_name_mappings",- "posthog_teammarketinganalyticsconfig"."custom_source_mappings",- "posthog_teammarketinganalyticsconfig"."campaign_field_preferences"- FROM "posthog_teammarketinganalyticsconfig"- WHERE "posthog_teammarketinganalyticsconfig"."team_id" = 99999- LIMIT 21- '''-# ----# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.158- '''- SELECT "customer_analytics_teamcustomeranalyticsconfig"."team_id",- "customer_analytics_teamcustomeranalyticsconfig"."activity_event",- "customer_analytics_teamcustomeranalyticsconfig"."signup_pageview_event",- "customer_analytics_teamcustomeranalyticsconfig"."signup_event",- "customer_analytics_teamcustomeranalyticsconfig"."subscription_event",- "customer_analytics_teamcustomeranalyticsconfig"."payment_event",- "customer_analytics_teamcustomeranalyticsconfig"."account_group_type_index",- "customer_analytics_teamcustomeranalyticsconfig"."default_pinned_properties",- "customer_analytics_teamcustomeranalyticsconfig"."account_track_rules",- "customer_analytics_teamcustomeranalyticsconfig"."account_track_rules_enabled_at"- FROM "customer_analytics_teamcustomeranalyticsconfig"- WHERE "customer_analytics_teamcustomeranalyticsconfig"."team_id" = 99999- LIMIT 21- '''-# ----# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.159- '''- 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.16- '''- SELECT "posthog_filesystem"."id" AS "id",- "posthog_filesystem"."path" AS "path"- 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))- ORDER BY 1 ASC- LIMIT 1- '''-# ----# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.160- '''- 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"."customization",- "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.161- '''- 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"."content_type_id" = 99999- AND "posthog_taggeditem"."object_id" = 99999)- '''-# ----# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.162- '''- 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"."ui_configuration",- "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.163- '''- 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"."enforce_verified_domains",- "posthog_organization"."members_can_invite",- "posthog_organization"."members_can_create_projects",- "posthog_organization"."members_can_use_personal_api_keys",- "posthog_organization"."members_can_see_org_members",- "posthog_organization"."uses_most_specific_access_resolution",- "posthog_organization"."allow_publicly_shared_resources",- "posthog_organization"."member_notice",- "posthog_organization"."read_only_mcp_access",- "posthog_organization"."default_role_id",- "posthog_organization"."plugins_access_level",- "posthog_organization"."for_internal_metrics",- "posthog_organization"."default_anonymize_ips",- "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"."has_active_subscription",- "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.164- '''- 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"."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"."enforce_verified_domains",- "posthog_organization"."members_can_invite",- "posthog_organization"."members_can_create_projects",- "posthog_organization"."members_can_use_personal_api_keys",- "posthog_organization"."members_can_see_org_members",- "posthog_organization"."uses_most_specific_access_resolution",- "posthog_organization"."allow_publicly_shared_resources",- "posthog_organization"."member_notice",- "posthog_organization"."read_only_mcp_access",- "posthog_organization"."default_role_id",- "posthog_organization"."plugins_access_level",- "posthog_organization"."for_internal_metrics",- "posthog_organization"."default_anonymize_ips",- "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"."has_active_subscription",- "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.165- '''- 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"."enforce_verified_domains",- "posthog_organization"."members_can_invite",- "posthog_organization"."members_can_create_projects",- "posthog_organization"."members_can_use_personal_api_keys",- "posthog_organization"."members_can_see_org_members",- "posthog_organization"."uses_most_specific_access_resolution",- "posthog_organization"."allow_publicly_shared_resources",- "posthog_organization"."member_notice",- "posthog_organization"."read_only_mcp_access",- "posthog_organization"."default_role_id",- "posthog_organization"."plugins_access_level",- "posthog_organization"."for_internal_metrics",- "posthog_organization"."default_anonymize_ips",- "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"."has_active_subscription",- "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.166- '''- 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"- FROM "ee_accesscontrol"- 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"."organization_id" = '00000000-0000-0000-0000-000000000000'::uuid- AND "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.167- '''- 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_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",@@ -7179,627 +6620,63 @@"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.168- '''- SELECT "ee_role"."organization_id" AS "role__organization_id",- "ee_rolemembership"."role_id" AS "role_id"- FROM "ee_rolemembership"- LEFT OUTER JOIN "posthog_organizationmembership" ON ("ee_rolemembership"."organization_member_id" = "posthog_organizationmembership"."id")- INNER JOIN "ee_role" ON ("ee_rolemembership"."role_id" = "ee_role"."id")- WHERE ("ee_rolemembership"."user_id" = 99999- AND ("ee_rolemembership"."organization_member_id" IS NULL- OR "posthog_organizationmembership"."organization_id" = ("ee_role"."organization_id")))- '''-# ----# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.169- '''- 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"- 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"."resource" = 'project'- AND "posthog_team"."organization_id" IN ('00000000-0000-0000-0000-000000000000'::uuid)- AND ("posthog_organizationmembership"."user_id" = 99999- OR ("ee_accesscontrol"."organization_member_id" IS NULL- AND "ee_accesscontrol"."role_id" IS NULL)))- '''-# ----# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.17- '''- 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.170- '''- 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"."customization",- "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",-- (SELECT U0."id" AS "id"- 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 1 ASC- LIMIT 1) AS "_folder_id",- 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."ui_configuration",- 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.171- '''- 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.172- '''- 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"."group_key",- "posthog_dashboardtile"."badge",- "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"."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"."ui_configuration",- "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."ui_configuration",- 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"."agent_context",- "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."ui_configuration",- 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."ui_configuration",- 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+ WHERE "posthog_organizationmembership"."user_id" = 99999'''# ----# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.173+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.168'''- 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"."customization",- "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 "ee_role"."organization_id" AS "role__organization_id",+ "ee_rolemembership"."role_id" AS "role_id"+ FROM "ee_rolemembership"+ LEFT OUTER JOIN "posthog_organizationmembership" ON ("ee_rolemembership"."organization_member_id" = "posthog_organizationmembership"."id")+ INNER JOIN "ee_role" ON ("ee_rolemembership"."role_id" = "ee_role"."id")+ WHERE ("ee_rolemembership"."user_id" = 99999+ AND ("ee_rolemembership"."organization_member_id" IS NULL+ OR "posthog_organizationmembership"."organization_id" = ("ee_role"."organization_id")))'''# ----# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.174+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.169'''- 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"."group_key",- "posthog_dashboardtile"."badge",- "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 /* ... */))+ 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"+ 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"."resource" = 'project'+ AND "posthog_team"."organization_id" IN ('00000000-0000-0000-0000-000000000000'::uuid)+ AND ("posthog_organizationmembership"."user_id" = 99999+ OR ("ee_accesscontrol"."organization_member_id" IS NULL+ AND "ee_accesscontrol"."role_id" IS NULL)))'''# ----# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.175+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.17+ '''+ 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.170'''SELECT "posthog_dashboard"."id","posthog_dashboard"."name",@@ -7822,13 +6699,110 @@"posthog_dashboard"."deprecated_tags","posthog_dashboard"."tags","posthog_dashboard"."share_token",- "posthog_dashboard"."is_shared"+ "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",++ (SELECT U0."id" AS "id"+ 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 1 ASC+ LIMIT 1) AS "_folder_id",+ 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."ui_configuration",+ 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"- WHERE ("posthog_dashboard"."id") IN ((1,- 2)/* ... */)+ 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.176+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.171+ '''+ 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.172'''SELECT "posthog_taggeditem"."id","posthog_taggeditem"."tag_id",@@ -7849,7 +6823,7 @@5 /* ... */))'''# ----# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.177+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.173'''SELECT "posthog_team"."id","posthog_team"."uuid",@@ -7948,7 +6922,7 @@LIMIT 21'''# ----# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.178+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.174'''SELECT "posthog_filesystem"."team_id","posthog_filesystem"."id",@@ -7973,50 +6947,30 @@AND "posthog_filesystem"."shortcut" IS NOT NULL))'''# ----# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.179+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.175'''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.18- '''- SELECT "posthog_insightvariable"."id",- "posthog_insightvariable"."name",- "posthog_insightvariable"."code_name",- "posthog_insightvariable"."type",- "posthog_insightvariable"."default_value",- "posthog_insightvariable"."is_multi"- FROM "posthog_insightvariable"- INNER JOIN "posthog_team" ON ("posthog_insightvariable"."team_id" = "posthog_team"."id")- WHERE ("posthog_insightvariable"."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_insightvariable"."team_id" = 99999))- ORDER BY "posthog_insightvariable"."name" ASC+ "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.180+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.176'''SELECT "posthog_insightvariable"."id","posthog_insightvariable"."name",@@ -8036,7 +6990,7 @@ORDER BY "posthog_insightvariable"."name" ASC'''# ----# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.181+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.177'''SELECT "posthog_dashboardtile"."id","posthog_dashboardtile"."dashboard_id",@@ -8385,12 +7339,6 @@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" = 99999AND "posthog_dashboardtile"."dashboard_id" = 99999AND NOT ("posthog_dashboard"."deleted"AND "posthog_dashboardtile"."deleted"@@ -8400,68 +7348,11 @@ORDER BY "posthog_dashboarditem"."order" ASC'''# ----# 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"."customization",- "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+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.178'''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"."group_key",- "posthog_dashboardtile"."badge","posthog_dashboardtile"."deleted"FROM "posthog_dashboardtile"INNER JOIN "posthog_dashboard" ON ("posthog_dashboardtile"."dashboard_id" = "posthog_dashboard"."id")@@ -8475,36 +7366,7 @@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"."customization",- "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+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.179'''SELECT "posthog_taggeditem"."id","posthog_taggeditem"."tag_id",@@ -8525,7 +7387,27 @@5 /* ... */))'''# ----# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.186+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.18+ '''+ SELECT "posthog_insightvariable"."id",+ "posthog_insightvariable"."name",+ "posthog_insightvariable"."code_name",+ "posthog_insightvariable"."type",+ "posthog_insightvariable"."default_value",+ "posthog_insightvariable"."is_multi"+ FROM "posthog_insightvariable"+ INNER JOIN "posthog_team" ON ("posthog_insightvariable"."team_id" = "posthog_team"."id")+ WHERE ("posthog_insightvariable"."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_insightvariable"."team_id" = 99999))+ ORDER BY "posthog_insightvariable"."name" ASC+ '''+# ---+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.180'''SELECT "posthog_alertconfiguration"."created_by_id","posthog_alertconfiguration"."created_at",@@ -8608,7 +7490,7 @@5 /* ... */)'''# ----# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.187+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.181'''SELECT "posthog_teamrevenueanalyticsconfig"."team_id","posthog_teamrevenueanalyticsconfig"."filter_test_accounts",@@ -8621,7 +7503,7 @@LIMIT 21'''# ----# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.188+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.182'''SELECT "posthog_teammarketinganalyticsconfig"."team_id","posthog_teammarketinganalyticsconfig"."attribution_window_days",@@ -8637,7 +7519,7 @@LIMIT 21'''# ----# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.189+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.183'''SELECT "customer_analytics_teamcustomeranalyticsconfig"."team_id","customer_analytics_teamcustomeranalyticsconfig"."activity_event",@@ -8654,6 +7536,39 @@LIMIT 21'''# ---+# 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"."customization",+ "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.19'''SELECT "posthog_dashboardtile"."id",@@ -8979,103 +7894,37 @@T11."allow_sidebar_suggestions",T11."shortcut_position",T11."passkeys_enabled_for_2fa",- T11."hide_mcp_hints",- T11."ui_configuration",- 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.190- '''- 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"."customization",- "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.191- '''- 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"."customization",- "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 /* ... */))+ T11."hide_mcp_hints",+ T11."ui_configuration",+ 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.2@@ -12095,345 +10944,89 @@AND "posthog_team"."organization_id" IN ('00000000-0000-0000-0000-000000000000'::uuid)AND ("posthog_organizationmembership"."user_id" = 99999OR ("ee_accesscontrol"."organization_member_id" IS NULL- AND "ee_accesscontrol"."role_id" IS NULL)))- '''-# ----# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.83- '''- SELECT "posthog_dashboard"."id" AS "id"- 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" IN (1,- 2,- 3,- 4,- 5 /* ... */))- '''-# ----# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.84- '''- SELECT "posthog_dashboard"."id" AS "id",- "posthog_dashboard"."name" AS "name"- 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.85- '''- 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.86- '''- 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"."customization",- "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.87- '''- 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"."business_model"- FROM "posthog_team"- WHERE "posthog_team"."id" = 99999- LIMIT 21- '''-# ----# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.88- '''- 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"."enforce_verified_domains",- "posthog_organization"."members_can_invite",- "posthog_organization"."members_can_create_projects",- "posthog_organization"."members_can_use_personal_api_keys",- "posthog_organization"."members_can_see_org_members",- "posthog_organization"."uses_most_specific_access_resolution",- "posthog_organization"."allow_publicly_shared_resources",- "posthog_organization"."member_notice",- "posthog_organization"."read_only_mcp_access",- "posthog_organization"."default_role_id",- "posthog_organization"."plugins_access_level",- "posthog_organization"."for_internal_metrics",- "posthog_organization"."default_anonymize_ips",- "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"."has_active_subscription",- "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+ AND "ee_accesscontrol"."role_id" IS NULL)))'''# ----# 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.83'''- SELECT 1 AS "a"- FROM "posthog_sharingconfiguration"- WHERE ("posthog_sharingconfiguration"."enabled"- AND ("posthog_sharingconfiguration"."expires_at" IS NULL- OR "posthog_sharingconfiguration"."expires_at" > 'SHARING-EXPIRY-TIMESTAMP'::timestamptz)- AND "posthog_sharingconfiguration"."dashboard_id" = 99999- AND "posthog_sharingconfiguration"."team_id" = 99999)- LIMIT 1+ SELECT "posthog_dashboard"."id" AS "id"+ 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" IN (1,+ 2,+ 3,+ 4,+ 5 /* ... */))'''# ----# 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.84'''- 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"."business_model"- FROM "posthog_team"- WHERE "posthog_team"."id" = 99999- LIMIT 21+ SELECT "posthog_dashboard"."id" AS "id",+ "posthog_dashboard"."name" AS "name"+ 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.90+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.85+ '''+ 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.86+ '''+ 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"."customization",+ "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.87'''SELECT "posthog_team"."id","posthog_team"."uuid",@@ -12532,50 +11125,7 @@LIMIT 21'''# ----# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.91- '''- 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.92- '''- SELECT "posthog_insightviewed"."id",- "posthog_insightviewed"."team_id",- "posthog_insightviewed"."user_id",- "posthog_insightviewed"."insight_id",- "posthog_insightviewed"."last_viewed_at",- "posthog_insightviewed"."source",- "posthog_insightviewed"."dashboard_id"- FROM "posthog_insightviewed"- WHERE ("posthog_insightviewed"."insight_id" = 99999- AND "posthog_insightviewed"."team_id" = 99999- AND "posthog_insightviewed"."user_id" = 99999)- LIMIT 21- FOR- UPDATE- '''-# ----# 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.88'''SELECT "posthog_organization"."id","posthog_organization"."name",@@ -12621,7 +11171,118 @@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 1 AS "a"+ FROM "posthog_sharingconfiguration"+ WHERE ("posthog_sharingconfiguration"."enabled"+ AND ("posthog_sharingconfiguration"."expires_at" IS NULL+ OR "posthog_sharingconfiguration"."expires_at" > 'SHARING-EXPIRY-TIMESTAMP'::timestamptz)+ AND "posthog_sharingconfiguration"."dashboard_id" = 99999+ AND "posthog_sharingconfiguration"."team_id" = 99999)+ LIMIT 1+ '''+# ---+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.9+ '''+ 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"."business_model"+ FROM "posthog_team"+ WHERE "posthog_team"."id" = 99999+ LIMIT 21+ '''+# ---+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.90'''SELECT "posthog_team"."id","posthog_team"."uuid",@@ -12720,258 +11381,98 @@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"."group_key",- "posthog_dashboardtile"."badge",- "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"."group_key",- "posthog_dashboardtile"."badge",- "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"."id",- "posthog_insightvariable"."name",- "posthog_insightvariable"."code_name",- "posthog_insightvariable"."type",- "posthog_insightvariable"."default_value",- "posthog_insightvariable"."is_multi"- FROM "posthog_insightvariable"- INNER JOIN "posthog_team" ON ("posthog_insightvariable"."team_id" = "posthog_team"."id")- WHERE ("posthog_insightvariable"."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_insightvariable"."team_id" = 99999))- ORDER BY "posthog_insightvariable"."name" ASC- '''-# ----# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.98- '''- SELECT "posthog_teamrevenueanalyticsconfig"."team_id",- "posthog_teamrevenueanalyticsconfig"."filter_test_accounts",- "posthog_teamrevenueanalyticsconfig"."notified_first_sync",- "posthog_teamrevenueanalyticsconfig"."events",- "posthog_teamrevenueanalyticsconfig"."goals",- "posthog_teamrevenueanalyticsconfig"."base_currency"- FROM "posthog_teamrevenueanalyticsconfig"- WHERE "posthog_teamrevenueanalyticsconfig"."team_id" = 99999- LIMIT 21- '''-# ----# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.99- '''- SELECT "posthog_teammarketinganalyticsconfig"."team_id",- "posthog_teammarketinganalyticsconfig"."attribution_window_days",- "posthog_teammarketinganalyticsconfig"."attribution_mode",- "posthog_teammarketinganalyticsconfig"."filter_test_accounts",- "posthog_teammarketinganalyticsconfig"."sources_map",- "posthog_teammarketinganalyticsconfig"."conversion_goals",- "posthog_teammarketinganalyticsconfig"."campaign_name_mappings",- "posthog_teammarketinganalyticsconfig"."custom_source_mappings",- "posthog_teammarketinganalyticsconfig"."campaign_field_preferences"- FROM "posthog_teammarketinganalyticsconfig"- WHERE "posthog_teammarketinganalyticsconfig"."team_id" = 99999- LIMIT 21- '''-# ----# name: TestDashboard.test_retrieve_dashboard+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.91'''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"."ui_configuration",- "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)+ "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.10+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.92'''- 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 /* ... */)+ SELECT "posthog_insightviewed"."id",+ "posthog_insightviewed"."team_id",+ "posthog_insightviewed"."user_id",+ "posthog_insightviewed"."insight_id",+ "posthog_insightviewed"."last_viewed_at",+ "posthog_insightviewed"."source",+ "posthog_insightviewed"."dashboard_id"+ FROM "posthog_insightviewed"+ WHERE ("posthog_insightviewed"."insight_id" = 99999+ AND "posthog_insightviewed"."team_id" = 99999+ AND "posthog_insightviewed"."user_id" = 99999)+ LIMIT 21+ FOR+ UPDATE'''# ----# name: TestDashboard.test_retrieve_dashboard.11+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.93'''- 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"."group_key",- "posthog_dashboardtile"."badge",- "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_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"."enforce_verified_domains",+ "posthog_organization"."members_can_invite",+ "posthog_organization"."members_can_create_projects",+ "posthog_organization"."members_can_use_personal_api_keys",+ "posthog_organization"."members_can_see_org_members",+ "posthog_organization"."uses_most_specific_access_resolution",+ "posthog_organization"."allow_publicly_shared_resources",+ "posthog_organization"."member_notice",+ "posthog_organization"."read_only_mcp_access",+ "posthog_organization"."default_role_id",+ "posthog_organization"."plugins_access_level",+ "posthog_organization"."for_internal_metrics",+ "posthog_organization"."default_anonymize_ips",+ "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"."has_active_subscription",+ "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","posthog_team"."organization_id","posthog_team"."parent_team_id",@@ -13057,21 +11558,152 @@"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"."business_model",- "posthog_user"."id",+ "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.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"."group_key",+ "posthog_dashboardtile"."badge",+ "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"."group_key",+ "posthog_dashboardtile"."badge",+ "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"."id",+ "posthog_insightvariable"."name",+ "posthog_insightvariable"."code_name",+ "posthog_insightvariable"."type",+ "posthog_insightvariable"."default_value",+ "posthog_insightvariable"."is_multi"+ FROM "posthog_insightvariable"+ INNER JOIN "posthog_team" ON ("posthog_insightvariable"."team_id" = "posthog_team"."id")+ WHERE ("posthog_insightvariable"."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_insightvariable"."team_id" = 99999))+ ORDER BY "posthog_insightvariable"."name" ASC+ '''+# ---+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.98+ '''+ SELECT "posthog_teamrevenueanalyticsconfig"."team_id",+ "posthog_teamrevenueanalyticsconfig"."filter_test_accounts",+ "posthog_teamrevenueanalyticsconfig"."notified_first_sync",+ "posthog_teamrevenueanalyticsconfig"."events",+ "posthog_teamrevenueanalyticsconfig"."goals",+ "posthog_teamrevenueanalyticsconfig"."base_currency"+ FROM "posthog_teamrevenueanalyticsconfig"+ WHERE "posthog_teamrevenueanalyticsconfig"."team_id" = 99999+ LIMIT 21+ '''+# ---+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.99+ '''+ SELECT "posthog_teammarketinganalyticsconfig"."team_id",+ "posthog_teammarketinganalyticsconfig"."attribution_window_days",+ "posthog_teammarketinganalyticsconfig"."attribution_mode",+ "posthog_teammarketinganalyticsconfig"."filter_test_accounts",+ "posthog_teammarketinganalyticsconfig"."sources_map",+ "posthog_teammarketinganalyticsconfig"."conversion_goals",+ "posthog_teammarketinganalyticsconfig"."campaign_name_mappings",+ "posthog_teammarketinganalyticsconfig"."custom_source_mappings",+ "posthog_teammarketinganalyticsconfig"."campaign_field_preferences"+ FROM "posthog_teammarketinganalyticsconfig"+ WHERE "posthog_teammarketinganalyticsconfig"."team_id" = 99999+ LIMIT 21+ '''+# ---+# 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",@@ -13086,7 +11718,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",@@ -13110,181 +11741,36 @@"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."ui_configuration",- 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"."agent_context",- "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."ui_configuration",- 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."ui_configuration",- 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_user"."email_opt_in"+ FROM "posthog_user"+ WHERE ("posthog_user"."is_active"+ AND "posthog_user"."id" = 99999)'''# ----# name: TestDashboard.test_retrieve_dashboard.12+# 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'''SELECT "posthog_taggeditem"."id","posthog_taggeditem"."tag_id",@@ -13305,7 +11791,7 @@5 /* ... */))'''# ----# name: TestDashboard.test_retrieve_dashboard.13+# name: TestDashboard.test_retrieve_dashboard.12'''SELECT "posthog_team"."id","posthog_team"."uuid",@@ -13404,7 +11890,7 @@LIMIT 21'''# ----# name: TestDashboard.test_retrieve_dashboard.14+# name: TestDashboard.test_retrieve_dashboard.13'''SELECT "posthog_filesystem"."team_id","posthog_filesystem"."id",@@ -13429,7 +11915,7 @@AND "posthog_filesystem"."shortcut" IS NOT NULL))'''# ----# name: TestDashboard.test_retrieve_dashboard.15+# name: TestDashboard.test_retrieve_dashboard.14'''SELECT "posthog_filesystemshortcut"."id","posthog_filesystemshortcut"."team_id",@@ -13452,7 +11938,7 @@AND "posthog_filesystemshortcut"."href" IS NOT NULL))'''# ----# name: TestDashboard.test_retrieve_dashboard.16+# name: TestDashboard.test_retrieve_dashboard.15'''SELECT "posthog_insightvariable"."id","posthog_insightvariable"."name",@@ -13472,7 +11958,7 @@ORDER BY "posthog_insightvariable"."name" ASC'''# ----# name: TestDashboard.test_retrieve_dashboard.17+# name: TestDashboard.test_retrieve_dashboard.16'''SELECT "posthog_dashboardtile"."id","posthog_dashboardtile"."dashboard_id",@@ -13821,12 +12307,6 @@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" = 99999AND "posthog_dashboardtile"."dashboard_id" = 99999AND NOT ("posthog_dashboard"."deleted"AND "posthog_dashboardtile"."deleted"diff --git a/posthog/api/test/dashboards/test_dashboard.py b/posthog/api/test/dashboards/test_dashboard.pyindex 23109f4277bd..a9d5cc3dd8ce 100644--- a/posthog/api/test/dashboards/test_dashboard.py+++ b/posthog/api/test/dashboards/test_dashboard.py@@ -1109,21 +1109,21 @@ class TestDashboard(APIBaseTest, QueryMatchingTest):# queries: the runner passes its already-loaded team, so the check skips the Team# lookup, and with the feature unavailable no PropertyAccessControl rows are read.- with self.assertNumQueries(baseline + 11):+ with self.assertNumQueries(baseline + 10):self.dashboard_api.get_dashboard(dashboard_id, query_params={"no_items_field": "true"})- # baseline + 11 + 12 once at least one insight materializes. Three of the 12 read the+ # baseline + 10 + 7 once at least one insight materializes. Three of the 7 read the# revenue, marketing and customer analytics configs that go into the query cache key.self.dashboard_api.create_insight({"dashboards": [dashboard_id]})- with self.assertNumQueries(baseline + 11 + 12):+ with self.assertNumQueries(baseline + 10 + 7):self.dashboard_api.get_dashboard(dashboard_id, query_params={"no_items_field": "true"})self.dashboard_api.create_insight({"dashboards": [dashboard_id]})- with self.assertNumQueries(baseline + 11 + 12):+ with self.assertNumQueries(baseline + 10 + 7):self.dashboard_api.get_dashboard(dashboard_id, query_params={"no_items_field": "true"})self.dashboard_api.create_insight({"dashboards": [dashboard_id]})- with self.assertNumQueries(baseline + 11 + 12):+ with self.assertNumQueries(baseline + 10 + 7):self.dashboard_api.get_dashboard(dashboard_id, query_params={"no_items_field": "true"})def test_insight_alerts_do_not_nplus1_dashboard_gets(self) -> None:diff --git a/products/dashboards/backend/api/dashboard.py b/products/dashboards/backend/api/dashboard.pyindex e4677c15b86f..24a24bcf03fc 100644--- a/products/dashboards/backend/api/dashboard.py+++ b/products/dashboards/backend/api/dashboard.py@@ -142,7 +142,7 @@ from products.dashboards.backend.constants import (RUN_INSIGHTS_MAX_TOTAL_CHARS,RUN_INSIGHTS_MIN_TILE_CHARS,)-from products.dashboards.backend.facade.api import DashboardTileBasicSerializer+from products.dashboards.backend.facade.api import DashboardTileBasicSerializer, tile_ids_prefetchfrom products.dashboards.backend.facade.enums import PrivilegeLevel, RestrictionLevelfrom products.dashboards.backend.feature_flags import dashboard_widgets_enabledfrom products.dashboards.backend.models.dashboard import (@@ -461,6 +461,9 @@ def tile_insight_prefetches() -> list[Prefetch]:prefetch silently serializes `alerts: []` for every tile, hiding alert threshold lines ondashboards."""return [+ # InsightSerializer builds `dashboard_tiles` and `dashboards` from each insight's tiles. Without+ # this, every tile on the dashboard costs a query for each field that reads them.+ tile_ids_prefetch("insight__dashboard_tiles"),Prefetch("insight__tagged_items",queryset=TaggedItem.objects.select_related("tag"),@@ -3138,8 +3141,8 @@ class DashboardsViewSet(if self.action == "bulk_delete":return queryset.exclude(deleted=True).select_related("team")- # subscribe_nudge only reads the dashboard's pk and name, so skip the detail prefetch- # cascade (tiles → insights → their dashboards) and the folder/last-viewed annotations.+ # subscribe_nudge only reads the dashboard's pk and name, so skip the folder/last-viewed+ # annotations, the sharing-configuration prefetch and the created_by join.# Team scoping is preserved by the filter above; the CanEditDashboard object permission# still gates the write.if self.action == "subscribe_nudge":@@ -3190,34 +3193,6 @@ class DashboardsViewSet(queryset = queryset.prefetch_related("sharingconfiguration_set").select_related("created_by")- if self.action != "list":- tiles_prefetch_queryset = DashboardTile.dashboard_queryset(- DashboardTile.objects.prefetch_related(- Prefetch(- "insight__dashboards",- # nosemgrep: idor-lookup-without-team (scoped via prefetch on team-scoped queryset)- queryset=Dashboard.objects.filter(- id__in=DashboardTile.objects.values_list("dashboard_id", flat=True)- ),- ),- "insight__dashboard_tiles__dashboard",- )- )- try:- dashboard_id = self.kwargs["pk"]- tiles_prefetch_queryset = tiles_prefetch_queryset.filter(dashboard_id=dashboard_id)- except KeyError:- # in case there are endpoints that hit this branch but don't have a pk- pass-- queryset = queryset.prefetch_related(- # prefetching tiles saves 25 queries per tile on the dashboard- Prefetch(- "tiles",- queryset=tiles_prefetch_queryset,- ),- )-# Add access level filtering for list actionsqueryset = self._filter_queryset_by_access_level(queryset)diff --git a/products/dashboards/backend/facade/api.py b/products/dashboards/backend/facade/api.pyindex 1b74af31947f..f4d08719e6dd 100644--- a/products/dashboards/backend/facade/api.py+++ b/products/dashboards/backend/facade/api.py@@ -200,10 +200,11 @@ def active_tile_count(dashboard_id: int) -> int:return DashboardTile.objects.filter(dashboard_id=dashboard_id).exclude(deleted=True).count()-def tile_ids_prefetch() -> Prefetch:- """Prefetch of an insight's tiles carrying only the columns a basic insight payload renders."""+def tile_ids_prefetch(lookup: str = "dashboard_tiles") -> Prefetch:+ """Prefetch of an insight's tiles carrying only the columns a basic insight payload renders.+ `lookup` is the path from the queryset's model to the insight's tiles."""return Prefetch(- "dashboard_tiles",+ lookup,queryset=DashboardTile.objects.only("id", "dashboard_id", "deleted", "insight_id"),)