: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
chore(tests): record every query in postgres query snapshots (#119735)
Phil Haacka97951a927b8
diff --git a/posthog/api/test/dashboards/__snapshots__/test_dashboard.ambr b/posthog/api/test/dashboards/__snapshots__/test_dashboard.ambrindex c87ed623a2f5..78693299bd2b 100644--- a/posthog/api/test/dashboards/__snapshots__/test_dashboard.ambr+++ b/posthog/api/test/dashboards/__snapshots__/test_dashboard.ambr@@ -93,51 +93,30 @@# ---# name: TestDashboard.test_adding_insights_is_not_nplus1_for_gets.10'''- 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_adding_insights_is_not_nplus1_for_gets.11- '''- 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 /* ... */))+ 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.12+# name: TestDashboard.test_adding_insights_is_not_nplus1_for_gets.100'''SELECT "posthog_team"."id","posthog_team"."uuid",@@ -236,7 +215,7 @@LIMIT 21'''# ----# name: TestDashboard.test_adding_insights_is_not_nplus1_for_gets.13+# name: TestDashboard.test_adding_insights_is_not_nplus1_for_gets.101'''SELECT "posthog_organization"."id","posthog_organization"."name",@@ -282,7 +261,7 @@LIMIT 21'''# ----# name: TestDashboard.test_adding_insights_is_not_nplus1_for_gets.14+# name: TestDashboard.test_adding_insights_is_not_nplus1_for_gets.102'''SELECT 1 AS "a"FROM "posthog_sharingconfiguration"@@ -294,7 +273,7 @@LIMIT 1'''# ----# name: TestDashboard.test_adding_insights_is_not_nplus1_for_gets.15+# name: TestDashboard.test_adding_insights_is_not_nplus1_for_gets.103'''SELECT "posthog_team"."id","posthog_team"."uuid",@@ -393,7 +372,7 @@LIMIT 21'''# ----# name: TestDashboard.test_adding_insights_is_not_nplus1_for_gets.16+# name: TestDashboard.test_adding_insights_is_not_nplus1_for_gets.104'''SELECT "posthog_filesystem"."team_id","posthog_filesystem"."id",@@ -418,7 +397,7 @@AND "posthog_filesystem"."shortcut" IS NOT NULL))'''# ----# name: TestDashboard.test_adding_insights_is_not_nplus1_for_gets.17+# name: TestDashboard.test_adding_insights_is_not_nplus1_for_gets.105'''SELECT "posthog_insightviewed"."id","posthog_insightviewed"."team_id",@@ -436,7 +415,7 @@UPDATE'''# ----# name: TestDashboard.test_adding_insights_is_not_nplus1_for_gets.18+# name: TestDashboard.test_adding_insights_is_not_nplus1_for_gets.106'''SELECT "posthog_dashboardtile"."id","posthog_dashboardtile"."dashboard_id",@@ -465,7 +444,7 @@AND "posthog_dashboardtile"."insight_id" = 99999)'''# ----# name: TestDashboard.test_adding_insights_is_not_nplus1_for_gets.19+# name: TestDashboard.test_adding_insights_is_not_nplus1_for_gets.107'''SELECT "posthog_dashboardtile"."id","posthog_dashboardtile"."dashboard_id",@@ -494,146 +473,7 @@AND "posthog_dashboardtile"."insight_id" = 99999)'''# ----# name: TestDashboard.test_adding_insights_is_not_nplus1_for_gets.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",- "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_adding_insights_is_not_nplus1_for_gets.20+# name: TestDashboard.test_adding_insights_is_not_nplus1_for_gets.108'''SELECT "posthog_insightvariable"."id","posthog_insightvariable"."name",@@ -653,7 +493,7 @@ORDER BY "posthog_insightvariable"."name" ASC'''# ----# name: TestDashboard.test_adding_insights_is_not_nplus1_for_gets.21+# name: TestDashboard.test_adding_insights_is_not_nplus1_for_gets.109'''SELECT "posthog_teamrevenueanalyticsconfig"."team_id","posthog_teamrevenueanalyticsconfig"."filter_test_accounts",@@ -666,7 +506,19 @@LIMIT 21'''# ----# name: TestDashboard.test_adding_insights_is_not_nplus1_for_gets.22+# name: TestDashboard.test_adding_insights_is_not_nplus1_for_gets.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_adding_insights_is_not_nplus1_for_gets.110'''SELECT "posthog_teammarketinganalyticsconfig"."team_id","posthog_teammarketinganalyticsconfig"."attribution_window_days",@@ -682,7 +534,7 @@LIMIT 21'''# ----# name: TestDashboard.test_adding_insights_is_not_nplus1_for_gets.23+# name: TestDashboard.test_adding_insights_is_not_nplus1_for_gets.111'''SELECT "customer_analytics_teamcustomeranalyticsconfig"."team_id","customer_analytics_teamcustomeranalyticsconfig"."activity_event",@@ -699,7 +551,7 @@LIMIT 21'''# ----# name: TestDashboard.test_adding_insights_is_not_nplus1_for_gets.24+# name: TestDashboard.test_adding_insights_is_not_nplus1_for_gets.112'''SELECT "posthog_dashboardtile"."dashboard_id" AS "dashboard_id"FROM "posthog_dashboardtile"@@ -710,7 +562,7 @@AND "posthog_dashboardtile"."insight_id" = 99999)'''# ----# name: TestDashboard.test_adding_insights_is_not_nplus1_for_gets.25+# name: TestDashboard.test_adding_insights_is_not_nplus1_for_gets.113'''SELECT "posthog_dashboard"."id","posthog_dashboard"."name",@@ -743,7 +595,7 @@5 /* ... */))'''# ----# name: TestDashboard.test_adding_insights_is_not_nplus1_for_gets.26+# name: TestDashboard.test_adding_insights_is_not_nplus1_for_gets.114'''SELECT "posthog_tag"."name" AS "tag__name"FROM "posthog_taggeditem"@@ -752,7 +604,7 @@AND "posthog_taggeditem"."object_id" = 99999)'''# ----# name: TestDashboard.test_adding_insights_is_not_nplus1_for_gets.27+# name: TestDashboard.test_adding_insights_is_not_nplus1_for_gets.115'''SELECT "posthog_user"."id","posthog_user"."password",@@ -798,7 +650,7 @@AND "posthog_user"."id" = 99999)'''# ----# name: TestDashboard.test_adding_insights_is_not_nplus1_for_gets.28+# name: TestDashboard.test_adding_insights_is_not_nplus1_for_gets.116'''SELECT "posthog_organization"."id","posthog_organization"."name",@@ -844,7 +696,7 @@LIMIT 21'''# ----# name: TestDashboard.test_adding_insights_is_not_nplus1_for_gets.29+# name: TestDashboard.test_adding_insights_is_not_nplus1_for_gets.117'''SELECT "posthog_team"."id","posthog_team"."uuid",@@ -983,7 +835,7 @@LIMIT 21'''# ----# name: TestDashboard.test_adding_insights_is_not_nplus1_for_gets.3+# name: TestDashboard.test_adding_insights_is_not_nplus1_for_gets.118'''SELECT "posthog_organizationmembership"."id","posthog_organizationmembership"."organization_id",@@ -1038,62 +890,7 @@LIMIT 21'''# ----# name: TestDashboard.test_adding_insights_is_not_nplus1_for_gets.30- '''- 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_adding_insights_is_not_nplus1_for_gets.31+# name: TestDashboard.test_adding_insights_is_not_nplus1_for_gets.119'''SELECT "ee_accesscontrol"."id","ee_accesscontrol"."team_id",@@ -1116,7 +913,26 @@AND "ee_accesscontrol"."team_id" = 99999))'''# ----# name: TestDashboard.test_adding_insights_is_not_nplus1_for_gets.32+# name: TestDashboard.test_adding_insights_is_not_nplus1_for_gets.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_adding_insights_is_not_nplus1_for_gets.120'''SELECT "posthog_organizationmembership"."id","posthog_organizationmembership"."organization_id",@@ -1169,7 +985,7 @@WHERE "posthog_organizationmembership"."user_id" = 99999'''# ----# name: TestDashboard.test_adding_insights_is_not_nplus1_for_gets.33+# name: TestDashboard.test_adding_insights_is_not_nplus1_for_gets.121'''SELECT "ee_role"."organization_id" AS "role__organization_id","ee_rolemembership"."role_id" AS "role_id"@@ -1181,7 +997,7 @@OR "posthog_organizationmembership"."organization_id" = ("ee_role"."organization_id")))'''# ----# name: TestDashboard.test_adding_insights_is_not_nplus1_for_gets.34+# name: TestDashboard.test_adding_insights_is_not_nplus1_for_gets.122'''SELECT "ee_accesscontrol"."id","ee_accesscontrol"."team_id",@@ -1203,7 +1019,7 @@AND "ee_accesscontrol"."role_id" IS NULL)))'''# ----# name: TestDashboard.test_adding_insights_is_not_nplus1_for_gets.35+# name: TestDashboard.test_adding_insights_is_not_nplus1_for_gets.123'''SELECT "posthog_dashboard"."id","posthog_dashboard"."name",@@ -1306,7 +1122,7 @@LIMIT 21'''# ----# name: TestDashboard.test_adding_insights_is_not_nplus1_for_gets.36+# name: TestDashboard.test_adding_insights_is_not_nplus1_for_gets.124'''SELECT "posthog_sharingconfiguration"."id","posthog_sharingconfiguration"."team_id",@@ -1329,7 +1145,7 @@5 /* ... */)'''# ----# name: TestDashboard.test_adding_insights_is_not_nplus1_for_gets.37+# name: TestDashboard.test_adding_insights_is_not_nplus1_for_gets.125'''SELECT "posthog_taggeditem"."id","posthog_taggeditem"."tag_id",@@ -1350,7 +1166,7 @@5 /* ... */))'''# ----# name: TestDashboard.test_adding_insights_is_not_nplus1_for_gets.38+# name: TestDashboard.test_adding_insights_is_not_nplus1_for_gets.126'''SELECT "posthog_team"."id","posthog_team"."uuid",@@ -1449,7 +1265,7 @@LIMIT 21'''# ----# name: TestDashboard.test_adding_insights_is_not_nplus1_for_gets.39+# name: TestDashboard.test_adding_insights_is_not_nplus1_for_gets.127'''SELECT "posthog_filesystem"."team_id","posthog_filesystem"."id",@@ -1474,30 +1290,7 @@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+# name: TestDashboard.test_adding_insights_is_not_nplus1_for_gets.128'''SELECT "posthog_filesystemshortcut"."id","posthog_filesystemshortcut"."team_id",@@ -1520,7 +1313,7 @@AND "posthog_filesystemshortcut"."href" IS NOT NULL))'''# ----# name: TestDashboard.test_adding_insights_is_not_nplus1_for_gets.41+# name: TestDashboard.test_adding_insights_is_not_nplus1_for_gets.129'''SELECT "posthog_insightvariable"."id","posthog_insightvariable"."name",@@ -1540,7 +1333,15 @@ORDER BY "posthog_insightvariable"."name" ASC'''# ----# name: TestDashboard.test_adding_insights_is_not_nplus1_for_gets.42+# name: TestDashboard.test_adding_insights_is_not_nplus1_for_gets.13+ '''+ SELECT COUNT(*) AS "__count"+ FROM "posthog_taggeditem"+ WHERE ("posthog_taggeditem"."content_type_id" = 99999+ AND "posthog_taggeditem"."object_id" = 99999)+ '''+# ---+# name: TestDashboard.test_adding_insights_is_not_nplus1_for_gets.130'''SELECT "posthog_dashboardtile"."id","posthog_dashboardtile"."dashboard_id",@@ -1898,7 +1699,7 @@ORDER BY "posthog_dashboarditem"."order" ASC'''# ----# name: TestDashboard.test_adding_insights_is_not_nplus1_for_gets.43+# name: TestDashboard.test_adding_insights_is_not_nplus1_for_gets.131'''SELECT "posthog_dashboardtile"."id","posthog_dashboardtile"."dashboard_id",@@ -1916,7 +1717,7 @@5 /* ... */))'''# ----# name: TestDashboard.test_adding_insights_is_not_nplus1_for_gets.44+# name: TestDashboard.test_adding_insights_is_not_nplus1_for_gets.132'''SELECT "posthog_taggeditem"."id","posthog_taggeditem"."tag_id",@@ -1937,7 +1738,7 @@5 /* ... */))'''# ----# name: TestDashboard.test_adding_insights_is_not_nplus1_for_gets.45+# name: TestDashboard.test_adding_insights_is_not_nplus1_for_gets.133'''SELECT "posthog_alertconfiguration"."created_by_id","posthog_alertconfiguration"."created_at",@@ -2020,7 +1821,7 @@5 /* ... */)'''# ----# name: TestDashboard.test_adding_insights_is_not_nplus1_for_gets.46+# name: TestDashboard.test_adding_insights_is_not_nplus1_for_gets.134'''SELECT "posthog_teamrevenueanalyticsconfig"."team_id","posthog_teamrevenueanalyticsconfig"."filter_test_accounts",@@ -2033,7 +1834,7 @@LIMIT 21'''# ----# name: TestDashboard.test_adding_insights_is_not_nplus1_for_gets.47+# name: TestDashboard.test_adding_insights_is_not_nplus1_for_gets.135'''SELECT "posthog_teammarketinganalyticsconfig"."team_id","posthog_teammarketinganalyticsconfig"."attribution_window_days",@@ -2049,7 +1850,7 @@LIMIT 21'''# ----# name: TestDashboard.test_adding_insights_is_not_nplus1_for_gets.48+# name: TestDashboard.test_adding_insights_is_not_nplus1_for_gets.136'''SELECT "customer_analytics_teamcustomeranalyticsconfig"."team_id","customer_analytics_teamcustomeranalyticsconfig"."activity_event",@@ -2066,7 +1867,7 @@LIMIT 21'''# ----# name: TestDashboard.test_adding_insights_is_not_nplus1_for_gets.49+# name: TestDashboard.test_adding_insights_is_not_nplus1_for_gets.137'''SELECT "posthog_dashboard"."id","posthog_dashboard"."name",@@ -2099,127 +1900,7 @@5 /* ... */))'''# ----# name: TestDashboard.test_adding_insights_is_not_nplus1_for_gets.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.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+# name: TestDashboard.test_adding_insights_is_not_nplus1_for_gets.138'''SELECT "posthog_user"."id","posthog_user"."password",@@ -2265,7 +1946,7 @@AND "posthog_user"."id" = 99999)'''# ----# name: TestDashboard.test_listing_dashboards_is_not_nplus1.1+# name: TestDashboard.test_adding_insights_is_not_nplus1_for_gets.139'''SELECT "posthog_organization"."id","posthog_organization"."name",@@ -2311,7 +1992,23 @@LIMIT 21'''# ----# name: TestDashboard.test_listing_dashboards_is_not_nplus1.10+# name: TestDashboard.test_adding_insights_is_not_nplus1_for_gets.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_adding_insights_is_not_nplus1_for_gets.140'''SELECT "posthog_team"."id","posthog_team"."uuid",@@ -2404,15 +2101,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_listing_dashboards_is_not_nplus1.11- '''- SELECT "posthog_organization"."id",+ "posthog_team"."business_model",+ "posthog_organization"."id","posthog_organization"."name","posthog_organization"."slug","posthog_organization"."logo_media_id",@@ -2451,12 +2141,273 @@"posthog_organization"."personalization","posthog_organization"."domain_whitelist","posthog_organization"."is_platform"- FROM "posthog_organization"- WHERE "posthog_organization"."id" = '00000000-0000-0000-0000-000000000000'::uuid+ FROM "posthog_team"+ INNER JOIN "posthog_organization" ON ("posthog_team"."organization_id" = "posthog_organization"."id")+ WHERE "posthog_team"."id" = 99999LIMIT 21'''# ----# name: TestDashboard.test_listing_dashboards_is_not_nplus1.12+# name: TestDashboard.test_adding_insights_is_not_nplus1_for_gets.141+ '''+ 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_adding_insights_is_not_nplus1_for_gets.142+ '''+ 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.143+ '''+ 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.144+ '''+ 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.145+ '''+ 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.146+ '''+ 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.147+ '''+ 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_adding_insights_is_not_nplus1_for_gets.148+ '''+ SELECT COUNT(*) AS "__count"+ FROM "posthog_dashboardtile"+ INNER JOIN "posthog_dashboard" ON ("posthog_dashboardtile"."dashboard_id" = "posthog_dashboard"."id")+ WHERE (NOT ("posthog_dashboardtile"."deleted"+ AND "posthog_dashboardtile"."deleted" IS NOT NULL)+ AND NOT ("posthog_dashboard"."deleted")+ AND "posthog_dashboardtile"."dashboard_id" = 99999+ AND NOT ("posthog_dashboardtile"."deleted"+ AND "posthog_dashboardtile"."deleted" IS NOT NULL))+ '''+# ---+# name: TestDashboard.test_adding_insights_is_not_nplus1_for_gets.149+ '''+ SELECT "posthog_dashboard"."id",+ "posthog_dashboard"."name",+ "posthog_dashboard"."description",+ "posthog_dashboard"."team_id",+ "posthog_dashboard"."pinned",+ "posthog_dashboard"."created_at",+ "posthog_dashboard"."created_by_id",+ "posthog_dashboard"."deleted",+ "posthog_dashboard"."last_accessed_at",+ "posthog_dashboard"."last_refresh",+ "posthog_dashboard"."filters",+ "posthog_dashboard"."variables",+ "posthog_dashboard"."breakdown_colors",+ "posthog_dashboard"."data_color_theme_id",+ "posthog_dashboard"."creation_mode",+ "posthog_dashboard"."restriction_level",+ "posthog_dashboard"."quick_filter_ids",+ "posthog_dashboard"."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_adding_insights_is_not_nplus1_for_gets.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_adding_insights_is_not_nplus1_for_gets.150'''SELECT "posthog_team"."id","posthog_team"."uuid",@@ -2555,50 +2506,7 @@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- '''- 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+# name: TestDashboard.test_adding_insights_is_not_nplus1_for_gets.151'''SELECT "posthog_organization"."id","posthog_organization"."name",@@ -2644,7 +2552,19 @@LIMIT 21'''# ----# name: TestDashboard.test_listing_dashboards_is_not_nplus1.16+# name: TestDashboard.test_adding_insights_is_not_nplus1_for_gets.152+ '''+ 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_adding_insights_is_not_nplus1_for_gets.153'''SELECT "posthog_team"."id","posthog_team"."uuid",@@ -2743,7 +2663,50 @@LIMIT 21'''# ----# name: TestDashboard.test_listing_dashboards_is_not_nplus1.17+# name: TestDashboard.test_adding_insights_is_not_nplus1_for_gets.154+ '''+ 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_adding_insights_is_not_nplus1_for_gets.155+ '''+ 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_adding_insights_is_not_nplus1_for_gets.156'''SELECT "posthog_dashboardtile"."id","posthog_dashboardtile"."dashboard_id",@@ -2772,7 +2735,7 @@AND "posthog_dashboardtile"."insight_id" = 99999)'''# ----# name: TestDashboard.test_listing_dashboards_is_not_nplus1.18+# name: TestDashboard.test_adding_insights_is_not_nplus1_for_gets.157'''SELECT "posthog_dashboardtile"."id","posthog_dashboardtile"."dashboard_id",@@ -2801,7 +2764,7 @@AND "posthog_dashboardtile"."insight_id" = 99999)'''# ----# name: TestDashboard.test_listing_dashboards_is_not_nplus1.19+# name: TestDashboard.test_adding_insights_is_not_nplus1_for_gets.158'''SELECT "posthog_insightvariable"."id","posthog_insightvariable"."name",@@ -2821,146 +2784,7 @@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",- "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_listing_dashboards_is_not_nplus1.20+# name: TestDashboard.test_adding_insights_is_not_nplus1_for_gets.159'''SELECT "posthog_teamrevenueanalyticsconfig"."team_id","posthog_teamrevenueanalyticsconfig"."filter_test_accounts",@@ -2973,7 +2797,23 @@LIMIT 21'''# ----# name: TestDashboard.test_listing_dashboards_is_not_nplus1.21+# name: TestDashboard.test_adding_insights_is_not_nplus1_for_gets.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_adding_insights_is_not_nplus1_for_gets.160'''SELECT "posthog_teammarketinganalyticsconfig"."team_id","posthog_teammarketinganalyticsconfig"."attribution_window_days",@@ -2989,7 +2829,7 @@LIMIT 21'''# ----# name: TestDashboard.test_listing_dashboards_is_not_nplus1.22+# name: TestDashboard.test_adding_insights_is_not_nplus1_for_gets.161'''SELECT "customer_analytics_teamcustomeranalyticsconfig"."team_id","customer_analytics_teamcustomeranalyticsconfig"."activity_event",@@ -3006,7 +2846,7 @@LIMIT 21'''# ----# name: TestDashboard.test_listing_dashboards_is_not_nplus1.23+# name: TestDashboard.test_adding_insights_is_not_nplus1_for_gets.162'''SELECT "posthog_dashboardtile"."dashboard_id" AS "dashboard_id"FROM "posthog_dashboardtile"@@ -3017,7 +2857,7 @@AND "posthog_dashboardtile"."insight_id" = 99999)'''# ----# name: TestDashboard.test_listing_dashboards_is_not_nplus1.24+# name: TestDashboard.test_adding_insights_is_not_nplus1_for_gets.163'''SELECT "posthog_dashboard"."id","posthog_dashboard"."name",@@ -3050,7 +2890,7 @@5 /* ... */))'''# ----# name: TestDashboard.test_listing_dashboards_is_not_nplus1.25+# name: TestDashboard.test_adding_insights_is_not_nplus1_for_gets.164'''SELECT "posthog_tag"."name" AS "tag__name"FROM "posthog_taggeditem"@@ -3059,7 +2899,7 @@AND "posthog_taggeditem"."object_id" = 99999)'''# ----# name: TestDashboard.test_listing_dashboards_is_not_nplus1.26+# name: TestDashboard.test_adding_insights_is_not_nplus1_for_gets.165'''SELECT "posthog_user"."id","posthog_user"."password",@@ -3105,7 +2945,7 @@AND "posthog_user"."id" = 99999)'''# ----# name: TestDashboard.test_listing_dashboards_is_not_nplus1.27+# name: TestDashboard.test_adding_insights_is_not_nplus1_for_gets.166'''SELECT "posthog_organization"."id","posthog_organization"."name",@@ -3151,7 +2991,7 @@LIMIT 21'''# ----# name: TestDashboard.test_listing_dashboards_is_not_nplus1.28+# name: TestDashboard.test_adding_insights_is_not_nplus1_for_gets.167'''SELECT "posthog_team"."id","posthog_team"."uuid",@@ -3290,62 +3130,7 @@LIMIT 21'''# ----# name: TestDashboard.test_listing_dashboards_is_not_nplus1.29- '''- 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.3+# name: TestDashboard.test_adding_insights_is_not_nplus1_for_gets.168'''SELECT "posthog_organizationmembership"."id","posthog_organizationmembership"."organization_id",@@ -3400,7 +3185,7 @@LIMIT 21'''# ----# name: TestDashboard.test_listing_dashboards_is_not_nplus1.30+# name: TestDashboard.test_adding_insights_is_not_nplus1_for_gets.169'''SELECT "ee_accesscontrol"."id","ee_accesscontrol"."team_id",@@ -3423,7 +3208,26 @@AND "ee_accesscontrol"."team_id" = 99999))'''# ----# name: TestDashboard.test_listing_dashboards_is_not_nplus1.31+# name: TestDashboard.test_adding_insights_is_not_nplus1_for_gets.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_adding_insights_is_not_nplus1_for_gets.170'''SELECT "posthog_organizationmembership"."id","posthog_organizationmembership"."organization_id",@@ -3476,21 +3280,41 @@WHERE "posthog_organizationmembership"."user_id" = 99999'''# ----# name: TestDashboard.test_listing_dashboards_is_not_nplus1.32+# name: TestDashboard.test_adding_insights_is_not_nplus1_for_gets.171'''- SELECT COUNT(*) AS "__count"- FROM "posthog_dashboard"- INNER JOIN "posthog_team" ON ("posthog_dashboard"."team_id" = "posthog_team"."id")- LEFT OUTER JOIN "posthog_filesystemviewlog" recent_dashboard_views ON ("posthog_team"."id" = recent_dashboard_views."team_id"- AND ((recent_dashboard_views."user_id" = 99999- AND recent_dashboard_views."type" = 'dashboard'- AND recent_dashboard_views."ref" = ("posthog_dashboard"."id")::varchar)))- WHERE ("posthog_team"."project_id" = 99999- AND NOT ("posthog_dashboard"."deleted")- AND NOT ("posthog_dashboard"."creation_mode" = 'unlisted'))+ SELECT "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_listing_dashboards_is_not_nplus1.33+# name: TestDashboard.test_adding_insights_is_not_nplus1_for_gets.172+ '''+ 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.173'''SELECT "posthog_dashboard"."id","posthog_dashboard"."name",@@ -3589,14 +3413,11 @@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 NOT ("posthog_dashboard"."creation_mode" = 'unlisted'))- ORDER BY "posthog_dashboard"."pinned" DESC,- "posthog_dashboard"."name" ASC,- "posthog_dashboard"."id" ASC- LIMIT 300+ AND "posthog_dashboard"."id" = 99999)+ LIMIT 21'''# ----# name: TestDashboard.test_listing_dashboards_is_not_nplus1.34+# name: TestDashboard.test_adding_insights_is_not_nplus1_for_gets.174'''SELECT "posthog_sharingconfiguration"."id","posthog_sharingconfiguration"."team_id",@@ -3619,7 +3440,7 @@5 /* ... */)'''# ----# name: TestDashboard.test_listing_dashboards_is_not_nplus1.35+# name: TestDashboard.test_adding_insights_is_not_nplus1_for_gets.175'''SELECT "posthog_taggeditem"."id","posthog_taggeditem"."tag_id",@@ -3640,40 +3461,29660 @@5 /* ... */))'''# ----# name: TestDashboard.test_listing_dashboards_is_not_nplus1.4+# name: TestDashboard.test_adding_insights_is_not_nplus1_for_gets.176'''- 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_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.5+# name: TestDashboard.test_adding_insights_is_not_nplus1_for_gets.177'''- 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",+ 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.178+ '''+ 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.179+ '''+ 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.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_adding_insights_is_not_nplus1_for_gets.180+ '''+ SELECT "posthog_dashboardtile"."id",+ "posthog_dashboardtile"."dashboard_id",+ "posthog_dashboardtile"."insight_id",+ "posthog_dashboardtile"."text_id",+ "posthog_dashboardtile"."button_tile_id",+ "posthog_dashboardtile"."widget_id",+ "posthog_dashboardtile"."team_id",+ "posthog_dashboardtile"."layouts",+ "posthog_dashboardtile"."color",+ "posthog_dashboardtile"."filters_hash",+ "posthog_dashboardtile"."last_refresh",+ "posthog_dashboardtile"."refreshing",+ "posthog_dashboardtile"."refresh_attempt",+ "posthog_dashboardtile"."filters_overrides",+ "posthog_dashboardtile"."show_description",+ "posthog_dashboardtile"."transparent_background",+ "posthog_dashboardtile"."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 "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.181+ '''+ 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,+ 4,+ 5 /* ... */))+ '''+# ---+# name: TestDashboard.test_adding_insights_is_not_nplus1_for_gets.182+ '''+ 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.183+ '''+ 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.184+ '''+ 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.185+ '''+ 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.186+ '''+ 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.187+ '''+ 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_adding_insights_is_not_nplus1_for_gets.19+ '''+ 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 "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.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",+ "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_adding_insights_is_not_nplus1_for_gets.20+ '''+ 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_adding_insights_is_not_nplus1_for_gets.21+ '''+ 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_adding_insights_is_not_nplus1_for_gets.22+ '''+ 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.23+ '''+ 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_adding_insights_is_not_nplus1_for_gets.24+ '''+ 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_adding_insights_is_not_nplus1_for_gets.25+ '''+ 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.26+ '''+ 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.27+ '''+ 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.28+ '''+ 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.29+ '''+ 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_adding_insights_is_not_nplus1_for_gets.3+ '''+ SELECT "posthog_organizationmembership"."id",+ "posthog_organizationmembership"."organization_id",+ "posthog_organizationmembership"."user_id",+ "posthog_organizationmembership"."level",+ "posthog_organizationmembership"."joined_at",+ "posthog_organizationmembership"."updated_at",+ "posthog_organizationmembership"."invited_by_id",+ "posthog_organization"."id",+ "posthog_organization"."name",+ "posthog_organization"."slug",+ "posthog_organization"."logo_media_id",+ "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_adding_insights_is_not_nplus1_for_gets.30+ '''+ 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_adding_insights_is_not_nplus1_for_gets.31+ '''+ 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.32+ '''+ 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.33+ '''+ 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.34+ '''+ 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.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+ '''+# ---+# name: TestDashboard.test_adding_insights_is_not_nplus1_for_gets.36+ '''+ 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 "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.37+ '''+ 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_adding_insights_is_not_nplus1_for_gets.38+ '''+ 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.39+ '''+ 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_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_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_adding_insights_is_not_nplus1_for_gets.41+ '''+ 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.42+ '''+ 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.43+ '''+ 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.44+ '''+ 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.45+ '''+ 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.46+ '''+ 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_adding_insights_is_not_nplus1_for_gets.47+ '''+ SELECT COUNT(*) AS "__count"+ FROM "posthog_dashboardtile"+ INNER JOIN "posthog_dashboard" ON ("posthog_dashboardtile"."dashboard_id" = "posthog_dashboard"."id")+ WHERE (NOT ("posthog_dashboardtile"."deleted"+ AND "posthog_dashboardtile"."deleted" IS NOT NULL)+ AND NOT ("posthog_dashboard"."deleted")+ AND "posthog_dashboardtile"."dashboard_id" = 99999+ AND NOT ("posthog_dashboardtile"."deleted"+ AND "posthog_dashboardtile"."deleted" IS NOT NULL))+ '''+# ---+# name: TestDashboard.test_adding_insights_is_not_nplus1_for_gets.48+ '''+ SELECT "posthog_dashboard"."id",+ "posthog_dashboard"."name",+ "posthog_dashboard"."description",+ "posthog_dashboard"."team_id",+ "posthog_dashboard"."pinned",+ "posthog_dashboard"."created_at",+ "posthog_dashboard"."created_by_id",+ "posthog_dashboard"."deleted",+ "posthog_dashboard"."last_accessed_at",+ "posthog_dashboard"."last_refresh",+ "posthog_dashboard"."filters",+ "posthog_dashboard"."variables",+ "posthog_dashboard"."breakdown_colors",+ "posthog_dashboard"."data_color_theme_id",+ "posthog_dashboard"."creation_mode",+ "posthog_dashboard"."restriction_level",+ "posthog_dashboard"."quick_filter_ids",+ "posthog_dashboard"."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_adding_insights_is_not_nplus1_for_gets.49+ '''+ 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.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.50+ '''+ 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.51+ '''+ 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_adding_insights_is_not_nplus1_for_gets.52+ '''+ 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.53+ '''+ 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_adding_insights_is_not_nplus1_for_gets.54+ '''+ 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_adding_insights_is_not_nplus1_for_gets.55+ '''+ 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.56+ '''+ 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.57+ '''+ 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.58+ '''+ 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.59+ '''+ 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.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.60+ '''+ 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.61+ '''+ SELECT "customer_analytics_teamcustomeranalyticsconfig"."account_group_type_index" AS "account_group_type_index"+ FROM "customer_analytics_teamcustomeranalyticsconfig"+ WHERE "customer_analytics_teamcustomeranalyticsconfig"."team_id" = 99999+ ORDER BY "customer_analytics_teamcustomeranalyticsconfig"."team_id" ASC+ LIMIT 1+ '''+# ---+# name: TestDashboard.test_adding_insights_is_not_nplus1_for_gets.62+ '''+ 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_adding_insights_is_not_nplus1_for_gets.63+ '''+ 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_adding_insights_is_not_nplus1_for_gets.64+ '''+ 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_adding_insights_is_not_nplus1_for_gets.65+ '''+ 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_adding_insights_is_not_nplus1_for_gets.66+ '''+ 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.67+ '''+ 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_adding_insights_is_not_nplus1_for_gets.68+ '''+ 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_adding_insights_is_not_nplus1_for_gets.69+ '''+ 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.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.70+ '''+ 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.71+ '''+ 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.72+ '''+ 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.73+ '''+ 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_adding_insights_is_not_nplus1_for_gets.74+ '''+ 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_adding_insights_is_not_nplus1_for_gets.75+ '''+ 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.76+ '''+ 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.77+ '''+ 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.78+ '''+ 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.79+ '''+ 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.8+ '''+ SELECT COUNT(*) AS "__count"+ FROM "posthog_dashboard"+ INNER JOIN "posthog_team" ON ("posthog_dashboard"."team_id" = "posthog_team"."id")+ WHERE (NOT ("posthog_dashboard"."deleted")+ AND ("posthog_dashboard"."team_id" =+ (SELECT U0."parent_team_id" AS "parent_team_id"+ FROM "posthog_team" U0+ WHERE U0."id" = 99999+ LIMIT 1)+ OR ("posthog_team"."parent_team_id" IS NULL+ AND "posthog_dashboard"."team_id" = 99999))+ AND NOT "posthog_dashboard"."deleted")+ '''+# ---+# name: TestDashboard.test_adding_insights_is_not_nplus1_for_gets.80+ '''+ 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 "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.81+ '''+ 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,+ 4,+ 5 /* ... */))+ '''+# ---+# name: TestDashboard.test_adding_insights_is_not_nplus1_for_gets.82+ '''+ 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.83+ '''+ 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.84+ '''+ 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.85+ '''+ 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.86+ '''+ 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.87+ '''+ 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_adding_insights_is_not_nplus1_for_gets.88+ '''+ 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_adding_insights_is_not_nplus1_for_gets.89+ '''+ 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.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_adding_insights_is_not_nplus1_for_gets.90+ '''+ 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_adding_insights_is_not_nplus1_for_gets.91+ '''+ 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_adding_insights_is_not_nplus1_for_gets.92+ '''+ 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.93+ '''+ 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.94+ '''+ 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.95+ '''+ 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.96+ '''+ 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.97+ '''+ 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_adding_insights_is_not_nplus1_for_gets.98+ '''+ 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_adding_insights_is_not_nplus1_for_gets.99+ '''+ SELECT "posthog_dashboard"."id",+ "posthog_dashboard"."name",+ "posthog_dashboard"."description",+ "posthog_dashboard"."team_id",+ "posthog_dashboard"."pinned",+ "posthog_dashboard"."created_at",+ "posthog_dashboard"."created_by_id",+ "posthog_dashboard"."deleted",+ "posthog_dashboard"."last_accessed_at",+ "posthog_dashboard"."last_refresh",+ "posthog_dashboard"."filters",+ "posthog_dashboard"."variables",+ "posthog_dashboard"."breakdown_colors",+ "posthog_dashboard"."data_color_theme_id",+ "posthog_dashboard"."creation_mode",+ "posthog_dashboard"."restriction_level",+ "posthog_dashboard"."quick_filter_ids",+ "posthog_dashboard"."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_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_team"."id" AS "id"+ FROM "posthog_team"+ WHERE ("posthog_team"."organization_id" = '00000000-0000-0000-0000-000000000000'::uuid+ AND "posthog_team"."receive_org_level_activity_logs")+ '''+# ---+# name: TestDashboard.test_listing_dashboards_is_not_nplus1.10+ '''+ SELECT "posthog_identityproviderconfig"."id",+ "posthog_identityproviderconfig"."organization_id",+ "posthog_identityproviderconfig"."name",+ "posthog_identityproviderconfig"."domain_scope",+ "posthog_identityproviderconfig"."config_scope",+ "posthog_identityproviderconfig"."created_at",+ "posthog_identityproviderconfig"."updated_at",+ "posthog_identityproviderconfig"."saml_entity_id",+ "posthog_identityproviderconfig"."saml_acs_url",+ "posthog_identityproviderconfig"."saml_x509_cert",+ "posthog_identityproviderconfig"."oidc_issuer_url",+ "posthog_identityproviderconfig"."oidc_client_id",+ "posthog_identityproviderconfig"."oidc_credentials",+ "posthog_identityproviderconfig"."saml_relay_state",+ "posthog_identityproviderconfig"."scim_slug",+ "posthog_identityproviderconfig"."scim_enabled",+ "posthog_identityproviderconfig"."scim_bearer_token",+ "posthog_identityproviderconfig"."id_jag_issuer_url",+ "posthog_identityproviderconfig"."id_jag_jwks_url",+ "posthog_identityproviderconfig"."id_jag_allowed_clients"+ FROM "posthog_identityproviderconfig"+ WHERE "posthog_identityproviderconfig"."organization_id" = '00000000-0000-0000-0000-000000000000'::uuid+ '''+# ---+# name: TestDashboard.test_listing_dashboards_is_not_nplus1.100+ '''+ 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.101+ '''+ 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_listing_dashboards_is_not_nplus1.102+ '''+ 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.103+ '''+ 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.104+ '''+ 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.105+ '''+ 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_listing_dashboards_is_not_nplus1.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",+ "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.107+ '''+ 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.108+ '''+ 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.109+ '''+ 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.11+ '''+ SELECT "posthog_identityproviderconfig"."id",+ "posthog_identityproviderconfig"."organization_id",+ "posthog_identityproviderconfig"."name",+ "posthog_identityproviderconfig"."domain_scope",+ "posthog_identityproviderconfig"."config_scope",+ "posthog_identityproviderconfig"."created_at",+ "posthog_identityproviderconfig"."updated_at",+ "posthog_identityproviderconfig"."saml_entity_id",+ "posthog_identityproviderconfig"."saml_acs_url",+ "posthog_identityproviderconfig"."saml_x509_cert",+ "posthog_identityproviderconfig"."oidc_issuer_url",+ "posthog_identityproviderconfig"."oidc_client_id",+ "posthog_identityproviderconfig"."oidc_credentials",+ "posthog_identityproviderconfig"."saml_relay_state",+ "posthog_identityproviderconfig"."scim_slug",+ "posthog_identityproviderconfig"."scim_enabled",+ "posthog_identityproviderconfig"."scim_bearer_token",+ "posthog_identityproviderconfig"."id_jag_issuer_url",+ "posthog_identityproviderconfig"."id_jag_jwks_url",+ "posthog_identityproviderconfig"."id_jag_allowed_clients"+ FROM "posthog_identityproviderconfig"+ WHERE "posthog_identityproviderconfig"."organization_id" = '00000000-0000-0000-0000-000000000000'::uuid+ '''+# ---+# name: TestDashboard.test_listing_dashboards_is_not_nplus1.110+ '''+ 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.111+ '''+ SELECT COUNT(*) AS "__count"+ FROM "posthog_dashboardtile"+ INNER JOIN "posthog_dashboard" ON ("posthog_dashboardtile"."dashboard_id" = "posthog_dashboard"."id")+ WHERE (NOT ("posthog_dashboardtile"."deleted"+ AND "posthog_dashboardtile"."deleted" IS NOT NULL)+ AND NOT ("posthog_dashboard"."deleted")+ AND "posthog_dashboardtile"."dashboard_id" = 99999+ AND NOT ("posthog_dashboardtile"."deleted"+ AND "posthog_dashboardtile"."deleted" IS NOT NULL))+ '''+# ---+# name: TestDashboard.test_listing_dashboards_is_not_nplus1.112+ '''+ 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_listing_dashboards_is_not_nplus1.113+ '''+ 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.114+ '''+ 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.115+ '''+ SELECT "posthog_team"."id",+ "posthog_team"."uuid",+ "posthog_team"."organization_id",+ "posthog_team"."parent_team_id",+ "posthog_team"."project_id",+ "posthog_team"."api_token",+ "posthog_team"."app_urls",+ "posthog_team"."name",+ "posthog_team"."slack_incoming_webhook",+ "posthog_team"."created_at",+ "posthog_team"."updated_at",+ "posthog_team"."anonymize_ips",+ "posthog_team"."completed_snippet_onboarding",+ "posthog_team"."has_completed_onboarding_for",+ "posthog_team"."onboarding_tasks",+ "posthog_team"."ingested_event",+ "posthog_team"."ingested_production_event",+ "posthog_team"."ingested_production_event_last_checked_at",+ "posthog_team"."person_processing_opt_out",+ "posthog_team"."secret_api_token",+ "posthog_team"."secret_api_token_backup",+ "posthog_team"."session_recording_opt_in",+ "posthog_team"."session_recording_sample_rate",+ "posthog_team"."session_recording_minimum_duration_milliseconds",+ "posthog_team"."session_recording_linked_flag",+ "posthog_team"."session_recording_network_payload_capture_config",+ "posthog_team"."session_recording_masking_config",+ "posthog_team"."session_recording_url_trigger_config",+ "posthog_team"."session_recording_url_blocklist_config",+ "posthog_team"."session_recording_event_trigger_config",+ "posthog_team"."session_recording_trigger_match_type_config",+ "posthog_team"."session_recording_trigger_groups",+ "posthog_team"."session_replay_config",+ "posthog_team"."session_recording_retention_period",+ "posthog_team"."event_retention_months",+ "posthog_team"."conversations_enabled",+ "posthog_team"."conversations_settings",+ "posthog_team"."proactive_tasks_enabled",+ "posthog_team"."survey_config",+ "posthog_team"."surveys_opt_in",+ "posthog_team"."product_tours_opt_in",+ "posthog_team"."capture_console_log_opt_in",+ "posthog_team"."capture_performance_opt_in",+ "posthog_team"."capture_dead_clicks",+ "posthog_team"."autocapture_opt_out",+ "posthog_team"."autocapture_web_vitals_opt_in",+ "posthog_team"."autocapture_web_vitals_allowed_metrics",+ "posthog_team"."autocapture_exceptions_opt_in",+ "posthog_team"."autocapture_exceptions_errors_to_ignore",+ "posthog_team"."logs_settings",+ "posthog_team"."llm_gateway_enabled_at",+ "posthog_team"."llm_gateway_revoked_at",+ "posthog_team"."llm_gateway_overspend_allowance_usd",+ "posthog_team"."heatmaps_opt_in",+ "posthog_team"."receive_org_level_activity_logs",+ "posthog_team"."web_analytics_pre_aggregated_tables_enabled",+ "posthog_team"."web_analytics_pre_aggregated_tables_version",+ "posthog_team"."flags_persistence_default",+ "posthog_team"."feature_flag_confirmation_enabled",+ "posthog_team"."feature_flag_confirmation_message",+ "posthog_team"."default_evaluation_environments_enabled",+ "posthog_team"."require_evaluation_environment_tags",+ "posthog_team"."default_evaluation_contexts_enabled",+ "posthog_team"."require_evaluation_contexts",+ "posthog_team"."session_recording_version",+ "posthog_team"."signup_token",+ "posthog_team"."is_demo",+ "posthog_team"."access_control",+ "posthog_team"."week_start_day",+ "posthog_team"."inject_web_apps",+ "posthog_team"."test_account_filters",+ "posthog_team"."test_account_filters_default_checked",+ "posthog_team"."path_cleaning_filters",+ "posthog_team"."timezone",+ "posthog_team"."data_attributes",+ "posthog_team"."person_display_name_properties",+ "posthog_team"."live_events_columns",+ "posthog_team"."recording_domains",+ "posthog_team"."human_friendly_comparison_periods",+ "posthog_team"."cookieless_server_hash_mode",+ "posthog_team"."primary_dashboard_id",+ "posthog_team"."default_data_theme",+ "posthog_team"."extra_settings",+ "posthog_team"."modifiers",+ "posthog_team"."correlation_config",+ "posthog_team"."session_recording_retention_period_days",+ "posthog_team"."external_data_workspace_id",+ "posthog_team"."external_data_workspace_last_synced_at",+ "posthog_team"."api_query_rate_limit",+ "posthog_team"."drop_events_older_than",+ "posthog_team"."base_currency",+ "posthog_team"."business_model"+ FROM "posthog_team"+ WHERE "posthog_team"."id" = 99999+ LIMIT 21+ '''+# ---+# name: TestDashboard.test_listing_dashboards_is_not_nplus1.116+ '''+ 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.117+ '''+ 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.118+ '''+ 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.119+ '''+ 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.12+ '''+ SELECT "posthog_organizationdomain"."id",+ "posthog_organizationdomain"."organization_id",+ "posthog_organizationdomain"."domain",+ "posthog_organizationdomain"."verification_challenge",+ "posthog_organizationdomain"."verified_at",+ "posthog_organizationdomain"."last_verification_retry",+ "posthog_organizationdomain"."jit_provisioning_enabled",+ "posthog_organizationdomain"."sso_enforcement",+ "posthog_organizationdomain"."saml_entity_id",+ "posthog_organizationdomain"."saml_acs_url",+ "posthog_organizationdomain"."saml_x509_cert",+ "posthog_organizationdomain"."scim_enabled",+ "posthog_organizationdomain"."scim_bearer_token",+ "posthog_organizationdomain"."id_jag_issuer_url",+ "posthog_organizationdomain"."id_jag_jwks_url",+ "posthog_organizationdomain"."id_jag_allowed_clients",+ "posthog_organizationdomain"."identity_provider_config_id"+ FROM "posthog_organizationdomain"+ WHERE "posthog_organizationdomain"."organization_id" = '00000000-0000-0000-0000-000000000000'::uuid+ '''+# ---+# name: TestDashboard.test_listing_dashboards_is_not_nplus1.120+ '''+ 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_listing_dashboards_is_not_nplus1.121+ '''+ 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_listing_dashboards_is_not_nplus1.122+ '''+ 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.123+ '''+ 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_listing_dashboards_is_not_nplus1.124+ '''+ 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_listing_dashboards_is_not_nplus1.125+ '''+ 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_listing_dashboards_is_not_nplus1.126+ '''+ 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.127+ '''+ 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_listing_dashboards_is_not_nplus1.128+ '''+ 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.129+ '''+ 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.13+ '''+ SELECT "posthog_organizationdomain"."id",+ "posthog_organizationdomain"."organization_id",+ "posthog_organizationdomain"."domain",+ "posthog_organizationdomain"."verification_challenge",+ "posthog_organizationdomain"."verified_at",+ "posthog_organizationdomain"."last_verification_retry",+ "posthog_organizationdomain"."jit_provisioning_enabled",+ "posthog_organizationdomain"."sso_enforcement",+ "posthog_organizationdomain"."saml_entity_id",+ "posthog_organizationdomain"."saml_acs_url",+ "posthog_organizationdomain"."saml_x509_cert",+ "posthog_organizationdomain"."scim_enabled",+ "posthog_organizationdomain"."scim_bearer_token",+ "posthog_organizationdomain"."id_jag_issuer_url",+ "posthog_organizationdomain"."id_jag_jwks_url",+ "posthog_organizationdomain"."id_jag_allowed_clients",+ "posthog_organizationdomain"."identity_provider_config_id"+ FROM "posthog_organizationdomain"+ WHERE "posthog_organizationdomain"."organization_id" = '00000000-0000-0000-0000-000000000000'::uuid+ '''+# ---+# name: TestDashboard.test_listing_dashboards_is_not_nplus1.130+ '''+ 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.131+ '''+ 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_listing_dashboards_is_not_nplus1.132+ '''+ 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.133+ '''+ 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.134+ '''+ 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.135+ '''+ 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.136+ '''+ 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.137+ '''+ SELECT COUNT(*) AS "__count"+ FROM "posthog_dashboardtile"+ INNER JOIN "posthog_dashboard" ON ("posthog_dashboardtile"."dashboard_id" = "posthog_dashboard"."id")+ WHERE (NOT ("posthog_dashboardtile"."deleted"+ AND "posthog_dashboardtile"."deleted" IS NOT NULL)+ AND NOT ("posthog_dashboard"."deleted")+ AND "posthog_dashboardtile"."dashboard_id" = 99999+ AND NOT ("posthog_dashboardtile"."deleted"+ AND "posthog_dashboardtile"."deleted" IS NOT NULL))+ '''+# ---+# name: TestDashboard.test_listing_dashboards_is_not_nplus1.138+ '''+ 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_listing_dashboards_is_not_nplus1.139+ '''+ 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.14+ '''+ SELECT "posthog_roleexternalreference"."id",+ "posthog_roleexternalreference"."organization_id",+ "posthog_roleexternalreference"."role_id",+ "posthog_roleexternalreference"."provider",+ "posthog_roleexternalreference"."provider_organization_id",+ "posthog_roleexternalreference"."provider_role_id",+ "posthog_roleexternalreference"."provider_role_slug",+ "posthog_roleexternalreference"."provider_role_name",+ "posthog_roleexternalreference"."created_at",+ "posthog_roleexternalreference"."updated_at",+ "posthog_roleexternalreference"."created_by_id"+ FROM "posthog_roleexternalreference"+ WHERE "posthog_roleexternalreference"."organization_id" = '00000000-0000-0000-0000-000000000000'::uuid+ '''+# ---+# name: TestDashboard.test_listing_dashboards_is_not_nplus1.140+ '''+ 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.141+ '''+ 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.142+ '''+ 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.143+ '''+ 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.144+ '''+ 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.145+ '''+ 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.146+ '''+ 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_listing_dashboards_is_not_nplus1.147+ '''+ 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_listing_dashboards_is_not_nplus1.148+ '''+ 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.149+ '''+ 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_listing_dashboards_is_not_nplus1.15+ '''+ SELECT "posthog_roleexternalreference"."id",+ "posthog_roleexternalreference"."organization_id",+ "posthog_roleexternalreference"."role_id",+ "posthog_roleexternalreference"."provider",+ "posthog_roleexternalreference"."provider_organization_id",+ "posthog_roleexternalreference"."provider_role_id",+ "posthog_roleexternalreference"."provider_role_slug",+ "posthog_roleexternalreference"."provider_role_name",+ "posthog_roleexternalreference"."created_at",+ "posthog_roleexternalreference"."updated_at",+ "posthog_roleexternalreference"."created_by_id"+ FROM "posthog_roleexternalreference"+ WHERE "posthog_roleexternalreference"."organization_id" = '00000000-0000-0000-0000-000000000000'::uuid+ '''+# ---+# name: TestDashboard.test_listing_dashboards_is_not_nplus1.150+ '''+ 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_listing_dashboards_is_not_nplus1.151+ '''+ 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_listing_dashboards_is_not_nplus1.152+ '''+ 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.153+ '''+ 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_listing_dashboards_is_not_nplus1.154+ '''+ 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.155+ '''+ 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.156+ '''+ 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.157+ '''+ 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_listing_dashboards_is_not_nplus1.158+ '''+ 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.159+ '''+ 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.16+ '''+ SELECT "posthog_organizationprovisioning"."organization_id",+ "posthog_organizationprovisioning"."partner",+ "posthog_organizationprovisioning"."application_id",+ "posthog_organizationprovisioning"."created_at"+ FROM "posthog_organizationprovisioning"+ WHERE "posthog_organizationprovisioning"."organization_id" = '00000000-0000-0000-0000-000000000000'::uuid+ LIMIT 21+ '''+# ---+# name: TestDashboard.test_listing_dashboards_is_not_nplus1.160+ '''+ 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.161+ '''+ 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.162+ '''+ 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.163+ '''+ 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.164+ '''+ 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.165+ '''+ 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.166+ '''+ 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.167+ '''+ 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_listing_dashboards_is_not_nplus1.168+ '''+ 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.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"+ 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.17+ '''+ SELECT "posthog_proxyrecord"."id",+ "posthog_proxyrecord"."organization_id",+ "posthog_proxyrecord"."domain",+ "posthog_proxyrecord"."target_cname",+ "posthog_proxyrecord"."root_redirect_url",+ "posthog_proxyrecord"."message",+ "posthog_proxyrecord"."status",+ "posthog_proxyrecord"."created_by_id",+ "posthog_proxyrecord"."created_at",+ "posthog_proxyrecord"."updated_at"+ FROM "posthog_proxyrecord"+ WHERE "posthog_proxyrecord"."organization_id" = '00000000-0000-0000-0000-000000000000'::uuid+ '''+# ---+# name: TestDashboard.test_listing_dashboards_is_not_nplus1.170+ '''+ 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.171+ '''+ SELECT COUNT(*) AS "__count"+ FROM "posthog_dashboard"+ INNER JOIN "posthog_team" ON ("posthog_dashboard"."team_id" = "posthog_team"."id")+ WHERE (NOT ("posthog_dashboard"."deleted")+ AND ("posthog_dashboard"."team_id" =+ (SELECT U0."parent_team_id" AS "parent_team_id"+ FROM "posthog_team" U0+ WHERE U0."id" = 99999+ LIMIT 1)+ OR ("posthog_team"."parent_team_id" IS NULL+ AND "posthog_dashboard"."team_id" = 99999))+ AND NOT "posthog_dashboard"."deleted")+ '''+# ---+# name: TestDashboard.test_listing_dashboards_is_not_nplus1.172+ '''+ SELECT "posthog_team"."id",+ "posthog_team"."uuid",+ "posthog_team"."organization_id",+ "posthog_team"."parent_team_id",+ "posthog_team"."project_id",+ "posthog_team"."api_token",+ "posthog_team"."app_urls",+ "posthog_team"."name",+ "posthog_team"."slack_incoming_webhook",+ "posthog_team"."created_at",+ "posthog_team"."updated_at",+ "posthog_team"."anonymize_ips",+ "posthog_team"."completed_snippet_onboarding",+ "posthog_team"."has_completed_onboarding_for",+ "posthog_team"."onboarding_tasks",+ "posthog_team"."ingested_event",+ "posthog_team"."ingested_production_event",+ "posthog_team"."ingested_production_event_last_checked_at",+ "posthog_team"."person_processing_opt_out",+ "posthog_team"."secret_api_token",+ "posthog_team"."secret_api_token_backup",+ "posthog_team"."session_recording_opt_in",+ "posthog_team"."session_recording_sample_rate",+ "posthog_team"."session_recording_minimum_duration_milliseconds",+ "posthog_team"."session_recording_linked_flag",+ "posthog_team"."session_recording_network_payload_capture_config",+ "posthog_team"."session_recording_masking_config",+ "posthog_team"."session_recording_url_trigger_config",+ "posthog_team"."session_recording_url_blocklist_config",+ "posthog_team"."session_recording_event_trigger_config",+ "posthog_team"."session_recording_trigger_match_type_config",+ "posthog_team"."session_recording_trigger_groups",+ "posthog_team"."session_replay_config",+ "posthog_team"."session_recording_retention_period",+ "posthog_team"."event_retention_months",+ "posthog_team"."conversations_enabled",+ "posthog_team"."conversations_settings",+ "posthog_team"."proactive_tasks_enabled",+ "posthog_team"."survey_config",+ "posthog_team"."surveys_opt_in",+ "posthog_team"."product_tours_opt_in",+ "posthog_team"."capture_console_log_opt_in",+ "posthog_team"."capture_performance_opt_in",+ "posthog_team"."capture_dead_clicks",+ "posthog_team"."autocapture_opt_out",+ "posthog_team"."autocapture_web_vitals_opt_in",+ "posthog_team"."autocapture_web_vitals_allowed_metrics",+ "posthog_team"."autocapture_exceptions_opt_in",+ "posthog_team"."autocapture_exceptions_errors_to_ignore",+ "posthog_team"."logs_settings",+ "posthog_team"."llm_gateway_enabled_at",+ "posthog_team"."llm_gateway_revoked_at",+ "posthog_team"."llm_gateway_overspend_allowance_usd",+ "posthog_team"."heatmaps_opt_in",+ "posthog_team"."receive_org_level_activity_logs",+ "posthog_team"."web_analytics_pre_aggregated_tables_enabled",+ "posthog_team"."web_analytics_pre_aggregated_tables_version",+ "posthog_team"."flags_persistence_default",+ "posthog_team"."feature_flag_confirmation_enabled",+ "posthog_team"."feature_flag_confirmation_message",+ "posthog_team"."default_evaluation_environments_enabled",+ "posthog_team"."require_evaluation_environment_tags",+ "posthog_team"."default_evaluation_contexts_enabled",+ "posthog_team"."require_evaluation_contexts",+ "posthog_team"."session_recording_version",+ "posthog_team"."signup_token",+ "posthog_team"."is_demo",+ "posthog_team"."access_control",+ "posthog_team"."week_start_day",+ "posthog_team"."inject_web_apps",+ "posthog_team"."test_account_filters",+ "posthog_team"."test_account_filters_default_checked",+ "posthog_team"."path_cleaning_filters",+ "posthog_team"."timezone",+ "posthog_team"."data_attributes",+ "posthog_team"."person_display_name_properties",+ "posthog_team"."live_events_columns",+ "posthog_team"."recording_domains",+ "posthog_team"."human_friendly_comparison_periods",+ "posthog_team"."cookieless_server_hash_mode",+ "posthog_team"."primary_dashboard_id",+ "posthog_team"."default_data_theme",+ "posthog_team"."extra_settings",+ "posthog_team"."modifiers",+ "posthog_team"."correlation_config",+ "posthog_team"."session_recording_retention_period_days",+ "posthog_team"."external_data_workspace_id",+ "posthog_team"."external_data_workspace_last_synced_at",+ "posthog_team"."api_query_rate_limit",+ "posthog_team"."drop_events_older_than",+ "posthog_team"."base_currency",+ "posthog_team"."business_model"+ FROM "posthog_team"+ WHERE "posthog_team"."id" = 99999+ LIMIT 21+ '''+# ---+# name: TestDashboard.test_listing_dashboards_is_not_nplus1.173+ '''+ 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_listing_dashboards_is_not_nplus1.174+ '''+ 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_listing_dashboards_is_not_nplus1.175+ '''+ 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_listing_dashboards_is_not_nplus1.176+ '''+ SELECT COUNT(*) AS "__count"+ FROM "posthog_taggeditem"+ WHERE ("posthog_taggeditem"."content_type_id" = 99999+ AND "posthog_taggeditem"."object_id" = 99999)+ '''+# ---+# name: TestDashboard.test_listing_dashboards_is_not_nplus1.177+ '''+ 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_listing_dashboards_is_not_nplus1.178+ '''+ 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_listing_dashboards_is_not_nplus1.179+ '''+ 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_listing_dashboards_is_not_nplus1.18+ '''+ SELECT "posthog_proxyrecord"."id",+ "posthog_proxyrecord"."organization_id",+ "posthog_proxyrecord"."domain",+ "posthog_proxyrecord"."target_cname",+ "posthog_proxyrecord"."root_redirect_url",+ "posthog_proxyrecord"."message",+ "posthog_proxyrecord"."status",+ "posthog_proxyrecord"."created_by_id",+ "posthog_proxyrecord"."created_at",+ "posthog_proxyrecord"."updated_at"+ FROM "posthog_proxyrecord"+ WHERE "posthog_proxyrecord"."organization_id" = '00000000-0000-0000-0000-000000000000'::uuid+ '''+# ---+# name: TestDashboard.test_listing_dashboards_is_not_nplus1.180+ '''+ 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_listing_dashboards_is_not_nplus1.181+ '''+ 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.182+ '''+ 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 "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_listing_dashboards_is_not_nplus1.183+ '''+ 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.184+ '''+ 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.185+ '''+ 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.186+ '''+ SELECT "posthog_team"."id",+ "posthog_team"."uuid",+ "posthog_team"."organization_id",+ "posthog_team"."parent_team_id",+ "posthog_team"."project_id",+ "posthog_team"."api_token",+ "posthog_team"."app_urls",+ "posthog_team"."name",+ "posthog_team"."slack_incoming_webhook",+ "posthog_team"."created_at",+ "posthog_team"."updated_at",+ "posthog_team"."anonymize_ips",+ "posthog_team"."completed_snippet_onboarding",+ "posthog_team"."has_completed_onboarding_for",+ "posthog_team"."onboarding_tasks",+ "posthog_team"."ingested_event",+ "posthog_team"."ingested_production_event",+ "posthog_team"."ingested_production_event_last_checked_at",+ "posthog_team"."person_processing_opt_out",+ "posthog_team"."secret_api_token",+ "posthog_team"."secret_api_token_backup",+ "posthog_team"."session_recording_opt_in",+ "posthog_team"."session_recording_sample_rate",+ "posthog_team"."session_recording_minimum_duration_milliseconds",+ "posthog_team"."session_recording_linked_flag",+ "posthog_team"."session_recording_network_payload_capture_config",+ "posthog_team"."session_recording_masking_config",+ "posthog_team"."session_recording_url_trigger_config",+ "posthog_team"."session_recording_url_blocklist_config",+ "posthog_team"."session_recording_event_trigger_config",+ "posthog_team"."session_recording_trigger_match_type_config",+ "posthog_team"."session_recording_trigger_groups",+ "posthog_team"."session_replay_config",+ "posthog_team"."session_recording_retention_period",+ "posthog_team"."event_retention_months",+ "posthog_team"."conversations_enabled",+ "posthog_team"."conversations_settings",+ "posthog_team"."proactive_tasks_enabled",+ "posthog_team"."survey_config",+ "posthog_team"."surveys_opt_in",+ "posthog_team"."product_tours_opt_in",+ "posthog_team"."capture_console_log_opt_in",+ "posthog_team"."capture_performance_opt_in",+ "posthog_team"."capture_dead_clicks",+ "posthog_team"."autocapture_opt_out",+ "posthog_team"."autocapture_web_vitals_opt_in",+ "posthog_team"."autocapture_web_vitals_allowed_metrics",+ "posthog_team"."autocapture_exceptions_opt_in",+ "posthog_team"."autocapture_exceptions_errors_to_ignore",+ "posthog_team"."logs_settings",+ "posthog_team"."llm_gateway_enabled_at",+ "posthog_team"."llm_gateway_revoked_at",+ "posthog_team"."llm_gateway_overspend_allowance_usd",+ "posthog_team"."heatmaps_opt_in",+ "posthog_team"."receive_org_level_activity_logs",+ "posthog_team"."web_analytics_pre_aggregated_tables_enabled",+ "posthog_team"."web_analytics_pre_aggregated_tables_version",+ "posthog_team"."flags_persistence_default",+ "posthog_team"."feature_flag_confirmation_enabled",+ "posthog_team"."feature_flag_confirmation_message",+ "posthog_team"."default_evaluation_environments_enabled",+ "posthog_team"."require_evaluation_environment_tags",+ "posthog_team"."default_evaluation_contexts_enabled",+ "posthog_team"."require_evaluation_contexts",+ "posthog_team"."session_recording_version",+ "posthog_team"."signup_token",+ "posthog_team"."is_demo",+ "posthog_team"."access_control",+ "posthog_team"."week_start_day",+ "posthog_team"."inject_web_apps",+ "posthog_team"."test_account_filters",+ "posthog_team"."test_account_filters_default_checked",+ "posthog_team"."path_cleaning_filters",+ "posthog_team"."timezone",+ "posthog_team"."data_attributes",+ "posthog_team"."person_display_name_properties",+ "posthog_team"."live_events_columns",+ "posthog_team"."recording_domains",+ "posthog_team"."human_friendly_comparison_periods",+ "posthog_team"."cookieless_server_hash_mode",+ "posthog_team"."primary_dashboard_id",+ "posthog_team"."default_data_theme",+ "posthog_team"."extra_settings",+ "posthog_team"."modifiers",+ "posthog_team"."correlation_config",+ "posthog_team"."session_recording_retention_period_days",+ "posthog_team"."external_data_workspace_id",+ "posthog_team"."external_data_workspace_last_synced_at",+ "posthog_team"."api_query_rate_limit",+ "posthog_team"."drop_events_older_than",+ "posthog_team"."base_currency",+ "posthog_team"."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_listing_dashboards_is_not_nplus1.187+ '''+ 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.188+ '''+ 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.189+ '''+ 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.19+ '''+ SELECT "posthog_duckgresserver"."created_by_id",+ "posthog_duckgresserver"."created_at",+ "posthog_duckgresserver"."updated_at",+ "posthog_duckgresserver"."id",+ "posthog_duckgresserver"."organization_id",+ "posthog_duckgresserver"."host",+ "posthog_duckgresserver"."port",+ "posthog_duckgresserver"."flight_port",+ "posthog_duckgresserver"."database",+ "posthog_duckgresserver"."username",+ "posthog_duckgresserver"."password",+ "posthog_duckgresserver"."trino_password",+ "posthog_duckgresserver"."catalog_host",+ "posthog_duckgresserver"."catalog_port",+ "posthog_duckgresserver"."catalog_database",+ "posthog_duckgresserver"."catalog_username",+ "posthog_duckgresserver"."catalog_password",+ "posthog_duckgresserver"."bucket",+ "posthog_duckgresserver"."bucket_region"+ FROM "posthog_duckgresserver"+ WHERE "posthog_duckgresserver"."organization_id" = '00000000-0000-0000-0000-000000000000'::uuid+ LIMIT 21+ '''+# ---+# name: TestDashboard.test_listing_dashboards_is_not_nplus1.190+ '''+ 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.191+ '''+ 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.192+ '''+ SELECT COUNT(*) AS "__count"+ FROM "posthog_dashboardtile"+ INNER JOIN "posthog_dashboard" ON ("posthog_dashboardtile"."dashboard_id" = "posthog_dashboard"."id")+ WHERE (NOT ("posthog_dashboardtile"."deleted"+ AND "posthog_dashboardtile"."deleted" IS NOT NULL)+ AND NOT ("posthog_dashboard"."deleted")+ AND "posthog_dashboardtile"."dashboard_id" = 99999+ AND NOT ("posthog_dashboardtile"."deleted"+ AND "posthog_dashboardtile"."deleted" IS NOT NULL))+ '''+# ---+# name: TestDashboard.test_listing_dashboards_is_not_nplus1.193+ '''+ 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_listing_dashboards_is_not_nplus1.194+ '''+ 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.195+ '''+ 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.196+ '''+ 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.197+ '''+ 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.198+ '''+ 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.199+ '''+ 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.2+ '''+ 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+ ORDER BY "posthog_organization"."id" ASC+ LIMIT 1+ '''+# ---+# name: TestDashboard.test_listing_dashboards_is_not_nplus1.20+ '''+ SELECT "posthog_managedwarehousesourcelifecycle"."organization_id",+ "posthog_managedwarehousesourcelifecycle"."generation",+ "posthog_managedwarehousesourcelifecycle"."desired_active",+ "posthog_managedwarehousesourcelifecycle"."legacy_conversion_generation"+ FROM "posthog_managedwarehousesourcelifecycle"+ WHERE "posthog_managedwarehousesourcelifecycle"."organization_id" = '00000000-0000-0000-0000-000000000000'::uuid+ LIMIT 21+ '''+# ---+# name: TestDashboard.test_listing_dashboards_is_not_nplus1.200+ '''+ 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.201+ '''+ 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_listing_dashboards_is_not_nplus1.202+ '''+ 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_listing_dashboards_is_not_nplus1.203+ '''+ 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.204+ '''+ 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_listing_dashboards_is_not_nplus1.205+ '''+ 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_listing_dashboards_is_not_nplus1.206+ '''+ 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_listing_dashboards_is_not_nplus1.207+ '''+ 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.208+ '''+ 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_listing_dashboards_is_not_nplus1.209+ '''+ 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.21+ '''+ SELECT "legal_documents_legaldocument"."created_by_id",+ "legal_documents_legaldocument"."created_at",+ "legal_documents_legaldocument"."updated_at",+ "legal_documents_legaldocument"."id",+ "legal_documents_legaldocument"."organization_id",+ "legal_documents_legaldocument"."document_type",+ "legal_documents_legaldocument"."company_name",+ "legal_documents_legaldocument"."company_address",+ "legal_documents_legaldocument"."representative_email",+ "legal_documents_legaldocument"."status",+ "legal_documents_legaldocument"."pandadoc_document_id",+ "legal_documents_legaldocument"."signed_pdf_stored"+ FROM "legal_documents_legaldocument"+ WHERE "legal_documents_legaldocument"."organization_id" = '00000000-0000-0000-0000-000000000000'::uuid+ ORDER BY "legal_documents_legaldocument"."created_at" DESC+ '''+# ---+# name: TestDashboard.test_listing_dashboards_is_not_nplus1.210+ '''+ 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.211+ '''+ 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.212+ '''+ 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_listing_dashboards_is_not_nplus1.213+ '''+ 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.214+ '''+ 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.215+ '''+ 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.216+ '''+ 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.217+ '''+ 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.218+ '''+ SELECT COUNT(*) AS "__count"+ FROM "posthog_dashboardtile"+ INNER JOIN "posthog_dashboard" ON ("posthog_dashboardtile"."dashboard_id" = "posthog_dashboard"."id")+ WHERE (NOT ("posthog_dashboardtile"."deleted"+ AND "posthog_dashboardtile"."deleted" IS NOT NULL)+ AND NOT ("posthog_dashboard"."deleted")+ AND "posthog_dashboardtile"."dashboard_id" = 99999+ AND NOT ("posthog_dashboardtile"."deleted"+ AND "posthog_dashboardtile"."deleted" IS NOT NULL))+ '''+# ---+# name: TestDashboard.test_listing_dashboards_is_not_nplus1.219+ '''+ 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_listing_dashboards_is_not_nplus1.22+ '''+ SELECT "legal_documents_legaldocument"."created_by_id",+ "legal_documents_legaldocument"."created_at",+ "legal_documents_legaldocument"."updated_at",+ "legal_documents_legaldocument"."id",+ "legal_documents_legaldocument"."organization_id",+ "legal_documents_legaldocument"."document_type",+ "legal_documents_legaldocument"."company_name",+ "legal_documents_legaldocument"."company_address",+ "legal_documents_legaldocument"."representative_email",+ "legal_documents_legaldocument"."status",+ "legal_documents_legaldocument"."pandadoc_document_id",+ "legal_documents_legaldocument"."signed_pdf_stored"+ FROM "legal_documents_legaldocument"+ WHERE "legal_documents_legaldocument"."organization_id" = '00000000-0000-0000-0000-000000000000'::uuid+ ORDER BY "legal_documents_legaldocument"."created_at" DESC+ '''+# ---+# name: TestDashboard.test_listing_dashboards_is_not_nplus1.220+ '''+ 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.221+ '''+ 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.222+ '''+ 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.223+ '''+ 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.224+ '''+ 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.225+ '''+ 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.226+ '''+ 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.227+ '''+ 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_listing_dashboards_is_not_nplus1.228+ '''+ 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_listing_dashboards_is_not_nplus1.229+ '''+ 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.23+ '''+ SELECT "growth_productpushcampaign"."updated_at",+ "growth_productpushcampaign"."id",+ "growth_productpushcampaign"."organization_id",+ "growth_productpushcampaign"."created_by_id",+ "growth_productpushcampaign"."product_key",+ "growth_productpushcampaign"."status",+ "growth_productpushcampaign"."position",+ "growth_productpushcampaign"."scheduled_for",+ "growth_productpushcampaign"."started_at",+ "growth_productpushcampaign"."ends_at",+ "growth_productpushcampaign"."ended_at",+ "growth_productpushcampaign"."source",+ "growth_productpushcampaign"."reason_text",+ "growth_productpushcampaign"."metadata",+ "growth_productpushcampaign"."created_at"+ FROM "growth_productpushcampaign"+ WHERE "growth_productpushcampaign"."organization_id" = '00000000-0000-0000-0000-000000000000'::uuid+ '''+# ---+# name: TestDashboard.test_listing_dashboards_is_not_nplus1.230+ '''+ 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_listing_dashboards_is_not_nplus1.231+ '''+ 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_listing_dashboards_is_not_nplus1.232+ '''+ 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_listing_dashboards_is_not_nplus1.233+ '''+ 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.234+ '''+ 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_listing_dashboards_is_not_nplus1.235+ '''+ 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.236+ '''+ 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.237+ '''+ 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.238+ '''+ 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_listing_dashboards_is_not_nplus1.239+ '''+ 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.24+ '''+ SELECT "growth_productpushcampaign"."updated_at",+ "growth_productpushcampaign"."id",+ "growth_productpushcampaign"."organization_id",+ "growth_productpushcampaign"."created_by_id",+ "growth_productpushcampaign"."product_key",+ "growth_productpushcampaign"."status",+ "growth_productpushcampaign"."position",+ "growth_productpushcampaign"."scheduled_for",+ "growth_productpushcampaign"."started_at",+ "growth_productpushcampaign"."ends_at",+ "growth_productpushcampaign"."ended_at",+ "growth_productpushcampaign"."source",+ "growth_productpushcampaign"."reason_text",+ "growth_productpushcampaign"."metadata",+ "growth_productpushcampaign"."created_at"+ FROM "growth_productpushcampaign"+ WHERE "growth_productpushcampaign"."organization_id" = '00000000-0000-0000-0000-000000000000'::uuid+ '''+# ---+# name: TestDashboard.test_listing_dashboards_is_not_nplus1.240+ '''+ 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.241+ '''+ 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.242+ '''+ 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.243+ '''+ 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.244+ '''+ SELECT COUNT(*) AS "__count"+ FROM "posthog_dashboardtile"+ INNER JOIN "posthog_dashboard" ON ("posthog_dashboardtile"."dashboard_id" = "posthog_dashboard"."id")+ WHERE (NOT ("posthog_dashboardtile"."deleted"+ AND "posthog_dashboardtile"."deleted" IS NOT NULL)+ AND NOT ("posthog_dashboard"."deleted")+ AND "posthog_dashboardtile"."dashboard_id" = 99999+ AND NOT ("posthog_dashboardtile"."deleted"+ AND "posthog_dashboardtile"."deleted" IS NOT NULL))+ '''+# ---+# name: TestDashboard.test_listing_dashboards_is_not_nplus1.245+ '''+ 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_listing_dashboards_is_not_nplus1.246+ '''+ 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.247+ '''+ 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.248+ '''+ 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.249+ '''+ 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.25+ '''+ SELECT "growth_organizationenrichment"."id",+ "growth_organizationenrichment"."organization_id",+ "growth_organizationenrichment"."data",+ "growth_organizationenrichment"."created_at",+ "growth_organizationenrichment"."updated_at"+ FROM "growth_organizationenrichment"+ WHERE "growth_organizationenrichment"."organization_id" = '00000000-0000-0000-0000-000000000000'::uuid+ LIMIT 21+ '''+# ---+# name: TestDashboard.test_listing_dashboards_is_not_nplus1.250+ '''+ 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.251+ '''+ 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.252+ '''+ 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.253+ '''+ 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_listing_dashboards_is_not_nplus1.254+ '''+ 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_listing_dashboards_is_not_nplus1.255+ '''+ 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.256+ '''+ 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_listing_dashboards_is_not_nplus1.257+ '''+ 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_listing_dashboards_is_not_nplus1.258+ '''+ 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_listing_dashboards_is_not_nplus1.259+ '''+ 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.26+ '''+ SELECT "growth_organizationenrichmentfetch"."id",+ "growth_organizationenrichmentfetch"."organization_id",+ "growth_organizationenrichmentfetch"."provider",+ "growth_organizationenrichmentfetch"."fetched_at",+ "growth_organizationenrichmentfetch"."is_recheck",+ "growth_organizationenrichmentfetch"."payload"+ FROM "growth_organizationenrichmentfetch"+ WHERE "growth_organizationenrichmentfetch"."organization_id" = '00000000-0000-0000-0000-000000000000'::uuid+ '''+# ---+# name: TestDashboard.test_listing_dashboards_is_not_nplus1.260+ '''+ 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_listing_dashboards_is_not_nplus1.261+ '''+ 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.262+ '''+ 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.263+ '''+ 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.264+ '''+ 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_listing_dashboards_is_not_nplus1.265+ '''+ 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.266+ '''+ 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.267+ '''+ 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.268+ '''+ 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.269+ '''+ 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.27+ '''+ SELECT "growth_organizationenrichmentfetch"."id",+ "growth_organizationenrichmentfetch"."organization_id",+ "growth_organizationenrichmentfetch"."provider",+ "growth_organizationenrichmentfetch"."fetched_at",+ "growth_organizationenrichmentfetch"."is_recheck",+ "growth_organizationenrichmentfetch"."payload"+ FROM "growth_organizationenrichmentfetch"+ WHERE "growth_organizationenrichmentfetch"."organization_id" = '00000000-0000-0000-0000-000000000000'::uuid+ '''+# ---+# name: TestDashboard.test_listing_dashboards_is_not_nplus1.270+ '''+ 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.271+ '''+ 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.272+ '''+ 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.273+ '''+ 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.274+ '''+ 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_listing_dashboards_is_not_nplus1.275+ '''+ 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.276+ '''+ 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.277+ '''+ 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.278+ '''+ SELECT COUNT(*) AS "__count"+ FROM "posthog_dashboard"+ INNER JOIN "posthog_team" ON ("posthog_dashboard"."team_id" = "posthog_team"."id")+ WHERE (NOT ("posthog_dashboard"."deleted")+ AND ("posthog_dashboard"."team_id" =+ (SELECT U0."parent_team_id" AS "parent_team_id"+ FROM "posthog_team" U0+ WHERE U0."id" = 99999+ LIMIT 1)+ OR ("posthog_team"."parent_team_id" IS NULL+ AND "posthog_dashboard"."team_id" = 99999))+ AND NOT "posthog_dashboard"."deleted")+ '''+# ---+# name: TestDashboard.test_listing_dashboards_is_not_nplus1.279+ '''+ 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.28+ '''+ SELECT "growth_enrichmentlabelresult"."id",+ "growth_enrichmentlabelresult"."organization_id",+ "growth_enrichmentlabelresult"."fetch_id",+ "growth_enrichmentlabelresult"."label_name",+ "growth_enrichmentlabelresult"."prompt_version",+ "growth_enrichmentlabelresult"."prompt_hash",+ "growth_enrichmentlabelresult"."model",+ "growth_enrichmentlabelresult"."output",+ "growth_enrichmentlabelresult"."inputs",+ "growth_enrichmentlabelresult"."created_at"+ FROM "growth_enrichmentlabelresult"+ WHERE "growth_enrichmentlabelresult"."organization_id" = '00000000-0000-0000-0000-000000000000'::uuid+ '''+# ---+# name: TestDashboard.test_listing_dashboards_is_not_nplus1.280+ '''+ 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_listing_dashboards_is_not_nplus1.281+ '''+ 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_listing_dashboards_is_not_nplus1.282+ '''+ 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_listing_dashboards_is_not_nplus1.283+ '''+ SELECT COUNT(*) AS "__count"+ FROM "posthog_taggeditem"+ WHERE ("posthog_taggeditem"."content_type_id" = 99999+ AND "posthog_taggeditem"."object_id" = 99999)+ '''+# ---+# name: TestDashboard.test_listing_dashboards_is_not_nplus1.284+ '''+ 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_listing_dashboards_is_not_nplus1.285+ '''+ 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_listing_dashboards_is_not_nplus1.286+ '''+ 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_listing_dashboards_is_not_nplus1.287+ '''+ 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_listing_dashboards_is_not_nplus1.288+ '''+ 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.289+ '''+ 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 "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_listing_dashboards_is_not_nplus1.29+ '''+ SELECT "growth_enrichmentlabelresult"."id",+ "growth_enrichmentlabelresult"."organization_id",+ "growth_enrichmentlabelresult"."fetch_id",+ "growth_enrichmentlabelresult"."label_name",+ "growth_enrichmentlabelresult"."prompt_version",+ "growth_enrichmentlabelresult"."prompt_hash",+ "growth_enrichmentlabelresult"."model",+ "growth_enrichmentlabelresult"."output",+ "growth_enrichmentlabelresult"."inputs",+ "growth_enrichmentlabelresult"."created_at"+ FROM "growth_enrichmentlabelresult"+ WHERE "growth_enrichmentlabelresult"."organization_id" = '00000000-0000-0000-0000-000000000000'::uuid+ '''+# ---+# name: TestDashboard.test_listing_dashboards_is_not_nplus1.290+ '''+ 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.291+ '''+ 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.292+ '''+ 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.293+ '''+ 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_listing_dashboards_is_not_nplus1.294+ '''+ 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.295+ '''+ 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.296+ '''+ 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.297+ '''+ 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.298+ '''+ 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.299+ '''+ SELECT COUNT(*) AS "__count"+ FROM "posthog_dashboardtile"+ INNER JOIN "posthog_dashboard" ON ("posthog_dashboardtile"."dashboard_id" = "posthog_dashboard"."id")+ WHERE (NOT ("posthog_dashboardtile"."deleted"+ AND "posthog_dashboardtile"."deleted" IS NOT NULL)+ AND NOT ("posthog_dashboard"."deleted")+ AND "posthog_dashboardtile"."dashboard_id" = 99999+ AND NOT ("posthog_dashboardtile"."deleted"+ AND "posthog_dashboardtile"."deleted" IS NOT NULL))+ '''+# ---+# name: TestDashboard.test_listing_dashboards_is_not_nplus1.3+ '''+ SELECT "posthog_organization"."is_active" AS "is_active",+ "posthog_organization"."has_active_subscription" AS "has_active_subscription"+ FROM "posthog_organization"+ WHERE "posthog_organization"."id" = '00000000-0000-0000-0000-000000000000'::uuid+ ORDER BY "posthog_organization"."id" ASC+ LIMIT 1+ '''+# ---+# name: TestDashboard.test_listing_dashboards_is_not_nplus1.30+ '''+ SELECT "growth_enrichmentsignupsnapshot"."id",+ "growth_enrichmentsignupsnapshot"."organization_id",+ "growth_enrichmentsignupsnapshot"."created_at"+ FROM "growth_enrichmentsignupsnapshot"+ WHERE "growth_enrichmentsignupsnapshot"."organization_id" = '00000000-0000-0000-0000-000000000000'::uuid+ LIMIT 21+ '''+# ---+# name: TestDashboard.test_listing_dashboards_is_not_nplus1.300+ '''+ 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_listing_dashboards_is_not_nplus1.301+ '''+ 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.302+ '''+ 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.303+ '''+ 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.304+ '''+ 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.305+ '''+ 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.306+ '''+ 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.307+ '''+ 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.308+ '''+ 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_listing_dashboards_is_not_nplus1.309+ '''+ 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_listing_dashboards_is_not_nplus1.31+ '''+ SELECT "ee_organizationresourceaccess"."id",+ "ee_organizationresourceaccess"."resource",+ "ee_organizationresourceaccess"."access_level",+ "ee_organizationresourceaccess"."organization_id",+ "ee_organizationresourceaccess"."created_by_id",+ "ee_organizationresourceaccess"."created_at",+ "ee_organizationresourceaccess"."updated_at"+ FROM "ee_organizationresourceaccess"+ WHERE "ee_organizationresourceaccess"."organization_id" = '00000000-0000-0000-0000-000000000000'::uuid+ '''+# ---+# name: TestDashboard.test_listing_dashboards_is_not_nplus1.310+ '''+ 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.311+ '''+ 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_listing_dashboards_is_not_nplus1.312+ '''+ 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_listing_dashboards_is_not_nplus1.313+ '''+ 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_listing_dashboards_is_not_nplus1.314+ '''+ 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.315+ '''+ 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_listing_dashboards_is_not_nplus1.316+ '''+ 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.317+ '''+ 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.318+ '''+ 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.319+ '''+ 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_listing_dashboards_is_not_nplus1.32+ '''+ SELECT "ee_organizationresourceaccess"."id",+ "ee_organizationresourceaccess"."resource",+ "ee_organizationresourceaccess"."access_level",+ "ee_organizationresourceaccess"."organization_id",+ "ee_organizationresourceaccess"."created_by_id",+ "ee_organizationresourceaccess"."created_at",+ "ee_organizationresourceaccess"."updated_at"+ FROM "ee_organizationresourceaccess"+ WHERE "ee_organizationresourceaccess"."organization_id" = '00000000-0000-0000-0000-000000000000'::uuid+ '''+# ---+# name: TestDashboard.test_listing_dashboards_is_not_nplus1.320+ '''+ 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.321+ '''+ 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.322+ '''+ 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.323+ '''+ 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.324+ '''+ 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.325+ '''+ SELECT COUNT(*) AS "__count"+ FROM "posthog_dashboardtile"+ INNER JOIN "posthog_dashboard" ON ("posthog_dashboardtile"."dashboard_id" = "posthog_dashboard"."id")+ WHERE (NOT ("posthog_dashboardtile"."deleted"+ AND "posthog_dashboardtile"."deleted" IS NOT NULL)+ AND NOT ("posthog_dashboard"."deleted")+ AND "posthog_dashboardtile"."dashboard_id" = 99999+ AND NOT ("posthog_dashboardtile"."deleted"+ AND "posthog_dashboardtile"."deleted" IS NOT NULL))+ '''+# ---+# name: TestDashboard.test_listing_dashboards_is_not_nplus1.326+ '''+ 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_listing_dashboards_is_not_nplus1.327+ '''+ 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.328+ '''+ 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.329+ '''+ 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.33+ '''+ SELECT "posthog_team"."organization_id" AS "organization_id"+ FROM "posthog_team"+ WHERE "posthog_team"."id" = 99999+ ORDER BY "posthog_team"."id" ASC+ LIMIT 1+ '''+# ---+# name: TestDashboard.test_listing_dashboards_is_not_nplus1.330+ '''+ 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.331+ '''+ 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.332+ '''+ 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.333+ '''+ 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.334+ '''+ 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_listing_dashboards_is_not_nplus1.335+ '''+ 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_listing_dashboards_is_not_nplus1.336+ '''+ 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.337+ '''+ 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_listing_dashboards_is_not_nplus1.338+ '''+ 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_listing_dashboards_is_not_nplus1.339+ '''+ 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_listing_dashboards_is_not_nplus1.34+ '''+ 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"+ FROM "posthog_organizationmembership"+ WHERE "posthog_organizationmembership"."user_id" = 99999+ '''+# ---+# name: TestDashboard.test_listing_dashboards_is_not_nplus1.340+ '''+ 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.341+ '''+ 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_listing_dashboards_is_not_nplus1.342+ '''+ 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.343+ '''+ 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.344+ '''+ 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.345+ '''+ 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_listing_dashboards_is_not_nplus1.346+ '''+ 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.347+ '''+ 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.348+ '''+ 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.349+ '''+ 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.35+ '''+ 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"+ FROM "posthog_organizationmembership"+ WHERE "posthog_organizationmembership"."id" = '00000000000000000000000000000000'::uuid+ LIMIT 21+ '''+# ---+# name: TestDashboard.test_listing_dashboards_is_not_nplus1.350+ '''+ 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.351+ '''+ SELECT COUNT(*) AS "__count"+ FROM "posthog_dashboardtile"+ INNER JOIN "posthog_dashboard" ON ("posthog_dashboardtile"."dashboard_id" = "posthog_dashboard"."id")+ WHERE (NOT ("posthog_dashboardtile"."deleted"+ AND "posthog_dashboardtile"."deleted" IS NOT NULL)+ AND NOT ("posthog_dashboard"."deleted")+ AND "posthog_dashboardtile"."dashboard_id" = 99999+ AND NOT ("posthog_dashboardtile"."deleted"+ AND "posthog_dashboardtile"."deleted" IS NOT NULL))+ '''+# ---+# name: TestDashboard.test_listing_dashboards_is_not_nplus1.352+ '''+ 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_listing_dashboards_is_not_nplus1.353+ '''+ 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.354+ '''+ 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.355+ '''+ 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.356+ '''+ 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.357+ '''+ 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.358+ '''+ 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.359+ '''+ 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.36+ '''+ SELECT "posthog_team"."id" AS "id"+ FROM "posthog_team"+ WHERE ("posthog_team"."organization_id" = '00000000-0000-0000-0000-000000000000'::uuid+ AND "posthog_team"."receive_org_level_activity_logs")+ '''+# ---+# name: TestDashboard.test_listing_dashboards_is_not_nplus1.360+ '''+ 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_listing_dashboards_is_not_nplus1.361+ '''+ 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_listing_dashboards_is_not_nplus1.362+ '''+ 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.363+ '''+ 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_listing_dashboards_is_not_nplus1.364+ '''+ 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_listing_dashboards_is_not_nplus1.365+ '''+ 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_listing_dashboards_is_not_nplus1.366+ '''+ 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.367+ '''+ 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_listing_dashboards_is_not_nplus1.368+ '''+ 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.369+ '''+ 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.37+ '''+ 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"."organization_id" = '00000000-0000-0000-0000-000000000000'::uuid+ ORDER BY "posthog_team"."id" ASC+ LIMIT 1+ '''+# ---+# name: TestDashboard.test_listing_dashboards_is_not_nplus1.370+ '''+ 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.371+ '''+ 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_listing_dashboards_is_not_nplus1.372+ '''+ 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.373+ '''+ 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.374+ '''+ 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.375+ '''+ 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.376+ '''+ 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.377+ '''+ 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.378+ '''+ 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.379+ '''+ 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.38+ '''+ 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"."id" = 99999+ ORDER BY "posthog_user"."id" ASC+ LIMIT 1+ '''+# ---+# name: TestDashboard.test_listing_dashboards_is_not_nplus1.380+ '''+ 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.381+ '''+ 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_listing_dashboards_is_not_nplus1.382+ '''+ 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.383+ '''+ 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.384+ '''+ 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.385+ '''+ SELECT COUNT(*) AS "__count"+ FROM "posthog_dashboard"+ INNER JOIN "posthog_team" ON ("posthog_dashboard"."team_id" = "posthog_team"."id")+ WHERE (NOT ("posthog_dashboard"."deleted")+ AND ("posthog_dashboard"."team_id" =+ (SELECT U0."parent_team_id" AS "parent_team_id"+ FROM "posthog_team" U0+ WHERE U0."id" = 99999+ LIMIT 1)+ OR ("posthog_team"."parent_team_id" IS NULL+ AND "posthog_dashboard"."team_id" = 99999))+ AND NOT "posthog_dashboard"."deleted")+ '''+# ---+# name: TestDashboard.test_listing_dashboards_is_not_nplus1.386+ '''+ 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.387+ '''+ 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_listing_dashboards_is_not_nplus1.388+ '''+ 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_listing_dashboards_is_not_nplus1.389+ '''+ 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_listing_dashboards_is_not_nplus1.39+ '''+ SELECT "signals_signaluserautonomyconfig"."id",+ "signals_signaluserautonomyconfig"."user_id",+ "signals_signaluserautonomyconfig"."autostart_priority",+ "signals_signaluserautonomyconfig"."slack_notification_integration_id",+ "signals_signaluserautonomyconfig"."slack_notification_channel",+ "signals_signaluserautonomyconfig"."slack_notification_min_priority",+ "signals_signaluserautonomyconfig"."github_assign_on_pull_request",+ "signals_signaluserautonomyconfig"."github_open_pull_request_ready",+ "signals_signaluserautonomyconfig"."created_at",+ "signals_signaluserautonomyconfig"."updated_at"+ FROM "signals_signaluserautonomyconfig"+ WHERE "signals_signaluserautonomyconfig"."user_id" = 99999+ LIMIT 21+ '''+# ---+# name: TestDashboard.test_listing_dashboards_is_not_nplus1.390+ '''+ SELECT COUNT(*) AS "__count"+ FROM "posthog_taggeditem"+ WHERE ("posthog_taggeditem"."content_type_id" = 99999+ AND "posthog_taggeditem"."object_id" = 99999)+ '''+# ---+# name: TestDashboard.test_listing_dashboards_is_not_nplus1.391+ '''+ 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_listing_dashboards_is_not_nplus1.392+ '''+ 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_listing_dashboards_is_not_nplus1.393+ '''+ 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_listing_dashboards_is_not_nplus1.394+ '''+ 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_listing_dashboards_is_not_nplus1.395+ '''+ 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.396+ '''+ 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 "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_listing_dashboards_is_not_nplus1.397+ '''+ 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.398+ '''+ 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.399+ '''+ 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.4+ '''+ SELECT "posthog_organizationmembernotificationlock"."id",+ "posthog_organizationmembernotificationlock"."organization_id",+ "posthog_organizationmembernotificationlock"."organization_membership_id",+ "posthog_organizationmembernotificationlock"."setting",+ "posthog_organizationmembernotificationlock"."scope_id",+ "posthog_organizationmembernotificationlock"."locked_value",+ "posthog_organizationmembernotificationlock"."created_by_id",+ "posthog_organizationmembernotificationlock"."created_at",+ "posthog_organizationmembernotificationlock"."updated_at"+ FROM "posthog_organizationmembernotificationlock"+ WHERE "posthog_organizationmembernotificationlock"."organization_id" = '00000000-0000-0000-0000-000000000000'::uuid+ '''+# ---+# name: TestDashboard.test_listing_dashboards_is_not_nplus1.40+ '''+ 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.400+ '''+ 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_listing_dashboards_is_not_nplus1.401+ '''+ 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.402+ '''+ 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.403+ '''+ 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.404+ '''+ 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.405+ '''+ 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.406+ '''+ SELECT COUNT(*) AS "__count"+ FROM "posthog_dashboardtile"+ INNER JOIN "posthog_dashboard" ON ("posthog_dashboardtile"."dashboard_id" = "posthog_dashboard"."id")+ WHERE (NOT ("posthog_dashboardtile"."deleted"+ AND "posthog_dashboardtile"."deleted" IS NOT NULL)+ AND NOT ("posthog_dashboard"."deleted")+ AND "posthog_dashboardtile"."dashboard_id" = 99999+ AND NOT ("posthog_dashboardtile"."deleted"+ AND "posthog_dashboardtile"."deleted" IS NOT NULL))+ '''+# ---+# name: TestDashboard.test_listing_dashboards_is_not_nplus1.407+ '''+ 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_listing_dashboards_is_not_nplus1.408+ '''+ 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.409+ '''+ 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.41+ '''+ 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"."organization_id" = '00000000-0000-0000-0000-000000000000'::uuid+ '''+# ---+# name: TestDashboard.test_listing_dashboards_is_not_nplus1.410+ '''+ 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.411+ '''+ 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.412+ '''+ 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.413+ '''+ 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.414+ '''+ 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.415+ '''+ 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_listing_dashboards_is_not_nplus1.416+ '''+ 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_listing_dashboards_is_not_nplus1.417+ '''+ 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.418+ '''+ 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_listing_dashboards_is_not_nplus1.419+ '''+ 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_listing_dashboards_is_not_nplus1.42+ '''+ SELECT 1 AS "a"+ FROM "posthog_filesystemshortcut"+ INNER JOIN "posthog_team" ON ("posthog_filesystemshortcut"."team_id" = "posthog_team"."id")+ WHERE (("posthog_filesystemshortcut"."surface" IS NULL+ OR "posthog_filesystemshortcut"."surface" = 'web')+ AND "posthog_team"."project_id" = 99999+ AND "posthog_filesystemshortcut"."user_id" = 99999+ AND "posthog_filesystemshortcut"."ref" IS NULL+ AND NOT ("posthog_filesystemshortcut"."type" = 'folder'))+ LIMIT 1+ '''+# ---+# name: TestDashboard.test_listing_dashboards_is_not_nplus1.420+ '''+ 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_listing_dashboards_is_not_nplus1.421+ '''+ 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.422+ '''+ 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_listing_dashboards_is_not_nplus1.423+ '''+ 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.424+ '''+ 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.425+ '''+ 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.426+ '''+ 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_listing_dashboards_is_not_nplus1.427+ '''+ 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.428+ '''+ 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.429+ '''+ 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.43+ "SELECT pg_advisory_xact_lock(hashtextextended('file-system-shortcuts:99999:99999', 99999))"+# ---+# name: TestDashboard.test_listing_dashboards_is_not_nplus1.430+ '''+ 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.431+ '''+ 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.432+ '''+ SELECT COUNT(*) AS "__count"+ FROM "posthog_dashboardtile"+ INNER JOIN "posthog_dashboard" ON ("posthog_dashboardtile"."dashboard_id" = "posthog_dashboard"."id")+ WHERE (NOT ("posthog_dashboardtile"."deleted"+ AND "posthog_dashboardtile"."deleted" IS NOT NULL)+ AND NOT ("posthog_dashboard"."deleted")+ AND "posthog_dashboardtile"."dashboard_id" = 99999+ AND NOT ("posthog_dashboardtile"."deleted"+ AND "posthog_dashboardtile"."deleted" IS NOT NULL))+ '''+# ---+# name: TestDashboard.test_listing_dashboards_is_not_nplus1.433+ '''+ 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_listing_dashboards_is_not_nplus1.434+ '''+ 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.435+ '''+ 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.436+ '''+ 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.437+ '''+ 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.438+ '''+ 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.439+ '''+ 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.44+ '''+ SELECT "posthog_filesystemshortcut"."path" AS "path"+ FROM "posthog_filesystemshortcut"+ INNER JOIN "posthog_team" ON ("posthog_filesystemshortcut"."team_id" = "posthog_team"."id")+ WHERE (("posthog_filesystemshortcut"."surface" IS NULL+ OR "posthog_filesystemshortcut"."surface" = 'web')+ AND "posthog_team"."project_id" = 99999+ AND "posthog_filesystemshortcut"."user_id" = 99999+ AND "posthog_filesystemshortcut"."ref" IS NULL+ AND NOT ("posthog_filesystemshortcut"."type" = 'folder'))+ '''+# ---+# name: TestDashboard.test_listing_dashboards_is_not_nplus1.440+ '''+ 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.441+ '''+ 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_listing_dashboards_is_not_nplus1.442+ '''+ 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_listing_dashboards_is_not_nplus1.443+ '''+ 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.444+ '''+ 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_listing_dashboards_is_not_nplus1.445+ '''+ 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_listing_dashboards_is_not_nplus1.446+ '''+ 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_listing_dashboards_is_not_nplus1.447+ '''+ 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.448+ '''+ 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_listing_dashboards_is_not_nplus1.449+ '''+ 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.45+ '''+ SELECT "posthog_filesystemshortcut"."order" AS "order"+ FROM "posthog_filesystemshortcut"+ INNER JOIN "posthog_team" ON ("posthog_filesystemshortcut"."team_id" = "posthog_team"."id")+ WHERE (("posthog_filesystemshortcut"."surface" IS NULL+ OR "posthog_filesystemshortcut"."surface" = 'web')+ AND "posthog_team"."project_id" = 99999+ AND "posthog_filesystemshortcut"."user_id" = 99999)+ '''+# ---+# name: TestDashboard.test_listing_dashboards_is_not_nplus1.450+ '''+ 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.451+ '''+ 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.452+ '''+ 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_listing_dashboards_is_not_nplus1.453+ '''+ 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.454+ '''+ 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.455+ '''+ 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.456+ '''+ 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.457+ '''+ 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.458+ '''+ SELECT COUNT(*) AS "__count"+ FROM "posthog_dashboardtile"+ INNER JOIN "posthog_dashboard" ON ("posthog_dashboardtile"."dashboard_id" = "posthog_dashboard"."id")+ WHERE (NOT ("posthog_dashboardtile"."deleted"+ AND "posthog_dashboardtile"."deleted" IS NOT NULL)+ AND NOT ("posthog_dashboard"."deleted")+ AND "posthog_dashboardtile"."dashboard_id" = 99999+ AND NOT ("posthog_dashboardtile"."deleted"+ AND "posthog_dashboardtile"."deleted" IS NOT NULL))+ '''+# ---+# name: TestDashboard.test_listing_dashboards_is_not_nplus1.459+ '''+ 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_listing_dashboards_is_not_nplus1.46+ '''+ 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"+ FROM "posthog_organizationmembership"+ WHERE "posthog_organizationmembership"."user_id" = 99999+ ORDER BY "posthog_organizationmembership"."id" ASC+ LIMIT 1+ '''+# ---+# name: TestDashboard.test_listing_dashboards_is_not_nplus1.460+ '''+ 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.461+ '''+ 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.462+ '''+ 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.463+ '''+ 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.464+ '''+ 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.465+ '''+ 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.466+ '''+ 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.467+ '''+ 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_listing_dashboards_is_not_nplus1.468+ '''+ 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_listing_dashboards_is_not_nplus1.469+ '''+ 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.47+ '''+ SELECT 1 AS "a"+ FROM "posthog_filesystemshortcut"+ INNER JOIN "posthog_team" ON ("posthog_filesystemshortcut"."team_id" = "posthog_team"."id")+ WHERE (("posthog_filesystemshortcut"."surface" IS NULL+ OR "posthog_filesystemshortcut"."surface" = 'web')+ AND "posthog_team"."project_id" = 99999+ AND "posthog_filesystemshortcut"."user_id" = 99999+ AND "posthog_filesystemshortcut"."ref" IS NULL+ AND NOT ("posthog_filesystemshortcut"."type" = 'folder'))+ LIMIT 1+ '''+# ---+# name: TestDashboard.test_listing_dashboards_is_not_nplus1.470+ '''+ 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_listing_dashboards_is_not_nplus1.471+ '''+ 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_listing_dashboards_is_not_nplus1.472+ '''+ 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_listing_dashboards_is_not_nplus1.473+ '''+ 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.474+ '''+ 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_listing_dashboards_is_not_nplus1.475+ '''+ 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.476+ '''+ 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.477+ '''+ 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.478+ '''+ 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_listing_dashboards_is_not_nplus1.479+ '''+ 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.48+ '''+ SELECT "posthog_team"."organization_id" AS "organization_id"+ FROM "posthog_team"+ WHERE "posthog_team"."id" = 99999+ ORDER BY "posthog_team"."id" ASC+ LIMIT 1+ '''+# ---+# name: TestDashboard.test_listing_dashboards_is_not_nplus1.480+ '''+ 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.481+ '''+ 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.482+ '''+ 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.483+ '''+ 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.484+ '''+ 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.485+ '''+ 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.486+ '''+ 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.487+ '''+ 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.488+ '''+ 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_listing_dashboards_is_not_nplus1.489+ '''+ 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.49+ '''+ SELECT "posthog_team"."id" AS "id"+ FROM "posthog_team"+ WHERE ("posthog_team"."organization_id" = '00000000-0000-0000-0000-000000000000'::uuid+ AND "posthog_team"."receive_org_level_activity_logs")+ '''+# ---+# name: TestDashboard.test_listing_dashboards_is_not_nplus1.490+ '''+ 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.491+ '''+ 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.492+ '''+ SELECT COUNT(*) AS "__count"+ FROM "posthog_dashboard"+ INNER JOIN "posthog_team" ON ("posthog_dashboard"."team_id" = "posthog_team"."id")+ WHERE (NOT ("posthog_dashboard"."deleted")+ AND ("posthog_dashboard"."team_id" =+ (SELECT U0."parent_team_id" AS "parent_team_id"+ FROM "posthog_team" U0+ WHERE U0."id" = 99999+ LIMIT 1)+ OR ("posthog_team"."parent_team_id" IS NULL+ AND "posthog_dashboard"."team_id" = 99999))+ AND NOT "posthog_dashboard"."deleted")+ '''+# ---+# name: TestDashboard.test_listing_dashboards_is_not_nplus1.493+ '''+ 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.494+ '''+ 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_listing_dashboards_is_not_nplus1.495+ '''+ 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_listing_dashboards_is_not_nplus1.496+ '''+ 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_listing_dashboards_is_not_nplus1.497+ '''+ SELECT COUNT(*) AS "__count"+ FROM "posthog_taggeditem"+ WHERE ("posthog_taggeditem"."content_type_id" = 99999+ AND "posthog_taggeditem"."object_id" = 99999)+ '''+# ---+# name: TestDashboard.test_listing_dashboards_is_not_nplus1.498+ '''+ 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_listing_dashboards_is_not_nplus1.499+ '''+ 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_listing_dashboards_is_not_nplus1.5+ '''+ SELECT "posthog_organizationmembernotificationlock"."id",+ "posthog_organizationmembernotificationlock"."organization_id",+ "posthog_organizationmembernotificationlock"."organization_membership_id",+ "posthog_organizationmembernotificationlock"."setting",+ "posthog_organizationmembernotificationlock"."scope_id",+ "posthog_organizationmembernotificationlock"."locked_value",+ "posthog_organizationmembernotificationlock"."created_by_id",+ "posthog_organizationmembernotificationlock"."created_at",+ "posthog_organizationmembernotificationlock"."updated_at"+ FROM "posthog_organizationmembernotificationlock"+ WHERE "posthog_organizationmembernotificationlock"."organization_id" = '00000000-0000-0000-0000-000000000000'::uuid+ '''+# ---+# name: TestDashboard.test_listing_dashboards_is_not_nplus1.50+ '''+ 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.500+ '''+ 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_listing_dashboards_is_not_nplus1.501+ '''+ 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_listing_dashboards_is_not_nplus1.502+ '''+ 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.503+ '''+ 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 "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_listing_dashboards_is_not_nplus1.504+ '''+ 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.505+ '''+ 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.506+ '''+ 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.507+ '''+ 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_listing_dashboards_is_not_nplus1.508+ '''+ 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.509+ '''+ 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.51+ '''+ 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.510+ '''+ 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.511+ '''+ 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.512+ '''+ 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.513+ '''+ SELECT COUNT(*) AS "__count"+ FROM "posthog_dashboardtile"+ INNER JOIN "posthog_dashboard" ON ("posthog_dashboardtile"."dashboard_id" = "posthog_dashboard"."id")+ WHERE (NOT ("posthog_dashboardtile"."deleted"+ AND "posthog_dashboardtile"."deleted" IS NOT NULL)+ AND NOT ("posthog_dashboard"."deleted")+ AND "posthog_dashboardtile"."dashboard_id" = 99999+ AND NOT ("posthog_dashboardtile"."deleted"+ AND "posthog_dashboardtile"."deleted" IS NOT NULL))+ '''+# ---+# name: TestDashboard.test_listing_dashboards_is_not_nplus1.514+ '''+ 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_listing_dashboards_is_not_nplus1.515+ '''+ 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.516+ '''+ 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.517+ '''+ 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.518+ '''+ 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.519+ '''+ 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.52+ '''+ 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_listing_dashboards_is_not_nplus1.520+ '''+ 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.521+ '''+ 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.522+ '''+ 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_listing_dashboards_is_not_nplus1.523+ '''+ 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_listing_dashboards_is_not_nplus1.524+ '''+ 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.525+ '''+ 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_listing_dashboards_is_not_nplus1.526+ '''+ 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_listing_dashboards_is_not_nplus1.527+ '''+ 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_listing_dashboards_is_not_nplus1.528+ '''+ 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.529+ '''+ 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_listing_dashboards_is_not_nplus1.53+ '''+ 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.530+ '''+ 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.531+ '''+ 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.532+ '''+ 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.533+ '''+ 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_listing_dashboards_is_not_nplus1.534+ '''+ 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.535+ '''+ 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.536+ '''+ 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.537+ '''+ 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.538+ '''+ 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.539+ '''+ SELECT COUNT(*) AS "__count"+ FROM "posthog_dashboardtile"+ INNER JOIN "posthog_dashboard" ON ("posthog_dashboardtile"."dashboard_id" = "posthog_dashboard"."id")+ WHERE (NOT ("posthog_dashboardtile"."deleted"+ AND "posthog_dashboardtile"."deleted" IS NOT NULL)+ AND NOT ("posthog_dashboard"."deleted")+ AND "posthog_dashboardtile"."dashboard_id" = 99999+ AND NOT ("posthog_dashboardtile"."deleted"+ AND "posthog_dashboardtile"."deleted" IS NOT NULL))+ '''+# ---+# name: TestDashboard.test_listing_dashboards_is_not_nplus1.54+ '''+ 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.540+ '''+ 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_listing_dashboards_is_not_nplus1.541+ '''+ 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.542+ '''+ 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.543+ '''+ 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.544+ '''+ 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.545+ '''+ 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.546+ '''+ 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.547+ '''+ 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.548+ '''+ 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_listing_dashboards_is_not_nplus1.549+ '''+ 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_listing_dashboards_is_not_nplus1.55+ '''+ 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.550+ '''+ 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.551+ '''+ 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_listing_dashboards_is_not_nplus1.552+ '''+ 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_listing_dashboards_is_not_nplus1.553+ '''+ 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_listing_dashboards_is_not_nplus1.554+ '''+ 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.555+ '''+ 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_listing_dashboards_is_not_nplus1.556+ '''+ 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.557+ '''+ 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.558+ '''+ 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.559+ '''+ 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_listing_dashboards_is_not_nplus1.56+ '''+ 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.560+ '''+ 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.561+ '''+ 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.562+ '''+ 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.563+ '''+ 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.564+ '''+ 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.565+ '''+ SELECT COUNT(*) AS "__count"+ FROM "posthog_dashboardtile"+ INNER JOIN "posthog_dashboard" ON ("posthog_dashboardtile"."dashboard_id" = "posthog_dashboard"."id")+ WHERE (NOT ("posthog_dashboardtile"."deleted"+ AND "posthog_dashboardtile"."deleted" IS NOT NULL)+ AND NOT ("posthog_dashboard"."deleted")+ AND "posthog_dashboardtile"."dashboard_id" = 99999+ AND NOT ("posthog_dashboardtile"."deleted"+ AND "posthog_dashboardtile"."deleted" IS NOT NULL))+ '''+# ---+# name: TestDashboard.test_listing_dashboards_is_not_nplus1.566+ '''+ 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_listing_dashboards_is_not_nplus1.567+ '''+ 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.568+ '''+ 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.569+ '''+ 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.57+ '''+ 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.570+ '''+ 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.571+ '''+ 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.572+ '''+ 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.573+ '''+ 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.574+ '''+ 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_listing_dashboards_is_not_nplus1.575+ '''+ 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_listing_dashboards_is_not_nplus1.576+ '''+ 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.577+ '''+ 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_listing_dashboards_is_not_nplus1.578+ '''+ 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_listing_dashboards_is_not_nplus1.579+ '''+ 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_listing_dashboards_is_not_nplus1.58+ '''+ 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.580+ '''+ 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.581+ '''+ 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_listing_dashboards_is_not_nplus1.582+ '''+ 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.583+ '''+ 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.584+ '''+ 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.585+ '''+ 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_listing_dashboards_is_not_nplus1.586+ '''+ 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.587+ '''+ 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.588+ '''+ 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.589+ '''+ 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.59+ '''+ 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_listing_dashboards_is_not_nplus1.590+ '''+ 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.591+ '''+ 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.592+ '''+ 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.6+ '''+ SELECT "posthog_oauthapplication"."redirect_uris",+ "posthog_oauthapplication"."post_logout_redirect_uris",+ "posthog_oauthapplication"."client_type",+ "posthog_oauthapplication"."authorization_grant_type",+ "posthog_oauthapplication"."client_secret",+ "posthog_oauthapplication"."hash_client_secret",+ "posthog_oauthapplication"."name",+ "posthog_oauthapplication"."skip_authorization",+ "posthog_oauthapplication"."created",+ "posthog_oauthapplication"."updated",+ "posthog_oauthapplication"."algorithm",+ "posthog_oauthapplication"."allowed_origins",+ "posthog_oauthapplication"."id",+ "posthog_oauthapplication"."client_id",+ "posthog_oauthapplication"."organization_id",+ "posthog_oauthapplication"."user_id",+ "posthog_oauthapplication"."logo_uri",+ "posthog_oauthapplication"."is_dcr_client",+ "posthog_oauthapplication"."dcr_client_id_issued_at",+ "posthog_oauthapplication"."is_verified",+ "posthog_oauthapplication"."is_first_party",+ "posthog_oauthapplication"."auth_brand",+ "posthog_oauthapplication"."scopes",+ "posthog_oauthapplication"."optional_scopes",+ "posthog_oauthapplication"."sessions_revoked_at",+ "posthog_oauthapplication"."is_cimd_client",+ "posthog_oauthapplication"."cimd_metadata_last_fetched",+ "posthog_oauthapplication"."jwks_uri",+ "posthog_oauthapplication"."is_provisioning_partner",+ "posthog_oauthapplication"."provisioning_config"+ FROM "posthog_oauthapplication"+ WHERE "posthog_oauthapplication"."organization_id" = '00000000-0000-0000-0000-000000000000'::uuid+ '''+# ---+# name: TestDashboard.test_listing_dashboards_is_not_nplus1.60+ '''+ 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.61+ '''+ 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.62+ '''+ 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.63+ '''+ SELECT COUNT(*) AS "__count"+ FROM "posthog_dashboard"+ INNER JOIN "posthog_team" ON ("posthog_dashboard"."team_id" = "posthog_team"."id")+ WHERE (NOT ("posthog_dashboard"."deleted")+ AND ("posthog_dashboard"."team_id" =+ (SELECT U0."parent_team_id" AS "parent_team_id"+ FROM "posthog_team" U0+ WHERE U0."id" = 99999+ LIMIT 1)+ OR ("posthog_team"."parent_team_id" IS NULL+ AND "posthog_dashboard"."team_id" = 99999))+ AND NOT "posthog_dashboard"."deleted")+ '''+# ---+# name: TestDashboard.test_listing_dashboards_is_not_nplus1.64+ '''+ 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.65+ '''+ 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_listing_dashboards_is_not_nplus1.66+ '''+ 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_listing_dashboards_is_not_nplus1.67+ '''+ 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_listing_dashboards_is_not_nplus1.68+ '''+ SELECT COUNT(*) AS "__count"+ FROM "posthog_taggeditem"+ WHERE ("posthog_taggeditem"."content_type_id" = 99999+ AND "posthog_taggeditem"."object_id" = 99999)+ '''+# ---+# name: TestDashboard.test_listing_dashboards_is_not_nplus1.69+ '''+ 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_listing_dashboards_is_not_nplus1.7+ '''+ SELECT "posthog_oauthapplication"."redirect_uris",+ "posthog_oauthapplication"."post_logout_redirect_uris",+ "posthog_oauthapplication"."client_type",+ "posthog_oauthapplication"."authorization_grant_type",+ "posthog_oauthapplication"."client_secret",+ "posthog_oauthapplication"."hash_client_secret",+ "posthog_oauthapplication"."name",+ "posthog_oauthapplication"."skip_authorization",+ "posthog_oauthapplication"."created",+ "posthog_oauthapplication"."updated",+ "posthog_oauthapplication"."algorithm",+ "posthog_oauthapplication"."allowed_origins",+ "posthog_oauthapplication"."id",+ "posthog_oauthapplication"."client_id",+ "posthog_oauthapplication"."organization_id",+ "posthog_oauthapplication"."user_id",+ "posthog_oauthapplication"."logo_uri",+ "posthog_oauthapplication"."is_dcr_client",+ "posthog_oauthapplication"."dcr_client_id_issued_at",+ "posthog_oauthapplication"."is_verified",+ "posthog_oauthapplication"."is_first_party",+ "posthog_oauthapplication"."auth_brand",+ "posthog_oauthapplication"."scopes",+ "posthog_oauthapplication"."optional_scopes",+ "posthog_oauthapplication"."sessions_revoked_at",+ "posthog_oauthapplication"."is_cimd_client",+ "posthog_oauthapplication"."cimd_metadata_last_fetched",+ "posthog_oauthapplication"."jwks_uri",+ "posthog_oauthapplication"."is_provisioning_partner",+ "posthog_oauthapplication"."provisioning_config"+ FROM "posthog_oauthapplication"+ WHERE "posthog_oauthapplication"."organization_id" = '00000000-0000-0000-0000-000000000000'::uuid+ '''+# ---+# name: TestDashboard.test_listing_dashboards_is_not_nplus1.70+ '''+ 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_listing_dashboards_is_not_nplus1.71+ '''+ 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_listing_dashboards_is_not_nplus1.72+ '''+ 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_listing_dashboards_is_not_nplus1.73+ '''+ 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.74+ '''+ SELECT "posthog_dashboardtile"."id",+ "posthog_dashboardtile"."dashboard_id",+ "posthog_dashboardtile"."insight_id",+ "posthog_dashboardtile"."text_id",+ "posthog_dashboardtile"."button_tile_id",+ "posthog_dashboardtile"."widget_id",+ "posthog_dashboardtile"."team_id",+ "posthog_dashboardtile"."layouts",+ "posthog_dashboardtile"."color",+ "posthog_dashboardtile"."filters_hash",+ "posthog_dashboardtile"."last_refresh",+ "posthog_dashboardtile"."refreshing",+ "posthog_dashboardtile"."refresh_attempt",+ "posthog_dashboardtile"."filters_overrides",+ "posthog_dashboardtile"."show_description",+ "posthog_dashboardtile"."transparent_background",+ "posthog_dashboardtile"."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 "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_listing_dashboards_is_not_nplus1.75+ '''+ 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.76+ '''+ 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.77+ '''+ 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.78+ '''+ 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_listing_dashboards_is_not_nplus1.79+ '''+ 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.8+ '''+ SELECT "posthog_cimdverificationtoken"."id",+ "posthog_cimdverificationtoken"."organization_id",+ "posthog_cimdverificationtoken"."label",+ "posthog_cimdverificationtoken"."cimd_url",+ "posthog_cimdverificationtoken"."mask_value",+ "posthog_cimdverificationtoken"."secure_value",+ "posthog_cimdverificationtoken"."created_by_id",+ "posthog_cimdverificationtoken"."created_at",+ "posthog_cimdverificationtoken"."last_used_at"+ FROM "posthog_cimdverificationtoken"+ WHERE "posthog_cimdverificationtoken"."organization_id" = '00000000-0000-0000-0000-000000000000'::uuid+ '''+# ---+# name: TestDashboard.test_listing_dashboards_is_not_nplus1.80+ '''+ 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.81+ '''+ 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.82+ '''+ 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.83+ '''+ 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.84+ '''+ SELECT COUNT(*) AS "__count"+ FROM "posthog_dashboardtile"+ INNER JOIN "posthog_dashboard" ON ("posthog_dashboardtile"."dashboard_id" = "posthog_dashboard"."id")+ WHERE (NOT ("posthog_dashboardtile"."deleted"+ AND "posthog_dashboardtile"."deleted" IS NOT NULL)+ AND NOT ("posthog_dashboard"."deleted")+ AND "posthog_dashboardtile"."dashboard_id" = 99999+ AND NOT ("posthog_dashboardtile"."deleted"+ AND "posthog_dashboardtile"."deleted" IS NOT NULL))+ '''+# ---+# name: TestDashboard.test_listing_dashboards_is_not_nplus1.85+ '''+ 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_listing_dashboards_is_not_nplus1.86+ '''+ 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.87+ '''+ SELECT "posthog_organization"."id",+ "posthog_organization"."name","posthog_organization"."slug","posthog_organization"."logo_media_id","posthog_organization"."created_at",@@ -3711,88 +33152,444 @@"posthog_organization"."personalization","posthog_organization"."domain_whitelist","posthog_organization"."is_platform"- FROM "posthog_organizationmembership"- INNER JOIN "posthog_organization" ON ("posthog_organizationmembership"."organization_id" = "posthog_organization"."id")- WHERE "posthog_organizationmembership"."user_id" = 99999+ FROM "posthog_organization"+ WHERE "posthog_organization"."id" = '00000000-0000-0000-0000-000000000000'::uuid+ LIMIT 21'''# ----# name: TestDashboard.test_listing_dashboards_is_not_nplus1.6+# name: TestDashboard.test_listing_dashboards_is_not_nplus1.88'''- 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_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.89+ '''+ 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.9+ '''+ SELECT "posthog_cimdverificationtoken"."id",+ "posthog_cimdverificationtoken"."organization_id",+ "posthog_cimdverificationtoken"."label",+ "posthog_cimdverificationtoken"."cimd_url",+ "posthog_cimdverificationtoken"."mask_value",+ "posthog_cimdverificationtoken"."secure_value",+ "posthog_cimdverificationtoken"."created_by_id",+ "posthog_cimdverificationtoken"."created_at",+ "posthog_cimdverificationtoken"."last_used_at"+ FROM "posthog_cimdverificationtoken"+ WHERE "posthog_cimdverificationtoken"."organization_id" = '00000000-0000-0000-0000-000000000000'::uuid+ '''+# ---+# name: TestDashboard.test_listing_dashboards_is_not_nplus1.90+ '''+ 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.91+ '''+ 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.7+# name: TestDashboard.test_listing_dashboards_is_not_nplus1.92'''- 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_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.8+# name: TestDashboard.test_listing_dashboards_is_not_nplus1.93'''- 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"."deleted"- AND "posthog_dashboardtile"."deleted" IS NOT NULL))+ AND "posthog_dashboardtile"."insight_id" = 99999)'''# ----# name: TestDashboard.test_listing_dashboards_is_not_nplus1.9+# name: TestDashboard.test_listing_dashboards_is_not_nplus1.94'''- 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 /* ... */))+ 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_listing_dashboards_is_not_nplus1.95+ '''+ 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.96+ '''+ 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_listing_dashboards_is_not_nplus1.97+ '''+ 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_listing_dashboards_is_not_nplus1.98+ '''+ 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_listing_dashboards_is_not_nplus1.99+ '''+ SELECT "customer_analytics_teamcustomeranalyticsconfig"."account_group_type_index" AS "account_group_type_index"+ FROM "customer_analytics_teamcustomeranalyticsconfig"+ WHERE "customer_analytics_teamcustomeranalyticsconfig"."team_id" = 99999+ ORDER BY "customer_analytics_teamcustomeranalyticsconfig"."team_id" ASC+ LIMIT 1'''# ---# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tilesdiff --git a/posthog/api/test/dashboards/test_dashboard.py b/posthog/api/test/dashboards/test_dashboard.pyindex a9d5cc3dd8ce..ca538e3215c4 100644--- a/posthog/api/test/dashboards/test_dashboard.py+++ b/posthog/api/test/dashboards/test_dashboard.py@@ -45,7 +45,6 @@ from posthog.models.project import Projectfrom posthog.models.quick_filter import QuickFilterfrom posthog.models.sharing_configuration import SharingConfigurationfrom posthog.models.signals import mute_selected_signals-from posthog.models.tagged_item_registry import content_type_forfrom posthog.test.db_context_capturing import capture_db_queriesfrom posthog.test.insight_queries import browser_filtered_pageview_query, default_pageview_query, insight_queryfrom posthog.test.test_utils import create_group_type_mapping_without_created_at@@ -109,11 +108,6 @@ class TestDashboard(APIBaseTest, QueryMatchingTest):self.organization.save()self.dashboard_api = DashboardAPI(self.client, self.team, self.assertEqual)- def _fill_content_type_cache(self) -> None:- # Django caches ContentType lookups for the whole process.- content_type_for(Dashboard)- content_type_for(Insight)-def _fill_team_config_cache(self) -> None:# The query runner reads these accessors. Each one caches its result in an lru_cache that outlives the test.# The cache key is the Team. Team instances with the same pk compare equal.@@ -122,19 +116,18 @@ class TestDashboard(APIBaseTest, QueryMatchingTest):_ = self.team.marketing_analytics_config_ = self.team.customer_analytics_config+ @snapshot_postgres_queriesdef test_retrieve_dashboard_list(self):- self._fill_content_type_cache()- with snapshot_postgres_queries_context(self):- dashboard_names = ["a dashboard", "b dashboard"]- for dashboard_name in dashboard_names:- self.dashboard_api.create_dashboard({"name": dashboard_name})+ dashboard_names = ["a dashboard", "b dashboard"]+ for dashboard_name in dashboard_names:+ self.dashboard_api.create_dashboard({"name": dashboard_name})- with self.assertNumQueries(13):- response_data = self.dashboard_api.list_dashboards()- self.assertEqual(- [dashboard["name"] for dashboard in response_data["results"]],- dashboard_names,- )+ with self.assertNumQueries(13):+ response_data = self.dashboard_api.list_dashboards()+ self.assertEqual(+ [dashboard["name"] for dashboard in response_data["results"]],+ dashboard_names,+ )@patch("products.dashboards.backend.api.dashboard.report_user_action")def test_non_web_retrieve_fires_dashboard_read_event(self, mock_report_user_action: mock.Mock) -> None:@@ -678,29 +671,28 @@ class TestDashboard(APIBaseTest, QueryMatchingTest):# Set equality asserts the match is exact — every other dashboard (nested, other folder, root/named) is excludedassert result_ids == {ids[expected_key]}+ @snapshot_postgres_queriesdef test_retrieve_dashboard(self):- self._fill_content_type_cache()- with snapshot_postgres_queries_context(self):- dashboard = Dashboard.objects.create(team=self.team, name="private dashboard", created_by=self.user)+ dashboard = Dashboard.objects.create(team=self.team, name="private dashboard", created_by=self.user)- with patch("products.dashboards.backend.access.record_dashboard_access") as mock_record_access:- response_data = self.dashboard_api.get_dashboard(dashboard.pk)+ with patch("products.dashboards.backend.access.record_dashboard_access") as mock_record_access:+ response_data = self.dashboard_api.get_dashboard(dashboard.pk)- mock_record_access.assert_called_once_with(DashboardAccessMethod.HUMAN)+ mock_record_access.assert_called_once_with(DashboardAccessMethod.HUMAN)- self.assertEqual(response_data["name"], "private dashboard")- self.assertEqual(response_data["description"], "")- self.assertEqual(response_data["created_by"]["distinct_id"], self.user.distinct_id)- self.assertEqual(response_data["created_by"]["first_name"], self.user.first_name)- self.assertEqual(response_data["creation_mode"], "default")- self.assertEqual(- response_data["restriction_level"],- Dashboard.RestrictionLevel.EVERYONE_IN_PROJECT_CAN_EDIT,- )- self.assertEqual(- response_data["effective_privilege_level"],- Dashboard.RestrictionLevel.ONLY_COLLABORATORS_CAN_EDIT,- )+ self.assertEqual(response_data["name"], "private dashboard")+ self.assertEqual(response_data["description"], "")+ self.assertEqual(response_data["created_by"]["distinct_id"], self.user.distinct_id)+ self.assertEqual(response_data["created_by"]["first_name"], self.user.first_name)+ self.assertEqual(response_data["creation_mode"], "default")+ self.assertEqual(+ response_data["restriction_level"],+ Dashboard.RestrictionLevel.EVERYONE_IN_PROJECT_CAN_EDIT,+ )+ self.assertEqual(+ response_data["effective_privilege_level"],+ Dashboard.RestrictionLevel.ONLY_COLLABORATORS_CAN_EDIT,+ )def test_create_basic_dashboard(self):# the front end sends an empty description even if not allowed to add one@@ -1229,7 +1221,6 @@ class TestDashboard(APIBaseTest, QueryMatchingTest):AND "posthog_dashboardtile"."dashboard_id" IN (1,```"""- self._fill_content_type_cache()self._fill_team_config_cache()with snapshot_postgres_queries_context(self):dashboard_one_id, _ = self.dashboard_api.create_dashboard({"name": "dashboard-1"})diff --git a/posthog/test/base.py b/posthog/test/base.pyindex 9c6cca5ad8f5..e1cdee4d9051 100644--- a/posthog/test/base.py+++ b/posthog/test/base.py@@ -19,12 +19,12 @@ from unittest.mock import patchfrom django.apps import appsfrom django.conf import settings+from django.contrib.contenttypes.models import ContentTypefrom django.core.cache import cachefrom django.core.management import call_commandfrom django.db import connection, connections, transactionfrom django.db.migrations.executor import MigrationExecutorfrom django.test import SimpleTestCase, TestCase, TransactionTestCase, override_settings-from django.test.utils import CaptureQueriesContextimport sqlparsefrom clickhouse_pool import ChPool@@ -288,6 +288,12 @@ def clean_varying_query_parts(query, replace_all_numbers):query = re.sub(r".\"ref\" = '([0-9a-f]{32}|[0-9a-f-]{36}|[0-9]+|[A-Za-z0-9\_\-]+)'", """."ref" = '0001'""", query)+ # The pattern allows one level of nested parentheses inside the lock call.+ query = re.sub(+ r"pg_(?:try_)?advisory_\w+\((?:[^()']|'[^']*'|\([^()]*\))*\)",+ lambda lock_call: re.sub(r"\d+", "99999", lock_call.group(0)),+ query,+ )else:query = re.sub(r"(team|project|cohort)_id(\"?) = \d+", r"\1_id\2 = 99999", query)query = re.sub(@@ -1547,6 +1553,46 @@ class QueryMatchingTest:raise AssertionError(params_error_message)+class PostgresQueryRecorder:+ """Records every query a connection runs while installed with `connection.execute_wrapper`.++ Each entry holds the SQL text that Django's debug cursor writes to `connection.queries`.+ """++ def __init__(self) -> None:+ self.captured_queries: list[dict[str, str]] = []++ def __call__(+ self,+ execute: Callable[[str, Any, bool, dict[str, Any]], Any],+ sql: str,+ params: Any,+ many: bool,+ context: dict[str, Any],+ ) -> Any:+ try:+ return execute(sql, params, many, context)+ finally:+ self.captured_queries.append({"sql": self._logged_sql(sql, params, many, context)})++ @staticmethod+ def _logged_sql(sql: str, params: Any, many: bool, context: dict[str, Any]) -> str:+ if many:+ try:+ times: int | str = len(params)+ except TypeError:+ times = "?"+ return f"{times} times: {sql}"+ return context["connection"].ops.last_executed_query(context["cursor"].cursor, sql, params)+++def _fill_content_type_cache() -> None:+ # A capture that starts with a cold cache records django_content_type queries that a warm capture does not.+ # An enclosing assertNumQueries counts only queries that run through a debug cursor.+ with patch.object(connections[ContentType.objects.db], "force_debug_cursor", False):+ ContentType.objects.get_for_models(*apps.get_models())++@contextmanagerdef snapshot_postgres_queries_context(testcase: QueryMatchingTest,@@ -1566,6 +1612,12 @@ def snapshot_postgres_queries_context(fixed output.Returns a context manager that can be used to capture queries.+ It records through `connection.execute_wrapper`, so a nested `assertNumQueries`+ or a test-client request that clears `connection.queries` does not drop any+ query from the capture.++ Before it records, it fills Django's ContentType cache for every model. An+ enclosing `assertNumQueries` does not count the query that the fill runs.NOTE: it requires specifically that a `QueryMatchingTest` is used as thetestcase argument.@@ -1581,11 +1633,13 @@ def snapshot_postgres_queries_context(# Run some code that generates queries"""- with CaptureQueriesContext(connections[using]) as context:- yield context+ _fill_content_type_cache()+ recorder = PostgresQueryRecorder()+ with connections[using].execute_wrapper(recorder):+ yield recorder- for query_with_time in context.captured_queries:- query = query_with_time["sql"]+ for captured_query in recorder.captured_queries:+ query = captured_query["sql"]if custom_query_matcher:if query and custom_query_matcher(query):testcase.assertQueryMatchesSnapshot(query, replace_all_numbers=replace_all_numbers)diff --git a/posthog/test/test_base.py b/posthog/test/test_base.pyindex 2ebb099bec65..2a45bfd148ba 100644--- a/posthog/test/test_base.py+++ b/posthog/test/test_base.py@@ -1,11 +1,16 @@import pytestfrom posthog.test.base import (+ QueryMatchingTest,run_clickhouse_statement_in_parallel,skip_clickhouse_query_snapshots,snapshot_clickhouse_queries,+ snapshot_postgres_queries_context,)from django.conf import settings+from django.contrib.contenttypes.models import ContentType+from django.db import reset_queries+from django.test import TestCasefrom clickhouse_driver.errors import ServerException@@ -17,6 +22,7 @@ from posthog.models.event.sql import (WRITABLE_EVENTS_DATA_TABLE,WRITABLE_EVENTS_JSON_TABLE,)+from posthog.models.team.team import Teamdef test_snapshot_clickhouse_queries_skips_marked_methods() -> None:@@ -58,3 +64,23 @@ def test_events_schema_setting_controls_legacy_table_availability(django_db_setuassert json_table_names <= actual_table_nameselse:assert legacy_table_names <= actual_table_names+++class TestSnapshotPostgresQueriesContext(TestCase, QueryMatchingTest):+ def test_cold_content_type_cache_fill_is_neither_captured_nor_counted(self) -> None:+ ContentType.objects.clear_cache()++ with self.assertNumQueries(1) as counted:+ with snapshot_postgres_queries_context(self, custom_query_matcher=lambda query: False) as context:+ ContentType.objects.get_for_model(Team)+ Team.objects.exists()++ assert context.captured_queries == [{"sql": query["sql"]} for query in counted.captured_queries]++ def test_capture_keeps_queries_that_ran_before_a_query_log_clear(self) -> None:+ with snapshot_postgres_queries_context(self, custom_query_matcher=lambda query: False) as context:+ Team.objects.exists()+ reset_queries()+ Team.objects.exists()++ assert len(context.captured_queries) == 2diff --git a/products/product_analytics/backend/tests/api/__snapshots__/test_insight.ambr b/products/product_analytics/backend/tests/api/__snapshots__/test_insight.ambrindex 1395af30dd2e..0c5b30a9ede2 100644--- a/products/product_analytics/backend/tests/api/__snapshots__/test_insight.ambr+++ b/products/product_analytics/backend/tests/api/__snapshots__/test_insight.ambr@@ -1,5 +1,249 @@# serializer version: 1# name: TestInsight.test_listing_insights_does_not_nplus1+ '''+ 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"+ FROM "posthog_organizationmembership"+ WHERE "posthog_organizationmembership"."user_id" = 99999+ '''+# ---+# name: TestInsight.test_listing_insights_does_not_nplus1.1+ '''+ 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"+ FROM "posthog_organizationmembership"+ WHERE "posthog_organizationmembership"."id" = '00000000000000000000000000000000'::uuid+ LIMIT 21+ '''+# ---+# name: TestInsight.test_listing_insights_does_not_nplus1.10+ '''+ 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: TestInsight.test_listing_insights_does_not_nplus1.100+ '''+ 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: TestInsight.test_listing_insights_does_not_nplus1.101+ '''+ 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: TestInsight.test_listing_insights_does_not_nplus1.102+ '''+ 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: TestInsight.test_listing_insights_does_not_nplus1.103+ '''+ 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: TestInsight.test_listing_insights_does_not_nplus1.104+ '''+ 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: TestInsight.test_listing_insights_does_not_nplus1.105+ '''+ 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: TestInsight.test_listing_insights_does_not_nplus1.106+ '''+ 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: TestInsight.test_listing_insights_does_not_nplus1.107+ '''+ 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: TestInsight.test_listing_insights_does_not_nplus1.108+ '''+ 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: TestInsight.test_listing_insights_does_not_nplus1.109+ '''+ SELECT COUNT(*) AS "__count"+ FROM "posthog_dashboarditem"+ WHERE NOT ("posthog_dashboarditem"."deleted")+ '''+# ---+# name: TestInsight.test_listing_insights_does_not_nplus1.11+ '''+ 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: TestInsight.test_listing_insights_does_not_nplus1.110'''SELECT "posthog_user"."id","posthog_user"."password",@@ -45,7 +289,7 @@AND "posthog_user"."id" = 99999)'''# ----# name: TestInsight.test_listing_insights_does_not_nplus1.1+# name: TestInsight.test_listing_insights_does_not_nplus1.111'''SELECT "posthog_organization"."id","posthog_organization"."name",@@ -91,7 +335,7 @@LIMIT 21'''# ----# name: TestInsight.test_listing_insights_does_not_nplus1.10+# name: TestInsight.test_listing_insights_does_not_nplus1.112'''SELECT "posthog_team"."id","posthog_team"."uuid",@@ -184,15 +428,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: TestInsight.test_listing_insights_does_not_nplus1.11- '''- SELECT "posthog_organization"."id",+ "posthog_team"."business_model",+ "posthog_organization"."id","posthog_organization"."name","posthog_organization"."slug","posthog_organization"."logo_media_id",@@ -231,20 +468,196 @@"posthog_organization"."personalization","posthog_organization"."domain_whitelist","posthog_organization"."is_platform"- FROM "posthog_organization"- WHERE "posthog_organization"."id" = '00000000-0000-0000-0000-000000000000'::uuid+ FROM "posthog_team"+ INNER JOIN "posthog_organization" ON ("posthog_team"."organization_id" = "posthog_organization"."id")+ WHERE "posthog_team"."id" = 99999LIMIT 21'''# ----# name: TestInsight.test_listing_insights_does_not_nplus1.12+# name: TestInsight.test_listing_insights_does_not_nplus1.113'''- 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",+ 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: TestInsight.test_listing_insights_does_not_nplus1.114+ '''+ 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: TestInsight.test_listing_insights_does_not_nplus1.115+ '''+ 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: TestInsight.test_listing_insights_does_not_nplus1.116+ '''+ SELECT COUNT(*) AS "__count"+ FROM "posthog_dashboarditem"+ INNER JOIN "posthog_team" ON ("posthog_dashboarditem"."team_id" = "posthog_team"."id")+ WHERE ("posthog_team"."project_id" = 99999+ AND NOT ("posthog_dashboarditem"."deleted"))+ '''+# ---+# name: TestInsight.test_listing_insights_does_not_nplus1.117+ '''+ SELECT "posthog_dashboarditem"."id",+ "posthog_dashboarditem"."name",+ "posthog_dashboarditem"."derived_name",+ "posthog_dashboarditem"."description",+ "posthog_dashboarditem"."team_id",+ "posthog_dashboarditem"."filters",+ "posthog_dashboarditem"."filters_hash",+ "posthog_dashboarditem"."query",+ "posthog_dashboarditem"."query_metadata",+ "posthog_dashboarditem"."order",+ "posthog_dashboarditem"."deleted",+ "posthog_dashboarditem"."saved",+ "posthog_dashboarditem"."created_at",+ "posthog_dashboarditem"."refreshing",+ "posthog_dashboarditem"."created_by_id",+ "posthog_dashboarditem"."is_sample",+ "posthog_dashboarditem"."short_id",+ "posthog_dashboarditem"."favorited",+ "posthog_dashboarditem"."refresh_attempt",+ "posthog_dashboarditem"."last_modified_at",+ "posthog_dashboarditem"."last_modified_by_id",+ "posthog_dashboarditem"."dashboard_id",+ "posthog_dashboarditem"."last_refresh",+ "posthog_dashboarditem"."layouts",+ "posthog_dashboarditem"."color",+ "posthog_dashboarditem"."dive_dashboard_id",+ "posthog_dashboarditem"."updated_at",+ "posthog_dashboarditem"."deprecated_tags",+ "posthog_dashboarditem"."tags",++ (SELECT U0."last_viewed_at" AS "last_viewed_at"+ FROM "posthog_insightviewed" U0+ WHERE U0."insight_id" = ("posthog_dashboarditem"."id")+ ORDER BY 1 DESC+ LIMIT 1) AS "last_viewed_at",+ "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",@@ -324,170 +737,6138 @@"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"- FROM "posthog_team"- WHERE "posthog_team"."id" = 99999- LIMIT 21+ "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"+ FROM "posthog_dashboarditem"+ INNER 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")+ WHERE ("posthog_team"."project_id" = 99999+ AND NOT ("posthog_dashboarditem"."deleted"))+ ORDER BY "posthog_dashboarditem"."last_modified_at" DESC,+ "posthog_dashboarditem"."id" DESC+ LIMIT 100'''# ----# name: TestInsight.test_listing_insights_does_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: TestInsight.test_listing_insights_does_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: TestInsight.test_listing_insights_does_not_nplus1.15+# name: TestInsight.test_listing_insights_does_not_nplus1.118'''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)+ AND "posthog_dashboardtile"."insight_id" IN (1,+ 2,+ 3,+ 4,+ 5 /* ... */))'''# ----# name: TestInsight.test_listing_insights_does_not_nplus1.16+# name: TestInsight.test_listing_insights_does_not_nplus1.119'''- 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"+ 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"+ FROM "posthog_taggeditem"+ WHERE ("posthog_taggeditem"."content_type_id" = 99999+ AND "posthog_taggeditem"."object_id" IN (1,+ 2,+ 3,+ 4,+ 5 /* ... */))+ '''+# ---+# name: TestInsight.test_listing_insights_does_not_nplus1.12+ '''+ SELECT COUNT(*) AS "__count"FROM "posthog_dashboardtile"INNER JOIN "posthog_dashboard" ON ("posthog_dashboardtile"."dashboard_id" = "posthog_dashboard"."id")WHERE (NOT ("posthog_dashboardtile"."deleted"AND "posthog_dashboardtile"."deleted" IS NOT NULL)AND NOT ("posthog_dashboard"."deleted")- AND "posthog_dashboardtile"."insight_id" = 99999)+ AND "posthog_dashboardtile"."dashboard_id" = 99999+ AND NOT ("posthog_dashboardtile"."deleted"+ AND "posthog_dashboardtile"."deleted" IS NOT NULL))+ '''+# ---+# name: TestInsight.test_listing_insights_does_not_nplus1.120+ '''+ 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: TestInsight.test_listing_insights_does_not_nplus1.121+ '''+ 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"+ FROM "posthog_organizationmembership"+ WHERE "posthog_organizationmembership"."user_id" = 99999+ '''+# ---+# name: TestInsight.test_listing_insights_does_not_nplus1.122+ '''+ 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"+ FROM "posthog_organizationmembership"+ WHERE "posthog_organizationmembership"."id" = '00000000000000000000000000000000'::uuid+ LIMIT 21+ '''+# ---+# name: TestInsight.test_listing_insights_does_not_nplus1.123+ '''+ SELECT "posthog_team"."id" AS "id"+ FROM "posthog_team"+ WHERE ("posthog_team"."organization_id" = '00000000-0000-0000-0000-000000000000'::uuid+ AND "posthog_team"."receive_org_level_activity_logs")+ '''+# ---+# name: TestInsight.test_listing_insights_does_not_nplus1.124+ '''+ 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: TestInsight.test_listing_insights_does_not_nplus1.125+ '''+ 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: TestInsight.test_listing_insights_does_not_nplus1.126+ '''+ 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: TestInsight.test_listing_insights_does_not_nplus1.127+ '''+ 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: TestInsight.test_listing_insights_does_not_nplus1.128+ '''+ 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: TestInsight.test_listing_insights_does_not_nplus1.129+ '''+ 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: TestInsight.test_listing_insights_does_not_nplus1.13+ '''+ 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: TestInsight.test_listing_insights_does_not_nplus1.130+ '''+ 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: TestInsight.test_listing_insights_does_not_nplus1.131+ '''+ 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: TestInsight.test_listing_insights_does_not_nplus1.132+ '''+ 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: TestInsight.test_listing_insights_does_not_nplus1.133+ '''+ 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: TestInsight.test_listing_insights_does_not_nplus1.134+ '''+ 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: TestInsight.test_listing_insights_does_not_nplus1.135+ '''+ 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: TestInsight.test_listing_insights_does_not_nplus1.136+ '''+ 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: TestInsight.test_listing_insights_does_not_nplus1.137+ '''+ SELECT "posthog_team"."id",+ "posthog_team"."uuid",+ "posthog_team"."organization_id",+ "posthog_team"."parent_team_id",+ "posthog_team"."project_id",+ "posthog_team"."api_token",+ "posthog_team"."app_urls",+ "posthog_team"."name",+ "posthog_team"."slack_incoming_webhook",+ "posthog_team"."created_at",+ "posthog_team"."updated_at",+ "posthog_team"."anonymize_ips",+ "posthog_team"."completed_snippet_onboarding",+ "posthog_team"."has_completed_onboarding_for",+ "posthog_team"."onboarding_tasks",+ "posthog_team"."ingested_event",+ "posthog_team"."ingested_production_event",+ "posthog_team"."ingested_production_event_last_checked_at",+ "posthog_team"."person_processing_opt_out",+ "posthog_team"."secret_api_token",+ "posthog_team"."secret_api_token_backup",+ "posthog_team"."session_recording_opt_in",+ "posthog_team"."session_recording_sample_rate",+ "posthog_team"."session_recording_minimum_duration_milliseconds",+ "posthog_team"."session_recording_linked_flag",+ "posthog_team"."session_recording_network_payload_capture_config",+ "posthog_team"."session_recording_masking_config",+ "posthog_team"."session_recording_url_trigger_config",+ "posthog_team"."session_recording_url_blocklist_config",+ "posthog_team"."session_recording_event_trigger_config",+ "posthog_team"."session_recording_trigger_match_type_config",+ "posthog_team"."session_recording_trigger_groups",+ "posthog_team"."session_replay_config",+ "posthog_team"."session_recording_retention_period",+ "posthog_team"."event_retention_months",+ "posthog_team"."conversations_enabled",+ "posthog_team"."conversations_settings",+ "posthog_team"."proactive_tasks_enabled",+ "posthog_team"."survey_config",+ "posthog_team"."surveys_opt_in",+ "posthog_team"."product_tours_opt_in",+ "posthog_team"."capture_console_log_opt_in",+ "posthog_team"."capture_performance_opt_in",+ "posthog_team"."capture_dead_clicks",+ "posthog_team"."autocapture_opt_out",+ "posthog_team"."autocapture_web_vitals_opt_in",+ "posthog_team"."autocapture_web_vitals_allowed_metrics",+ "posthog_team"."autocapture_exceptions_opt_in",+ "posthog_team"."autocapture_exceptions_errors_to_ignore",+ "posthog_team"."logs_settings",+ "posthog_team"."llm_gateway_enabled_at",+ "posthog_team"."llm_gateway_revoked_at",+ "posthog_team"."llm_gateway_overspend_allowance_usd",+ "posthog_team"."heatmaps_opt_in",+ "posthog_team"."receive_org_level_activity_logs",+ "posthog_team"."web_analytics_pre_aggregated_tables_enabled",+ "posthog_team"."web_analytics_pre_aggregated_tables_version",+ "posthog_team"."flags_persistence_default",+ "posthog_team"."feature_flag_confirmation_enabled",+ "posthog_team"."feature_flag_confirmation_message",+ "posthog_team"."default_evaluation_environments_enabled",+ "posthog_team"."require_evaluation_environment_tags",+ "posthog_team"."default_evaluation_contexts_enabled",+ "posthog_team"."require_evaluation_contexts",+ "posthog_team"."session_recording_version",+ "posthog_team"."signup_token",+ "posthog_team"."is_demo",+ "posthog_team"."access_control",+ "posthog_team"."week_start_day",+ "posthog_team"."inject_web_apps",+ "posthog_team"."test_account_filters",+ "posthog_team"."test_account_filters_default_checked",+ "posthog_team"."path_cleaning_filters",+ "posthog_team"."timezone",+ "posthog_team"."data_attributes",+ "posthog_team"."person_display_name_properties",+ "posthog_team"."live_events_columns",+ "posthog_team"."recording_domains",+ "posthog_team"."human_friendly_comparison_periods",+ "posthog_team"."cookieless_server_hash_mode",+ "posthog_team"."primary_dashboard_id",+ "posthog_team"."default_data_theme",+ "posthog_team"."extra_settings",+ "posthog_team"."modifiers",+ "posthog_team"."correlation_config",+ "posthog_team"."session_recording_retention_period_days",+ "posthog_team"."external_data_workspace_id",+ "posthog_team"."external_data_workspace_last_synced_at",+ "posthog_team"."api_query_rate_limit",+ "posthog_team"."drop_events_older_than",+ "posthog_team"."base_currency",+ "posthog_team"."business_model"+ FROM "posthog_team"+ WHERE "posthog_team"."id" = 99999+ LIMIT 21+ '''+# ---+# name: TestInsight.test_listing_insights_does_not_nplus1.138+ '''+ SELECT "posthog_filesystem"."team_id",+ "posthog_filesystem"."id",+ "posthog_filesystem"."path",+ "posthog_filesystem"."depth",+ "posthog_filesystem"."type",+ "posthog_filesystem"."ref",+ "posthog_filesystem"."href",+ "posthog_filesystem"."shortcut",+ "posthog_filesystem"."meta",+ "posthog_filesystem"."created_at",+ "posthog_filesystem"."created_by_id",+ "posthog_filesystem"."surface",+ "posthog_filesystem"."project_id"+ FROM "posthog_filesystem"+ WHERE (("posthog_filesystem"."surface" IS NULL+ OR "posthog_filesystem"."surface" = 'web')+ AND "posthog_filesystem"."ref" = '0001'+ AND "posthog_filesystem"."team_id" = 99999+ AND "posthog_filesystem"."type" = 'insight'+ AND NOT ("posthog_filesystem"."shortcut"+ AND "posthog_filesystem"."shortcut" IS NOT NULL))+ '''+# ---+# name: TestInsight.test_listing_insights_does_not_nplus1.139+ '''+ 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: TestInsight.test_listing_insights_does_not_nplus1.14+ '''+ 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: TestInsight.test_listing_insights_does_not_nplus1.140+ '''+ 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: TestInsight.test_listing_insights_does_not_nplus1.141+ '''+ 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: TestInsight.test_listing_insights_does_not_nplus1.142+ '''+ 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: TestInsight.test_listing_insights_does_not_nplus1.143+ '''+ 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: TestInsight.test_listing_insights_does_not_nplus1.144+ '''+ 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: TestInsight.test_listing_insights_does_not_nplus1.145+ '''+ 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: TestInsight.test_listing_insights_does_not_nplus1.146+ '''+ 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: TestInsight.test_listing_insights_does_not_nplus1.147+ '''+ SELECT "posthog_dashboard"."id",+ "posthog_dashboard"."name",+ "posthog_dashboard"."description",+ "posthog_dashboard"."team_id",+ "posthog_dashboard"."pinned",+ "posthog_dashboard"."created_at",+ "posthog_dashboard"."created_by_id",+ "posthog_dashboard"."deleted",+ "posthog_dashboard"."last_accessed_at",+ "posthog_dashboard"."last_refresh",+ "posthog_dashboard"."filters",+ "posthog_dashboard"."variables",+ "posthog_dashboard"."breakdown_colors",+ "posthog_dashboard"."data_color_theme_id",+ "posthog_dashboard"."creation_mode",+ "posthog_dashboard"."restriction_level",+ "posthog_dashboard"."quick_filter_ids",+ "posthog_dashboard"."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: TestInsight.test_listing_insights_does_not_nplus1.148+ '''+ 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: TestInsight.test_listing_insights_does_not_nplus1.149+ '''+ SELECT COUNT(*) AS "__count"+ FROM "posthog_dashboarditem"+ WHERE NOT ("posthog_dashboarditem"."deleted")+ '''+# ---+# name: TestInsight.test_listing_insights_does_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: TestInsight.test_listing_insights_does_not_nplus1.150+ '''+ 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: TestInsight.test_listing_insights_does_not_nplus1.151+ '''+ 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: TestInsight.test_listing_insights_does_not_nplus1.152+ '''+ SELECT "posthog_team"."id",+ "posthog_team"."uuid",+ "posthog_team"."organization_id",+ "posthog_team"."parent_team_id",+ "posthog_team"."project_id",+ "posthog_team"."api_token",+ "posthog_team"."app_urls",+ "posthog_team"."name",+ "posthog_team"."slack_incoming_webhook",+ "posthog_team"."created_at",+ "posthog_team"."updated_at",+ "posthog_team"."anonymize_ips",+ "posthog_team"."completed_snippet_onboarding",+ "posthog_team"."has_completed_onboarding_for",+ "posthog_team"."onboarding_tasks",+ "posthog_team"."ingested_event",+ "posthog_team"."ingested_production_event",+ "posthog_team"."ingested_production_event_last_checked_at",+ "posthog_team"."person_processing_opt_out",+ "posthog_team"."secret_api_token",+ "posthog_team"."secret_api_token_backup",+ "posthog_team"."session_recording_opt_in",+ "posthog_team"."session_recording_sample_rate",+ "posthog_team"."session_recording_minimum_duration_milliseconds",+ "posthog_team"."session_recording_linked_flag",+ "posthog_team"."session_recording_network_payload_capture_config",+ "posthog_team"."session_recording_masking_config",+ "posthog_team"."session_recording_url_trigger_config",+ "posthog_team"."session_recording_url_blocklist_config",+ "posthog_team"."session_recording_event_trigger_config",+ "posthog_team"."session_recording_trigger_match_type_config",+ "posthog_team"."session_recording_trigger_groups",+ "posthog_team"."session_replay_config",+ "posthog_team"."session_recording_retention_period",+ "posthog_team"."event_retention_months",+ "posthog_team"."conversations_enabled",+ "posthog_team"."conversations_settings",+ "posthog_team"."proactive_tasks_enabled",+ "posthog_team"."survey_config",+ "posthog_team"."surveys_opt_in",+ "posthog_team"."product_tours_opt_in",+ "posthog_team"."capture_console_log_opt_in",+ "posthog_team"."capture_performance_opt_in",+ "posthog_team"."capture_dead_clicks",+ "posthog_team"."autocapture_opt_out",+ "posthog_team"."autocapture_web_vitals_opt_in",+ "posthog_team"."autocapture_web_vitals_allowed_metrics",+ "posthog_team"."autocapture_exceptions_opt_in",+ "posthog_team"."autocapture_exceptions_errors_to_ignore",+ "posthog_team"."logs_settings",+ "posthog_team"."llm_gateway_enabled_at",+ "posthog_team"."llm_gateway_revoked_at",+ "posthog_team"."llm_gateway_overspend_allowance_usd",+ "posthog_team"."heatmaps_opt_in",+ "posthog_team"."receive_org_level_activity_logs",+ "posthog_team"."web_analytics_pre_aggregated_tables_enabled",+ "posthog_team"."web_analytics_pre_aggregated_tables_version",+ "posthog_team"."flags_persistence_default",+ "posthog_team"."feature_flag_confirmation_enabled",+ "posthog_team"."feature_flag_confirmation_message",+ "posthog_team"."default_evaluation_environments_enabled",+ "posthog_team"."require_evaluation_environment_tags",+ "posthog_team"."default_evaluation_contexts_enabled",+ "posthog_team"."require_evaluation_contexts",+ "posthog_team"."session_recording_version",+ "posthog_team"."signup_token",+ "posthog_team"."is_demo",+ "posthog_team"."access_control",+ "posthog_team"."week_start_day",+ "posthog_team"."inject_web_apps",+ "posthog_team"."test_account_filters",+ "posthog_team"."test_account_filters_default_checked",+ "posthog_team"."path_cleaning_filters",+ "posthog_team"."timezone",+ "posthog_team"."data_attributes",+ "posthog_team"."person_display_name_properties",+ "posthog_team"."live_events_columns",+ "posthog_team"."recording_domains",+ "posthog_team"."human_friendly_comparison_periods",+ "posthog_team"."cookieless_server_hash_mode",+ "posthog_team"."primary_dashboard_id",+ "posthog_team"."default_data_theme",+ "posthog_team"."extra_settings",+ "posthog_team"."modifiers",+ "posthog_team"."correlation_config",+ "posthog_team"."session_recording_retention_period_days",+ "posthog_team"."external_data_workspace_id",+ "posthog_team"."external_data_workspace_last_synced_at",+ "posthog_team"."api_query_rate_limit",+ "posthog_team"."drop_events_older_than",+ "posthog_team"."base_currency",+ "posthog_team"."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: TestInsight.test_listing_insights_does_not_nplus1.153+ '''+ 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: TestInsight.test_listing_insights_does_not_nplus1.154+ '''+ 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: TestInsight.test_listing_insights_does_not_nplus1.155+ '''+ 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: TestInsight.test_listing_insights_does_not_nplus1.156+ '''+ SELECT COUNT(*) AS "__count"+ FROM "posthog_dashboarditem"+ INNER JOIN "posthog_team" ON ("posthog_dashboarditem"."team_id" = "posthog_team"."id")+ WHERE ("posthog_team"."project_id" = 99999+ AND NOT ("posthog_dashboarditem"."deleted"))+ '''+# ---+# name: TestInsight.test_listing_insights_does_not_nplus1.157+ '''+ SELECT "posthog_dashboarditem"."id",+ "posthog_dashboarditem"."name",+ "posthog_dashboarditem"."derived_name",+ "posthog_dashboarditem"."description",+ "posthog_dashboarditem"."team_id",+ "posthog_dashboarditem"."filters",+ "posthog_dashboarditem"."filters_hash",+ "posthog_dashboarditem"."query",+ "posthog_dashboarditem"."query_metadata",+ "posthog_dashboarditem"."order",+ "posthog_dashboarditem"."deleted",+ "posthog_dashboarditem"."saved",+ "posthog_dashboarditem"."created_at",+ "posthog_dashboarditem"."refreshing",+ "posthog_dashboarditem"."created_by_id",+ "posthog_dashboarditem"."is_sample",+ "posthog_dashboarditem"."short_id",+ "posthog_dashboarditem"."favorited",+ "posthog_dashboarditem"."refresh_attempt",+ "posthog_dashboarditem"."last_modified_at",+ "posthog_dashboarditem"."last_modified_by_id",+ "posthog_dashboarditem"."dashboard_id",+ "posthog_dashboarditem"."last_refresh",+ "posthog_dashboarditem"."layouts",+ "posthog_dashboarditem"."color",+ "posthog_dashboarditem"."dive_dashboard_id",+ "posthog_dashboarditem"."updated_at",+ "posthog_dashboarditem"."deprecated_tags",+ "posthog_dashboarditem"."tags",++ (SELECT U0."last_viewed_at" AS "last_viewed_at"+ FROM "posthog_insightviewed" U0+ WHERE U0."insight_id" = ("posthog_dashboarditem"."id")+ ORDER BY 1 DESC+ LIMIT 1) AS "last_viewed_at",+ "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"+ FROM "posthog_dashboarditem"+ INNER 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")+ WHERE ("posthog_team"."project_id" = 99999+ AND NOT ("posthog_dashboarditem"."deleted"))+ ORDER BY "posthog_dashboarditem"."last_modified_at" DESC,+ "posthog_dashboarditem"."id" DESC+ LIMIT 100+ '''+# ---+# name: TestInsight.test_listing_insights_does_not_nplus1.158+ '''+ 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,+ 4,+ 5 /* ... */))+ '''+# ---+# name: TestInsight.test_listing_insights_does_not_nplus1.159+ '''+ 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"+ FROM "posthog_taggeditem"+ WHERE ("posthog_taggeditem"."content_type_id" = 99999+ AND "posthog_taggeditem"."object_id" IN (1,+ 2,+ 3,+ 4,+ 5 /* ... */))+ '''+# ---+# name: TestInsight.test_listing_insights_does_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: TestInsight.test_listing_insights_does_not_nplus1.160+ '''+ 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: TestInsight.test_listing_insights_does_not_nplus1.161+ '''+ 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"+ FROM "posthog_organizationmembership"+ WHERE "posthog_organizationmembership"."user_id" = 99999+ '''+# ---+# name: TestInsight.test_listing_insights_does_not_nplus1.162+ '''+ 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"+ FROM "posthog_organizationmembership"+ WHERE "posthog_organizationmembership"."id" = '00000000000000000000000000000000'::uuid+ LIMIT 21+ '''+# ---+# name: TestInsight.test_listing_insights_does_not_nplus1.163+ '''+ SELECT "posthog_team"."id" AS "id"+ FROM "posthog_team"+ WHERE ("posthog_team"."organization_id" = '00000000-0000-0000-0000-000000000000'::uuid+ AND "posthog_team"."receive_org_level_activity_logs")+ '''+# ---+# name: TestInsight.test_listing_insights_does_not_nplus1.164+ '''+ 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: TestInsight.test_listing_insights_does_not_nplus1.165+ '''+ 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: TestInsight.test_listing_insights_does_not_nplus1.166+ '''+ 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: TestInsight.test_listing_insights_does_not_nplus1.167+ '''+ 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: TestInsight.test_listing_insights_does_not_nplus1.168+ '''+ 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: TestInsight.test_listing_insights_does_not_nplus1.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"+ 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: TestInsight.test_listing_insights_does_not_nplus1.17+ '''+ 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: TestInsight.test_listing_insights_does_not_nplus1.170+ '''+ 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: TestInsight.test_listing_insights_does_not_nplus1.171+ '''+ 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: TestInsight.test_listing_insights_does_not_nplus1.172+ '''+ 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: TestInsight.test_listing_insights_does_not_nplus1.173+ '''+ 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: TestInsight.test_listing_insights_does_not_nplus1.174+ '''+ 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: TestInsight.test_listing_insights_does_not_nplus1.175+ '''+ 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: TestInsight.test_listing_insights_does_not_nplus1.176+ '''+ 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: TestInsight.test_listing_insights_does_not_nplus1.177+ '''+ 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: TestInsight.test_listing_insights_does_not_nplus1.178+ '''+ 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: TestInsight.test_listing_insights_does_not_nplus1.179+ '''+ 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: TestInsight.test_listing_insights_does_not_nplus1.18+ '''+ 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: TestInsight.test_listing_insights_does_not_nplus1.180+ '''+ SELECT "posthog_dashboardtile"."id",+ "posthog_dashboardtile"."dashboard_id",+ "posthog_dashboardtile"."insight_id",+ "posthog_dashboardtile"."text_id",+ "posthog_dashboardtile"."button_tile_id",+ "posthog_dashboardtile"."widget_id",+ "posthog_dashboardtile"."team_id",+ "posthog_dashboardtile"."layouts",+ "posthog_dashboardtile"."color",+ "posthog_dashboardtile"."filters_hash",+ "posthog_dashboardtile"."last_refresh",+ "posthog_dashboardtile"."refreshing",+ "posthog_dashboardtile"."refresh_attempt",+ "posthog_dashboardtile"."filters_overrides",+ "posthog_dashboardtile"."show_description",+ "posthog_dashboardtile"."transparent_background",+ "posthog_dashboardtile"."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: TestInsight.test_listing_insights_does_not_nplus1.181+ '''+ 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: TestInsight.test_listing_insights_does_not_nplus1.182+ '''+ 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: TestInsight.test_listing_insights_does_not_nplus1.183+ '''+ 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: TestInsight.test_listing_insights_does_not_nplus1.184+ '''+ 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: TestInsight.test_listing_insights_does_not_nplus1.185+ '''+ 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: TestInsight.test_listing_insights_does_not_nplus1.186+ '''+ 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: TestInsight.test_listing_insights_does_not_nplus1.187+ '''+ 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: TestInsight.test_listing_insights_does_not_nplus1.188+ '''+ 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: TestInsight.test_listing_insights_does_not_nplus1.189+ '''+ SELECT COUNT(*) AS "__count"+ FROM "posthog_dashboarditem"+ WHERE NOT ("posthog_dashboarditem"."deleted")+ '''+# ---+# name: TestInsight.test_listing_insights_does_not_nplus1.19+ '''+ 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: TestInsight.test_listing_insights_does_not_nplus1.190+ '''+ 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: TestInsight.test_listing_insights_does_not_nplus1.191+ '''+ 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: TestInsight.test_listing_insights_does_not_nplus1.192+ '''+ 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: TestInsight.test_listing_insights_does_not_nplus1.193+ '''+ 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: TestInsight.test_listing_insights_does_not_nplus1.194+ '''+ 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: TestInsight.test_listing_insights_does_not_nplus1.195+ '''+ 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: TestInsight.test_listing_insights_does_not_nplus1.196+ '''+ SELECT COUNT(*) AS "__count"+ FROM "posthog_dashboarditem"+ INNER JOIN "posthog_team" ON ("posthog_dashboarditem"."team_id" = "posthog_team"."id")+ WHERE ("posthog_team"."project_id" = 99999+ AND NOT ("posthog_dashboarditem"."deleted"))+ '''+# ---+# name: TestInsight.test_listing_insights_does_not_nplus1.197+ '''+ SELECT "posthog_dashboarditem"."id",+ "posthog_dashboarditem"."name",+ "posthog_dashboarditem"."derived_name",+ "posthog_dashboarditem"."description",+ "posthog_dashboarditem"."team_id",+ "posthog_dashboarditem"."filters",+ "posthog_dashboarditem"."filters_hash",+ "posthog_dashboarditem"."query",+ "posthog_dashboarditem"."query_metadata",+ "posthog_dashboarditem"."order",+ "posthog_dashboarditem"."deleted",+ "posthog_dashboarditem"."saved",+ "posthog_dashboarditem"."created_at",+ "posthog_dashboarditem"."refreshing",+ "posthog_dashboarditem"."created_by_id",+ "posthog_dashboarditem"."is_sample",+ "posthog_dashboarditem"."short_id",+ "posthog_dashboarditem"."favorited",+ "posthog_dashboarditem"."refresh_attempt",+ "posthog_dashboarditem"."last_modified_at",+ "posthog_dashboarditem"."last_modified_by_id",+ "posthog_dashboarditem"."dashboard_id",+ "posthog_dashboarditem"."last_refresh",+ "posthog_dashboarditem"."layouts",+ "posthog_dashboarditem"."color",+ "posthog_dashboarditem"."dive_dashboard_id",+ "posthog_dashboarditem"."updated_at",+ "posthog_dashboarditem"."deprecated_tags",+ "posthog_dashboarditem"."tags",++ (SELECT U0."last_viewed_at" AS "last_viewed_at"+ FROM "posthog_insightviewed" U0+ WHERE U0."insight_id" = ("posthog_dashboarditem"."id")+ ORDER BY 1 DESC+ LIMIT 1) AS "last_viewed_at",+ "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"+ FROM "posthog_dashboarditem"+ INNER 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")+ WHERE ("posthog_team"."project_id" = 99999+ AND NOT ("posthog_dashboarditem"."deleted"))+ ORDER BY "posthog_dashboarditem"."last_modified_at" DESC,+ "posthog_dashboarditem"."id" DESC+ LIMIT 100+ '''+# ---+# name: TestInsight.test_listing_insights_does_not_nplus1.198+ '''+ 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,+ 4,+ 5 /* ... */))+ '''+# ---+# name: TestInsight.test_listing_insights_does_not_nplus1.199+ '''+ 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"+ FROM "posthog_taggeditem"+ WHERE ("posthog_taggeditem"."content_type_id" = 99999+ AND "posthog_taggeditem"."object_id" IN (1,+ 2,+ 3,+ 4,+ 5 /* ... */))+ '''+# ---+# name: TestInsight.test_listing_insights_does_not_nplus1.2+ '''+ SELECT "posthog_team"."id" AS "id"+ FROM "posthog_team"+ WHERE ("posthog_team"."organization_id" = '00000000-0000-0000-0000-000000000000'::uuid+ AND "posthog_team"."receive_org_level_activity_logs")+ '''+# ---+# name: TestInsight.test_listing_insights_does_not_nplus1.20+ '''+ 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: TestInsight.test_listing_insights_does_not_nplus1.200+ '''+ 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: TestInsight.test_listing_insights_does_not_nplus1.21+ '''+ 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: TestInsight.test_listing_insights_does_not_nplus1.22+ '''+ 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: TestInsight.test_listing_insights_does_not_nplus1.23+ '''+ 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: TestInsight.test_listing_insights_does_not_nplus1.24+ '''+ 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: TestInsight.test_listing_insights_does_not_nplus1.25+ '''+ SELECT "customer_analytics_teamcustomeranalyticsconfig"."account_group_type_index" AS "account_group_type_index"+ FROM "customer_analytics_teamcustomeranalyticsconfig"+ WHERE "customer_analytics_teamcustomeranalyticsconfig"."team_id" = 99999+ ORDER BY "customer_analytics_teamcustomeranalyticsconfig"."team_id" ASC+ LIMIT 1+ '''+# ---+# name: TestInsight.test_listing_insights_does_not_nplus1.26+ '''+ 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: TestInsight.test_listing_insights_does_not_nplus1.27+ '''+ 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: TestInsight.test_listing_insights_does_not_nplus1.28+ '''+ 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: TestInsight.test_listing_insights_does_not_nplus1.29+ '''+ SELECT COUNT(*) AS "__count"+ FROM "posthog_dashboarditem"+ WHERE NOT ("posthog_dashboarditem"."deleted")+ '''+# ---+# name: TestInsight.test_listing_insights_does_not_nplus1.3+ '''+ 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: TestInsight.test_listing_insights_does_not_nplus1.30+ '''+ 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: TestInsight.test_listing_insights_does_not_nplus1.31+ '''+ 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: TestInsight.test_listing_insights_does_not_nplus1.32+ '''+ 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: TestInsight.test_listing_insights_does_not_nplus1.33+ '''+ 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: TestInsight.test_listing_insights_does_not_nplus1.34+ '''+ 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: TestInsight.test_listing_insights_does_not_nplus1.35+ '''+ 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: TestInsight.test_listing_insights_does_not_nplus1.36+ '''+ SELECT COUNT(*) AS "__count"+ FROM "posthog_dashboarditem"+ INNER JOIN "posthog_team" ON ("posthog_dashboarditem"."team_id" = "posthog_team"."id")+ WHERE ("posthog_team"."project_id" = 99999+ AND NOT ("posthog_dashboarditem"."deleted"))+ '''+# ---+# name: TestInsight.test_listing_insights_does_not_nplus1.37+ '''+ SELECT "posthog_dashboarditem"."id",+ "posthog_dashboarditem"."name",+ "posthog_dashboarditem"."derived_name",+ "posthog_dashboarditem"."description",+ "posthog_dashboarditem"."team_id",+ "posthog_dashboarditem"."filters",+ "posthog_dashboarditem"."filters_hash",+ "posthog_dashboarditem"."query",+ "posthog_dashboarditem"."query_metadata",+ "posthog_dashboarditem"."order",+ "posthog_dashboarditem"."deleted",+ "posthog_dashboarditem"."saved",+ "posthog_dashboarditem"."created_at",+ "posthog_dashboarditem"."refreshing",+ "posthog_dashboarditem"."created_by_id",+ "posthog_dashboarditem"."is_sample",+ "posthog_dashboarditem"."short_id",+ "posthog_dashboarditem"."favorited",+ "posthog_dashboarditem"."refresh_attempt",+ "posthog_dashboarditem"."last_modified_at",+ "posthog_dashboarditem"."last_modified_by_id",+ "posthog_dashboarditem"."dashboard_id",+ "posthog_dashboarditem"."last_refresh",+ "posthog_dashboarditem"."layouts",+ "posthog_dashboarditem"."color",+ "posthog_dashboarditem"."dive_dashboard_id",+ "posthog_dashboarditem"."updated_at",+ "posthog_dashboarditem"."deprecated_tags",+ "posthog_dashboarditem"."tags",++ (SELECT U0."last_viewed_at" AS "last_viewed_at"+ FROM "posthog_insightviewed" U0+ WHERE U0."insight_id" = ("posthog_dashboarditem"."id")+ ORDER BY 1 DESC+ LIMIT 1) AS "last_viewed_at",+ "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"+ FROM "posthog_dashboarditem"+ INNER 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")+ WHERE ("posthog_team"."project_id" = 99999+ AND NOT ("posthog_dashboarditem"."deleted"))+ ORDER BY "posthog_dashboarditem"."last_modified_at" DESC,+ "posthog_dashboarditem"."id" DESC+ LIMIT 100+ '''+# ---+# name: TestInsight.test_listing_insights_does_not_nplus1.38+ '''+ 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,+ 4,+ 5 /* ... */))+ '''+# ---+# name: TestInsight.test_listing_insights_does_not_nplus1.39+ '''+ 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"+ FROM "posthog_taggeditem"+ WHERE ("posthog_taggeditem"."content_type_id" = 99999+ AND "posthog_taggeditem"."object_id" IN (1,+ 2,+ 3,+ 4,+ 5 /* ... */))+ '''+# ---+# name: TestInsight.test_listing_insights_does_not_nplus1.4+ '''+ 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: TestInsight.test_listing_insights_does_not_nplus1.40+ '''+ 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: TestInsight.test_listing_insights_does_not_nplus1.41+ '''+ 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"+ FROM "posthog_organizationmembership"+ WHERE "posthog_organizationmembership"."user_id" = 99999+ '''+# ---+# name: TestInsight.test_listing_insights_does_not_nplus1.42+ '''+ 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"+ FROM "posthog_organizationmembership"+ WHERE "posthog_organizationmembership"."id" = '00000000000000000000000000000000'::uuid+ LIMIT 21+ '''+# ---+# name: TestInsight.test_listing_insights_does_not_nplus1.43+ '''+ SELECT "posthog_team"."id" AS "id"+ FROM "posthog_team"+ WHERE ("posthog_team"."organization_id" = '00000000-0000-0000-0000-000000000000'::uuid+ AND "posthog_team"."receive_org_level_activity_logs")+ '''+# ---+# name: TestInsight.test_listing_insights_does_not_nplus1.44+ '''+ 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: TestInsight.test_listing_insights_does_not_nplus1.45+ '''+ 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: TestInsight.test_listing_insights_does_not_nplus1.46+ '''+ 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: TestInsight.test_listing_insights_does_not_nplus1.47+ '''+ 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: TestInsight.test_listing_insights_does_not_nplus1.48+ '''+ 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: TestInsight.test_listing_insights_does_not_nplus1.49+ '''+ 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: TestInsight.test_listing_insights_does_not_nplus1.5+ '''+ 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: TestInsight.test_listing_insights_does_not_nplus1.50+ '''+ 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: TestInsight.test_listing_insights_does_not_nplus1.51+ '''+ 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: TestInsight.test_listing_insights_does_not_nplus1.52+ '''+ 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: TestInsight.test_listing_insights_does_not_nplus1.53+ '''+ 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: TestInsight.test_listing_insights_does_not_nplus1.54+ '''+ 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: TestInsight.test_listing_insights_does_not_nplus1.55+ '''+ 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: TestInsight.test_listing_insights_does_not_nplus1.56+ '''+ 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: TestInsight.test_listing_insights_does_not_nplus1.57+ '''+ 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: TestInsight.test_listing_insights_does_not_nplus1.58+ '''+ 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: TestInsight.test_listing_insights_does_not_nplus1.59+ '''+ 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: TestInsight.test_listing_insights_does_not_nplus1.6+ '''+ 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: TestInsight.test_listing_insights_does_not_nplus1.60+ '''+ 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: TestInsight.test_listing_insights_does_not_nplus1.61+ '''+ 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: TestInsight.test_listing_insights_does_not_nplus1.62+ '''+ 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: TestInsight.test_listing_insights_does_not_nplus1.63+ '''+ 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: TestInsight.test_listing_insights_does_not_nplus1.64+ '''+ 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: TestInsight.test_listing_insights_does_not_nplus1.65+ '''+ 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: TestInsight.test_listing_insights_does_not_nplus1.66+ '''+ 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: TestInsight.test_listing_insights_does_not_nplus1.67+ '''+ 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: TestInsight.test_listing_insights_does_not_nplus1.68+ '''+ 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: TestInsight.test_listing_insights_does_not_nplus1.69+ '''+ SELECT COUNT(*) AS "__count"+ FROM "posthog_dashboarditem"+ WHERE NOT ("posthog_dashboarditem"."deleted")+ '''+# ---+# name: TestInsight.test_listing_insights_does_not_nplus1.7+ '''+ 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: TestInsight.test_listing_insights_does_not_nplus1.70+ '''+ 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: TestInsight.test_listing_insights_does_not_nplus1.71+ '''+ 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: TestInsight.test_listing_insights_does_not_nplus1.72+ '''+ 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: TestInsight.test_listing_insights_does_not_nplus1.73+ '''+ 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: TestInsight.test_listing_insights_does_not_nplus1.17+# name: TestInsight.test_listing_insights_does_not_nplus1.74'''- 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: TestInsight.test_listing_insights_does_not_nplus1.18+# name: TestInsight.test_listing_insights_does_not_nplus1.75'''- 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 "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: TestInsight.test_listing_insights_does_not_nplus1.19+# name: TestInsight.test_listing_insights_does_not_nplus1.76'''- 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 COUNT(*) AS "__count"+ FROM "posthog_dashboarditem"+ INNER JOIN "posthog_team" ON ("posthog_dashboarditem"."team_id" = "posthog_team"."id")+ WHERE ("posthog_team"."project_id" = 99999+ AND NOT ("posthog_dashboarditem"."deleted"))'''# ----# name: TestInsight.test_listing_insights_does_not_nplus1.2+# name: TestInsight.test_listing_insights_does_not_nplus1.77'''- SELECT "posthog_team"."id",+ SELECT "posthog_dashboarditem"."id",+ "posthog_dashboarditem"."name",+ "posthog_dashboarditem"."derived_name",+ "posthog_dashboarditem"."description",+ "posthog_dashboarditem"."team_id",+ "posthog_dashboarditem"."filters",+ "posthog_dashboarditem"."filters_hash",+ "posthog_dashboarditem"."query",+ "posthog_dashboarditem"."query_metadata",+ "posthog_dashboarditem"."order",+ "posthog_dashboarditem"."deleted",+ "posthog_dashboarditem"."saved",+ "posthog_dashboarditem"."created_at",+ "posthog_dashboarditem"."refreshing",+ "posthog_dashboarditem"."created_by_id",+ "posthog_dashboarditem"."is_sample",+ "posthog_dashboarditem"."short_id",+ "posthog_dashboarditem"."favorited",+ "posthog_dashboarditem"."refresh_attempt",+ "posthog_dashboarditem"."last_modified_at",+ "posthog_dashboarditem"."last_modified_by_id",+ "posthog_dashboarditem"."dashboard_id",+ "posthog_dashboarditem"."last_refresh",+ "posthog_dashboarditem"."layouts",+ "posthog_dashboarditem"."color",+ "posthog_dashboarditem"."dive_dashboard_id",+ "posthog_dashboarditem"."updated_at",+ "posthog_dashboarditem"."deprecated_tags",+ "posthog_dashboarditem"."tags",++ (SELECT U0."last_viewed_at" AS "last_viewed_at"+ FROM "posthog_insightviewed" U0+ WHERE U0."insight_id" = ("posthog_dashboarditem"."id")+ ORDER BY 1 DESC+ LIMIT 1) AS "last_viewed_at",+ "posthog_team"."id","posthog_team"."uuid","posthog_team"."organization_id","posthog_team"."parent_team_id",@@ -566,142 +6947,217 @@"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: TestInsight.test_listing_insights_does_not_nplus1.20- '''- 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+ "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"+ FROM "posthog_dashboarditem"+ INNER 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")+ WHERE ("posthog_team"."project_id" = 99999+ AND NOT ("posthog_dashboarditem"."deleted"))+ ORDER BY "posthog_dashboarditem"."last_modified_at" DESC,+ "posthog_dashboarditem"."id" DESC+ LIMIT 100'''# ----# name: TestInsight.test_listing_insights_does_not_nplus1.21+# name: TestInsight.test_listing_insights_does_not_nplus1.78'''- SELECT "posthog_dashboardtile"."dashboard_id" AS "dashboard_id"+ 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" = 99999)+ AND "posthog_dashboardtile"."insight_id" IN (1,+ 2,+ 3,+ 4,+ 5 /* ... */))'''# ----# name: TestInsight.test_listing_insights_does_not_nplus1.22+# name: TestInsight.test_listing_insights_does_not_nplus1.79'''- 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 /* ... */))+ 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"+ FROM "posthog_taggeditem"+ WHERE ("posthog_taggeditem"."content_type_id" = 99999+ AND "posthog_taggeditem"."object_id" IN (1,+ 2,+ 3,+ 4,+ 5 /* ... */))'''# ----# name: TestInsight.test_listing_insights_does_not_nplus1.23+# name: TestInsight.test_listing_insights_does_not_nplus1.8'''- SELECT "posthog_tag"."name" AS "tag__name"+ 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: TestInsight.test_listing_insights_does_not_nplus1.80+ '''+ 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" = 99999)+ AND "posthog_taggeditem"."object_id" IN (1,+ 2,+ 3,+ 4,+ 5 /* ... */))'''# ----# name: TestInsight.test_listing_insights_does_not_nplus1.24+# name: TestInsight.test_listing_insights_does_not_nplus1.81'''- SELECT COUNT(*) AS "__count"- FROM "posthog_dashboarditem"- WHERE NOT ("posthog_dashboarditem"."deleted")+ 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"+ FROM "posthog_organizationmembership"+ WHERE "posthog_organizationmembership"."user_id" = 99999'''# ----# name: TestInsight.test_listing_insights_does_not_nplus1.25+# name: TestInsight.test_listing_insights_does_not_nplus1.82+ '''+ 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"+ FROM "posthog_organizationmembership"+ WHERE "posthog_organizationmembership"."id" = '00000000000000000000000000000000'::uuid+ LIMIT 21+ '''+# ---+# name: TestInsight.test_listing_insights_does_not_nplus1.83+ '''+ SELECT "posthog_team"."id" AS "id"+ FROM "posthog_team"+ WHERE ("posthog_team"."organization_id" = '00000000-0000-0000-0000-000000000000'::uuid+ AND "posthog_team"."receive_org_level_activity_logs")+ '''+# ---+# name: TestInsight.test_listing_insights_does_not_nplus1.84+ '''+ 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: TestInsight.test_listing_insights_does_not_nplus1.85'''SELECT "posthog_user"."id","posthog_user"."password",@@ -747,7 +7203,7 @@AND "posthog_user"."id" = 99999)'''# ----# name: TestInsight.test_listing_insights_does_not_nplus1.26+# name: TestInsight.test_listing_insights_does_not_nplus1.86'''SELECT "posthog_organization"."id","posthog_organization"."name",@@ -793,7 +7249,7 @@LIMIT 21'''# ----# name: TestInsight.test_listing_insights_does_not_nplus1.27+# name: TestInsight.test_listing_insights_does_not_nplus1.87'''SELECT "posthog_team"."id","posthog_team"."uuid",@@ -932,7 +7388,7 @@LIMIT 21'''# ----# name: TestInsight.test_listing_insights_does_not_nplus1.28+# name: TestInsight.test_listing_insights_does_not_nplus1.88'''SELECT "posthog_organizationmembership"."id","posthog_organizationmembership"."organization_id",@@ -987,7 +7443,7 @@LIMIT 21'''# ----# name: TestInsight.test_listing_insights_does_not_nplus1.29+# name: TestInsight.test_listing_insights_does_not_nplus1.89'''SELECT "ee_accesscontrol"."id","ee_accesscontrol"."team_id",@@ -1010,7 +7466,7 @@AND "ee_accesscontrol"."team_id" = 99999))'''# ----# name: TestInsight.test_listing_insights_does_not_nplus1.3+# name: TestInsight.test_listing_insights_does_not_nplus1.9'''SELECT "posthog_organizationmembership"."id","posthog_organizationmembership"."organization_id",@@ -1060,12 +7516,10 @@"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+ WHERE "posthog_organizationmembership"."user_id" = 99999'''# ----# name: TestInsight.test_listing_insights_does_not_nplus1.30+# name: TestInsight.test_listing_insights_does_not_nplus1.90'''SELECT "posthog_organizationmembership"."id","posthog_organizationmembership"."organization_id",@@ -1118,53 +7572,88 @@WHERE "posthog_organizationmembership"."user_id" = 99999'''# ----# name: TestInsight.test_listing_insights_does_not_nplus1.31+# name: TestInsight.test_listing_insights_does_not_nplus1.91+ '''+ 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: TestInsight.test_listing_insights_does_not_nplus1.92+ '''+ 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: TestInsight.test_listing_insights_does_not_nplus1.93'''SELECT COUNT(*) AS "__count"- FROM "posthog_dashboarditem"- INNER JOIN "posthog_team" ON ("posthog_dashboarditem"."team_id" = "posthog_team"."id")- WHERE ("posthog_team"."project_id" = 99999- AND NOT ("posthog_dashboarditem"."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"."deleted"+ AND "posthog_dashboardtile"."deleted" IS NOT NULL))'''# ----# name: TestInsight.test_listing_insights_does_not_nplus1.32+# name: TestInsight.test_listing_insights_does_not_nplus1.94'''- SELECT "posthog_dashboarditem"."id",- "posthog_dashboarditem"."name",- "posthog_dashboarditem"."derived_name",- "posthog_dashboarditem"."description",- "posthog_dashboarditem"."team_id",- "posthog_dashboarditem"."filters",- "posthog_dashboarditem"."filters_hash",- "posthog_dashboarditem"."query",- "posthog_dashboarditem"."query_metadata",- "posthog_dashboarditem"."order",- "posthog_dashboarditem"."deleted",- "posthog_dashboarditem"."saved",- "posthog_dashboarditem"."created_at",- "posthog_dashboarditem"."refreshing",- "posthog_dashboarditem"."created_by_id",- "posthog_dashboarditem"."is_sample",- "posthog_dashboarditem"."short_id",- "posthog_dashboarditem"."favorited",- "posthog_dashboarditem"."refresh_attempt",- "posthog_dashboarditem"."last_modified_at",- "posthog_dashboarditem"."last_modified_by_id",- "posthog_dashboarditem"."dashboard_id",- "posthog_dashboarditem"."last_refresh",- "posthog_dashboarditem"."layouts",- "posthog_dashboarditem"."color",- "posthog_dashboarditem"."dive_dashboard_id",- "posthog_dashboarditem"."updated_at",- "posthog_dashboarditem"."deprecated_tags",- "posthog_dashboarditem"."tags",-- (SELECT U0."last_viewed_at" AS "last_viewed_at"- FROM "posthog_insightviewed" U0- WHERE U0."insight_id" = ("posthog_dashboarditem"."id")- ORDER BY 1 DESC- LIMIT 1) AS "last_viewed_at",- "posthog_team"."id",+ 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: TestInsight.test_listing_insights_does_not_nplus1.95+ '''+ SELECT "posthog_team"."id","posthog_team"."uuid","posthog_team"."organization_id","posthog_team"."parent_team_id",@@ -1219,190 +7708,51 @@"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"- FROM "posthog_dashboarditem"- INNER 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")- WHERE ("posthog_team"."project_id" = 99999- AND NOT ("posthog_dashboarditem"."deleted"))- ORDER BY "posthog_dashboarditem"."last_modified_at" DESC,- "posthog_dashboarditem"."id" DESC- LIMIT 100- '''-# ----# name: TestInsight.test_listing_insights_does_not_nplus1.33- '''- 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,- 4,- 5 /* ... */))- '''-# ----# name: TestInsight.test_listing_insights_does_not_nplus1.34- '''- 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"- FROM "posthog_taggeditem"- WHERE ("posthog_taggeditem"."content_type_id" = 99999- AND "posthog_taggeditem"."object_id" IN (1,- 2,- 3,- 4,- 5 /* ... */))- '''-# ----# name: TestInsight.test_listing_insights_does_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: TestInsight.test_listing_insights_does_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))+ "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: TestInsight.test_listing_insights_does_not_nplus1.5+# name: TestInsight.test_listing_insights_does_not_nplus1.96'''- 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_organization"."id","posthog_organization"."name","posthog_organization"."slug","posthog_organization"."logo_media_id",@@ -1441,87 +7791,150 @@"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: TestInsight.test_listing_insights_does_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 /* ... */))+ FROM "posthog_organization"+ WHERE "posthog_organization"."id" = '00000000-0000-0000-0000-000000000000'::uuid+ LIMIT 21'''# ----# name: TestInsight.test_listing_insights_does_not_nplus1.7+# name: TestInsight.test_listing_insights_does_not_nplus1.97'''- 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_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: TestInsight.test_listing_insights_does_not_nplus1.8+# name: TestInsight.test_listing_insights_does_not_nplus1.98'''- SELECT COUNT(*) AS "__count"- FROM "posthog_dashboardtile"- INNER JOIN "posthog_dashboard" ON ("posthog_dashboardtile"."dashboard_id" = "posthog_dashboard"."id")- WHERE (NOT ("posthog_dashboardtile"."deleted"- AND "posthog_dashboardtile"."deleted" IS NOT NULL)- AND NOT ("posthog_dashboard"."deleted")- AND "posthog_dashboardtile"."dashboard_id" = 99999- AND NOT ("posthog_dashboardtile"."deleted"- AND "posthog_dashboardtile"."deleted" IS NOT NULL))+ SELECT "posthog_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: TestInsight.test_listing_insights_does_not_nplus1.9+# name: TestInsight.test_listing_insights_does_not_nplus1.99'''- SELECT "posthog_dashboard"."id",- "posthog_dashboard"."name",- "posthog_dashboard"."description",- "posthog_dashboard"."team_id",- "posthog_dashboard"."pinned",- "posthog_dashboard"."created_at",- "posthog_dashboard"."created_by_id",- "posthog_dashboard"."deleted",- "posthog_dashboard"."last_accessed_at",- "posthog_dashboard"."last_refresh",- "posthog_dashboard"."filters",- "posthog_dashboard"."variables",- "posthog_dashboard"."breakdown_colors",- "posthog_dashboard"."data_color_theme_id",- "posthog_dashboard"."creation_mode",- "posthog_dashboard"."restriction_level",- "posthog_dashboard"."quick_filter_ids",- "posthog_dashboard"."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 /* ... */))+ 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'''# ---