: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(insights): remove InsightCachingState model and legacy refresh code (#70453)
Thomas Obermüller5203e0ccdb24
diff --git a/.github/scripts/check-idor-model-coverage.py b/.github/scripts/check-idor-model-coverage.pyindex 3ca41473ad2f..e1569d4f691c 100644--- a/.github/scripts/check-idor-model-coverage.py+++ b/.github/scripts/check-idor-model-coverage.py@@ -135,7 +135,6 @@ def get_scoped_models() -> tuple[dict[str, set[str]], set[str], set[str], set[st# Outbound email delivery queue — looked up by PK / comment FK from internal# tasks (send + sweeper), never by user-supplied ID through an API."EmailOutboxMessage",- "InsightCachingState","InstanceSetting","Schedule",# --- Auto-scoped via ProductTeamModel (TeamScopedManager handles filtering) ---diff --git a/posthog/admin/admins/organization_admin.py b/posthog/admin/admins/organization_admin.pyindex 32e199bf3d3d..61223bf9ea22 100644--- a/posthog/admin/admins/organization_admin.py+++ b/posthog/admin/admins/organization_admin.py@@ -30,7 +30,6 @@ from posthog.person_db_router import PERSONS_DB_MODELSBULK_DELETE_MODEL_REGISTRY: tuple[tuple[str, str, str], ...] = (("early_access_features.EarlyAccessFeature", "team_id", "Early Access Features"),("error_tracking.ErrorTrackingIssueFingerprintV2", "team_id", "Error Tracking Fingerprints"),- ("product_analytics.InsightCachingState", "team_id", "Insight Caching States"),)# Subset of persons-db models that are part of the bulk-delete path.diff --git a/posthog/api/test/__snapshots__/test_event.ambr b/posthog/api/test/__snapshots__/test_event.ambrindex cdac6210189e..c671f0020273 100644--- a/posthog/api/test/__snapshots__/test_event.ambr+++ b/posthog/api/test/__snapshots__/test_event.ambr@@ -1,14 +1,22 @@# serializer version: 1# name: TestEvents.test_event_property_values'''- /* celery:posthog.tasks.tasks.sync_insight_caching_state */- SELECT team_id,- date_diff('second', max(timestamp), now()) AS age+ /* user_id:0 request:_snapshot_ */+ SELECT DISTINCT replaceRegexpAll(nullIf(nullIf(JSONExtractRaw(events.properties, 'random_prop'), ''), 'null'), '^"|"$', '') AS random_propFROM events- WHERE timestamp > date_sub(DAY, 3, now())- AND timestamp < now()- GROUP BY team_id- ORDER BY age;+ WHERE and(equals(events.team_id, 99999), greaterOrEquals(events.timestamp, toDateTime64('2020-01-13 00:00:00', 6, 'UTC')), lessOrEquals(events.timestamp, toDateTime64('2020-01-20 23:59:59', 6, 'UTC')), isNotNull(replaceRegexpAll(nullIf(nullIf(JSONExtractRaw(events.properties, 'random_prop'), ''), 'null'), '^"|"$', '')))+ LIMIT 10 SETTINGS readonly=2,+ max_execution_time=60,+ allow_experimental_object_type=1,+ max_ast_elements=4000000,+ max_expanded_ast_elements=4000000,+ max_bytes_before_external_group_by=0,+ transform_null_in=1,+ optimize_min_equality_disjunction_chain_length=4294967295,+ optimize_rewrite_aggregate_function_with_if=0,+ optimize_min_inequality_conjunction_chain_length=4294967295,+ allow_experimental_join_condition=1,+ use_hive_partitioning=0'''# ---# name: TestEvents.test_event_property_values.1@@ -16,7 +24,8 @@/* user_id:0 request:_snapshot_ */SELECT DISTINCT replaceRegexpAll(nullIf(nullIf(JSONExtractRaw(events.properties, 'random_prop'), ''), 'null'), '^"|"$', '') AS random_propFROM events- WHERE and(equals(events.team_id, 99999), greaterOrEquals(events.timestamp, toDateTime64('2020-01-13 00:00:00', 6, 'UTC')), lessOrEquals(events.timestamp, toDateTime64('2020-01-20 23:59:59', 6, 'UTC')), isNotNull(replaceRegexpAll(nullIf(nullIf(JSONExtractRaw(events.properties, 'random_prop'), ''), 'null'), '^"|"$', '')))+ WHERE and(equals(events.team_id, 99999), greaterOrEquals(events.timestamp, toDateTime64('2020-01-13 00:00:00', 6, 'UTC')), lessOrEquals(events.timestamp, toDateTime64('2020-01-20 23:59:59', 6, 'UTC')), isNotNull(replaceRegexpAll(nullIf(nullIf(JSONExtractRaw(events.properties, 'random_prop'), ''), 'null'), '^"|"$', '')), ifNull(ilike(toString(replaceRegexpAll(nullIf(nullIf(JSONExtractRaw(events.properties, 'random_prop'), ''), 'null'), '^"|"$', '')), '%qw%'), 0))+ ORDER BY length(toString(replaceRegexpAll(nullIf(nullIf(JSONExtractRaw(events.properties, 'random_prop'), ''), 'null'), '^"|"$', ''))) ASCLIMIT 10 SETTINGS readonly=2,max_execution_time=60,allow_experimental_object_type=1,@@ -36,7 +45,7 @@/* user_id:0 request:_snapshot_ */SELECT DISTINCT replaceRegexpAll(nullIf(nullIf(JSONExtractRaw(events.properties, 'random_prop'), ''), 'null'), '^"|"$', '') AS random_propFROM events- WHERE and(equals(events.team_id, 99999), greaterOrEquals(events.timestamp, toDateTime64('2020-01-13 00:00:00', 6, 'UTC')), lessOrEquals(events.timestamp, toDateTime64('2020-01-20 23:59:59', 6, 'UTC')), isNotNull(replaceRegexpAll(nullIf(nullIf(JSONExtractRaw(events.properties, 'random_prop'), ''), 'null'), '^"|"$', '')), ifNull(ilike(toString(replaceRegexpAll(nullIf(nullIf(JSONExtractRaw(events.properties, 'random_prop'), ''), 'null'), '^"|"$', '')), '%qw%'), 0))+ WHERE and(equals(events.team_id, 99999), greaterOrEquals(events.timestamp, toDateTime64('2020-01-13 00:00:00', 6, 'UTC')), lessOrEquals(events.timestamp, toDateTime64('2020-01-20 23:59:59', 6, 'UTC')), isNotNull(replaceRegexpAll(nullIf(nullIf(JSONExtractRaw(events.properties, 'random_prop'), ''), 'null'), '^"|"$', '')), ifNull(ilike(toString(replaceRegexpAll(nullIf(nullIf(JSONExtractRaw(events.properties, 'random_prop'), ''), 'null'), '^"|"$', '')), '%QW%'), 0))ORDER BY length(toString(replaceRegexpAll(nullIf(nullIf(JSONExtractRaw(events.properties, 'random_prop'), ''), 'null'), '^"|"$', ''))) ASCLIMIT 10 SETTINGS readonly=2,max_execution_time=60,@@ -57,7 +66,7 @@/* user_id:0 request:_snapshot_ */SELECT DISTINCT replaceRegexpAll(nullIf(nullIf(JSONExtractRaw(events.properties, 'random_prop'), ''), 'null'), '^"|"$', '') AS random_propFROM events- WHERE and(equals(events.team_id, 99999), greaterOrEquals(events.timestamp, toDateTime64('2020-01-13 00:00:00', 6, 'UTC')), lessOrEquals(events.timestamp, toDateTime64('2020-01-20 23:59:59', 6, 'UTC')), isNotNull(replaceRegexpAll(nullIf(nullIf(JSONExtractRaw(events.properties, 'random_prop'), ''), 'null'), '^"|"$', '')), ifNull(ilike(toString(replaceRegexpAll(nullIf(nullIf(JSONExtractRaw(events.properties, 'random_prop'), ''), 'null'), '^"|"$', '')), '%QW%'), 0))+ WHERE and(equals(events.team_id, 99999), greaterOrEquals(events.timestamp, toDateTime64('2020-01-13 00:00:00', 6, 'UTC')), lessOrEquals(events.timestamp, toDateTime64('2020-01-20 23:59:59', 6, 'UTC')), isNotNull(replaceRegexpAll(nullIf(nullIf(JSONExtractRaw(events.properties, 'random_prop'), ''), 'null'), '^"|"$', '')), ifNull(ilike(toString(replaceRegexpAll(nullIf(nullIf(JSONExtractRaw(events.properties, 'random_prop'), ''), 'null'), '^"|"$', '')), '%6%'), 0))ORDER BY length(toString(replaceRegexpAll(nullIf(nullIf(JSONExtractRaw(events.properties, 'random_prop'), ''), 'null'), '^"|"$', ''))) ASCLIMIT 10 SETTINGS readonly=2,max_execution_time=60,@@ -78,7 +87,7 @@/* user_id:0 request:_snapshot_ */SELECT DISTINCT replaceRegexpAll(nullIf(nullIf(JSONExtractRaw(events.properties, 'random_prop'), ''), 'null'), '^"|"$', '') AS random_propFROM events- WHERE and(equals(events.team_id, 99999), greaterOrEquals(events.timestamp, toDateTime64('2020-01-13 00:00:00', 6, 'UTC')), lessOrEquals(events.timestamp, toDateTime64('2020-01-20 23:59:59', 6, 'UTC')), isNotNull(replaceRegexpAll(nullIf(nullIf(JSONExtractRaw(events.properties, 'random_prop'), ''), 'null'), '^"|"$', '')), ifNull(ilike(toString(replaceRegexpAll(nullIf(nullIf(JSONExtractRaw(events.properties, 'random_prop'), ''), 'null'), '^"|"$', '')), '%6%'), 0))+ WHERE and(equals(events.team_id, 99999), greaterOrEquals(events.timestamp, toDateTime64('2020-01-13 00:00:00', 6, 'UTC')), lessOrEquals(events.timestamp, toDateTime64('2020-01-20 23:59:59', 6, 'UTC')), isNotNull(replaceRegexpAll(nullIf(nullIf(JSONExtractRaw(events.properties, 'random_prop'), ''), 'null'), '^"|"$', '')), equals(events.event, 'random event'), ifNull(ilike(toString(replaceRegexpAll(nullIf(nullIf(JSONExtractRaw(events.properties, 'random_prop'), ''), 'null'), '^"|"$', '')), '%6%'), 0))ORDER BY length(toString(replaceRegexpAll(nullIf(nullIf(JSONExtractRaw(events.properties, 'random_prop'), ''), 'null'), '^"|"$', ''))) ASCLIMIT 10 SETTINGS readonly=2,max_execution_time=60,@@ -99,7 +108,7 @@/* user_id:0 request:_snapshot_ */SELECT DISTINCT replaceRegexpAll(nullIf(nullIf(JSONExtractRaw(events.properties, 'random_prop'), ''), 'null'), '^"|"$', '') AS random_propFROM events- WHERE and(equals(events.team_id, 99999), greaterOrEquals(events.timestamp, toDateTime64('2020-01-13 00:00:00', 6, 'UTC')), lessOrEquals(events.timestamp, toDateTime64('2020-01-20 23:59:59', 6, 'UTC')), isNotNull(replaceRegexpAll(nullIf(nullIf(JSONExtractRaw(events.properties, 'random_prop'), ''), 'null'), '^"|"$', '')), equals(events.event, 'random event'), ifNull(ilike(toString(replaceRegexpAll(nullIf(nullIf(JSONExtractRaw(events.properties, 'random_prop'), ''), 'null'), '^"|"$', '')), '%6%'), 0))+ WHERE and(equals(events.team_id, 99999), greaterOrEquals(events.timestamp, toDateTime64('2020-01-13 00:00:00', 6, 'UTC')), lessOrEquals(events.timestamp, toDateTime64('2020-01-20 23:59:59', 6, 'UTC')), isNotNull(replaceRegexpAll(nullIf(nullIf(JSONExtractRaw(events.properties, 'random_prop'), ''), 'null'), '^"|"$', '')), or(equals(events.event, 'foo'), equals(events.event, 'random event')), ifNull(ilike(toString(replaceRegexpAll(nullIf(nullIf(JSONExtractRaw(events.properties, 'random_prop'), ''), 'null'), '^"|"$', '')), '%6%'), 0))ORDER BY length(toString(replaceRegexpAll(nullIf(nullIf(JSONExtractRaw(events.properties, 'random_prop'), ''), 'null'), '^"|"$', ''))) ASCLIMIT 10 SETTINGS readonly=2,max_execution_time=60,@@ -120,7 +129,7 @@/* user_id:0 request:_snapshot_ */SELECT DISTINCT replaceRegexpAll(nullIf(nullIf(JSONExtractRaw(events.properties, 'random_prop'), ''), 'null'), '^"|"$', '') AS random_propFROM events- WHERE and(equals(events.team_id, 99999), greaterOrEquals(events.timestamp, toDateTime64('2020-01-13 00:00:00', 6, 'UTC')), lessOrEquals(events.timestamp, toDateTime64('2020-01-20 23:59:59', 6, 'UTC')), isNotNull(replaceRegexpAll(nullIf(nullIf(JSONExtractRaw(events.properties, 'random_prop'), ''), 'null'), '^"|"$', '')), or(equals(events.event, 'foo'), equals(events.event, 'random event')), ifNull(ilike(toString(replaceRegexpAll(nullIf(nullIf(JSONExtractRaw(events.properties, 'random_prop'), ''), 'null'), '^"|"$', '')), '%6%'), 0))+ WHERE and(equals(events.team_id, 99999), greaterOrEquals(events.timestamp, toDateTime64('2020-01-13 00:00:00', 6, 'UTC')), lessOrEquals(events.timestamp, toDateTime64('2020-01-20 23:59:59', 6, 'UTC')), isNotNull(replaceRegexpAll(nullIf(nullIf(JSONExtractRaw(events.properties, 'random_prop'), ''), 'null'), '^"|"$', '')), equals(events.event, '404_i_dont_exist'), ifNull(ilike(toString(replaceRegexpAll(nullIf(nullIf(JSONExtractRaw(events.properties, 'random_prop'), ''), 'null'), '^"|"$', '')), '%qw%'), 0))ORDER BY length(toString(replaceRegexpAll(nullIf(nullIf(JSONExtractRaw(events.properties, 'random_prop'), ''), 'null'), '^"|"$', ''))) ASCLIMIT 10 SETTINGS readonly=2,max_execution_time=60,diff --git a/posthog/api/test/dashboards/__snapshots__/test_dashboard.ambr b/posthog/api/test/dashboards/__snapshots__/test_dashboard.ambrindex 77fbc75f5c0b..5a404e0080b6 100644--- a/posthog/api/test/dashboards/__snapshots__/test_dashboard.ambr+++ b/posthog/api/test/dashboards/__snapshots__/test_dashboard.ambr@@ -246,6 +246,172 @@'''# ---# name: TestDashboard.test_adding_insights_is_not_nplus1_for_gets.13+ '''+ SELECT "posthog_dashboardtile"."id",+ "posthog_dashboardtile"."dashboard_id",+ "posthog_dashboardtile"."insight_id",+ "posthog_dashboardtile"."text_id",+ "posthog_dashboardtile"."button_tile_id",+ "posthog_dashboardtile"."widget_id",+ "posthog_dashboardtile"."team_id",+ "posthog_dashboardtile"."layouts",+ "posthog_dashboardtile"."color",+ "posthog_dashboardtile"."filters_hash",+ "posthog_dashboardtile"."last_refresh",+ "posthog_dashboardtile"."refreshing",+ "posthog_dashboardtile"."refresh_attempt",+ "posthog_dashboardtile"."filters_overrides",+ "posthog_dashboardtile"."show_description",+ "posthog_dashboardtile"."transparent_background",+ "posthog_dashboardtile"."deleted"+ FROM "posthog_dashboardtile"+ INNER JOIN "posthog_dashboard" ON ("posthog_dashboardtile"."dashboard_id" = "posthog_dashboard"."id")+ WHERE (NOT ("posthog_dashboardtile"."deleted"+ AND "posthog_dashboardtile"."deleted" IS NOT NULL)+ AND NOT ("posthog_dashboard"."deleted")+ AND "posthog_dashboardtile"."insight_id" = 99999)+ '''+# ---+# name: TestDashboard.test_adding_insights_is_not_nplus1_for_gets.14+ '''+ SELECT "posthog_dashboardtile"."id",+ "posthog_dashboardtile"."dashboard_id",+ "posthog_dashboardtile"."insight_id",+ "posthog_dashboardtile"."text_id",+ "posthog_dashboardtile"."button_tile_id",+ "posthog_dashboardtile"."widget_id",+ "posthog_dashboardtile"."team_id",+ "posthog_dashboardtile"."layouts",+ "posthog_dashboardtile"."color",+ "posthog_dashboardtile"."filters_hash",+ "posthog_dashboardtile"."last_refresh",+ "posthog_dashboardtile"."refreshing",+ "posthog_dashboardtile"."refresh_attempt",+ "posthog_dashboardtile"."filters_overrides",+ "posthog_dashboardtile"."show_description",+ "posthog_dashboardtile"."transparent_background",+ "posthog_dashboardtile"."deleted"+ FROM "posthog_dashboardtile"+ INNER JOIN "posthog_dashboard" ON ("posthog_dashboardtile"."dashboard_id" = "posthog_dashboard"."id")+ WHERE (NOT ("posthog_dashboardtile"."deleted"+ AND "posthog_dashboardtile"."deleted" IS NOT NULL)+ AND NOT ("posthog_dashboard"."deleted")+ AND "posthog_dashboardtile"."insight_id" = 99999)+ '''+# ---+# name: TestDashboard.test_adding_insights_is_not_nplus1_for_gets.15+ '''+ SELECT "posthog_insightvariable"."created_by_id",+ "posthog_insightvariable"."created_at",+ "posthog_insightvariable"."updated_at",+ "posthog_insightvariable"."id",+ "posthog_insightvariable"."team_id",+ "posthog_insightvariable"."name",+ "posthog_insightvariable"."code_name",+ "posthog_insightvariable"."type",+ "posthog_insightvariable"."default_value",+ "posthog_insightvariable"."values"+ FROM "posthog_insightvariable"+ WHERE "posthog_insightvariable"."team_id" = 99999+ '''+# ---+# name: TestDashboard.test_adding_insights_is_not_nplus1_for_gets.16+ '''+ SELECT "posthog_dashboardtile"."dashboard_id" AS "dashboard_id"+ FROM "posthog_dashboardtile"+ INNER JOIN "posthog_dashboard" ON ("posthog_dashboardtile"."dashboard_id" = "posthog_dashboard"."id")+ WHERE (NOT ("posthog_dashboardtile"."deleted"+ AND "posthog_dashboardtile"."deleted" IS NOT NULL)+ AND NOT ("posthog_dashboard"."deleted")+ AND "posthog_dashboardtile"."insight_id" = 99999)+ '''+# ---+# name: TestDashboard.test_adding_insights_is_not_nplus1_for_gets.17+ '''+ SELECT "posthog_dashboard"."id",+ "posthog_dashboard"."name",+ "posthog_dashboard"."description",+ "posthog_dashboard"."team_id",+ "posthog_dashboard"."pinned",+ "posthog_dashboard"."created_at",+ "posthog_dashboard"."created_by_id",+ "posthog_dashboard"."deleted",+ "posthog_dashboard"."last_accessed_at",+ "posthog_dashboard"."last_refresh",+ "posthog_dashboard"."filters",+ "posthog_dashboard"."variables",+ "posthog_dashboard"."breakdown_colors",+ "posthog_dashboard"."data_color_theme_id",+ "posthog_dashboard"."creation_mode",+ "posthog_dashboard"."restriction_level",+ "posthog_dashboard"."quick_filter_ids",+ "posthog_dashboard"."deprecated_tags",+ "posthog_dashboard"."tags",+ "posthog_dashboard"."share_token",+ "posthog_dashboard"."is_shared"+ FROM "posthog_dashboard"+ WHERE (NOT ("posthog_dashboard"."deleted")+ AND "posthog_dashboard"."id" IN (1,+ 2,+ 3,+ 4,+ 5 /* ... */))+ '''+# ---+# name: TestDashboard.test_adding_insights_is_not_nplus1_for_gets.18+ '''+ SELECT "posthog_tag"."name" AS "tag__name"+ FROM "posthog_taggeditem"+ INNER JOIN "posthog_tag" ON ("posthog_taggeditem"."tag_id" = "posthog_tag"."id")+ WHERE "posthog_taggeditem"."insight_id" = 99999+ '''+# ---+# name: TestDashboard.test_adding_insights_is_not_nplus1_for_gets.19+ '''+ SELECT "posthog_user"."id",+ "posthog_user"."password",+ "posthog_user"."last_login",+ "posthog_user"."first_name",+ "posthog_user"."last_name",+ "posthog_user"."is_staff",+ "posthog_user"."date_joined",+ "posthog_user"."uuid",+ "posthog_user"."current_organization_id",+ "posthog_user"."current_team_id",+ "posthog_user"."email",+ "posthog_user"."pending_email",+ "posthog_user"."distinct_id",+ "posthog_user"."is_email_verified",+ "posthog_user"."credentials_reviewed_at",+ "posthog_user"."requested_2fa_reset_at",+ "posthog_user"."has_seen_product_intro_for",+ "posthog_user"."strapi_id",+ "posthog_user"."is_active",+ "posthog_user"."role_at_organization",+ "posthog_user"."theme_mode",+ "posthog_user"."partial_notification_settings",+ "posthog_user"."anonymize_data",+ "posthog_user"."allow_impersonation",+ "posthog_user"."toolbar_mode",+ "posthog_user"."hedgehog_config",+ "posthog_user"."allow_sidebar_suggestions",+ "posthog_user"."shortcut_position",+ "posthog_user"."passkeys_enabled_for_2fa",+ "posthog_user"."hide_mcp_hints",+ "posthog_user"."onboarding_skipped_at",+ "posthog_user"."onboarding_skipped_reason",+ "posthog_user"."onboarding_skipped_organization_id",+ "posthog_user"."onboarding_delegated_to_invite_id",+ "posthog_user"."onboarding_delegated_to_organization_id",+ "posthog_user"."onboarding_delegation_accepted_at",+ "posthog_user"."events_column_config",+ "posthog_user"."email_opt_in"+ FROM "posthog_user"+ WHERE ("posthog_user"."is_active"+ AND "posthog_user"."id" = 99999)+ '''+# ---+# name: TestDashboard.test_adding_insights_is_not_nplus1_for_gets.2'''SELECT "posthog_team"."id","posthog_team"."uuid",@@ -341,151 +507,49 @@"posthog_team"."experiment_recalculation_time","posthog_team"."default_experiment_confidence_level","posthog_team"."default_experiment_stats_method",- "posthog_team"."business_model"+ "posthog_team"."business_model",+ "posthog_organization"."id",+ "posthog_organization"."name",+ "posthog_organization"."slug",+ "posthog_organization"."logo_media_id",+ "posthog_organization"."created_at",+ "posthog_organization"."updated_at",+ "posthog_organization"."is_active",+ "posthog_organization"."is_not_active_reason",+ "posthog_organization"."session_cookie_age",+ "posthog_organization"."is_member_join_email_enabled",+ "posthog_organization"."is_ai_data_processing_approved",+ "posthog_organization"."is_ai_training_opted_in",+ "posthog_organization"."is_ai_training_locked",+ "posthog_organization"."is_ai_training_cta_shown",+ "posthog_organization"."enforce_2fa",+ "posthog_organization"."members_can_invite",+ "posthog_organization"."members_can_create_projects",+ "posthog_organization"."members_can_use_personal_api_keys",+ "posthog_organization"."allow_publicly_shared_resources",+ "posthog_organization"."default_role_id",+ "posthog_organization"."plugins_access_level",+ "posthog_organization"."for_internal_metrics",+ "posthog_organization"."default_experiment_stats_method",+ "posthog_organization"."default_anonymize_ips",+ "posthog_organization"."is_hipaa",+ "posthog_organization"."is_pending_deletion",+ "posthog_organization"."customer_id",+ "posthog_organization"."available_product_features",+ "posthog_organization"."usage",+ "posthog_organization"."never_drop_data",+ "posthog_organization"."customer_trust_scores",+ "posthog_organization"."setup_section_2_completed",+ "posthog_organization"."personalization",+ "posthog_organization"."domain_whitelist",+ "posthog_organization"."is_platform"FROM "posthog_team"+ INNER JOIN "posthog_organization" ON ("posthog_team"."organization_id" = "posthog_organization"."id")WHERE "posthog_team"."id" = 99999LIMIT 21'''# ----# name: TestDashboard.test_adding_insights_is_not_nplus1_for_gets.14- '''- SELECT "posthog_dashboarditem"."id",- "posthog_dashboarditem"."name",- "posthog_dashboarditem"."derived_name",- "posthog_dashboarditem"."description",- "posthog_dashboarditem"."team_id",- "posthog_dashboarditem"."filters",- "posthog_dashboarditem"."filters_hash",- "posthog_dashboarditem"."query",- "posthog_dashboarditem"."query_metadata",- "posthog_dashboarditem"."order",- "posthog_dashboarditem"."deleted",- "posthog_dashboarditem"."saved",- "posthog_dashboarditem"."created_at",- "posthog_dashboarditem"."refreshing",- "posthog_dashboarditem"."created_by_id",- "posthog_dashboarditem"."is_sample",- "posthog_dashboarditem"."short_id",- "posthog_dashboarditem"."favorited",- "posthog_dashboarditem"."refresh_attempt",- "posthog_dashboarditem"."last_modified_at",- "posthog_dashboarditem"."last_modified_by_id",- "posthog_dashboarditem"."dashboard_id",- "posthog_dashboarditem"."last_refresh",- "posthog_dashboarditem"."layouts",- "posthog_dashboarditem"."color",- "posthog_dashboarditem"."dive_dashboard_id",- "posthog_dashboarditem"."updated_at",- "posthog_dashboarditem"."deprecated_tags",- "posthog_dashboarditem"."tags"- FROM "posthog_dashboarditem"- WHERE "posthog_dashboarditem"."id" = 99999- LIMIT 21- '''-# ----# name: TestDashboard.test_adding_insights_is_not_nplus1_for_gets.15- '''- SELECT "posthog_team"."id",- "posthog_team"."uuid",- "posthog_team"."organization_id",- "posthog_team"."parent_team_id",- "posthog_team"."project_id",- "posthog_team"."api_token",- "posthog_team"."app_urls",- "posthog_team"."name",- "posthog_team"."slack_incoming_webhook",- "posthog_team"."created_at",- "posthog_team"."updated_at",- "posthog_team"."anonymize_ips",- "posthog_team"."completed_snippet_onboarding",- "posthog_team"."has_completed_onboarding_for",- "posthog_team"."onboarding_tasks",- "posthog_team"."ingested_event",- "posthog_team"."ingested_production_event",- "posthog_team"."ingested_production_event_last_checked_at",- "posthog_team"."person_processing_opt_out",- "posthog_team"."secret_api_token",- "posthog_team"."secret_api_token_backup",- "posthog_team"."session_recording_opt_in",- "posthog_team"."session_recording_sample_rate",- "posthog_team"."session_recording_minimum_duration_milliseconds",- "posthog_team"."session_recording_linked_flag",- "posthog_team"."session_recording_network_payload_capture_config",- "posthog_team"."session_recording_masking_config",- "posthog_team"."session_recording_url_trigger_config",- "posthog_team"."session_recording_url_blocklist_config",- "posthog_team"."session_recording_event_trigger_config",- "posthog_team"."session_recording_trigger_match_type_config",- "posthog_team"."session_recording_trigger_groups",- "posthog_team"."session_replay_config",- "posthog_team"."session_recording_retention_period",- "posthog_team"."event_retention_months",- "posthog_team"."conversations_enabled",- "posthog_team"."conversations_settings",- "posthog_team"."proactive_tasks_enabled",- "posthog_team"."survey_config",- "posthog_team"."surveys_opt_in",- "posthog_team"."product_tours_opt_in",- "posthog_team"."capture_console_log_opt_in",- "posthog_team"."capture_performance_opt_in",- "posthog_team"."capture_dead_clicks",- "posthog_team"."autocapture_opt_out",- "posthog_team"."autocapture_web_vitals_opt_in",- "posthog_team"."autocapture_web_vitals_allowed_metrics",- "posthog_team"."autocapture_exceptions_opt_in",- "posthog_team"."autocapture_exceptions_errors_to_ignore",- "posthog_team"."logs_settings",- "posthog_team"."llm_gateway_enabled_at",- "posthog_team"."llm_gateway_revoked_at",- "posthog_team"."llm_gateway_overspend_allowance_usd",- "posthog_team"."heatmaps_opt_in",- "posthog_team"."receive_org_level_activity_logs",- "posthog_team"."web_analytics_pre_aggregated_tables_enabled",- "posthog_team"."web_analytics_pre_aggregated_tables_version",- "posthog_team"."flags_persistence_default",- "posthog_team"."feature_flag_confirmation_enabled",- "posthog_team"."feature_flag_confirmation_message",- "posthog_team"."default_evaluation_environments_enabled",- "posthog_team"."require_evaluation_environment_tags",- "posthog_team"."default_evaluation_contexts_enabled",- "posthog_team"."require_evaluation_contexts",- "posthog_team"."session_recording_version",- "posthog_team"."signup_token",- "posthog_team"."is_demo",- "posthog_team"."access_control",- "posthog_team"."week_start_day",- "posthog_team"."inject_web_apps",- "posthog_team"."test_account_filters",- "posthog_team"."test_account_filters_default_checked",- "posthog_team"."path_cleaning_filters",- "posthog_team"."timezone",- "posthog_team"."data_attributes",- "posthog_team"."person_display_name_properties",- "posthog_team"."live_events_columns",- "posthog_team"."recording_domains",- "posthog_team"."human_friendly_comparison_periods",- "posthog_team"."cookieless_server_hash_mode",- "posthog_team"."primary_dashboard_id",- "posthog_team"."default_data_theme",- "posthog_team"."extra_settings",- "posthog_team"."modifiers",- "posthog_team"."correlation_config",- "posthog_team"."session_recording_retention_period_days",- "posthog_team"."external_data_workspace_id",- "posthog_team"."external_data_workspace_last_synced_at",- "posthog_team"."api_query_rate_limit",- "posthog_team"."drop_events_older_than",- "posthog_team"."base_currency",- "posthog_team"."experiment_recalculation_time",- "posthog_team"."default_experiment_confidence_level",- "posthog_team"."default_experiment_stats_method",- "posthog_team"."business_model"- FROM "posthog_team"- WHERE "posthog_team"."id" = 99999- LIMIT 21- '''-# ----# name: TestDashboard.test_adding_insights_is_not_nplus1_for_gets.16+# name: TestDashboard.test_adding_insights_is_not_nplus1_for_gets.20'''SELECT "posthog_organization"."id","posthog_organization"."name",@@ -527,169 +591,7 @@LIMIT 21'''# ----# name: TestDashboard.test_adding_insights_is_not_nplus1_for_gets.17- '''- SELECT "posthog_team"."id",- "posthog_team"."uuid",- "posthog_team"."organization_id",- "posthog_team"."parent_team_id",- "posthog_team"."project_id",- "posthog_team"."api_token",- "posthog_team"."app_urls",- "posthog_team"."name",- "posthog_team"."slack_incoming_webhook",- "posthog_team"."created_at",- "posthog_team"."updated_at",- "posthog_team"."anonymize_ips",- "posthog_team"."completed_snippet_onboarding",- "posthog_team"."has_completed_onboarding_for",- "posthog_team"."onboarding_tasks",- "posthog_team"."ingested_event",- "posthog_team"."ingested_production_event",- "posthog_team"."ingested_production_event_last_checked_at",- "posthog_team"."person_processing_opt_out",- "posthog_team"."secret_api_token",- "posthog_team"."secret_api_token_backup",- "posthog_team"."session_recording_opt_in",- "posthog_team"."session_recording_sample_rate",- "posthog_team"."session_recording_minimum_duration_milliseconds",- "posthog_team"."session_recording_linked_flag",- "posthog_team"."session_recording_network_payload_capture_config",- "posthog_team"."session_recording_masking_config",- "posthog_team"."session_recording_url_trigger_config",- "posthog_team"."session_recording_url_blocklist_config",- "posthog_team"."session_recording_event_trigger_config",- "posthog_team"."session_recording_trigger_match_type_config",- "posthog_team"."session_recording_trigger_groups",- "posthog_team"."session_replay_config",- "posthog_team"."session_recording_retention_period",- "posthog_team"."event_retention_months",- "posthog_team"."conversations_enabled",- "posthog_team"."conversations_settings",- "posthog_team"."proactive_tasks_enabled",- "posthog_team"."survey_config",- "posthog_team"."surveys_opt_in",- "posthog_team"."product_tours_opt_in",- "posthog_team"."capture_console_log_opt_in",- "posthog_team"."capture_performance_opt_in",- "posthog_team"."capture_dead_clicks",- "posthog_team"."autocapture_opt_out",- "posthog_team"."autocapture_web_vitals_opt_in",- "posthog_team"."autocapture_web_vitals_allowed_metrics",- "posthog_team"."autocapture_exceptions_opt_in",- "posthog_team"."autocapture_exceptions_errors_to_ignore",- "posthog_team"."logs_settings",- "posthog_team"."llm_gateway_enabled_at",- "posthog_team"."llm_gateway_revoked_at",- "posthog_team"."llm_gateway_overspend_allowance_usd",- "posthog_team"."heatmaps_opt_in",- "posthog_team"."receive_org_level_activity_logs",- "posthog_team"."web_analytics_pre_aggregated_tables_enabled",- "posthog_team"."web_analytics_pre_aggregated_tables_version",- "posthog_team"."flags_persistence_default",- "posthog_team"."feature_flag_confirmation_enabled",- "posthog_team"."feature_flag_confirmation_message",- "posthog_team"."default_evaluation_environments_enabled",- "posthog_team"."require_evaluation_environment_tags",- "posthog_team"."default_evaluation_contexts_enabled",- "posthog_team"."require_evaluation_contexts",- "posthog_team"."session_recording_version",- "posthog_team"."signup_token",- "posthog_team"."is_demo",- "posthog_team"."access_control",- "posthog_team"."week_start_day",- "posthog_team"."inject_web_apps",- "posthog_team"."test_account_filters",- "posthog_team"."test_account_filters_default_checked",- "posthog_team"."path_cleaning_filters",- "posthog_team"."timezone",- "posthog_team"."data_attributes",- "posthog_team"."person_display_name_properties",- "posthog_team"."live_events_columns",- "posthog_team"."recording_domains",- "posthog_team"."human_friendly_comparison_periods",- "posthog_team"."cookieless_server_hash_mode",- "posthog_team"."primary_dashboard_id",- "posthog_team"."default_data_theme",- "posthog_team"."extra_settings",- "posthog_team"."modifiers",- "posthog_team"."correlation_config",- "posthog_team"."session_recording_retention_period_days",- "posthog_team"."external_data_workspace_id",- "posthog_team"."external_data_workspace_last_synced_at",- "posthog_team"."api_query_rate_limit",- "posthog_team"."drop_events_older_than",- "posthog_team"."base_currency",- "posthog_team"."experiment_recalculation_time",- "posthog_team"."default_experiment_confidence_level",- "posthog_team"."default_experiment_stats_method",- "posthog_team"."business_model"- FROM "posthog_team"- WHERE "posthog_team"."id" = 99999- LIMIT 21- '''-# ----# name: TestDashboard.test_adding_insights_is_not_nplus1_for_gets.18- '''- SELECT "posthog_dashboardtile"."id",- "posthog_dashboardtile"."dashboard_id",- "posthog_dashboardtile"."insight_id",- "posthog_dashboardtile"."text_id",- "posthog_dashboardtile"."button_tile_id",- "posthog_dashboardtile"."widget_id",- "posthog_dashboardtile"."team_id",- "posthog_dashboardtile"."layouts",- "posthog_dashboardtile"."color",- "posthog_dashboardtile"."filters_hash",- "posthog_dashboardtile"."last_refresh",- "posthog_dashboardtile"."refreshing",- "posthog_dashboardtile"."refresh_attempt",- "posthog_dashboardtile"."filters_overrides",- "posthog_dashboardtile"."show_description",- "posthog_dashboardtile"."transparent_background",- "posthog_dashboardtile"."deleted"- FROM "posthog_dashboardtile"- WHERE "posthog_dashboardtile"."id" = 99999- LIMIT 21- '''-# ----# name: TestDashboard.test_adding_insights_is_not_nplus1_for_gets.19- '''- SELECT "posthog_dashboarditem"."id",- "posthog_dashboarditem"."name",- "posthog_dashboarditem"."derived_name",- "posthog_dashboarditem"."description",- "posthog_dashboarditem"."team_id",- "posthog_dashboarditem"."filters",- "posthog_dashboarditem"."filters_hash",- "posthog_dashboarditem"."query",- "posthog_dashboarditem"."query_metadata",- "posthog_dashboarditem"."order",- "posthog_dashboarditem"."deleted",- "posthog_dashboarditem"."saved",- "posthog_dashboarditem"."created_at",- "posthog_dashboarditem"."refreshing",- "posthog_dashboarditem"."created_by_id",- "posthog_dashboarditem"."is_sample",- "posthog_dashboarditem"."short_id",- "posthog_dashboarditem"."favorited",- "posthog_dashboarditem"."refresh_attempt",- "posthog_dashboarditem"."last_modified_at",- "posthog_dashboarditem"."last_modified_by_id",- "posthog_dashboarditem"."dashboard_id",- "posthog_dashboarditem"."last_refresh",- "posthog_dashboarditem"."layouts",- "posthog_dashboarditem"."color",- "posthog_dashboarditem"."dive_dashboard_id",- "posthog_dashboarditem"."updated_at",- "posthog_dashboarditem"."deprecated_tags",- "posthog_dashboarditem"."tags"- FROM "posthog_dashboarditem"- WHERE "posthog_dashboarditem"."id" = 99999- LIMIT 21- '''-# ----# name: TestDashboard.test_adding_insights_is_not_nplus1_for_gets.2+# name: TestDashboard.test_adding_insights_is_not_nplus1_for_gets.21'''SELECT "posthog_team"."id","posthog_team"."uuid",@@ -827,139 +729,16 @@LIMIT 21'''# ----# name: TestDashboard.test_adding_insights_is_not_nplus1_for_gets.20+# name: TestDashboard.test_adding_insights_is_not_nplus1_for_gets.22'''- SELECT "posthog_dashboard"."id",- "posthog_dashboard"."name",- "posthog_dashboard"."description",- "posthog_dashboard"."team_id",- "posthog_dashboard"."pinned",- "posthog_dashboard"."created_at",- "posthog_dashboard"."created_by_id",- "posthog_dashboard"."deleted",- "posthog_dashboard"."last_accessed_at",- "posthog_dashboard"."last_refresh",- "posthog_dashboard"."filters",- "posthog_dashboard"."variables",- "posthog_dashboard"."breakdown_colors",- "posthog_dashboard"."data_color_theme_id",- "posthog_dashboard"."creation_mode",- "posthog_dashboard"."restriction_level",- "posthog_dashboard"."quick_filter_ids",- "posthog_dashboard"."deprecated_tags",- "posthog_dashboard"."tags",- "posthog_dashboard"."share_token",- "posthog_dashboard"."is_shared"- FROM "posthog_dashboard"- WHERE "posthog_dashboard"."id" = 99999- LIMIT 21- '''-# ----# name: TestDashboard.test_adding_insights_is_not_nplus1_for_gets.21- '''- SELECT "posthog_team"."id",- "posthog_team"."uuid",- "posthog_team"."organization_id",- "posthog_team"."parent_team_id",- "posthog_team"."project_id",- "posthog_team"."api_token",- "posthog_team"."app_urls",- "posthog_team"."name",- "posthog_team"."slack_incoming_webhook",- "posthog_team"."created_at",- "posthog_team"."updated_at",- "posthog_team"."anonymize_ips",- "posthog_team"."completed_snippet_onboarding",- "posthog_team"."has_completed_onboarding_for",- "posthog_team"."onboarding_tasks",- "posthog_team"."ingested_event",- "posthog_team"."ingested_production_event",- "posthog_team"."ingested_production_event_last_checked_at",- "posthog_team"."person_processing_opt_out",- "posthog_team"."secret_api_token",- "posthog_team"."secret_api_token_backup",- "posthog_team"."session_recording_opt_in",- "posthog_team"."session_recording_sample_rate",- "posthog_team"."session_recording_minimum_duration_milliseconds",- "posthog_team"."session_recording_linked_flag",- "posthog_team"."session_recording_network_payload_capture_config",- "posthog_team"."session_recording_masking_config",- "posthog_team"."session_recording_url_trigger_config",- "posthog_team"."session_recording_url_blocklist_config",- "posthog_team"."session_recording_event_trigger_config",- "posthog_team"."session_recording_trigger_match_type_config",- "posthog_team"."session_recording_trigger_groups",- "posthog_team"."session_replay_config",- "posthog_team"."session_recording_retention_period",- "posthog_team"."event_retention_months",- "posthog_team"."conversations_enabled",- "posthog_team"."conversations_settings",- "posthog_team"."proactive_tasks_enabled",- "posthog_team"."survey_config",- "posthog_team"."surveys_opt_in",- "posthog_team"."product_tours_opt_in",- "posthog_team"."capture_console_log_opt_in",- "posthog_team"."capture_performance_opt_in",- "posthog_team"."capture_dead_clicks",- "posthog_team"."autocapture_opt_out",- "posthog_team"."autocapture_web_vitals_opt_in",- "posthog_team"."autocapture_web_vitals_allowed_metrics",- "posthog_team"."autocapture_exceptions_opt_in",- "posthog_team"."autocapture_exceptions_errors_to_ignore",- "posthog_team"."logs_settings",- "posthog_team"."llm_gateway_enabled_at",- "posthog_team"."llm_gateway_revoked_at",- "posthog_team"."llm_gateway_overspend_allowance_usd",- "posthog_team"."heatmaps_opt_in",- "posthog_team"."receive_org_level_activity_logs",- "posthog_team"."web_analytics_pre_aggregated_tables_enabled",- "posthog_team"."web_analytics_pre_aggregated_tables_version",- "posthog_team"."flags_persistence_default",- "posthog_team"."feature_flag_confirmation_enabled",- "posthog_team"."feature_flag_confirmation_message",- "posthog_team"."default_evaluation_environments_enabled",- "posthog_team"."require_evaluation_environment_tags",- "posthog_team"."default_evaluation_contexts_enabled",- "posthog_team"."require_evaluation_contexts",- "posthog_team"."session_recording_version",- "posthog_team"."signup_token",- "posthog_team"."is_demo",- "posthog_team"."access_control",- "posthog_team"."week_start_day",- "posthog_team"."inject_web_apps",- "posthog_team"."test_account_filters",- "posthog_team"."test_account_filters_default_checked",- "posthog_team"."path_cleaning_filters",- "posthog_team"."timezone",- "posthog_team"."data_attributes",- "posthog_team"."person_display_name_properties",- "posthog_team"."live_events_columns",- "posthog_team"."recording_domains",- "posthog_team"."human_friendly_comparison_periods",- "posthog_team"."cookieless_server_hash_mode",- "posthog_team"."primary_dashboard_id",- "posthog_team"."default_data_theme",- "posthog_team"."extra_settings",- "posthog_team"."modifiers",- "posthog_team"."correlation_config",- "posthog_team"."session_recording_retention_period_days",- "posthog_team"."external_data_workspace_id",- "posthog_team"."external_data_workspace_last_synced_at",- "posthog_team"."api_query_rate_limit",- "posthog_team"."drop_events_older_than",- "posthog_team"."base_currency",- "posthog_team"."experiment_recalculation_time",- "posthog_team"."default_experiment_confidence_level",- "posthog_team"."default_experiment_stats_method",- "posthog_team"."business_model"- FROM "posthog_team"- WHERE "posthog_team"."id" = 99999- LIMIT 21- '''-# ----# name: TestDashboard.test_adding_insights_is_not_nplus1_for_gets.22- '''- SELECT "posthog_organization"."id",+ SELECT "posthog_organizationmembership"."id",+ "posthog_organizationmembership"."organization_id",+ "posthog_organizationmembership"."user_id",+ "posthog_organizationmembership"."level",+ "posthog_organizationmembership"."joined_at",+ "posthog_organizationmembership"."updated_at",+ "posthog_organizationmembership"."invited_by_id",+ "posthog_organization"."id","posthog_organization"."name","posthog_organization"."slug","posthog_organization"."logo_media_id",@@ -994,90 +773,105 @@"posthog_organization"."personalization","posthog_organization"."domain_whitelist","posthog_organization"."is_platform"- FROM "posthog_organization"- WHERE "posthog_organization"."id" = '00000000-0000-0000-0000-000000000000'::uuid+ FROM "posthog_organizationmembership"+ INNER JOIN "posthog_organization" ON ("posthog_organizationmembership"."organization_id" = "posthog_organization"."id")+ WHERE ("posthog_organizationmembership"."organization_id" = '00000000-0000-0000-0000-000000000000'::uuid+ AND "posthog_organizationmembership"."user_id" = 99999)LIMIT 21'''# ---# name: TestDashboard.test_adding_insights_is_not_nplus1_for_gets.23'''- SELECT "posthog_dashboardtile"."id",- "posthog_dashboardtile"."dashboard_id",- "posthog_dashboardtile"."insight_id",- "posthog_dashboardtile"."text_id",- "posthog_dashboardtile"."button_tile_id",- "posthog_dashboardtile"."widget_id",- "posthog_dashboardtile"."team_id",- "posthog_dashboardtile"."layouts",- "posthog_dashboardtile"."color",- "posthog_dashboardtile"."filters_hash",- "posthog_dashboardtile"."last_refresh",- "posthog_dashboardtile"."refreshing",- "posthog_dashboardtile"."refresh_attempt",- "posthog_dashboardtile"."filters_overrides",- "posthog_dashboardtile"."show_description",- "posthog_dashboardtile"."transparent_background",- "posthog_dashboardtile"."deleted"- FROM "posthog_dashboardtile"- INNER JOIN "posthog_dashboard" ON ("posthog_dashboardtile"."dashboard_id" = "posthog_dashboard"."id")- WHERE (NOT ("posthog_dashboardtile"."deleted"- AND "posthog_dashboardtile"."deleted" IS NOT NULL)- AND NOT ("posthog_dashboard"."deleted")- AND "posthog_dashboardtile"."insight_id" = 99999)+ SELECT "ee_accesscontrol"."id",+ "ee_accesscontrol"."team_id",+ "ee_accesscontrol"."access_level",+ "ee_accesscontrol"."resource",+ "ee_accesscontrol"."resource_id",+ "ee_accesscontrol"."organization_member_id",+ "ee_accesscontrol"."role_id",+ "ee_accesscontrol"."created_by_id",+ "ee_accesscontrol"."created_at",+ "ee_accesscontrol"."updated_at",+ "posthog_team"."organization_id" AS "_team_organization_id"+ FROM "ee_accesscontrol"+ INNER JOIN "posthog_team" ON ("ee_accesscontrol"."team_id" = "posthog_team"."id")+ LEFT OUTER JOIN "posthog_organizationmembership" ON ("ee_accesscontrol"."organization_member_id" = "posthog_organizationmembership"."id")+ WHERE (("ee_accesscontrol"."organization_member_id" IS NULL+ AND "ee_accesscontrol"."role_id" IS NULL+ AND "ee_accesscontrol"."team_id" = 99999)+ OR ("posthog_organizationmembership"."user_id" = 99999+ AND "ee_accesscontrol"."role_id" IS NULL+ AND "ee_accesscontrol"."team_id" = 99999))'''# ---# name: TestDashboard.test_adding_insights_is_not_nplus1_for_gets.24'''- SELECT "posthog_dashboardtile"."id",- "posthog_dashboardtile"."dashboard_id",- "posthog_dashboardtile"."insight_id",- "posthog_dashboardtile"."text_id",- "posthog_dashboardtile"."button_tile_id",- "posthog_dashboardtile"."widget_id",- "posthog_dashboardtile"."team_id",- "posthog_dashboardtile"."layouts",- "posthog_dashboardtile"."color",- "posthog_dashboardtile"."filters_hash",- "posthog_dashboardtile"."last_refresh",- "posthog_dashboardtile"."refreshing",- "posthog_dashboardtile"."refresh_attempt",- "posthog_dashboardtile"."filters_overrides",- "posthog_dashboardtile"."show_description",- "posthog_dashboardtile"."transparent_background",- "posthog_dashboardtile"."deleted"- FROM "posthog_dashboardtile"- INNER JOIN "posthog_dashboard" ON ("posthog_dashboardtile"."dashboard_id" = "posthog_dashboard"."id")- WHERE (NOT ("posthog_dashboardtile"."deleted"- AND "posthog_dashboardtile"."deleted" IS NOT NULL)- AND NOT ("posthog_dashboard"."deleted")- AND "posthog_dashboardtile"."insight_id" = 99999)+ SELECT "posthog_organizationmembership"."id",+ "posthog_organizationmembership"."organization_id",+ "posthog_organizationmembership"."user_id",+ "posthog_organizationmembership"."level",+ "posthog_organizationmembership"."joined_at",+ "posthog_organizationmembership"."updated_at",+ "posthog_organizationmembership"."invited_by_id",+ "posthog_organization"."id",+ "posthog_organization"."name",+ "posthog_organization"."slug",+ "posthog_organization"."logo_media_id",+ "posthog_organization"."created_at",+ "posthog_organization"."updated_at",+ "posthog_organization"."is_active",+ "posthog_organization"."is_not_active_reason",+ "posthog_organization"."session_cookie_age",+ "posthog_organization"."is_member_join_email_enabled",+ "posthog_organization"."is_ai_data_processing_approved",+ "posthog_organization"."is_ai_training_opted_in",+ "posthog_organization"."is_ai_training_locked",+ "posthog_organization"."is_ai_training_cta_shown",+ "posthog_organization"."enforce_2fa",+ "posthog_organization"."members_can_invite",+ "posthog_organization"."members_can_create_projects",+ "posthog_organization"."members_can_use_personal_api_keys",+ "posthog_organization"."allow_publicly_shared_resources",+ "posthog_organization"."default_role_id",+ "posthog_organization"."plugins_access_level",+ "posthog_organization"."for_internal_metrics",+ "posthog_organization"."default_experiment_stats_method",+ "posthog_organization"."default_anonymize_ips",+ "posthog_organization"."is_hipaa",+ "posthog_organization"."is_pending_deletion",+ "posthog_organization"."customer_id",+ "posthog_organization"."available_product_features",+ "posthog_organization"."usage",+ "posthog_organization"."never_drop_data",+ "posthog_organization"."customer_trust_scores",+ "posthog_organization"."setup_section_2_completed",+ "posthog_organization"."personalization",+ "posthog_organization"."domain_whitelist",+ "posthog_organization"."is_platform"+ FROM "posthog_organizationmembership"+ INNER JOIN "posthog_organization" ON ("posthog_organizationmembership"."organization_id" = "posthog_organization"."id")+ WHERE "posthog_organizationmembership"."user_id" = 99999'''# ---# name: TestDashboard.test_adding_insights_is_not_nplus1_for_gets.25'''- SELECT "posthog_insightvariable"."created_by_id",- "posthog_insightvariable"."created_at",- "posthog_insightvariable"."updated_at",- "posthog_insightvariable"."id",- "posthog_insightvariable"."team_id",- "posthog_insightvariable"."name",- "posthog_insightvariable"."code_name",- "posthog_insightvariable"."type",- "posthog_insightvariable"."default_value",- "posthog_insightvariable"."values"- FROM "posthog_insightvariable"- WHERE "posthog_insightvariable"."team_id" = 99999+ SELECT "ee_accesscontrol"."team_id" AS "team_id",+ "ee_accesscontrol"."resource_id" AS "resource_id",+ "ee_accesscontrol"."organization_member_id" AS "organization_member_id",+ "ee_accesscontrol"."role_id" AS "role_id",+ "ee_accesscontrol"."access_level" AS "access_level"+ FROM "ee_accesscontrol"+ INNER JOIN "posthog_team" ON ("ee_accesscontrol"."team_id" = "posthog_team"."id")+ WHERE ("ee_accesscontrol"."resource" = 'project'+ AND "posthog_team"."organization_id" IN ('00000000-0000-0000-0000-000000000000'::uuid))'''# ---# name: TestDashboard.test_adding_insights_is_not_nplus1_for_gets.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)+ SELECT "ee_rolemembership"."organization_member_id" AS "organization_member_id",+ "ee_rolemembership"."role_id" AS "role_id"+ FROM "ee_rolemembership"+ WHERE "ee_rolemembership"."user_id" = 99999'''# ---# name: TestDashboard.test_adding_insights_is_not_nplus1_for_gets.27@@ -1102,165 +896,145 @@"posthog_dashboard"."deprecated_tags","posthog_dashboard"."tags","posthog_dashboard"."share_token",- "posthog_dashboard"."is_shared"+ "posthog_dashboard"."is_shared",+ recent_dashboard_views."viewed_at" AS "last_viewed_at",+ ("posthog_dashboard"."id")::varchar AS "_ref_id",++ (SELECT U0."path" AS "path"+ FROM "posthog_filesystem" U0+ WHERE ((U0."surface" IS NULL+ OR U0."surface" = 'web')+ AND U0."ref" = ("posthog_dashboard"."id")::varchar+ AND U0."team_id" = ("posthog_dashboard"."team_id")+ AND U0."type" = 'dashboard'+ AND NOT (U0."shortcut"+ AND U0."shortcut" IS NOT NULL))+ ORDER BY U0."id" ASC+ LIMIT 1) AS "_folder_path",+ T6."id",+ T6."password",+ T6."last_login",+ T6."first_name",+ T6."last_name",+ T6."is_staff",+ T6."date_joined",+ T6."uuid",+ T6."current_organization_id",+ T6."current_team_id",+ T6."email",+ T6."pending_email",+ T6."distinct_id",+ T6."is_email_verified",+ T6."credentials_reviewed_at",+ T6."requested_password_reset_at",+ T6."requested_2fa_reset_at",+ T6."has_seen_product_intro_for",+ T6."strapi_id",+ T6."is_active",+ T6."role_at_organization",+ T6."theme_mode",+ T6."partial_notification_settings",+ T6."anonymize_data",+ T6."allow_impersonation",+ T6."toolbar_mode",+ T6."hedgehog_config",+ T6."allow_sidebar_suggestions",+ T6."shortcut_position",+ T6."passkeys_enabled_for_2fa",+ T6."hide_mcp_hints",+ T6."onboarding_skipped_at",+ T6."onboarding_skipped_reason",+ T6."onboarding_skipped_organization_id",+ T6."onboarding_delegated_to_invite_id",+ T6."onboarding_delegated_to_organization_id",+ T6."onboarding_delegation_accepted_at",+ T6."events_column_config",+ T6."email_opt_in"FROM "posthog_dashboard"- WHERE (NOT ("posthog_dashboard"."deleted")- AND "posthog_dashboard"."id" IN (1,- 2,- 3,- 4,- 5 /* ... */))+ 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.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"."insight_id" = 99999+ SELECT "posthog_sharingconfiguration"."id",+ "posthog_sharingconfiguration"."team_id",+ "posthog_sharingconfiguration"."dashboard_id",+ "posthog_sharingconfiguration"."insight_id",+ "posthog_sharingconfiguration"."recording_id",+ "posthog_sharingconfiguration"."notebook_id",+ "posthog_sharingconfiguration"."interviewee_context_id",+ "posthog_sharingconfiguration"."created_at",+ "posthog_sharingconfiguration"."enabled",+ "posthog_sharingconfiguration"."access_token",+ "posthog_sharingconfiguration"."expires_at",+ "posthog_sharingconfiguration"."settings",+ "posthog_sharingconfiguration"."password_required"+ FROM "posthog_sharingconfiguration"+ WHERE "posthog_sharingconfiguration"."dashboard_id" IN (1,+ 2,+ 3,+ 4,+ 5 /* ... */)'''# ---# name: TestDashboard.test_adding_insights_is_not_nplus1_for_gets.29'''- SELECT "posthog_user"."id",- "posthog_user"."password",- "posthog_user"."last_login",- "posthog_user"."first_name",- "posthog_user"."last_name",- "posthog_user"."is_staff",- "posthog_user"."date_joined",- "posthog_user"."uuid",- "posthog_user"."current_organization_id",- "posthog_user"."current_team_id",- "posthog_user"."email",- "posthog_user"."pending_email",- "posthog_user"."distinct_id",- "posthog_user"."is_email_verified",- "posthog_user"."credentials_reviewed_at",- "posthog_user"."requested_2fa_reset_at",- "posthog_user"."has_seen_product_intro_for",- "posthog_user"."strapi_id",- "posthog_user"."is_active",- "posthog_user"."role_at_organization",- "posthog_user"."theme_mode",- "posthog_user"."partial_notification_settings",- "posthog_user"."anonymize_data",- "posthog_user"."allow_impersonation",- "posthog_user"."toolbar_mode",- "posthog_user"."hedgehog_config",- "posthog_user"."allow_sidebar_suggestions",- "posthog_user"."shortcut_position",- "posthog_user"."passkeys_enabled_for_2fa",- "posthog_user"."hide_mcp_hints",- "posthog_user"."onboarding_skipped_at",- "posthog_user"."onboarding_skipped_reason",- "posthog_user"."onboarding_skipped_organization_id",- "posthog_user"."onboarding_delegated_to_invite_id",- "posthog_user"."onboarding_delegated_to_organization_id",- "posthog_user"."onboarding_delegation_accepted_at",- "posthog_user"."events_column_config",- "posthog_user"."email_opt_in"- FROM "posthog_user"- WHERE ("posthog_user"."is_active"- AND "posthog_user"."id" = 99999)- '''-# ----# name: TestDashboard.test_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"."members_can_invite",- "posthog_organization"."members_can_create_projects",- "posthog_organization"."members_can_use_personal_api_keys",- "posthog_organization"."allow_publicly_shared_resources",- "posthog_organization"."default_role_id",- "posthog_organization"."plugins_access_level",- "posthog_organization"."for_internal_metrics",- "posthog_organization"."default_experiment_stats_method",- "posthog_organization"."default_anonymize_ips",- "posthog_organization"."is_hipaa",- "posthog_organization"."is_pending_deletion",- "posthog_organization"."customer_id",- "posthog_organization"."available_product_features",- "posthog_organization"."usage",- "posthog_organization"."never_drop_data",- "posthog_organization"."customer_trust_scores",- "posthog_organization"."setup_section_2_completed",- "posthog_organization"."personalization",- "posthog_organization"."domain_whitelist",- "posthog_organization"."is_platform"- FROM "posthog_organizationmembership"- INNER JOIN "posthog_organization" ON ("posthog_organizationmembership"."organization_id" = "posthog_organization"."id")- WHERE ("posthog_organizationmembership"."organization_id" = '00000000-0000-0000-0000-000000000000'::uuid- AND "posthog_organizationmembership"."user_id" = 99999)- LIMIT 21- '''-# ----# name: TestDashboard.test_adding_insights_is_not_nplus1_for_gets.30- '''- SELECT "posthog_organization"."id",- "posthog_organization"."name",- "posthog_organization"."slug",- "posthog_organization"."logo_media_id",- "posthog_organization"."created_at",- "posthog_organization"."updated_at",- "posthog_organization"."is_active",- "posthog_organization"."is_not_active_reason",- "posthog_organization"."session_cookie_age",- "posthog_organization"."is_member_join_email_enabled",- "posthog_organization"."is_ai_data_processing_approved",- "posthog_organization"."is_ai_training_opted_in",- "posthog_organization"."is_ai_training_locked",- "posthog_organization"."is_ai_training_cta_shown",- "posthog_organization"."enforce_2fa",- "posthog_organization"."members_can_invite",- "posthog_organization"."members_can_create_projects",- "posthog_organization"."members_can_use_personal_api_keys",- "posthog_organization"."allow_publicly_shared_resources",- "posthog_organization"."default_role_id",- "posthog_organization"."plugins_access_level",- "posthog_organization"."for_internal_metrics",- "posthog_organization"."default_experiment_stats_method",- "posthog_organization"."default_anonymize_ips",- "posthog_organization"."is_hipaa",- "posthog_organization"."is_pending_deletion",- "posthog_organization"."customer_id",- "posthog_organization"."available_product_features",- "posthog_organization"."usage",- "posthog_organization"."never_drop_data",- "posthog_organization"."customer_trust_scores",- "posthog_organization"."setup_section_2_completed",- "posthog_organization"."personalization",- "posthog_organization"."domain_whitelist",- "posthog_organization"."is_platform"- FROM "posthog_organization"- WHERE "posthog_organization"."id" = '00000000-0000-0000-0000-000000000000'::uuid- LIMIT 21- '''-# ----# name: TestDashboard.test_adding_insights_is_not_nplus1_for_gets.31- '''- SELECT "posthog_team"."id",+ SELECT "posthog_dashboardtile"."id",+ "posthog_dashboardtile"."dashboard_id",+ "posthog_dashboardtile"."insight_id",+ "posthog_dashboardtile"."text_id",+ "posthog_dashboardtile"."button_tile_id",+ "posthog_dashboardtile"."widget_id",+ "posthog_dashboardtile"."team_id",+ "posthog_dashboardtile"."layouts",+ "posthog_dashboardtile"."color",+ "posthog_dashboardtile"."filters_hash",+ "posthog_dashboardtile"."last_refresh",+ "posthog_dashboardtile"."refreshing",+ "posthog_dashboardtile"."refresh_attempt",+ "posthog_dashboardtile"."filters_overrides",+ "posthog_dashboardtile"."show_description",+ "posthog_dashboardtile"."transparent_background",+ "posthog_dashboardtile"."deleted",+ "posthog_dashboarditem"."id",+ "posthog_dashboarditem"."name",+ "posthog_dashboarditem"."derived_name",+ "posthog_dashboarditem"."description",+ "posthog_dashboarditem"."team_id",+ "posthog_dashboarditem"."filters",+ "posthog_dashboarditem"."filters_hash",+ "posthog_dashboarditem"."query",+ "posthog_dashboarditem"."query_metadata",+ "posthog_dashboarditem"."order",+ "posthog_dashboarditem"."deleted",+ "posthog_dashboarditem"."saved",+ "posthog_dashboarditem"."created_at",+ "posthog_dashboarditem"."refreshing",+ "posthog_dashboarditem"."created_by_id",+ "posthog_dashboarditem"."is_sample",+ "posthog_dashboarditem"."short_id",+ "posthog_dashboarditem"."favorited",+ "posthog_dashboarditem"."refresh_attempt",+ "posthog_dashboarditem"."last_modified_at",+ "posthog_dashboarditem"."last_modified_by_id",+ "posthog_dashboarditem"."dashboard_id",+ "posthog_dashboarditem"."last_refresh",+ "posthog_dashboarditem"."layouts",+ "posthog_dashboarditem"."color",+ "posthog_dashboarditem"."dive_dashboard_id",+ "posthog_dashboarditem"."updated_at",+ "posthog_dashboarditem"."deprecated_tags",+ "posthog_dashboarditem"."tags",+ "posthog_team"."id","posthog_team"."uuid","posthog_team"."organization_id","posthog_team"."parent_team_id",@@ -1346,458 +1120,17 @@"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"."drop_events_older_than",- "posthog_team"."base_currency",- "posthog_team"."experiment_recalculation_time",- "posthog_team"."default_experiment_confidence_level",- "posthog_team"."default_experiment_stats_method",- "posthog_team"."business_model",- "posthog_organization"."id",- "posthog_organization"."name",- "posthog_organization"."slug",- "posthog_organization"."logo_media_id",- "posthog_organization"."created_at",- "posthog_organization"."updated_at",- "posthog_organization"."is_active",- "posthog_organization"."is_not_active_reason",- "posthog_organization"."session_cookie_age",- "posthog_organization"."is_member_join_email_enabled",- "posthog_organization"."is_ai_data_processing_approved",- "posthog_organization"."is_ai_training_opted_in",- "posthog_organization"."is_ai_training_locked",- "posthog_organization"."is_ai_training_cta_shown",- "posthog_organization"."enforce_2fa",- "posthog_organization"."members_can_invite",- "posthog_organization"."members_can_create_projects",- "posthog_organization"."members_can_use_personal_api_keys",- "posthog_organization"."allow_publicly_shared_resources",- "posthog_organization"."default_role_id",- "posthog_organization"."plugins_access_level",- "posthog_organization"."for_internal_metrics",- "posthog_organization"."default_experiment_stats_method",- "posthog_organization"."default_anonymize_ips",- "posthog_organization"."is_hipaa",- "posthog_organization"."is_pending_deletion",- "posthog_organization"."customer_id",- "posthog_organization"."available_product_features",- "posthog_organization"."usage",- "posthog_organization"."never_drop_data",- "posthog_organization"."customer_trust_scores",- "posthog_organization"."setup_section_2_completed",- "posthog_organization"."personalization",- "posthog_organization"."domain_whitelist",- "posthog_organization"."is_platform"- FROM "posthog_team"- INNER JOIN "posthog_organization" ON ("posthog_team"."organization_id" = "posthog_organization"."id")- WHERE "posthog_team"."id" = 99999- LIMIT 21- '''-# ----# name: TestDashboard.test_adding_insights_is_not_nplus1_for_gets.32- '''- SELECT "posthog_organizationmembership"."id",- "posthog_organizationmembership"."organization_id",- "posthog_organizationmembership"."user_id",- "posthog_organizationmembership"."level",- "posthog_organizationmembership"."joined_at",- "posthog_organizationmembership"."updated_at",- "posthog_organizationmembership"."invited_by_id",- "posthog_organization"."id",- "posthog_organization"."name",- "posthog_organization"."slug",- "posthog_organization"."logo_media_id",- "posthog_organization"."created_at",- "posthog_organization"."updated_at",- "posthog_organization"."is_active",- "posthog_organization"."is_not_active_reason",- "posthog_organization"."session_cookie_age",- "posthog_organization"."is_member_join_email_enabled",- "posthog_organization"."is_ai_data_processing_approved",- "posthog_organization"."is_ai_training_opted_in",- "posthog_organization"."is_ai_training_locked",- "posthog_organization"."is_ai_training_cta_shown",- "posthog_organization"."enforce_2fa",- "posthog_organization"."members_can_invite",- "posthog_organization"."members_can_create_projects",- "posthog_organization"."members_can_use_personal_api_keys",- "posthog_organization"."allow_publicly_shared_resources",- "posthog_organization"."default_role_id",- "posthog_organization"."plugins_access_level",- "posthog_organization"."for_internal_metrics",- "posthog_organization"."default_experiment_stats_method",- "posthog_organization"."default_anonymize_ips",- "posthog_organization"."is_hipaa",- "posthog_organization"."is_pending_deletion",- "posthog_organization"."customer_id",- "posthog_organization"."available_product_features",- "posthog_organization"."usage",- "posthog_organization"."never_drop_data",- "posthog_organization"."customer_trust_scores",- "posthog_organization"."setup_section_2_completed",- "posthog_organization"."personalization",- "posthog_organization"."domain_whitelist",- "posthog_organization"."is_platform"- FROM "posthog_organizationmembership"- INNER JOIN "posthog_organization" ON ("posthog_organizationmembership"."organization_id" = "posthog_organization"."id")- WHERE ("posthog_organizationmembership"."organization_id" = '00000000-0000-0000-0000-000000000000'::uuid- AND "posthog_organizationmembership"."user_id" = 99999)- LIMIT 21- '''-# ----# name: TestDashboard.test_adding_insights_is_not_nplus1_for_gets.33- '''- SELECT "ee_accesscontrol"."id",- "ee_accesscontrol"."team_id",- "ee_accesscontrol"."access_level",- "ee_accesscontrol"."resource",- "ee_accesscontrol"."resource_id",- "ee_accesscontrol"."organization_member_id",- "ee_accesscontrol"."role_id",- "ee_accesscontrol"."created_by_id",- "ee_accesscontrol"."created_at",- "ee_accesscontrol"."updated_at",- "posthog_team"."organization_id" AS "_team_organization_id"- FROM "ee_accesscontrol"- INNER JOIN "posthog_team" ON ("ee_accesscontrol"."team_id" = "posthog_team"."id")- LEFT OUTER JOIN "posthog_organizationmembership" ON ("ee_accesscontrol"."organization_member_id" = "posthog_organizationmembership"."id")- WHERE (("ee_accesscontrol"."organization_member_id" IS NULL- AND "ee_accesscontrol"."role_id" IS NULL- AND "ee_accesscontrol"."team_id" = 99999)- OR ("posthog_organizationmembership"."user_id" = 99999- AND "ee_accesscontrol"."role_id" IS NULL- AND "ee_accesscontrol"."team_id" = 99999))- '''-# ----# name: TestDashboard.test_adding_insights_is_not_nplus1_for_gets.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",- "posthog_organization"."id",- "posthog_organization"."name",- "posthog_organization"."slug",- "posthog_organization"."logo_media_id",- "posthog_organization"."created_at",- "posthog_organization"."updated_at",- "posthog_organization"."is_active",- "posthog_organization"."is_not_active_reason",- "posthog_organization"."session_cookie_age",- "posthog_organization"."is_member_join_email_enabled",- "posthog_organization"."is_ai_data_processing_approved",- "posthog_organization"."is_ai_training_opted_in",- "posthog_organization"."is_ai_training_locked",- "posthog_organization"."is_ai_training_cta_shown",- "posthog_organization"."enforce_2fa",- "posthog_organization"."members_can_invite",- "posthog_organization"."members_can_create_projects",- "posthog_organization"."members_can_use_personal_api_keys",- "posthog_organization"."allow_publicly_shared_resources",- "posthog_organization"."default_role_id",- "posthog_organization"."plugins_access_level",- "posthog_organization"."for_internal_metrics",- "posthog_organization"."default_experiment_stats_method",- "posthog_organization"."default_anonymize_ips",- "posthog_organization"."is_hipaa",- "posthog_organization"."is_pending_deletion",- "posthog_organization"."customer_id",- "posthog_organization"."available_product_features",- "posthog_organization"."usage",- "posthog_organization"."never_drop_data",- "posthog_organization"."customer_trust_scores",- "posthog_organization"."setup_section_2_completed",- "posthog_organization"."personalization",- "posthog_organization"."domain_whitelist",- "posthog_organization"."is_platform"- FROM "posthog_organizationmembership"- INNER JOIN "posthog_organization" ON ("posthog_organizationmembership"."organization_id" = "posthog_organization"."id")- WHERE "posthog_organizationmembership"."user_id" = 99999- '''-# ----# name: TestDashboard.test_adding_insights_is_not_nplus1_for_gets.35- '''- SELECT "ee_accesscontrol"."team_id" AS "team_id",- "ee_accesscontrol"."resource_id" AS "resource_id",- "ee_accesscontrol"."organization_member_id" AS "organization_member_id",- "ee_accesscontrol"."role_id" AS "role_id",- "ee_accesscontrol"."access_level" AS "access_level"- FROM "ee_accesscontrol"- INNER JOIN "posthog_team" ON ("ee_accesscontrol"."team_id" = "posthog_team"."id")- WHERE ("ee_accesscontrol"."resource" = 'project'- AND "posthog_team"."organization_id" IN ('00000000-0000-0000-0000-000000000000'::uuid))- '''-# ----# name: TestDashboard.test_adding_insights_is_not_nplus1_for_gets.36- '''- SELECT "ee_rolemembership"."organization_member_id" AS "organization_member_id",- "ee_rolemembership"."role_id" AS "role_id"- FROM "ee_rolemembership"- WHERE "ee_rolemembership"."user_id" = 99999- '''-# ----# name: TestDashboard.test_adding_insights_is_not_nplus1_for_gets.37- '''- SELECT "posthog_dashboard"."id",- "posthog_dashboard"."name",- "posthog_dashboard"."description",- "posthog_dashboard"."team_id",- "posthog_dashboard"."pinned",- "posthog_dashboard"."created_at",- "posthog_dashboard"."created_by_id",- "posthog_dashboard"."deleted",- "posthog_dashboard"."last_accessed_at",- "posthog_dashboard"."last_refresh",- "posthog_dashboard"."filters",- "posthog_dashboard"."variables",- "posthog_dashboard"."breakdown_colors",- "posthog_dashboard"."data_color_theme_id",- "posthog_dashboard"."creation_mode",- "posthog_dashboard"."restriction_level",- "posthog_dashboard"."quick_filter_ids",- "posthog_dashboard"."deprecated_tags",- "posthog_dashboard"."tags",- "posthog_dashboard"."share_token",- "posthog_dashboard"."is_shared",- recent_dashboard_views."viewed_at" AS "last_viewed_at",- ("posthog_dashboard"."id")::varchar AS "_ref_id",-- (SELECT U0."path" AS "path"- FROM "posthog_filesystem" U0- WHERE ((U0."surface" IS NULL- OR U0."surface" = 'web')- AND U0."ref" = ("posthog_dashboard"."id")::varchar- AND U0."team_id" = ("posthog_dashboard"."team_id")- AND U0."type" = 'dashboard'- AND NOT (U0."shortcut"- AND U0."shortcut" IS NOT NULL))- ORDER BY U0."id" ASC- LIMIT 1) AS "_folder_path",- T6."id",- T6."password",- T6."last_login",- T6."first_name",- T6."last_name",- T6."is_staff",- T6."date_joined",- T6."uuid",- T6."current_organization_id",- T6."current_team_id",- T6."email",- T6."pending_email",- T6."distinct_id",- T6."is_email_verified",- T6."credentials_reviewed_at",- T6."requested_password_reset_at",- T6."requested_2fa_reset_at",- T6."has_seen_product_intro_for",- T6."strapi_id",- T6."is_active",- T6."role_at_organization",- T6."theme_mode",- T6."partial_notification_settings",- T6."anonymize_data",- T6."allow_impersonation",- T6."toolbar_mode",- T6."hedgehog_config",- T6."allow_sidebar_suggestions",- T6."shortcut_position",- T6."passkeys_enabled_for_2fa",- T6."hide_mcp_hints",- T6."onboarding_skipped_at",- T6."onboarding_skipped_reason",- T6."onboarding_skipped_organization_id",- T6."onboarding_delegated_to_invite_id",- T6."onboarding_delegated_to_organization_id",- T6."onboarding_delegation_accepted_at",- T6."events_column_config",- T6."email_opt_in"- FROM "posthog_dashboard"- INNER JOIN "posthog_team" ON ("posthog_dashboard"."team_id" = "posthog_team"."id")- LEFT OUTER JOIN "posthog_filesystemviewlog" recent_dashboard_views ON ("posthog_team"."id" = recent_dashboard_views."team_id"- AND ((recent_dashboard_views."user_id" = 99999- AND recent_dashboard_views."type" = 'dashboard'- AND recent_dashboard_views."ref" = ("posthog_dashboard"."id")::varchar)))- LEFT OUTER JOIN "posthog_user" T6 ON ("posthog_dashboard"."created_by_id" = T6."id")- WHERE ("posthog_team"."project_id" = 99999- AND NOT ("posthog_dashboard"."deleted")- AND "posthog_dashboard"."id" = 99999)- LIMIT 21- '''-# ----# name: TestDashboard.test_adding_insights_is_not_nplus1_for_gets.38- '''- 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.39- '''- SELECT "posthog_dashboardtile"."id",- "posthog_dashboardtile"."dashboard_id",- "posthog_dashboardtile"."insight_id",- "posthog_dashboardtile"."text_id",- "posthog_dashboardtile"."button_tile_id",- "posthog_dashboardtile"."widget_id",- "posthog_dashboardtile"."team_id",- "posthog_dashboardtile"."layouts",- "posthog_dashboardtile"."color",- "posthog_dashboardtile"."filters_hash",- "posthog_dashboardtile"."last_refresh",- "posthog_dashboardtile"."refreshing",- "posthog_dashboardtile"."refresh_attempt",- "posthog_dashboardtile"."filters_overrides",- "posthog_dashboardtile"."show_description",- "posthog_dashboardtile"."transparent_background",- "posthog_dashboardtile"."deleted",- "posthog_dashboarditem"."id",- "posthog_dashboarditem"."name",- "posthog_dashboarditem"."derived_name",- "posthog_dashboarditem"."description",- "posthog_dashboarditem"."team_id",- "posthog_dashboarditem"."filters",- "posthog_dashboarditem"."filters_hash",- "posthog_dashboarditem"."query",- "posthog_dashboarditem"."query_metadata",- "posthog_dashboarditem"."order",- "posthog_dashboarditem"."deleted",- "posthog_dashboarditem"."saved",- "posthog_dashboarditem"."created_at",- "posthog_dashboarditem"."refreshing",- "posthog_dashboarditem"."created_by_id",- "posthog_dashboarditem"."is_sample",- "posthog_dashboarditem"."short_id",- "posthog_dashboarditem"."favorited",- "posthog_dashboarditem"."refresh_attempt",- "posthog_dashboarditem"."last_modified_at",- "posthog_dashboarditem"."last_modified_by_id",- "posthog_dashboarditem"."dashboard_id",- "posthog_dashboarditem"."last_refresh",- "posthog_dashboarditem"."layouts",- "posthog_dashboarditem"."color",- "posthog_dashboarditem"."dive_dashboard_id",- "posthog_dashboarditem"."updated_at",- "posthog_dashboarditem"."deprecated_tags",- "posthog_dashboarditem"."tags",- "posthog_team"."id",- "posthog_team"."uuid",- "posthog_team"."organization_id",- "posthog_team"."parent_team_id",- "posthog_team"."project_id",- "posthog_team"."api_token",- "posthog_team"."app_urls",- "posthog_team"."name",- "posthog_team"."slack_incoming_webhook",- "posthog_team"."created_at",- "posthog_team"."updated_at",- "posthog_team"."anonymize_ips",- "posthog_team"."completed_snippet_onboarding",- "posthog_team"."has_completed_onboarding_for",- "posthog_team"."onboarding_tasks",- "posthog_team"."ingested_event",- "posthog_team"."ingested_production_event",- "posthog_team"."ingested_production_event_last_checked_at",- "posthog_team"."person_processing_opt_out",- "posthog_team"."secret_api_token",- "posthog_team"."secret_api_token_backup",- "posthog_team"."session_recording_opt_in",- "posthog_team"."session_recording_sample_rate",- "posthog_team"."session_recording_minimum_duration_milliseconds",- "posthog_team"."session_recording_linked_flag",- "posthog_team"."session_recording_network_payload_capture_config",- "posthog_team"."session_recording_masking_config",- "posthog_team"."session_recording_url_trigger_config",- "posthog_team"."session_recording_url_blocklist_config",- "posthog_team"."session_recording_event_trigger_config",- "posthog_team"."session_recording_trigger_match_type_config",- "posthog_team"."session_recording_trigger_groups",- "posthog_team"."session_replay_config",- "posthog_team"."session_recording_retention_period",- "posthog_team"."event_retention_months",- "posthog_team"."conversations_enabled",- "posthog_team"."conversations_settings",- "posthog_team"."proactive_tasks_enabled",- "posthog_team"."survey_config",- "posthog_team"."surveys_opt_in",- "posthog_team"."product_tours_opt_in",- "posthog_team"."capture_console_log_opt_in",- "posthog_team"."capture_performance_opt_in",- "posthog_team"."capture_dead_clicks",- "posthog_team"."autocapture_opt_out",- "posthog_team"."autocapture_web_vitals_opt_in",- "posthog_team"."autocapture_web_vitals_allowed_metrics",- "posthog_team"."autocapture_exceptions_opt_in",- "posthog_team"."autocapture_exceptions_errors_to_ignore",- "posthog_team"."logs_settings",- "posthog_team"."llm_gateway_enabled_at",- "posthog_team"."llm_gateway_revoked_at",- "posthog_team"."llm_gateway_overspend_allowance_usd",- "posthog_team"."heatmaps_opt_in",- "posthog_team"."receive_org_level_activity_logs",- "posthog_team"."web_analytics_pre_aggregated_tables_enabled",- "posthog_team"."web_analytics_pre_aggregated_tables_version",- "posthog_team"."flags_persistence_default",- "posthog_team"."feature_flag_confirmation_enabled",- "posthog_team"."feature_flag_confirmation_message",- "posthog_team"."default_evaluation_environments_enabled",- "posthog_team"."require_evaluation_environment_tags",- "posthog_team"."default_evaluation_contexts_enabled",- "posthog_team"."require_evaluation_contexts",- "posthog_team"."session_recording_version",- "posthog_team"."signup_token",- "posthog_team"."is_demo",- "posthog_team"."access_control",- "posthog_team"."week_start_day",- "posthog_team"."inject_web_apps",- "posthog_team"."test_account_filters",- "posthog_team"."test_account_filters_default_checked",- "posthog_team"."path_cleaning_filters",- "posthog_team"."timezone",- "posthog_team"."data_attributes",- "posthog_team"."person_display_name_properties",- "posthog_team"."live_events_columns",- "posthog_team"."recording_domains",- "posthog_team"."human_friendly_comparison_periods",- "posthog_team"."cookieless_server_hash_mode",- "posthog_team"."primary_dashboard_id",- "posthog_team"."default_data_theme",- "posthog_team"."extra_settings",- "posthog_team"."modifiers",- "posthog_team"."correlation_config",- "posthog_team"."session_recording_retention_period_days",- "posthog_team"."plugins_opt_in",- "posthog_team"."opt_out_capture",- "posthog_team"."event_names",- "posthog_team"."event_names_with_usage",- "posthog_team"."event_properties",- "posthog_team"."event_properties_with_usage",- "posthog_team"."event_properties_numerical",- "posthog_team"."external_data_workspace_id",- "posthog_team"."external_data_workspace_last_synced_at",- "posthog_team"."api_query_rate_limit",- "posthog_team"."revenue_tracking_config",+ "posthog_team"."revenue_tracking_config","posthog_team"."drop_events_older_than","posthog_team"."base_currency","posthog_team"."experiment_recalculation_time",@@ -2012,52 +1345,58 @@ORDER BY "posthog_dashboarditem"."order" ASC'''# ----# 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",- "posthog_team"."organization_id" AS "_team_organization_id"- FROM "ee_accesscontrol"- INNER JOIN "posthog_team" ON ("ee_accesscontrol"."team_id" = "posthog_team"."id")- LEFT OUTER JOIN "posthog_organizationmembership" ON ("ee_accesscontrol"."organization_member_id" = "posthog_organizationmembership"."id")- WHERE (("ee_accesscontrol"."organization_member_id" IS NULL- AND "ee_accesscontrol"."role_id" IS NULL- AND "ee_accesscontrol"."team_id" = 99999)- OR ("posthog_organizationmembership"."user_id" = 99999- AND "ee_accesscontrol"."role_id" IS NULL- AND "ee_accesscontrol"."team_id" = 99999))- '''-# ----# name: TestDashboard.test_adding_insights_is_not_nplus1_for_gets.40+# name: TestDashboard.test_adding_insights_is_not_nplus1_for_gets.3'''- SELECT "posthog_insightcachingstate"."id",- "posthog_insightcachingstate"."team_id",- "posthog_insightcachingstate"."insight_id",- "posthog_insightcachingstate"."dashboard_tile_id",- "posthog_insightcachingstate"."cache_key",- "posthog_insightcachingstate"."target_cache_age_seconds",- "posthog_insightcachingstate"."last_refresh",- "posthog_insightcachingstate"."last_refresh_queued_at",- "posthog_insightcachingstate"."refresh_attempt",- "posthog_insightcachingstate"."created_at",- "posthog_insightcachingstate"."updated_at"- FROM "posthog_insightcachingstate"- WHERE "posthog_insightcachingstate"."dashboard_tile_id" IN (1,- 2,- 3,- 4,- 5 /* ... */)+ SELECT "posthog_organizationmembership"."id",+ "posthog_organizationmembership"."organization_id",+ "posthog_organizationmembership"."user_id",+ "posthog_organizationmembership"."level",+ "posthog_organizationmembership"."joined_at",+ "posthog_organizationmembership"."updated_at",+ "posthog_organizationmembership"."invited_by_id",+ "posthog_organization"."id",+ "posthog_organization"."name",+ "posthog_organization"."slug",+ "posthog_organization"."logo_media_id",+ "posthog_organization"."created_at",+ "posthog_organization"."updated_at",+ "posthog_organization"."is_active",+ "posthog_organization"."is_not_active_reason",+ "posthog_organization"."session_cookie_age",+ "posthog_organization"."is_member_join_email_enabled",+ "posthog_organization"."is_ai_data_processing_approved",+ "posthog_organization"."is_ai_training_opted_in",+ "posthog_organization"."is_ai_training_locked",+ "posthog_organization"."is_ai_training_cta_shown",+ "posthog_organization"."enforce_2fa",+ "posthog_organization"."members_can_invite",+ "posthog_organization"."members_can_create_projects",+ "posthog_organization"."members_can_use_personal_api_keys",+ "posthog_organization"."allow_publicly_shared_resources",+ "posthog_organization"."default_role_id",+ "posthog_organization"."plugins_access_level",+ "posthog_organization"."for_internal_metrics",+ "posthog_organization"."default_experiment_stats_method",+ "posthog_organization"."default_anonymize_ips",+ "posthog_organization"."is_hipaa",+ "posthog_organization"."is_pending_deletion",+ "posthog_organization"."customer_id",+ "posthog_organization"."available_product_features",+ "posthog_organization"."usage",+ "posthog_organization"."never_drop_data",+ "posthog_organization"."customer_trust_scores",+ "posthog_organization"."setup_section_2_completed",+ "posthog_organization"."personalization",+ "posthog_organization"."domain_whitelist",+ "posthog_organization"."is_platform"+ FROM "posthog_organizationmembership"+ INNER JOIN "posthog_organization" ON ("posthog_organizationmembership"."organization_id" = "posthog_organization"."id")+ WHERE ("posthog_organizationmembership"."organization_id" = '00000000-0000-0000-0000-000000000000'::uuid+ AND "posthog_organizationmembership"."user_id" = 99999)+ LIMIT 21'''# ----# name: TestDashboard.test_adding_insights_is_not_nplus1_for_gets.41+# name: TestDashboard.test_adding_insights_is_not_nplus1_for_gets.30'''SELECT ("posthog_dashboardtile"."insight_id") AS "_prefetch_related_val_insight_id","posthog_dashboard"."id",@@ -2098,7 +1437,7 @@5 /* ... */))'''# ----# name: TestDashboard.test_adding_insights_is_not_nplus1_for_gets.42+# name: TestDashboard.test_adding_insights_is_not_nplus1_for_gets.31'''SELECT "posthog_dashboardtile"."id","posthog_dashboardtile"."dashboard_id",@@ -2129,7 +1468,7 @@5 /* ... */))'''# ----# name: TestDashboard.test_adding_insights_is_not_nplus1_for_gets.43+# name: TestDashboard.test_adding_insights_is_not_nplus1_for_gets.32'''SELECT "posthog_dashboard"."id","posthog_dashboard"."name",@@ -2157,7 +1496,7 @@2)/* ... */)'''# ----# name: TestDashboard.test_adding_insights_is_not_nplus1_for_gets.44+# name: TestDashboard.test_adding_insights_is_not_nplus1_for_gets.33'''SELECT "posthog_taggeditem"."id","posthog_taggeditem"."tag_id",@@ -2183,7 +1522,7 @@5 /* ... */)'''# ----# name: TestDashboard.test_adding_insights_is_not_nplus1_for_gets.45+# name: TestDashboard.test_adding_insights_is_not_nplus1_for_gets.34'''SELECT "posthog_team"."id","posthog_team"."uuid",@@ -2285,7 +1624,7 @@LIMIT 21'''# ----# name: TestDashboard.test_adding_insights_is_not_nplus1_for_gets.46+# name: TestDashboard.test_adding_insights_is_not_nplus1_for_gets.35'''SELECT "posthog_filesystem"."team_id","posthog_filesystem"."id",@@ -2310,7 +1649,7 @@AND "posthog_filesystem"."shortcut" IS NOT NULL))'''# ----# name: TestDashboard.test_adding_insights_is_not_nplus1_for_gets.47+# name: TestDashboard.test_adding_insights_is_not_nplus1_for_gets.36'''SELECT "posthog_filesystemshortcut"."id","posthog_filesystemshortcut"."team_id",@@ -2333,7 +1672,7 @@AND "posthog_filesystemshortcut"."href" IS NOT NULL))'''# ----# name: TestDashboard.test_adding_insights_is_not_nplus1_for_gets.48+# name: TestDashboard.test_adding_insights_is_not_nplus1_for_gets.37'''SELECT "posthog_insightvariable"."created_by_id","posthog_insightvariable"."created_at",@@ -2349,7 +1688,7 @@WHERE "posthog_insightvariable"."team_id" = 99999'''# ----# name: TestDashboard.test_adding_insights_is_not_nplus1_for_gets.49+# name: TestDashboard.test_adding_insights_is_not_nplus1_for_gets.38'''SELECT "posthog_dashboardtile"."id","posthog_dashboardtile"."dashboard_id",@@ -2709,77 +2048,7 @@ORDER BY "posthog_dashboarditem"."order" ASC'''# ----# 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"."members_can_invite",- "posthog_organization"."members_can_create_projects",- "posthog_organization"."members_can_use_personal_api_keys",- "posthog_organization"."allow_publicly_shared_resources",- "posthog_organization"."default_role_id",- "posthog_organization"."plugins_access_level",- "posthog_organization"."for_internal_metrics",- "posthog_organization"."default_experiment_stats_method",- "posthog_organization"."default_anonymize_ips",- "posthog_organization"."is_hipaa",- "posthog_organization"."is_pending_deletion",- "posthog_organization"."customer_id",- "posthog_organization"."available_product_features",- "posthog_organization"."usage",- "posthog_organization"."never_drop_data",- "posthog_organization"."customer_trust_scores",- "posthog_organization"."setup_section_2_completed",- "posthog_organization"."personalization",- "posthog_organization"."domain_whitelist",- "posthog_organization"."is_platform"- FROM "posthog_organizationmembership"- INNER JOIN "posthog_organization" ON ("posthog_organizationmembership"."organization_id" = "posthog_organization"."id")- WHERE "posthog_organizationmembership"."user_id" = 99999- '''-# ----# name: TestDashboard.test_adding_insights_is_not_nplus1_for_gets.50- '''- SELECT "posthog_insightcachingstate"."id",- "posthog_insightcachingstate"."team_id",- "posthog_insightcachingstate"."insight_id",- "posthog_insightcachingstate"."dashboard_tile_id",- "posthog_insightcachingstate"."cache_key",- "posthog_insightcachingstate"."target_cache_age_seconds",- "posthog_insightcachingstate"."last_refresh",- "posthog_insightcachingstate"."last_refresh_queued_at",- "posthog_insightcachingstate"."refresh_attempt",- "posthog_insightcachingstate"."created_at",- "posthog_insightcachingstate"."updated_at"- FROM "posthog_insightcachingstate"- WHERE "posthog_insightcachingstate"."dashboard_tile_id" IN (1,- 2,- 3,- 4,- 5 /* ... */)- '''-# ----# name: TestDashboard.test_adding_insights_is_not_nplus1_for_gets.51+# name: TestDashboard.test_adding_insights_is_not_nplus1_for_gets.39'''SELECT ("posthog_dashboardtile"."insight_id") AS "_prefetch_related_val_insight_id","posthog_dashboard"."id",@@ -2820,7 +2089,31 @@5 /* ... */))'''# ----# name: TestDashboard.test_adding_insights_is_not_nplus1_for_gets.52+# 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",+ "posthog_team"."organization_id" AS "_team_organization_id"+ FROM "ee_accesscontrol"+ INNER JOIN "posthog_team" ON ("ee_accesscontrol"."team_id" = "posthog_team"."id")+ LEFT OUTER JOIN "posthog_organizationmembership" ON ("ee_accesscontrol"."organization_member_id" = "posthog_organizationmembership"."id")+ WHERE (("ee_accesscontrol"."organization_member_id" IS NULL+ AND "ee_accesscontrol"."role_id" IS NULL+ AND "ee_accesscontrol"."team_id" = 99999)+ OR ("posthog_organizationmembership"."user_id" = 99999+ AND "ee_accesscontrol"."role_id" IS NULL+ AND "ee_accesscontrol"."team_id" = 99999))+ '''+# ---+# name: TestDashboard.test_adding_insights_is_not_nplus1_for_gets.40'''SELECT "posthog_dashboardtile"."id","posthog_dashboardtile"."dashboard_id",@@ -2851,7 +2144,7 @@5 /* ... */))'''# ----# name: TestDashboard.test_adding_insights_is_not_nplus1_for_gets.53+# name: TestDashboard.test_adding_insights_is_not_nplus1_for_gets.41'''SELECT "posthog_dashboard"."id","posthog_dashboard"."name",@@ -2879,7 +2172,7 @@2)/* ... */)'''# ----# name: TestDashboard.test_adding_insights_is_not_nplus1_for_gets.54+# name: TestDashboard.test_adding_insights_is_not_nplus1_for_gets.42'''SELECT "posthog_taggeditem"."id","posthog_taggeditem"."tag_id",@@ -2905,7 +2198,7 @@5 /* ... */)'''# ----# name: TestDashboard.test_adding_insights_is_not_nplus1_for_gets.55+# name: TestDashboard.test_adding_insights_is_not_nplus1_for_gets.43'''SELECT "posthog_alertconfiguration"."created_by_id","posthog_alertconfiguration"."created_at",@@ -2977,7 +2270,7 @@5 /* ... */)'''# ----# name: TestDashboard.test_adding_insights_is_not_nplus1_for_gets.56+# name: TestDashboard.test_adding_insights_is_not_nplus1_for_gets.44'''SELECT "posthog_dashboard"."id","posthog_dashboard"."name",@@ -3009,190 +2302,7 @@5 /* ... */))'''# ----# name: TestDashboard.test_adding_insights_is_not_nplus1_for_gets.6- '''- SELECT "ee_accesscontrol"."team_id" AS "team_id",- "ee_accesscontrol"."resource_id" AS "resource_id",- "ee_accesscontrol"."organization_member_id" AS "organization_member_id",- "ee_accesscontrol"."role_id" AS "role_id",- "ee_accesscontrol"."access_level" AS "access_level"- FROM "ee_accesscontrol"- INNER JOIN "posthog_team" ON ("ee_accesscontrol"."team_id" = "posthog_team"."id")- WHERE ("ee_accesscontrol"."resource" = 'project'- AND "posthog_team"."organization_id" IN ('00000000-0000-0000-0000-000000000000'::uuid))- '''-# ----# name: TestDashboard.test_adding_insights_is_not_nplus1_for_gets.7- '''- SELECT "ee_rolemembership"."organization_member_id" AS "organization_member_id",- "ee_rolemembership"."role_id" AS "role_id"- FROM "ee_rolemembership"- WHERE "ee_rolemembership"."user_id" = 99999- '''-# ----# name: TestDashboard.test_adding_insights_is_not_nplus1_for_gets.8- '''- SELECT "posthog_dashboard"."id",- "posthog_dashboard"."name",- "posthog_dashboard"."description",- "posthog_dashboard"."team_id",- "posthog_dashboard"."pinned",- "posthog_dashboard"."created_at",- "posthog_dashboard"."created_by_id",- "posthog_dashboard"."deleted",- "posthog_dashboard"."last_accessed_at",- "posthog_dashboard"."last_refresh",- "posthog_dashboard"."filters",- "posthog_dashboard"."variables",- "posthog_dashboard"."breakdown_colors",- "posthog_dashboard"."data_color_theme_id",- "posthog_dashboard"."creation_mode",- "posthog_dashboard"."restriction_level",- "posthog_dashboard"."quick_filter_ids",- "posthog_dashboard"."deprecated_tags",- "posthog_dashboard"."tags",- "posthog_dashboard"."share_token",- "posthog_dashboard"."is_shared"- FROM "posthog_dashboard"- INNER JOIN "posthog_team" ON ("posthog_dashboard"."team_id" = "posthog_team"."id")- WHERE (NOT ("posthog_dashboard"."deleted")- AND ("posthog_dashboard"."team_id" =- (SELECT U0."parent_team_id" AS "parent_team_id"- FROM "posthog_team" U0- WHERE U0."id" = 99999- LIMIT 1)- OR ("posthog_team"."parent_team_id" IS NULL- AND "posthog_dashboard"."team_id" = 99999))- AND "posthog_dashboard"."id" = 99999)- LIMIT 21- '''-# ----# name: TestDashboard.test_adding_insights_is_not_nplus1_for_gets.9- '''- SELECT COUNT(*) AS "__count"- FROM "posthog_dashboardtile"- INNER JOIN "posthog_dashboard" ON ("posthog_dashboardtile"."dashboard_id" = "posthog_dashboard"."id")- WHERE (NOT ("posthog_dashboardtile"."deleted"- AND "posthog_dashboardtile"."deleted" IS NOT NULL)- AND NOT ("posthog_dashboard"."deleted")- AND "posthog_dashboardtile"."dashboard_id" = 99999- AND NOT ("posthog_dashboardtile"."deleted"- AND "posthog_dashboardtile"."deleted" IS NOT NULL))- '''-# ----# name: TestDashboard.test_listing_dashboards_is_not_nplus1- '''- SELECT "posthog_user"."id",- "posthog_user"."password",- "posthog_user"."last_login",- "posthog_user"."first_name",- "posthog_user"."last_name",- "posthog_user"."is_staff",- "posthog_user"."date_joined",- "posthog_user"."uuid",- "posthog_user"."current_organization_id",- "posthog_user"."current_team_id",- "posthog_user"."email",- "posthog_user"."pending_email",- "posthog_user"."distinct_id",- "posthog_user"."is_email_verified",- "posthog_user"."credentials_reviewed_at",- "posthog_user"."requested_2fa_reset_at",- "posthog_user"."has_seen_product_intro_for",- "posthog_user"."strapi_id",- "posthog_user"."is_active",- "posthog_user"."role_at_organization",- "posthog_user"."theme_mode",- "posthog_user"."partial_notification_settings",- "posthog_user"."anonymize_data",- "posthog_user"."allow_impersonation",- "posthog_user"."toolbar_mode",- "posthog_user"."hedgehog_config",- "posthog_user"."allow_sidebar_suggestions",- "posthog_user"."shortcut_position",- "posthog_user"."passkeys_enabled_for_2fa",- "posthog_user"."hide_mcp_hints",- "posthog_user"."onboarding_skipped_at",- "posthog_user"."onboarding_skipped_reason",- "posthog_user"."onboarding_skipped_organization_id",- "posthog_user"."onboarding_delegated_to_invite_id",- "posthog_user"."onboarding_delegated_to_organization_id",- "posthog_user"."onboarding_delegation_accepted_at",- "posthog_user"."events_column_config",- "posthog_user"."email_opt_in"- FROM "posthog_user"- WHERE ("posthog_user"."is_active"- AND "posthog_user"."id" = 99999)- '''-# ----# name: TestDashboard.test_listing_dashboards_is_not_nplus1.1- '''- SELECT "posthog_organization"."id",- "posthog_organization"."name",- "posthog_organization"."slug",- "posthog_organization"."logo_media_id",- "posthog_organization"."created_at",- "posthog_organization"."updated_at",- "posthog_organization"."is_active",- "posthog_organization"."is_not_active_reason",- "posthog_organization"."session_cookie_age",- "posthog_organization"."is_member_join_email_enabled",- "posthog_organization"."is_ai_data_processing_approved",- "posthog_organization"."is_ai_training_opted_in",- "posthog_organization"."is_ai_training_locked",- "posthog_organization"."is_ai_training_cta_shown",- "posthog_organization"."enforce_2fa",- "posthog_organization"."members_can_invite",- "posthog_organization"."members_can_create_projects",- "posthog_organization"."members_can_use_personal_api_keys",- "posthog_organization"."allow_publicly_shared_resources",- "posthog_organization"."default_role_id",- "posthog_organization"."plugins_access_level",- "posthog_organization"."for_internal_metrics",- "posthog_organization"."default_experiment_stats_method",- "posthog_organization"."default_anonymize_ips",- "posthog_organization"."is_hipaa",- "posthog_organization"."is_pending_deletion",- "posthog_organization"."customer_id",- "posthog_organization"."available_product_features",- "posthog_organization"."usage",- "posthog_organization"."never_drop_data",- "posthog_organization"."customer_trust_scores",- "posthog_organization"."setup_section_2_completed",- "posthog_organization"."personalization",- "posthog_organization"."domain_whitelist",- "posthog_organization"."is_platform"- FROM "posthog_organization"- WHERE "posthog_organization"."id" = '00000000-0000-0000-0000-000000000000'::uuid- LIMIT 21- '''-# ----# name: TestDashboard.test_listing_dashboards_is_not_nplus1.10- '''- SELECT "posthog_filesystem"."team_id",- "posthog_filesystem"."id",- "posthog_filesystem"."path",- "posthog_filesystem"."depth",- "posthog_filesystem"."type",- "posthog_filesystem"."ref",- "posthog_filesystem"."href",- "posthog_filesystem"."shortcut",- "posthog_filesystem"."meta",- "posthog_filesystem"."created_at",- "posthog_filesystem"."created_by_id",- "posthog_filesystem"."surface",- "posthog_filesystem"."project_id"- FROM "posthog_filesystem"- WHERE (("posthog_filesystem"."surface" IS NULL- OR "posthog_filesystem"."surface" = 'web')- AND "posthog_filesystem"."ref" = '0001'- AND "posthog_filesystem"."team_id" = 99999- AND "posthog_filesystem"."type" = 'insight'- AND NOT ("posthog_filesystem"."shortcut"- AND "posthog_filesystem"."shortcut" IS NOT NULL))- '''-# ----# name: TestDashboard.test_listing_dashboards_is_not_nplus1.11+# name: TestDashboard.test_adding_insights_is_not_nplus1_for_gets.45'''SELECT "posthog_team"."id","posthog_team"."uuid",@@ -3294,9 +2404,90 @@LIMIT 21'''# ----# name: TestDashboard.test_listing_dashboards_is_not_nplus1.12+# name: TestDashboard.test_adding_insights_is_not_nplus1_for_gets.46'''- SELECT "posthog_dashboarditem"."id",+ SELECT "posthog_filesystem"."team_id",+ "posthog_filesystem"."id",+ "posthog_filesystem"."path",+ "posthog_filesystem"."depth",+ "posthog_filesystem"."type",+ "posthog_filesystem"."ref",+ "posthog_filesystem"."href",+ "posthog_filesystem"."shortcut",+ "posthog_filesystem"."meta",+ "posthog_filesystem"."created_at",+ "posthog_filesystem"."created_by_id",+ "posthog_filesystem"."surface",+ "posthog_filesystem"."project_id"+ FROM "posthog_filesystem"+ WHERE (("posthog_filesystem"."surface" IS NULL+ OR "posthog_filesystem"."surface" = 'web')+ AND "posthog_filesystem"."ref" = '0001'+ AND "posthog_filesystem"."team_id" = 99999+ AND "posthog_filesystem"."type" = 'dashboard'+ AND NOT ("posthog_filesystem"."shortcut"+ AND "posthog_filesystem"."shortcut" IS NOT NULL))+ '''+# ---+# name: TestDashboard.test_adding_insights_is_not_nplus1_for_gets.47+ '''+ 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.48+ '''+ SELECT "posthog_insightvariable"."created_by_id",+ "posthog_insightvariable"."created_at",+ "posthog_insightvariable"."updated_at",+ "posthog_insightvariable"."id",+ "posthog_insightvariable"."team_id",+ "posthog_insightvariable"."name",+ "posthog_insightvariable"."code_name",+ "posthog_insightvariable"."type",+ "posthog_insightvariable"."default_value",+ "posthog_insightvariable"."values"+ FROM "posthog_insightvariable"+ WHERE "posthog_insightvariable"."team_id" = 99999+ '''+# ---+# name: TestDashboard.test_adding_insights_is_not_nplus1_for_gets.49+ '''+ SELECT "posthog_dashboardtile"."id",+ "posthog_dashboardtile"."dashboard_id",+ "posthog_dashboardtile"."insight_id",+ "posthog_dashboardtile"."text_id",+ "posthog_dashboardtile"."button_tile_id",+ "posthog_dashboardtile"."widget_id",+ "posthog_dashboardtile"."team_id",+ "posthog_dashboardtile"."layouts",+ "posthog_dashboardtile"."color",+ "posthog_dashboardtile"."filters_hash",+ "posthog_dashboardtile"."last_refresh",+ "posthog_dashboardtile"."refreshing",+ "posthog_dashboardtile"."refresh_attempt",+ "posthog_dashboardtile"."filters_overrides",+ "posthog_dashboardtile"."show_description",+ "posthog_dashboardtile"."transparent_background",+ "posthog_dashboardtile"."deleted",+ "posthog_dashboarditem"."id","posthog_dashboarditem"."name","posthog_dashboarditem"."derived_name","posthog_dashboarditem"."description",@@ -3324,15 +2515,8 @@"posthog_dashboarditem"."dive_dashboard_id","posthog_dashboarditem"."updated_at","posthog_dashboarditem"."deprecated_tags",- "posthog_dashboarditem"."tags"- FROM "posthog_dashboarditem"- WHERE "posthog_dashboarditem"."id" = 99999- LIMIT 21- '''-# ----# name: TestDashboard.test_listing_dashboards_is_not_nplus1.13- '''- SELECT "posthog_team"."id",+ "posthog_dashboarditem"."tags",+ "posthog_team"."id","posthog_team"."uuid","posthog_team"."organization_id","posthog_team"."parent_team_id",@@ -3418,24 +2602,243 @@"posthog_team"."modifiers","posthog_team"."correlation_config","posthog_team"."session_recording_retention_period_days",+ "posthog_team"."plugins_opt_in",+ "posthog_team"."opt_out_capture",+ "posthog_team"."event_names",+ "posthog_team"."event_names_with_usage",+ "posthog_team"."event_properties",+ "posthog_team"."event_properties_with_usage",+ "posthog_team"."event_properties_numerical","posthog_team"."external_data_workspace_id","posthog_team"."external_data_workspace_last_synced_at","posthog_team"."api_query_rate_limit",+ "posthog_team"."revenue_tracking_config","posthog_team"."drop_events_older_than","posthog_team"."base_currency","posthog_team"."experiment_recalculation_time","posthog_team"."default_experiment_confidence_level","posthog_team"."default_experiment_stats_method",- "posthog_team"."business_model"- FROM "posthog_team"- WHERE "posthog_team"."id" = 99999- LIMIT 21- '''-# ----# name: TestDashboard.test_listing_dashboards_is_not_nplus1.14- '''- SELECT "posthog_organization"."id",- "posthog_organization"."name",+ "posthog_team"."business_model",+ "posthog_user"."id",+ "posthog_user"."password",+ "posthog_user"."last_login",+ "posthog_user"."first_name",+ "posthog_user"."last_name",+ "posthog_user"."is_staff",+ "posthog_user"."date_joined",+ "posthog_user"."uuid",+ "posthog_user"."current_organization_id",+ "posthog_user"."current_team_id",+ "posthog_user"."email",+ "posthog_user"."pending_email",+ "posthog_user"."distinct_id",+ "posthog_user"."is_email_verified",+ "posthog_user"."credentials_reviewed_at",+ "posthog_user"."requested_password_reset_at",+ "posthog_user"."requested_2fa_reset_at",+ "posthog_user"."has_seen_product_intro_for",+ "posthog_user"."strapi_id",+ "posthog_user"."is_active",+ "posthog_user"."role_at_organization",+ "posthog_user"."theme_mode",+ "posthog_user"."partial_notification_settings",+ "posthog_user"."anonymize_data",+ "posthog_user"."allow_impersonation",+ "posthog_user"."toolbar_mode",+ "posthog_user"."hedgehog_config",+ "posthog_user"."allow_sidebar_suggestions",+ "posthog_user"."shortcut_position",+ "posthog_user"."passkeys_enabled_for_2fa",+ "posthog_user"."hide_mcp_hints",+ "posthog_user"."onboarding_skipped_at",+ "posthog_user"."onboarding_skipped_reason",+ "posthog_user"."onboarding_skipped_organization_id",+ "posthog_user"."onboarding_delegated_to_invite_id",+ "posthog_user"."onboarding_delegated_to_organization_id",+ "posthog_user"."onboarding_delegation_accepted_at",+ "posthog_user"."events_column_config",+ "posthog_user"."email_opt_in",+ T6."id",+ T6."password",+ T6."last_login",+ T6."first_name",+ T6."last_name",+ T6."is_staff",+ T6."date_joined",+ T6."uuid",+ T6."current_organization_id",+ T6."current_team_id",+ T6."email",+ T6."pending_email",+ T6."distinct_id",+ T6."is_email_verified",+ T6."credentials_reviewed_at",+ T6."requested_password_reset_at",+ T6."requested_2fa_reset_at",+ T6."has_seen_product_intro_for",+ T6."strapi_id",+ T6."is_active",+ T6."role_at_organization",+ T6."theme_mode",+ T6."partial_notification_settings",+ T6."anonymize_data",+ T6."allow_impersonation",+ T6."toolbar_mode",+ T6."hedgehog_config",+ T6."allow_sidebar_suggestions",+ T6."shortcut_position",+ T6."passkeys_enabled_for_2fa",+ T6."hide_mcp_hints",+ T6."onboarding_skipped_at",+ T6."onboarding_skipped_reason",+ T6."onboarding_skipped_organization_id",+ T6."onboarding_delegated_to_invite_id",+ T6."onboarding_delegated_to_organization_id",+ T6."onboarding_delegation_accepted_at",+ T6."events_column_config",+ T6."email_opt_in",+ "posthog_text"."id",+ "posthog_text"."body",+ "posthog_text"."created_by_id",+ "posthog_text"."last_modified_at",+ "posthog_text"."last_modified_by_id",+ "posthog_text"."team_id",+ "posthog_buttontile"."id",+ "posthog_buttontile"."url",+ "posthog_buttontile"."text",+ "posthog_buttontile"."placement",+ "posthog_buttontile"."style",+ "posthog_buttontile"."created_by_id",+ "posthog_buttontile"."last_modified_at",+ "posthog_buttontile"."last_modified_by_id",+ "posthog_buttontile"."team_id",+ "posthog_dashboardwidget"."id",+ "posthog_dashboardwidget"."widget_type",+ "posthog_dashboardwidget"."name",+ "posthog_dashboardwidget"."description",+ "posthog_dashboardwidget"."config",+ "posthog_dashboardwidget"."created_by_id",+ "posthog_dashboardwidget"."last_modified_at",+ "posthog_dashboardwidget"."last_modified_by_id",+ "posthog_dashboardwidget"."team_id",+ T10."id",+ T10."password",+ T10."last_login",+ T10."first_name",+ T10."last_name",+ T10."is_staff",+ T10."date_joined",+ T10."uuid",+ T10."current_organization_id",+ T10."current_team_id",+ T10."email",+ T10."pending_email",+ T10."distinct_id",+ T10."is_email_verified",+ T10."credentials_reviewed_at",+ T10."requested_password_reset_at",+ T10."requested_2fa_reset_at",+ T10."has_seen_product_intro_for",+ T10."strapi_id",+ T10."is_active",+ T10."role_at_organization",+ T10."theme_mode",+ T10."partial_notification_settings",+ T10."anonymize_data",+ T10."allow_impersonation",+ T10."toolbar_mode",+ T10."hedgehog_config",+ T10."allow_sidebar_suggestions",+ T10."shortcut_position",+ T10."passkeys_enabled_for_2fa",+ T10."hide_mcp_hints",+ T10."onboarding_skipped_at",+ T10."onboarding_skipped_reason",+ T10."onboarding_skipped_organization_id",+ T10."onboarding_delegated_to_invite_id",+ T10."onboarding_delegated_to_organization_id",+ T10."onboarding_delegation_accepted_at",+ T10."events_column_config",+ T10."email_opt_in",+ T11."id",+ T11."password",+ T11."last_login",+ T11."first_name",+ T11."last_name",+ T11."is_staff",+ T11."date_joined",+ T11."uuid",+ T11."current_organization_id",+ T11."current_team_id",+ T11."email",+ T11."pending_email",+ T11."distinct_id",+ T11."is_email_verified",+ T11."credentials_reviewed_at",+ T11."requested_password_reset_at",+ T11."requested_2fa_reset_at",+ T11."has_seen_product_intro_for",+ T11."strapi_id",+ T11."is_active",+ T11."role_at_organization",+ T11."theme_mode",+ T11."partial_notification_settings",+ T11."anonymize_data",+ T11."allow_impersonation",+ T11."toolbar_mode",+ T11."hedgehog_config",+ T11."allow_sidebar_suggestions",+ T11."shortcut_position",+ T11."passkeys_enabled_for_2fa",+ T11."hide_mcp_hints",+ T11."onboarding_skipped_at",+ T11."onboarding_skipped_reason",+ T11."onboarding_skipped_organization_id",+ T11."onboarding_delegated_to_invite_id",+ T11."onboarding_delegated_to_organization_id",+ T11."onboarding_delegation_accepted_at",+ T11."events_column_config",+ T11."email_opt_in"+ FROM "posthog_dashboardtile"+ INNER JOIN "posthog_dashboard" ON ("posthog_dashboardtile"."dashboard_id" = "posthog_dashboard"."id")+ LEFT OUTER JOIN "posthog_dashboarditem" ON ("posthog_dashboardtile"."insight_id" = "posthog_dashboarditem"."id")+ LEFT OUTER JOIN "posthog_team" ON ("posthog_dashboarditem"."team_id" = "posthog_team"."id")+ LEFT OUTER JOIN "posthog_user" ON ("posthog_dashboarditem"."created_by_id" = "posthog_user"."id")+ LEFT OUTER JOIN "posthog_user" T6 ON ("posthog_dashboarditem"."last_modified_by_id" = T6."id")+ LEFT OUTER JOIN "posthog_text" ON ("posthog_dashboardtile"."text_id" = "posthog_text"."id")+ LEFT OUTER JOIN "posthog_buttontile" ON ("posthog_dashboardtile"."button_tile_id" = "posthog_buttontile"."id")+ LEFT OUTER JOIN "posthog_dashboardwidget" ON ("posthog_dashboardtile"."widget_id" = "posthog_dashboardwidget"."id")+ LEFT OUTER JOIN "posthog_user" T10 ON ("posthog_dashboardwidget"."created_by_id" = T10."id")+ LEFT OUTER JOIN "posthog_user" T11 ON ("posthog_dashboardwidget"."last_modified_by_id" = T11."id")+ WHERE (NOT ("posthog_dashboardtile"."deleted"+ AND "posthog_dashboardtile"."deleted" IS NOT NULL)+ AND NOT ("posthog_dashboard"."deleted")+ AND NOT ("posthog_dashboard"."deleted"+ AND "posthog_dashboardtile"."deleted"+ AND "posthog_dashboardtile"."deleted" IS NOT NULL)+ AND (NOT "posthog_dashboarditem"."deleted"+ OR "posthog_dashboardtile"."insight_id" IS NULL)+ AND "posthog_dashboardtile"."dashboard_id" = 99999+ AND "posthog_dashboardtile"."dashboard_id" = 99999+ AND NOT ("posthog_dashboard"."deleted"+ AND "posthog_dashboardtile"."deleted"+ AND "posthog_dashboardtile"."deleted" IS NOT NULL)+ AND (NOT "posthog_dashboarditem"."deleted"+ OR "posthog_dashboardtile"."insight_id" IS NULL))+ ORDER BY "posthog_dashboarditem"."order" ASC+ '''+# ---+# name: TestDashboard.test_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",@@ -3469,114 +2872,74 @@"posthog_organization"."personalization","posthog_organization"."domain_whitelist","posthog_organization"."is_platform"- FROM "posthog_organization"- WHERE "posthog_organization"."id" = '00000000-0000-0000-0000-000000000000'::uuid- LIMIT 21+ FROM "posthog_organizationmembership"+ INNER JOIN "posthog_organization" ON ("posthog_organizationmembership"."organization_id" = "posthog_organization"."id")+ WHERE "posthog_organizationmembership"."user_id" = 99999'''# ----# name: TestDashboard.test_listing_dashboards_is_not_nplus1.15+# name: TestDashboard.test_adding_insights_is_not_nplus1_for_gets.50'''- SELECT "posthog_team"."id",- "posthog_team"."uuid",- "posthog_team"."organization_id",- "posthog_team"."parent_team_id",- "posthog_team"."project_id",- "posthog_team"."api_token",- "posthog_team"."app_urls",- "posthog_team"."name",- "posthog_team"."slack_incoming_webhook",- "posthog_team"."created_at",- "posthog_team"."updated_at",- "posthog_team"."anonymize_ips",- "posthog_team"."completed_snippet_onboarding",- "posthog_team"."has_completed_onboarding_for",- "posthog_team"."onboarding_tasks",- "posthog_team"."ingested_event",- "posthog_team"."ingested_production_event",- "posthog_team"."ingested_production_event_last_checked_at",- "posthog_team"."person_processing_opt_out",- "posthog_team"."secret_api_token",- "posthog_team"."secret_api_token_backup",- "posthog_team"."session_recording_opt_in",- "posthog_team"."session_recording_sample_rate",- "posthog_team"."session_recording_minimum_duration_milliseconds",- "posthog_team"."session_recording_linked_flag",- "posthog_team"."session_recording_network_payload_capture_config",- "posthog_team"."session_recording_masking_config",- "posthog_team"."session_recording_url_trigger_config",- "posthog_team"."session_recording_url_blocklist_config",- "posthog_team"."session_recording_event_trigger_config",- "posthog_team"."session_recording_trigger_match_type_config",- "posthog_team"."session_recording_trigger_groups",- "posthog_team"."session_replay_config",- "posthog_team"."session_recording_retention_period",- "posthog_team"."event_retention_months",- "posthog_team"."conversations_enabled",- "posthog_team"."conversations_settings",- "posthog_team"."proactive_tasks_enabled",- "posthog_team"."survey_config",- "posthog_team"."surveys_opt_in",- "posthog_team"."product_tours_opt_in",- "posthog_team"."capture_console_log_opt_in",- "posthog_team"."capture_performance_opt_in",- "posthog_team"."capture_dead_clicks",- "posthog_team"."autocapture_opt_out",- "posthog_team"."autocapture_web_vitals_opt_in",- "posthog_team"."autocapture_web_vitals_allowed_metrics",- "posthog_team"."autocapture_exceptions_opt_in",- "posthog_team"."autocapture_exceptions_errors_to_ignore",- "posthog_team"."logs_settings",- "posthog_team"."llm_gateway_enabled_at",- "posthog_team"."llm_gateway_revoked_at",- "posthog_team"."llm_gateway_overspend_allowance_usd",- "posthog_team"."heatmaps_opt_in",- "posthog_team"."receive_org_level_activity_logs",- "posthog_team"."web_analytics_pre_aggregated_tables_enabled",- "posthog_team"."web_analytics_pre_aggregated_tables_version",- "posthog_team"."flags_persistence_default",- "posthog_team"."feature_flag_confirmation_enabled",- "posthog_team"."feature_flag_confirmation_message",- "posthog_team"."default_evaluation_environments_enabled",- "posthog_team"."require_evaluation_environment_tags",- "posthog_team"."default_evaluation_contexts_enabled",- "posthog_team"."require_evaluation_contexts",- "posthog_team"."session_recording_version",- "posthog_team"."signup_token",- "posthog_team"."is_demo",- "posthog_team"."access_control",- "posthog_team"."week_start_day",- "posthog_team"."inject_web_apps",- "posthog_team"."test_account_filters",- "posthog_team"."test_account_filters_default_checked",- "posthog_team"."path_cleaning_filters",- "posthog_team"."timezone",- "posthog_team"."data_attributes",- "posthog_team"."person_display_name_properties",- "posthog_team"."live_events_columns",- "posthog_team"."recording_domains",- "posthog_team"."human_friendly_comparison_periods",- "posthog_team"."cookieless_server_hash_mode",- "posthog_team"."primary_dashboard_id",- "posthog_team"."default_data_theme",- "posthog_team"."extra_settings",- "posthog_team"."modifiers",- "posthog_team"."correlation_config",- "posthog_team"."session_recording_retention_period_days",- "posthog_team"."external_data_workspace_id",- "posthog_team"."external_data_workspace_last_synced_at",- "posthog_team"."api_query_rate_limit",- "posthog_team"."drop_events_older_than",- "posthog_team"."base_currency",- "posthog_team"."experiment_recalculation_time",- "posthog_team"."default_experiment_confidence_level",- "posthog_team"."default_experiment_stats_method",- "posthog_team"."business_model"- FROM "posthog_team"- WHERE "posthog_team"."id" = 99999- LIMIT 21+ SELECT "posthog_insightcachingstate"."id",+ "posthog_insightcachingstate"."team_id",+ "posthog_insightcachingstate"."insight_id",+ "posthog_insightcachingstate"."dashboard_tile_id",+ "posthog_insightcachingstate"."cache_key",+ "posthog_insightcachingstate"."target_cache_age_seconds",+ "posthog_insightcachingstate"."last_refresh",+ "posthog_insightcachingstate"."last_refresh_queued_at",+ "posthog_insightcachingstate"."refresh_attempt",+ "posthog_insightcachingstate"."created_at",+ "posthog_insightcachingstate"."updated_at"+ FROM "posthog_insightcachingstate"+ WHERE "posthog_insightcachingstate"."dashboard_tile_id" IN (1,+ 2,+ 3,+ 4,+ 5 /* ... */)'''# ----# name: TestDashboard.test_listing_dashboards_is_not_nplus1.16+# name: TestDashboard.test_adding_insights_is_not_nplus1_for_gets.51+ '''+ SELECT ("posthog_dashboardtile"."insight_id") AS "_prefetch_related_val_insight_id",+ "posthog_dashboard"."id",+ "posthog_dashboard"."name",+ "posthog_dashboard"."description",+ "posthog_dashboard"."team_id",+ "posthog_dashboard"."pinned",+ "posthog_dashboard"."created_at",+ "posthog_dashboard"."created_by_id",+ "posthog_dashboard"."deleted",+ "posthog_dashboard"."last_accessed_at",+ "posthog_dashboard"."last_refresh",+ "posthog_dashboard"."filters",+ "posthog_dashboard"."variables",+ "posthog_dashboard"."breakdown_colors",+ "posthog_dashboard"."data_color_theme_id",+ "posthog_dashboard"."creation_mode",+ "posthog_dashboard"."restriction_level",+ "posthog_dashboard"."quick_filter_ids",+ "posthog_dashboard"."deprecated_tags",+ "posthog_dashboard"."tags",+ "posthog_dashboard"."share_token",+ "posthog_dashboard"."is_shared"+ FROM "posthog_dashboard"+ INNER JOIN "posthog_dashboardtile" ON ("posthog_dashboard"."id" = "posthog_dashboardtile"."dashboard_id")+ WHERE (NOT ("posthog_dashboard"."deleted")+ AND "posthog_dashboard"."id" IN+ (SELECT U0."dashboard_id" AS "dashboard_id"+ FROM "posthog_dashboardtile" U0+ INNER JOIN "posthog_dashboard" U1 ON (U0."dashboard_id" = U1."id")+ WHERE (NOT (U0."deleted"+ AND U0."deleted" IS NOT NULL)+ AND NOT (U1."deleted")))+ AND "posthog_dashboardtile"."insight_id" IN (1,+ 2,+ 3,+ 4,+ 5 /* ... */))+ '''+# ---+# name: TestDashboard.test_adding_insights_is_not_nplus1_for_gets.52'''SELECT "posthog_dashboardtile"."id","posthog_dashboardtile"."dashboard_id",@@ -3596,47 +2959,18 @@"posthog_dashboardtile"."transparent_background","posthog_dashboardtile"."deleted"FROM "posthog_dashboardtile"- WHERE "posthog_dashboardtile"."id" = 99999- LIMIT 21- '''-# ----# name: TestDashboard.test_listing_dashboards_is_not_nplus1.17- '''- SELECT "posthog_dashboarditem"."id",- "posthog_dashboarditem"."name",- "posthog_dashboarditem"."derived_name",- "posthog_dashboarditem"."description",- "posthog_dashboarditem"."team_id",- "posthog_dashboarditem"."filters",- "posthog_dashboarditem"."filters_hash",- "posthog_dashboarditem"."query",- "posthog_dashboarditem"."query_metadata",- "posthog_dashboarditem"."order",- "posthog_dashboarditem"."deleted",- "posthog_dashboarditem"."saved",- "posthog_dashboarditem"."created_at",- "posthog_dashboarditem"."refreshing",- "posthog_dashboarditem"."created_by_id",- "posthog_dashboarditem"."is_sample",- "posthog_dashboarditem"."short_id",- "posthog_dashboarditem"."favorited",- "posthog_dashboarditem"."refresh_attempt",- "posthog_dashboarditem"."last_modified_at",- "posthog_dashboarditem"."last_modified_by_id",- "posthog_dashboarditem"."dashboard_id",- "posthog_dashboarditem"."last_refresh",- "posthog_dashboarditem"."layouts",- "posthog_dashboarditem"."color",- "posthog_dashboarditem"."dive_dashboard_id",- "posthog_dashboarditem"."updated_at",- "posthog_dashboarditem"."deprecated_tags",- "posthog_dashboarditem"."tags"- FROM "posthog_dashboarditem"- WHERE "posthog_dashboarditem"."id" = 99999- LIMIT 21+ 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_listing_dashboards_is_not_nplus1.18+# name: TestDashboard.test_adding_insights_is_not_nplus1_for_gets.53'''SELECT "posthog_dashboard"."id","posthog_dashboard"."name",@@ -3660,251 +2994,257 @@"posthog_dashboard"."share_token","posthog_dashboard"."is_shared"FROM "posthog_dashboard"- WHERE "posthog_dashboard"."id" = 99999- LIMIT 21+ WHERE ("posthog_dashboard"."id") IN ((1,+ 2)/* ... */)'''# ----# name: TestDashboard.test_listing_dashboards_is_not_nplus1.19+# name: TestDashboard.test_adding_insights_is_not_nplus1_for_gets.54'''- SELECT "posthog_team"."id",- "posthog_team"."uuid",- "posthog_team"."organization_id",- "posthog_team"."parent_team_id",- "posthog_team"."project_id",- "posthog_team"."api_token",- "posthog_team"."app_urls",- "posthog_team"."name",- "posthog_team"."slack_incoming_webhook",- "posthog_team"."created_at",- "posthog_team"."updated_at",- "posthog_team"."anonymize_ips",- "posthog_team"."completed_snippet_onboarding",- "posthog_team"."has_completed_onboarding_for",- "posthog_team"."onboarding_tasks",- "posthog_team"."ingested_event",- "posthog_team"."ingested_production_event",- "posthog_team"."ingested_production_event_last_checked_at",- "posthog_team"."person_processing_opt_out",- "posthog_team"."secret_api_token",- "posthog_team"."secret_api_token_backup",- "posthog_team"."session_recording_opt_in",- "posthog_team"."session_recording_sample_rate",- "posthog_team"."session_recording_minimum_duration_milliseconds",- "posthog_team"."session_recording_linked_flag",- "posthog_team"."session_recording_network_payload_capture_config",- "posthog_team"."session_recording_masking_config",- "posthog_team"."session_recording_url_trigger_config",- "posthog_team"."session_recording_url_blocklist_config",- "posthog_team"."session_recording_event_trigger_config",- "posthog_team"."session_recording_trigger_match_type_config",- "posthog_team"."session_recording_trigger_groups",- "posthog_team"."session_replay_config",- "posthog_team"."session_recording_retention_period",- "posthog_team"."event_retention_months",- "posthog_team"."conversations_enabled",- "posthog_team"."conversations_settings",- "posthog_team"."proactive_tasks_enabled",- "posthog_team"."survey_config",- "posthog_team"."surveys_opt_in",- "posthog_team"."product_tours_opt_in",- "posthog_team"."capture_console_log_opt_in",- "posthog_team"."capture_performance_opt_in",- "posthog_team"."capture_dead_clicks",- "posthog_team"."autocapture_opt_out",- "posthog_team"."autocapture_web_vitals_opt_in",- "posthog_team"."autocapture_web_vitals_allowed_metrics",- "posthog_team"."autocapture_exceptions_opt_in",- "posthog_team"."autocapture_exceptions_errors_to_ignore",- "posthog_team"."logs_settings",- "posthog_team"."llm_gateway_enabled_at",- "posthog_team"."llm_gateway_revoked_at",- "posthog_team"."llm_gateway_overspend_allowance_usd",- "posthog_team"."heatmaps_opt_in",- "posthog_team"."receive_org_level_activity_logs",- "posthog_team"."web_analytics_pre_aggregated_tables_enabled",- "posthog_team"."web_analytics_pre_aggregated_tables_version",- "posthog_team"."flags_persistence_default",- "posthog_team"."feature_flag_confirmation_enabled",- "posthog_team"."feature_flag_confirmation_message",- "posthog_team"."default_evaluation_environments_enabled",- "posthog_team"."require_evaluation_environment_tags",- "posthog_team"."default_evaluation_contexts_enabled",- "posthog_team"."require_evaluation_contexts",- "posthog_team"."session_recording_version",- "posthog_team"."signup_token",- "posthog_team"."is_demo",- "posthog_team"."access_control",- "posthog_team"."week_start_day",- "posthog_team"."inject_web_apps",- "posthog_team"."test_account_filters",- "posthog_team"."test_account_filters_default_checked",- "posthog_team"."path_cleaning_filters",- "posthog_team"."timezone",- "posthog_team"."data_attributes",- "posthog_team"."person_display_name_properties",- "posthog_team"."live_events_columns",- "posthog_team"."recording_domains",- "posthog_team"."human_friendly_comparison_periods",- "posthog_team"."cookieless_server_hash_mode",- "posthog_team"."primary_dashboard_id",- "posthog_team"."default_data_theme",- "posthog_team"."extra_settings",- "posthog_team"."modifiers",- "posthog_team"."correlation_config",- "posthog_team"."session_recording_retention_period_days",- "posthog_team"."external_data_workspace_id",- "posthog_team"."external_data_workspace_last_synced_at",- "posthog_team"."api_query_rate_limit",- "posthog_team"."drop_events_older_than",- "posthog_team"."base_currency",- "posthog_team"."experiment_recalculation_time",- "posthog_team"."default_experiment_confidence_level",- "posthog_team"."default_experiment_stats_method",- "posthog_team"."business_model"- FROM "posthog_team"- WHERE "posthog_team"."id" = 99999- LIMIT 21+ SELECT "posthog_taggeditem"."id",+ "posthog_taggeditem"."tag_id",+ "posthog_taggeditem"."dashboard_id",+ "posthog_taggeditem"."insight_id",+ "posthog_taggeditem"."event_definition_id",+ "posthog_taggeditem"."property_definition_id",+ "posthog_taggeditem"."action_id",+ "posthog_taggeditem"."feature_flag_id",+ "posthog_taggeditem"."experiment_saved_metric_id",+ "posthog_taggeditem"."ticket_id",+ "posthog_taggeditem"."account_id",+ "posthog_taggeditem"."endpoint_id",+ "posthog_tag"."id",+ "posthog_tag"."name",+ "posthog_tag"."team_id"+ FROM "posthog_taggeditem"+ INNER JOIN "posthog_tag" ON ("posthog_taggeditem"."tag_id" = "posthog_tag"."id")+ WHERE "posthog_taggeditem"."insight_id" IN (1,+ 2,+ 3,+ 4,+ 5 /* ... */)'''# ----# name: TestDashboard.test_listing_dashboards_is_not_nplus1.2+# name: TestDashboard.test_adding_insights_is_not_nplus1_for_gets.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"."experiment_recalculation_time",- "posthog_team"."default_experiment_confidence_level",- "posthog_team"."default_experiment_stats_method",- "posthog_team"."business_model",- "posthog_organization"."id",- "posthog_organization"."name",- "posthog_organization"."slug",- "posthog_organization"."logo_media_id",- "posthog_organization"."created_at",- "posthog_organization"."updated_at",- "posthog_organization"."is_active",- "posthog_organization"."is_not_active_reason",- "posthog_organization"."session_cookie_age",- "posthog_organization"."is_member_join_email_enabled",- "posthog_organization"."is_ai_data_processing_approved",- "posthog_organization"."is_ai_training_opted_in",- "posthog_organization"."is_ai_training_locked",- "posthog_organization"."is_ai_training_cta_shown",- "posthog_organization"."enforce_2fa",- "posthog_organization"."members_can_invite",- "posthog_organization"."members_can_create_projects",- "posthog_organization"."members_can_use_personal_api_keys",- "posthog_organization"."allow_publicly_shared_resources",- "posthog_organization"."default_role_id",- "posthog_organization"."plugins_access_level",- "posthog_organization"."for_internal_metrics",- "posthog_organization"."default_experiment_stats_method",- "posthog_organization"."default_anonymize_ips",- "posthog_organization"."is_hipaa",- "posthog_organization"."is_pending_deletion",- "posthog_organization"."customer_id",- "posthog_organization"."available_product_features",- "posthog_organization"."usage",- "posthog_organization"."never_drop_data",- "posthog_organization"."customer_trust_scores",- "posthog_organization"."setup_section_2_completed",- "posthog_organization"."personalization",- "posthog_organization"."domain_whitelist",- "posthog_organization"."is_platform"- FROM "posthog_team"- INNER JOIN "posthog_organization" ON ("posthog_team"."organization_id" = "posthog_organization"."id")- WHERE "posthog_team"."id" = 99999- LIMIT 21+ SELECT "posthog_alertconfiguration"."created_by_id",+ "posthog_alertconfiguration"."created_at",+ "posthog_alertconfiguration"."id",+ "posthog_alertconfiguration"."team_id",+ "posthog_alertconfiguration"."insight_id",+ "posthog_alertconfiguration"."name",+ "posthog_alertconfiguration"."config",+ "posthog_alertconfiguration"."calculation_interval",+ "posthog_alertconfiguration"."threshold_id",+ "posthog_alertconfiguration"."condition",+ "posthog_alertconfiguration"."detector_config",+ "posthog_alertconfiguration"."state",+ "posthog_alertconfiguration"."enabled",+ "posthog_alertconfiguration"."last_notified_at",+ "posthog_alertconfiguration"."last_checked_at",+ "posthog_alertconfiguration"."next_check_at",+ "posthog_alertconfiguration"."snoozed_until",+ "posthog_alertconfiguration"."skip_weekend",+ "posthog_alertconfiguration"."schedule_restriction",+ "posthog_alertconfiguration"."investigation_agent_enabled",+ "posthog_alertconfiguration"."investigation_gates_notifications",+ "posthog_alertconfiguration"."investigation_inconclusive_action",+ "posthog_user"."id",+ "posthog_user"."password",+ "posthog_user"."last_login",+ "posthog_user"."first_name",+ "posthog_user"."last_name",+ "posthog_user"."is_staff",+ "posthog_user"."date_joined",+ "posthog_user"."uuid",+ "posthog_user"."current_organization_id",+ "posthog_user"."current_team_id",+ "posthog_user"."email",+ "posthog_user"."pending_email",+ "posthog_user"."distinct_id",+ "posthog_user"."is_email_verified",+ "posthog_user"."credentials_reviewed_at",+ "posthog_user"."requested_password_reset_at",+ "posthog_user"."requested_2fa_reset_at",+ "posthog_user"."has_seen_product_intro_for",+ "posthog_user"."strapi_id",+ "posthog_user"."is_active",+ "posthog_user"."role_at_organization",+ "posthog_user"."theme_mode",+ "posthog_user"."partial_notification_settings",+ "posthog_user"."anonymize_data",+ "posthog_user"."allow_impersonation",+ "posthog_user"."toolbar_mode",+ "posthog_user"."hedgehog_config",+ "posthog_user"."allow_sidebar_suggestions",+ "posthog_user"."shortcut_position",+ "posthog_user"."passkeys_enabled_for_2fa",+ "posthog_user"."hide_mcp_hints",+ "posthog_user"."onboarding_skipped_at",+ "posthog_user"."onboarding_skipped_reason",+ "posthog_user"."onboarding_skipped_organization_id",+ "posthog_user"."onboarding_delegated_to_invite_id",+ "posthog_user"."onboarding_delegated_to_organization_id",+ "posthog_user"."onboarding_delegation_accepted_at",+ "posthog_user"."events_column_config",+ "posthog_user"."email_opt_in"+ FROM "posthog_alertconfiguration"+ LEFT OUTER JOIN "posthog_user" ON ("posthog_alertconfiguration"."created_by_id" = "posthog_user"."id")+ WHERE "posthog_alertconfiguration"."insight_id" IN (1,+ 2,+ 3,+ 4,+ 5 /* ... */)'''# ----# name: TestDashboard.test_listing_dashboards_is_not_nplus1.20+# name: TestDashboard.test_adding_insights_is_not_nplus1_for_gets.56+ '''+ SELECT "posthog_dashboard"."id",+ "posthog_dashboard"."name",+ "posthog_dashboard"."description",+ "posthog_dashboard"."team_id",+ "posthog_dashboard"."pinned",+ "posthog_dashboard"."created_at",+ "posthog_dashboard"."created_by_id",+ "posthog_dashboard"."deleted",+ "posthog_dashboard"."last_accessed_at",+ "posthog_dashboard"."last_refresh",+ "posthog_dashboard"."filters",+ "posthog_dashboard"."variables",+ "posthog_dashboard"."breakdown_colors",+ "posthog_dashboard"."data_color_theme_id",+ "posthog_dashboard"."creation_mode",+ "posthog_dashboard"."restriction_level",+ "posthog_dashboard"."quick_filter_ids",+ "posthog_dashboard"."deprecated_tags",+ "posthog_dashboard"."tags",+ "posthog_dashboard"."share_token",+ "posthog_dashboard"."is_shared"+ FROM "posthog_dashboard"+ WHERE (NOT ("posthog_dashboard"."deleted")+ AND "posthog_dashboard"."id" IN (1,+ 2,+ 3,+ 4,+ 5 /* ... */))+ '''+# ---+# name: TestDashboard.test_adding_insights_is_not_nplus1_for_gets.6+ '''+ SELECT "ee_accesscontrol"."team_id" AS "team_id",+ "ee_accesscontrol"."resource_id" AS "resource_id",+ "ee_accesscontrol"."organization_member_id" AS "organization_member_id",+ "ee_accesscontrol"."role_id" AS "role_id",+ "ee_accesscontrol"."access_level" AS "access_level"+ FROM "ee_accesscontrol"+ INNER JOIN "posthog_team" ON ("ee_accesscontrol"."team_id" = "posthog_team"."id")+ WHERE ("ee_accesscontrol"."resource" = 'project'+ AND "posthog_team"."organization_id" IN ('00000000-0000-0000-0000-000000000000'::uuid))+ '''+# ---+# name: TestDashboard.test_adding_insights_is_not_nplus1_for_gets.7+ '''+ SELECT "ee_rolemembership"."organization_member_id" AS "organization_member_id",+ "ee_rolemembership"."role_id" AS "role_id"+ FROM "ee_rolemembership"+ WHERE "ee_rolemembership"."user_id" = 99999+ '''+# ---+# name: TestDashboard.test_adding_insights_is_not_nplus1_for_gets.8+ '''+ SELECT "posthog_dashboard"."id",+ "posthog_dashboard"."name",+ "posthog_dashboard"."description",+ "posthog_dashboard"."team_id",+ "posthog_dashboard"."pinned",+ "posthog_dashboard"."created_at",+ "posthog_dashboard"."created_by_id",+ "posthog_dashboard"."deleted",+ "posthog_dashboard"."last_accessed_at",+ "posthog_dashboard"."last_refresh",+ "posthog_dashboard"."filters",+ "posthog_dashboard"."variables",+ "posthog_dashboard"."breakdown_colors",+ "posthog_dashboard"."data_color_theme_id",+ "posthog_dashboard"."creation_mode",+ "posthog_dashboard"."restriction_level",+ "posthog_dashboard"."quick_filter_ids",+ "posthog_dashboard"."deprecated_tags",+ "posthog_dashboard"."tags",+ "posthog_dashboard"."share_token",+ "posthog_dashboard"."is_shared"+ FROM "posthog_dashboard"+ INNER JOIN "posthog_team" ON ("posthog_dashboard"."team_id" = "posthog_team"."id")+ WHERE (NOT ("posthog_dashboard"."deleted")+ AND ("posthog_dashboard"."team_id" =+ (SELECT U0."parent_team_id" AS "parent_team_id"+ FROM "posthog_team" U0+ WHERE U0."id" = 99999+ LIMIT 1)+ OR ("posthog_team"."parent_team_id" IS NULL+ AND "posthog_dashboard"."team_id" = 99999))+ AND "posthog_dashboard"."id" = 99999)+ LIMIT 21+ '''+# ---+# name: TestDashboard.test_adding_insights_is_not_nplus1_for_gets.9+ '''+ SELECT COUNT(*) AS "__count"+ FROM "posthog_dashboardtile"+ INNER JOIN "posthog_dashboard" ON ("posthog_dashboardtile"."dashboard_id" = "posthog_dashboard"."id")+ WHERE (NOT ("posthog_dashboardtile"."deleted"+ AND "posthog_dashboardtile"."deleted" IS NOT NULL)+ AND NOT ("posthog_dashboard"."deleted")+ AND "posthog_dashboardtile"."dashboard_id" = 99999+ AND NOT ("posthog_dashboardtile"."deleted"+ AND "posthog_dashboardtile"."deleted" IS NOT NULL))+ '''+# ---+# name: TestDashboard.test_listing_dashboards_is_not_nplus1+ '''+ SELECT "posthog_user"."id",+ "posthog_user"."password",+ "posthog_user"."last_login",+ "posthog_user"."first_name",+ "posthog_user"."last_name",+ "posthog_user"."is_staff",+ "posthog_user"."date_joined",+ "posthog_user"."uuid",+ "posthog_user"."current_organization_id",+ "posthog_user"."current_team_id",+ "posthog_user"."email",+ "posthog_user"."pending_email",+ "posthog_user"."distinct_id",+ "posthog_user"."is_email_verified",+ "posthog_user"."credentials_reviewed_at",+ "posthog_user"."requested_2fa_reset_at",+ "posthog_user"."has_seen_product_intro_for",+ "posthog_user"."strapi_id",+ "posthog_user"."is_active",+ "posthog_user"."role_at_organization",+ "posthog_user"."theme_mode",+ "posthog_user"."partial_notification_settings",+ "posthog_user"."anonymize_data",+ "posthog_user"."allow_impersonation",+ "posthog_user"."toolbar_mode",+ "posthog_user"."hedgehog_config",+ "posthog_user"."allow_sidebar_suggestions",+ "posthog_user"."shortcut_position",+ "posthog_user"."passkeys_enabled_for_2fa",+ "posthog_user"."hide_mcp_hints",+ "posthog_user"."onboarding_skipped_at",+ "posthog_user"."onboarding_skipped_reason",+ "posthog_user"."onboarding_skipped_organization_id",+ "posthog_user"."onboarding_delegated_to_invite_id",+ "posthog_user"."onboarding_delegated_to_organization_id",+ "posthog_user"."onboarding_delegation_accepted_at",+ "posthog_user"."events_column_config",+ "posthog_user"."email_opt_in"+ FROM "posthog_user"+ WHERE ("posthog_user"."is_active"+ AND "posthog_user"."id" = 99999)+ '''+# ---+# name: TestDashboard.test_listing_dashboards_is_not_nplus1.1'''SELECT "posthog_organization"."id","posthog_organization"."name",@@ -3946,7 +3286,32 @@LIMIT 21'''# ----# name: TestDashboard.test_listing_dashboards_is_not_nplus1.21+# name: TestDashboard.test_listing_dashboards_is_not_nplus1.10+ '''+ SELECT "posthog_filesystem"."team_id",+ "posthog_filesystem"."id",+ "posthog_filesystem"."path",+ "posthog_filesystem"."depth",+ "posthog_filesystem"."type",+ "posthog_filesystem"."ref",+ "posthog_filesystem"."href",+ "posthog_filesystem"."shortcut",+ "posthog_filesystem"."meta",+ "posthog_filesystem"."created_at",+ "posthog_filesystem"."created_by_id",+ "posthog_filesystem"."surface",+ "posthog_filesystem"."project_id"+ FROM "posthog_filesystem"+ WHERE (("posthog_filesystem"."surface" IS NULL+ OR "posthog_filesystem"."surface" = 'web')+ AND "posthog_filesystem"."ref" = '0001'+ AND "posthog_filesystem"."team_id" = 99999+ AND "posthog_filesystem"."type" = 'insight'+ AND NOT ("posthog_filesystem"."shortcut"+ AND "posthog_filesystem"."shortcut" IS NOT NULL))+ '''+# ---+# name: TestDashboard.test_listing_dashboards_is_not_nplus1.11'''SELECT "posthog_organization"."id","posthog_organization"."name",@@ -3988,7 +3353,7 @@LIMIT 21'''# ----# name: TestDashboard.test_listing_dashboards_is_not_nplus1.22+# name: TestDashboard.test_listing_dashboards_is_not_nplus1.12'''SELECT "posthog_team"."id","posthog_team"."uuid",@@ -4090,7 +3455,7 @@LIMIT 21'''# ----# name: TestDashboard.test_listing_dashboards_is_not_nplus1.23+# name: TestDashboard.test_listing_dashboards_is_not_nplus1.13'''SELECT "posthog_dashboardtile"."id","posthog_dashboardtile"."dashboard_id",@@ -4117,7 +3482,7 @@AND "posthog_dashboardtile"."insight_id" = 99999)'''# ----# name: TestDashboard.test_listing_dashboards_is_not_nplus1.24+# name: TestDashboard.test_listing_dashboards_is_not_nplus1.14'''SELECT "posthog_dashboardtile"."id","posthog_dashboardtile"."dashboard_id",@@ -4144,7 +3509,7 @@AND "posthog_dashboardtile"."insight_id" = 99999)'''# ----# name: TestDashboard.test_listing_dashboards_is_not_nplus1.25+# name: TestDashboard.test_listing_dashboards_is_not_nplus1.15'''SELECT "posthog_insightvariable"."created_by_id","posthog_insightvariable"."created_at",@@ -4160,7 +3525,7 @@WHERE "posthog_insightvariable"."team_id" = 99999'''# ----# name: TestDashboard.test_listing_dashboards_is_not_nplus1.26+# name: TestDashboard.test_listing_dashboards_is_not_nplus1.16'''SELECT "posthog_dashboardtile"."dashboard_id" AS "dashboard_id"FROM "posthog_dashboardtile"@@ -4171,7 +3536,7 @@AND "posthog_dashboardtile"."insight_id" = 99999)'''# ----# name: TestDashboard.test_listing_dashboards_is_not_nplus1.27+# name: TestDashboard.test_listing_dashboards_is_not_nplus1.17'''SELECT "posthog_dashboard"."id","posthog_dashboard"."name",@@ -4203,7 +3568,7 @@5 /* ... */))'''# ----# name: TestDashboard.test_listing_dashboards_is_not_nplus1.28+# name: TestDashboard.test_listing_dashboards_is_not_nplus1.18'''SELECT "posthog_tag"."name" AS "tag__name"FROM "posthog_taggeditem"@@ -4211,7 +3576,7 @@WHERE "posthog_taggeditem"."insight_id" = 99999'''# ----# name: TestDashboard.test_listing_dashboards_is_not_nplus1.29+# name: TestDashboard.test_listing_dashboards_is_not_nplus1.19'''SELECT "posthog_user"."id","posthog_user"."password",@@ -4256,71 +3621,158 @@AND "posthog_user"."id" = 99999)'''# ----# name: TestDashboard.test_listing_dashboards_is_not_nplus1.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"."members_can_invite",- "posthog_organization"."members_can_create_projects",- "posthog_organization"."members_can_use_personal_api_keys",- "posthog_organization"."allow_publicly_shared_resources",- "posthog_organization"."default_role_id",- "posthog_organization"."plugins_access_level",- "posthog_organization"."for_internal_metrics",- "posthog_organization"."default_experiment_stats_method",- "posthog_organization"."default_anonymize_ips",- "posthog_organization"."is_hipaa",- "posthog_organization"."is_pending_deletion",- "posthog_organization"."customer_id",- "posthog_organization"."available_product_features",- "posthog_organization"."usage",- "posthog_organization"."never_drop_data",- "posthog_organization"."customer_trust_scores",- "posthog_organization"."setup_section_2_completed",- "posthog_organization"."personalization",- "posthog_organization"."domain_whitelist",- "posthog_organization"."is_platform"- FROM "posthog_organizationmembership"- INNER JOIN "posthog_organization" ON ("posthog_organizationmembership"."organization_id" = "posthog_organization"."id")- WHERE ("posthog_organizationmembership"."organization_id" = '00000000-0000-0000-0000-000000000000'::uuid- AND "posthog_organizationmembership"."user_id" = 99999)- LIMIT 21- '''-# ----# name: TestDashboard.test_listing_dashboards_is_not_nplus1.30+# 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",+ SELECT "posthog_team"."id",+ "posthog_team"."uuid",+ "posthog_team"."organization_id",+ "posthog_team"."parent_team_id",+ "posthog_team"."project_id",+ "posthog_team"."api_token",+ "posthog_team"."app_urls",+ "posthog_team"."name",+ "posthog_team"."slack_incoming_webhook",+ "posthog_team"."created_at",+ "posthog_team"."updated_at",+ "posthog_team"."anonymize_ips",+ "posthog_team"."completed_snippet_onboarding",+ "posthog_team"."has_completed_onboarding_for",+ "posthog_team"."onboarding_tasks",+ "posthog_team"."ingested_event",+ "posthog_team"."ingested_production_event",+ "posthog_team"."ingested_production_event_last_checked_at",+ "posthog_team"."person_processing_opt_out",+ "posthog_team"."secret_api_token",+ "posthog_team"."secret_api_token_backup",+ "posthog_team"."session_recording_opt_in",+ "posthog_team"."session_recording_sample_rate",+ "posthog_team"."session_recording_minimum_duration_milliseconds",+ "posthog_team"."session_recording_linked_flag",+ "posthog_team"."session_recording_network_payload_capture_config",+ "posthog_team"."session_recording_masking_config",+ "posthog_team"."session_recording_url_trigger_config",+ "posthog_team"."session_recording_url_blocklist_config",+ "posthog_team"."session_recording_event_trigger_config",+ "posthog_team"."session_recording_trigger_match_type_config",+ "posthog_team"."session_recording_trigger_groups",+ "posthog_team"."session_replay_config",+ "posthog_team"."session_recording_retention_period",+ "posthog_team"."event_retention_months",+ "posthog_team"."conversations_enabled",+ "posthog_team"."conversations_settings",+ "posthog_team"."proactive_tasks_enabled",+ "posthog_team"."survey_config",+ "posthog_team"."surveys_opt_in",+ "posthog_team"."product_tours_opt_in",+ "posthog_team"."capture_console_log_opt_in",+ "posthog_team"."capture_performance_opt_in",+ "posthog_team"."capture_dead_clicks",+ "posthog_team"."autocapture_opt_out",+ "posthog_team"."autocapture_web_vitals_opt_in",+ "posthog_team"."autocapture_web_vitals_allowed_metrics",+ "posthog_team"."autocapture_exceptions_opt_in",+ "posthog_team"."autocapture_exceptions_errors_to_ignore",+ "posthog_team"."logs_settings",+ "posthog_team"."llm_gateway_enabled_at",+ "posthog_team"."llm_gateway_revoked_at",+ "posthog_team"."llm_gateway_overspend_allowance_usd",+ "posthog_team"."heatmaps_opt_in",+ "posthog_team"."receive_org_level_activity_logs",+ "posthog_team"."web_analytics_pre_aggregated_tables_enabled",+ "posthog_team"."web_analytics_pre_aggregated_tables_version",+ "posthog_team"."flags_persistence_default",+ "posthog_team"."feature_flag_confirmation_enabled",+ "posthog_team"."feature_flag_confirmation_message",+ "posthog_team"."default_evaluation_environments_enabled",+ "posthog_team"."require_evaluation_environment_tags",+ "posthog_team"."default_evaluation_contexts_enabled",+ "posthog_team"."require_evaluation_contexts",+ "posthog_team"."session_recording_version",+ "posthog_team"."signup_token",+ "posthog_team"."is_demo",+ "posthog_team"."access_control",+ "posthog_team"."week_start_day",+ "posthog_team"."inject_web_apps",+ "posthog_team"."test_account_filters",+ "posthog_team"."test_account_filters_default_checked",+ "posthog_team"."path_cleaning_filters",+ "posthog_team"."timezone",+ "posthog_team"."data_attributes",+ "posthog_team"."person_display_name_properties",+ "posthog_team"."live_events_columns",+ "posthog_team"."recording_domains",+ "posthog_team"."human_friendly_comparison_periods",+ "posthog_team"."cookieless_server_hash_mode",+ "posthog_team"."primary_dashboard_id",+ "posthog_team"."default_data_theme",+ "posthog_team"."extra_settings",+ "posthog_team"."modifiers",+ "posthog_team"."correlation_config",+ "posthog_team"."session_recording_retention_period_days",+ "posthog_team"."external_data_workspace_id",+ "posthog_team"."external_data_workspace_last_synced_at",+ "posthog_team"."api_query_rate_limit",+ "posthog_team"."drop_events_older_than",+ "posthog_team"."base_currency",+ "posthog_team"."experiment_recalculation_time",+ "posthog_team"."default_experiment_confidence_level",+ "posthog_team"."default_experiment_stats_method",+ "posthog_team"."business_model",+ "posthog_organization"."id",+ "posthog_organization"."name",+ "posthog_organization"."slug",+ "posthog_organization"."logo_media_id",+ "posthog_organization"."created_at",+ "posthog_organization"."updated_at",+ "posthog_organization"."is_active",+ "posthog_organization"."is_not_active_reason",+ "posthog_organization"."session_cookie_age",+ "posthog_organization"."is_member_join_email_enabled",+ "posthog_organization"."is_ai_data_processing_approved",+ "posthog_organization"."is_ai_training_opted_in",+ "posthog_organization"."is_ai_training_locked",+ "posthog_organization"."is_ai_training_cta_shown",+ "posthog_organization"."enforce_2fa",+ "posthog_organization"."members_can_invite",+ "posthog_organization"."members_can_create_projects",+ "posthog_organization"."members_can_use_personal_api_keys",+ "posthog_organization"."allow_publicly_shared_resources",+ "posthog_organization"."default_role_id",+ "posthog_organization"."plugins_access_level",+ "posthog_organization"."for_internal_metrics",+ "posthog_organization"."default_experiment_stats_method",+ "posthog_organization"."default_anonymize_ips",+ "posthog_organization"."is_hipaa",+ "posthog_organization"."is_pending_deletion",+ "posthog_organization"."customer_id",+ "posthog_organization"."available_product_features",+ "posthog_organization"."usage",+ "posthog_organization"."never_drop_data",+ "posthog_organization"."customer_trust_scores",+ "posthog_organization"."setup_section_2_completed",+ "posthog_organization"."personalization",+ "posthog_organization"."domain_whitelist",+ "posthog_organization"."is_platform"+ FROM "posthog_team"+ INNER JOIN "posthog_organization" ON ("posthog_team"."organization_id" = "posthog_organization"."id")+ WHERE "posthog_team"."id" = 99999+ LIMIT 21+ '''+# ---+# name: TestDashboard.test_listing_dashboards_is_not_nplus1.20+ '''+ SELECT "posthog_organization"."id",+ "posthog_organization"."name",+ "posthog_organization"."slug",+ "posthog_organization"."logo_media_id",+ "posthog_organization"."created_at",+ "posthog_organization"."updated_at",+ "posthog_organization"."is_active",+ "posthog_organization"."is_not_active_reason",+ "posthog_organization"."session_cookie_age",+ "posthog_organization"."is_member_join_email_enabled",+ "posthog_organization"."is_ai_data_processing_approved",+ "posthog_organization"."is_ai_training_opted_in","posthog_organization"."is_ai_training_locked","posthog_organization"."is_ai_training_cta_shown","posthog_organization"."enforce_2fa",@@ -4349,7 +3801,7 @@LIMIT 21'''# ----# name: TestDashboard.test_listing_dashboards_is_not_nplus1.31+# name: TestDashboard.test_listing_dashboards_is_not_nplus1.21'''SELECT "posthog_team"."id","posthog_team"."uuid",@@ -4487,7 +3939,7 @@LIMIT 21'''# ----# name: TestDashboard.test_listing_dashboards_is_not_nplus1.32+# name: TestDashboard.test_listing_dashboards_is_not_nplus1.22'''SELECT "posthog_organizationmembership"."id","posthog_organizationmembership"."organization_id",@@ -4538,7 +3990,7 @@LIMIT 21'''# ----# name: TestDashboard.test_listing_dashboards_is_not_nplus1.33+# name: TestDashboard.test_listing_dashboards_is_not_nplus1.23'''SELECT "ee_accesscontrol"."id","ee_accesscontrol"."team_id",@@ -4562,7 +4014,7 @@AND "ee_accesscontrol"."team_id" = 99999))'''# ----# name: TestDashboard.test_listing_dashboards_is_not_nplus1.34+# name: TestDashboard.test_listing_dashboards_is_not_nplus1.24'''SELECT "posthog_organizationmembership"."id","posthog_organizationmembership"."organization_id",@@ -4611,7 +4063,7 @@WHERE "posthog_organizationmembership"."user_id" = 99999'''# ----# name: TestDashboard.test_listing_dashboards_is_not_nplus1.35+# name: TestDashboard.test_listing_dashboards_is_not_nplus1.25'''SELECT COUNT(*) AS "__count"FROM "posthog_dashboard"@@ -4625,7 +4077,7 @@AND NOT ("posthog_dashboard"."creation_mode" = 'unlisted'))'''# ----# name: TestDashboard.test_listing_dashboards_is_not_nplus1.36+# name: TestDashboard.test_listing_dashboards_is_not_nplus1.26'''SELECT "posthog_dashboard"."id","posthog_dashboard"."name",@@ -4716,7 +4168,7 @@LIMIT 300'''# ----# name: TestDashboard.test_listing_dashboards_is_not_nplus1.37+# name: TestDashboard.test_listing_dashboards_is_not_nplus1.27'''SELECT "posthog_sharingconfiguration"."id","posthog_sharingconfiguration"."team_id",@@ -4739,7 +4191,7 @@5 /* ... */)'''# ----# name: TestDashboard.test_listing_dashboards_is_not_nplus1.38+# name: TestDashboard.test_listing_dashboards_is_not_nplus1.28'''SELECT "posthog_taggeditem"."id","posthog_taggeditem"."tag_id",@@ -4765,31 +4217,52 @@5 /* ... */)'''# ----# name: TestDashboard.test_listing_dashboards_is_not_nplus1.4+# name: TestDashboard.test_listing_dashboards_is_not_nplus1.29'''- SELECT "ee_accesscontrol"."id",- "ee_accesscontrol"."team_id",- "ee_accesscontrol"."access_level",- "ee_accesscontrol"."resource",- "ee_accesscontrol"."resource_id",- "ee_accesscontrol"."organization_member_id",- "ee_accesscontrol"."role_id",- "ee_accesscontrol"."created_by_id",- "ee_accesscontrol"."created_at",- "ee_accesscontrol"."updated_at",- "posthog_team"."organization_id" AS "_team_organization_id"- FROM "ee_accesscontrol"- INNER JOIN "posthog_team" ON ("ee_accesscontrol"."team_id" = "posthog_team"."id")- LEFT OUTER JOIN "posthog_organizationmembership" ON ("ee_accesscontrol"."organization_member_id" = "posthog_organizationmembership"."id")- WHERE (("ee_accesscontrol"."organization_member_id" IS NULL- AND "ee_accesscontrol"."role_id" IS NULL- AND "ee_accesscontrol"."team_id" = 99999)- OR ("posthog_organizationmembership"."user_id" = 99999- AND "ee_accesscontrol"."role_id" IS NULL- AND "ee_accesscontrol"."team_id" = 99999))+ SELECT "posthog_user"."id",+ "posthog_user"."password",+ "posthog_user"."last_login",+ "posthog_user"."first_name",+ "posthog_user"."last_name",+ "posthog_user"."is_staff",+ "posthog_user"."date_joined",+ "posthog_user"."uuid",+ "posthog_user"."current_organization_id",+ "posthog_user"."current_team_id",+ "posthog_user"."email",+ "posthog_user"."pending_email",+ "posthog_user"."distinct_id",+ "posthog_user"."is_email_verified",+ "posthog_user"."credentials_reviewed_at",+ "posthog_user"."requested_2fa_reset_at",+ "posthog_user"."has_seen_product_intro_for",+ "posthog_user"."strapi_id",+ "posthog_user"."is_active",+ "posthog_user"."role_at_organization",+ "posthog_user"."theme_mode",+ "posthog_user"."partial_notification_settings",+ "posthog_user"."anonymize_data",+ "posthog_user"."allow_impersonation",+ "posthog_user"."toolbar_mode",+ "posthog_user"."hedgehog_config",+ "posthog_user"."allow_sidebar_suggestions",+ "posthog_user"."shortcut_position",+ "posthog_user"."passkeys_enabled_for_2fa",+ "posthog_user"."hide_mcp_hints",+ "posthog_user"."onboarding_skipped_at",+ "posthog_user"."onboarding_skipped_reason",+ "posthog_user"."onboarding_skipped_organization_id",+ "posthog_user"."onboarding_delegated_to_invite_id",+ "posthog_user"."onboarding_delegated_to_organization_id",+ "posthog_user"."onboarding_delegation_accepted_at",+ "posthog_user"."events_column_config",+ "posthog_user"."email_opt_in"+ FROM "posthog_user"+ WHERE ("posthog_user"."is_active"+ AND "posthog_user"."id" = 99999)'''# ----# name: TestDashboard.test_listing_dashboards_is_not_nplus1.5+# name: TestDashboard.test_listing_dashboards_is_not_nplus1.3'''SELECT "posthog_organizationmembership"."id","posthog_organizationmembership"."organization_id",@@ -4835,92 +4308,54 @@"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+ 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.6+# name: TestDashboard.test_listing_dashboards_is_not_nplus1.30'''- SELECT "posthog_dashboard"."id",- "posthog_dashboard"."name",- "posthog_dashboard"."description",- "posthog_dashboard"."team_id",- "posthog_dashboard"."pinned",- "posthog_dashboard"."created_at",- "posthog_dashboard"."created_by_id",- "posthog_dashboard"."deleted",- "posthog_dashboard"."last_accessed_at",- "posthog_dashboard"."last_refresh",- "posthog_dashboard"."filters",- "posthog_dashboard"."variables",- "posthog_dashboard"."breakdown_colors",- "posthog_dashboard"."data_color_theme_id",- "posthog_dashboard"."creation_mode",- "posthog_dashboard"."restriction_level",- "posthog_dashboard"."quick_filter_ids",- "posthog_dashboard"."deprecated_tags",- "posthog_dashboard"."tags",- "posthog_dashboard"."share_token",- "posthog_dashboard"."is_shared"- FROM "posthog_dashboard"- INNER JOIN "posthog_team" ON ("posthog_dashboard"."team_id" = "posthog_team"."id")- WHERE (NOT ("posthog_dashboard"."deleted")- AND ("posthog_dashboard"."team_id" =- (SELECT U0."parent_team_id" AS "parent_team_id"- FROM "posthog_team" U0- WHERE U0."id" = 99999- LIMIT 1)- OR ("posthog_team"."parent_team_id" IS NULL- AND "posthog_dashboard"."team_id" = 99999))- AND "posthog_dashboard"."id" = 99999)+ SELECT "posthog_organization"."id",+ "posthog_organization"."name",+ "posthog_organization"."slug",+ "posthog_organization"."logo_media_id",+ "posthog_organization"."created_at",+ "posthog_organization"."updated_at",+ "posthog_organization"."is_active",+ "posthog_organization"."is_not_active_reason",+ "posthog_organization"."session_cookie_age",+ "posthog_organization"."is_member_join_email_enabled",+ "posthog_organization"."is_ai_data_processing_approved",+ "posthog_organization"."is_ai_training_opted_in",+ "posthog_organization"."is_ai_training_locked",+ "posthog_organization"."is_ai_training_cta_shown",+ "posthog_organization"."enforce_2fa",+ "posthog_organization"."members_can_invite",+ "posthog_organization"."members_can_create_projects",+ "posthog_organization"."members_can_use_personal_api_keys",+ "posthog_organization"."allow_publicly_shared_resources",+ "posthog_organization"."default_role_id",+ "posthog_organization"."plugins_access_level",+ "posthog_organization"."for_internal_metrics",+ "posthog_organization"."default_experiment_stats_method",+ "posthog_organization"."default_anonymize_ips",+ "posthog_organization"."is_hipaa",+ "posthog_organization"."is_pending_deletion",+ "posthog_organization"."customer_id",+ "posthog_organization"."available_product_features",+ "posthog_organization"."usage",+ "posthog_organization"."never_drop_data",+ "posthog_organization"."customer_trust_scores",+ "posthog_organization"."setup_section_2_completed",+ "posthog_organization"."personalization",+ "posthog_organization"."domain_whitelist",+ "posthog_organization"."is_platform"+ FROM "posthog_organization"+ WHERE "posthog_organization"."id" = '00000000-0000-0000-0000-000000000000'::uuidLIMIT 21'''# ----# name: TestDashboard.test_listing_dashboards_is_not_nplus1.7- '''- SELECT COUNT(*) AS "__count"- FROM "posthog_dashboardtile"- INNER JOIN "posthog_dashboard" ON ("posthog_dashboardtile"."dashboard_id" = "posthog_dashboard"."id")- WHERE (NOT ("posthog_dashboardtile"."deleted"- AND "posthog_dashboardtile"."deleted" IS NOT NULL)- AND NOT ("posthog_dashboard"."deleted")- AND "posthog_dashboardtile"."dashboard_id" = 99999- AND NOT ("posthog_dashboardtile"."deleted"- AND "posthog_dashboardtile"."deleted" IS NOT NULL))- '''-# ----# name: TestDashboard.test_listing_dashboards_is_not_nplus1.8- '''- SELECT "posthog_dashboard"."id",- "posthog_dashboard"."name",- "posthog_dashboard"."description",- "posthog_dashboard"."team_id",- "posthog_dashboard"."pinned",- "posthog_dashboard"."created_at",- "posthog_dashboard"."created_by_id",- "posthog_dashboard"."deleted",- "posthog_dashboard"."last_accessed_at",- "posthog_dashboard"."last_refresh",- "posthog_dashboard"."filters",- "posthog_dashboard"."variables",- "posthog_dashboard"."breakdown_colors",- "posthog_dashboard"."data_color_theme_id",- "posthog_dashboard"."creation_mode",- "posthog_dashboard"."restriction_level",- "posthog_dashboard"."quick_filter_ids",- "posthog_dashboard"."deprecated_tags",- "posthog_dashboard"."tags",- "posthog_dashboard"."share_token",- "posthog_dashboard"."is_shared"- FROM "posthog_dashboard"- WHERE (NOT ("posthog_dashboard"."deleted")- AND "posthog_dashboard"."id" IN (1,- 2,- 3,- 4,- 5 /* ... */))- '''-# ----# name: TestDashboard.test_listing_dashboards_is_not_nplus1.9+# name: TestDashboard.test_listing_dashboards_is_not_nplus1.31'''SELECT "posthog_team"."id","posthog_team"."uuid",@@ -5016,60 +4451,58 @@"posthog_team"."experiment_recalculation_time","posthog_team"."default_experiment_confidence_level","posthog_team"."default_experiment_stats_method",- "posthog_team"."business_model"+ "posthog_team"."business_model",+ "posthog_organization"."id",+ "posthog_organization"."name",+ "posthog_organization"."slug",+ "posthog_organization"."logo_media_id",+ "posthog_organization"."created_at",+ "posthog_organization"."updated_at",+ "posthog_organization"."is_active",+ "posthog_organization"."is_not_active_reason",+ "posthog_organization"."session_cookie_age",+ "posthog_organization"."is_member_join_email_enabled",+ "posthog_organization"."is_ai_data_processing_approved",+ "posthog_organization"."is_ai_training_opted_in",+ "posthog_organization"."is_ai_training_locked",+ "posthog_organization"."is_ai_training_cta_shown",+ "posthog_organization"."enforce_2fa",+ "posthog_organization"."members_can_invite",+ "posthog_organization"."members_can_create_projects",+ "posthog_organization"."members_can_use_personal_api_keys",+ "posthog_organization"."allow_publicly_shared_resources",+ "posthog_organization"."default_role_id",+ "posthog_organization"."plugins_access_level",+ "posthog_organization"."for_internal_metrics",+ "posthog_organization"."default_experiment_stats_method",+ "posthog_organization"."default_anonymize_ips",+ "posthog_organization"."is_hipaa",+ "posthog_organization"."is_pending_deletion",+ "posthog_organization"."customer_id",+ "posthog_organization"."available_product_features",+ "posthog_organization"."usage",+ "posthog_organization"."never_drop_data",+ "posthog_organization"."customer_trust_scores",+ "posthog_organization"."setup_section_2_completed",+ "posthog_organization"."personalization",+ "posthog_organization"."domain_whitelist",+ "posthog_organization"."is_platform"FROM "posthog_team"+ INNER JOIN "posthog_organization" ON ("posthog_team"."organization_id" = "posthog_organization"."id")WHERE "posthog_team"."id" = 99999LIMIT 21'''# ----# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles- '''- SELECT "posthog_user"."id",- "posthog_user"."password",- "posthog_user"."last_login",- "posthog_user"."first_name",- "posthog_user"."last_name",- "posthog_user"."is_staff",- "posthog_user"."date_joined",- "posthog_user"."uuid",- "posthog_user"."current_organization_id",- "posthog_user"."current_team_id",- "posthog_user"."email",- "posthog_user"."pending_email",- "posthog_user"."distinct_id",- "posthog_user"."is_email_verified",- "posthog_user"."credentials_reviewed_at",- "posthog_user"."requested_2fa_reset_at",- "posthog_user"."has_seen_product_intro_for",- "posthog_user"."strapi_id",- "posthog_user"."is_active",- "posthog_user"."role_at_organization",- "posthog_user"."theme_mode",- "posthog_user"."partial_notification_settings",- "posthog_user"."anonymize_data",- "posthog_user"."allow_impersonation",- "posthog_user"."toolbar_mode",- "posthog_user"."hedgehog_config",- "posthog_user"."allow_sidebar_suggestions",- "posthog_user"."shortcut_position",- "posthog_user"."passkeys_enabled_for_2fa",- "posthog_user"."hide_mcp_hints",- "posthog_user"."onboarding_skipped_at",- "posthog_user"."onboarding_skipped_reason",- "posthog_user"."onboarding_skipped_organization_id",- "posthog_user"."onboarding_delegated_to_invite_id",- "posthog_user"."onboarding_delegated_to_organization_id",- "posthog_user"."onboarding_delegation_accepted_at",- "posthog_user"."events_column_config",- "posthog_user"."email_opt_in"- FROM "posthog_user"- WHERE ("posthog_user"."is_active"- AND "posthog_user"."id" = 99999)- '''-# ----# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.1+# name: TestDashboard.test_listing_dashboards_is_not_nplus1.32'''- SELECT "posthog_organization"."id",+ SELECT "posthog_organizationmembership"."id",+ "posthog_organizationmembership"."organization_id",+ "posthog_organizationmembership"."user_id",+ "posthog_organizationmembership"."level",+ "posthog_organizationmembership"."joined_at",+ "posthog_organizationmembership"."updated_at",+ "posthog_organizationmembership"."invited_by_id",+ "posthog_organization"."id","posthog_organization"."name","posthog_organization"."slug","posthog_organization"."logo_media_id",@@ -5104,39 +4537,47 @@"posthog_organization"."personalization","posthog_organization"."domain_whitelist","posthog_organization"."is_platform"- FROM "posthog_organization"- WHERE "posthog_organization"."id" = '00000000-0000-0000-0000-000000000000'::uuid+ FROM "posthog_organizationmembership"+ INNER JOIN "posthog_organization" ON ("posthog_organizationmembership"."organization_id" = "posthog_organization"."id")+ WHERE ("posthog_organizationmembership"."organization_id" = '00000000-0000-0000-0000-000000000000'::uuid+ AND "posthog_organizationmembership"."user_id" = 99999)LIMIT 21'''# ----# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.10+# name: TestDashboard.test_listing_dashboards_is_not_nplus1.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))+ SELECT "ee_accesscontrol"."id",+ "ee_accesscontrol"."team_id",+ "ee_accesscontrol"."access_level",+ "ee_accesscontrol"."resource",+ "ee_accesscontrol"."resource_id",+ "ee_accesscontrol"."organization_member_id",+ "ee_accesscontrol"."role_id",+ "ee_accesscontrol"."created_by_id",+ "ee_accesscontrol"."created_at",+ "ee_accesscontrol"."updated_at",+ "posthog_team"."organization_id" AS "_team_organization_id"+ FROM "ee_accesscontrol"+ INNER JOIN "posthog_team" ON ("ee_accesscontrol"."team_id" = "posthog_team"."id")+ LEFT OUTER JOIN "posthog_organizationmembership" ON ("ee_accesscontrol"."organization_member_id" = "posthog_organizationmembership"."id")+ WHERE (("ee_accesscontrol"."organization_member_id" IS NULL+ AND "ee_accesscontrol"."role_id" IS NULL+ AND "ee_accesscontrol"."team_id" = 99999)+ OR ("posthog_organizationmembership"."user_id" = 99999+ AND "ee_accesscontrol"."role_id" IS NULL+ AND "ee_accesscontrol"."team_id" = 99999))'''# ----# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.100+# name: TestDashboard.test_listing_dashboards_is_not_nplus1.34'''- SELECT "posthog_organization"."id",+ SELECT "posthog_organizationmembership"."id",+ "posthog_organizationmembership"."organization_id",+ "posthog_organizationmembership"."user_id",+ "posthog_organizationmembership"."level",+ "posthog_organizationmembership"."joined_at",+ "posthog_organizationmembership"."updated_at",+ "posthog_organizationmembership"."invited_by_id",+ "posthog_organization"."id","posthog_organization"."name","posthog_organization"."slug","posthog_organization"."logo_media_id",@@ -5171,195 +4612,26 @@"posthog_organization"."personalization","posthog_organization"."domain_whitelist","posthog_organization"."is_platform"- FROM "posthog_organization"- WHERE "posthog_organization"."id" = '00000000-0000-0000-0000-000000000000'::uuid- LIMIT 21- '''-# ----# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.101- '''- SELECT "posthog_team"."id",- "posthog_team"."uuid",- "posthog_team"."organization_id",- "posthog_team"."parent_team_id",- "posthog_team"."project_id",- "posthog_team"."api_token",- "posthog_team"."app_urls",- "posthog_team"."name",- "posthog_team"."slack_incoming_webhook",- "posthog_team"."created_at",- "posthog_team"."updated_at",- "posthog_team"."anonymize_ips",- "posthog_team"."completed_snippet_onboarding",- "posthog_team"."has_completed_onboarding_for",- "posthog_team"."onboarding_tasks",- "posthog_team"."ingested_event",- "posthog_team"."ingested_production_event",- "posthog_team"."ingested_production_event_last_checked_at",- "posthog_team"."person_processing_opt_out",- "posthog_team"."secret_api_token",- "posthog_team"."secret_api_token_backup",- "posthog_team"."session_recording_opt_in",- "posthog_team"."session_recording_sample_rate",- "posthog_team"."session_recording_minimum_duration_milliseconds",- "posthog_team"."session_recording_linked_flag",- "posthog_team"."session_recording_network_payload_capture_config",- "posthog_team"."session_recording_masking_config",- "posthog_team"."session_recording_url_trigger_config",- "posthog_team"."session_recording_url_blocklist_config",- "posthog_team"."session_recording_event_trigger_config",- "posthog_team"."session_recording_trigger_match_type_config",- "posthog_team"."session_recording_trigger_groups",- "posthog_team"."session_replay_config",- "posthog_team"."session_recording_retention_period",- "posthog_team"."event_retention_months",- "posthog_team"."conversations_enabled",- "posthog_team"."conversations_settings",- "posthog_team"."proactive_tasks_enabled",- "posthog_team"."survey_config",- "posthog_team"."surveys_opt_in",- "posthog_team"."product_tours_opt_in",- "posthog_team"."capture_console_log_opt_in",- "posthog_team"."capture_performance_opt_in",- "posthog_team"."capture_dead_clicks",- "posthog_team"."autocapture_opt_out",- "posthog_team"."autocapture_web_vitals_opt_in",- "posthog_team"."autocapture_web_vitals_allowed_metrics",- "posthog_team"."autocapture_exceptions_opt_in",- "posthog_team"."autocapture_exceptions_errors_to_ignore",- "posthog_team"."logs_settings",- "posthog_team"."llm_gateway_enabled_at",- "posthog_team"."llm_gateway_revoked_at",- "posthog_team"."llm_gateway_overspend_allowance_usd",- "posthog_team"."heatmaps_opt_in",- "posthog_team"."receive_org_level_activity_logs",- "posthog_team"."web_analytics_pre_aggregated_tables_enabled",- "posthog_team"."web_analytics_pre_aggregated_tables_version",- "posthog_team"."flags_persistence_default",- "posthog_team"."feature_flag_confirmation_enabled",- "posthog_team"."feature_flag_confirmation_message",- "posthog_team"."default_evaluation_environments_enabled",- "posthog_team"."require_evaluation_environment_tags",- "posthog_team"."default_evaluation_contexts_enabled",- "posthog_team"."require_evaluation_contexts",- "posthog_team"."session_recording_version",- "posthog_team"."signup_token",- "posthog_team"."is_demo",- "posthog_team"."access_control",- "posthog_team"."week_start_day",- "posthog_team"."inject_web_apps",- "posthog_team"."test_account_filters",- "posthog_team"."test_account_filters_default_checked",- "posthog_team"."path_cleaning_filters",- "posthog_team"."timezone",- "posthog_team"."data_attributes",- "posthog_team"."person_display_name_properties",- "posthog_team"."live_events_columns",- "posthog_team"."recording_domains",- "posthog_team"."human_friendly_comparison_periods",- "posthog_team"."cookieless_server_hash_mode",- "posthog_team"."primary_dashboard_id",- "posthog_team"."default_data_theme",- "posthog_team"."extra_settings",- "posthog_team"."modifiers",- "posthog_team"."correlation_config",- "posthog_team"."session_recording_retention_period_days",- "posthog_team"."external_data_workspace_id",- "posthog_team"."external_data_workspace_last_synced_at",- "posthog_team"."api_query_rate_limit",- "posthog_team"."drop_events_older_than",- "posthog_team"."base_currency",- "posthog_team"."experiment_recalculation_time",- "posthog_team"."default_experiment_confidence_level",- "posthog_team"."default_experiment_stats_method",- "posthog_team"."business_model"- FROM "posthog_team"- WHERE "posthog_team"."id" = 99999- LIMIT 21- '''-# ----# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.102- '''- SELECT "posthog_dashboardtile"."id",- "posthog_dashboardtile"."dashboard_id",- "posthog_dashboardtile"."insight_id",- "posthog_dashboardtile"."text_id",- "posthog_dashboardtile"."button_tile_id",- "posthog_dashboardtile"."widget_id",- "posthog_dashboardtile"."team_id",- "posthog_dashboardtile"."layouts",- "posthog_dashboardtile"."color",- "posthog_dashboardtile"."filters_hash",- "posthog_dashboardtile"."last_refresh",- "posthog_dashboardtile"."refreshing",- "posthog_dashboardtile"."refresh_attempt",- "posthog_dashboardtile"."filters_overrides",- "posthog_dashboardtile"."show_description",- "posthog_dashboardtile"."transparent_background",- "posthog_dashboardtile"."deleted"- FROM "posthog_dashboardtile"- INNER JOIN "posthog_dashboard" ON ("posthog_dashboardtile"."dashboard_id" = "posthog_dashboard"."id")- WHERE (NOT ("posthog_dashboardtile"."deleted"- AND "posthog_dashboardtile"."deleted" IS NOT NULL)- AND NOT ("posthog_dashboard"."deleted")- AND "posthog_dashboardtile"."insight_id" = 99999)- '''-# ----# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.103- '''- SELECT "posthog_dashboardtile"."id",- "posthog_dashboardtile"."dashboard_id",- "posthog_dashboardtile"."insight_id",- "posthog_dashboardtile"."text_id",- "posthog_dashboardtile"."button_tile_id",- "posthog_dashboardtile"."widget_id",- "posthog_dashboardtile"."team_id",- "posthog_dashboardtile"."layouts",- "posthog_dashboardtile"."color",- "posthog_dashboardtile"."filters_hash",- "posthog_dashboardtile"."last_refresh",- "posthog_dashboardtile"."refreshing",- "posthog_dashboardtile"."refresh_attempt",- "posthog_dashboardtile"."filters_overrides",- "posthog_dashboardtile"."show_description",- "posthog_dashboardtile"."transparent_background",- "posthog_dashboardtile"."deleted"- FROM "posthog_dashboardtile"- INNER JOIN "posthog_dashboard" ON ("posthog_dashboardtile"."dashboard_id" = "posthog_dashboard"."id")- WHERE (NOT ("posthog_dashboardtile"."deleted"- AND "posthog_dashboardtile"."deleted" IS NOT NULL)- AND NOT ("posthog_dashboard"."deleted")- AND "posthog_dashboardtile"."insight_id" = 99999)- '''-# ----# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.104- '''- SELECT "posthog_insightvariable"."created_by_id",- "posthog_insightvariable"."created_at",- "posthog_insightvariable"."updated_at",- "posthog_insightvariable"."id",- "posthog_insightvariable"."team_id",- "posthog_insightvariable"."name",- "posthog_insightvariable"."code_name",- "posthog_insightvariable"."type",- "posthog_insightvariable"."default_value",- "posthog_insightvariable"."values"- FROM "posthog_insightvariable"- WHERE "posthog_insightvariable"."team_id" = 99999+ FROM "posthog_organizationmembership"+ INNER JOIN "posthog_organization" ON ("posthog_organizationmembership"."organization_id" = "posthog_organization"."id")+ WHERE "posthog_organizationmembership"."user_id" = 99999'''# ----# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.105+# name: TestDashboard.test_listing_dashboards_is_not_nplus1.35'''- 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)+ 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" = 99999AND NOT ("posthog_dashboard"."deleted")- AND "posthog_dashboardtile"."insight_id" = 99999)+ AND NOT ("posthog_dashboard"."creation_mode" = 'unlisted'))'''# ----# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.106+# name: TestDashboard.test_listing_dashboards_is_not_nplus1.36'''SELECT "posthog_dashboard"."id","posthog_dashboard"."name",@@ -5381,72 +4653,158 @@"posthog_dashboard"."deprecated_tags","posthog_dashboard"."tags","posthog_dashboard"."share_token",- "posthog_dashboard"."is_shared"+ "posthog_dashboard"."is_shared",+ recent_dashboard_views."viewed_at" AS "last_viewed_at",+ ("posthog_dashboard"."id")::varchar AS "_ref_id",++ (SELECT U0."path" AS "path"+ FROM "posthog_filesystem" U0+ WHERE ((U0."surface" IS NULL+ OR U0."surface" = 'web')+ AND U0."ref" = ("posthog_dashboard"."id")::varchar+ AND U0."team_id" = ("posthog_dashboard"."team_id")+ AND U0."type" = 'dashboard'+ AND NOT (U0."shortcut"+ AND U0."shortcut" IS NOT NULL))+ ORDER BY U0."id" ASC+ LIMIT 1) AS "_folder_path",+ T6."id",+ T6."password",+ T6."last_login",+ T6."first_name",+ T6."last_name",+ T6."is_staff",+ T6."date_joined",+ T6."uuid",+ T6."current_organization_id",+ T6."current_team_id",+ T6."email",+ T6."pending_email",+ T6."distinct_id",+ T6."is_email_verified",+ T6."credentials_reviewed_at",+ T6."requested_password_reset_at",+ T6."requested_2fa_reset_at",+ T6."has_seen_product_intro_for",+ T6."strapi_id",+ T6."is_active",+ T6."role_at_organization",+ T6."theme_mode",+ T6."partial_notification_settings",+ T6."anonymize_data",+ T6."allow_impersonation",+ T6."toolbar_mode",+ T6."hedgehog_config",+ T6."allow_sidebar_suggestions",+ T6."shortcut_position",+ T6."passkeys_enabled_for_2fa",+ T6."hide_mcp_hints",+ T6."onboarding_skipped_at",+ T6."onboarding_skipped_reason",+ T6."onboarding_skipped_organization_id",+ T6."onboarding_delegated_to_invite_id",+ T6."onboarding_delegated_to_organization_id",+ T6."onboarding_delegation_accepted_at",+ T6."events_column_config",+ T6."email_opt_in"FROM "posthog_dashboard"- WHERE (NOT ("posthog_dashboard"."deleted")- AND "posthog_dashboard"."id" IN (1,- 2,- 3,- 4,- 5 /* ... */))- '''-# ----# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.107+ INNER JOIN "posthog_team" ON ("posthog_dashboard"."team_id" = "posthog_team"."id")+ LEFT OUTER JOIN "posthog_filesystemviewlog" recent_dashboard_views ON ("posthog_team"."id" = recent_dashboard_views."team_id"+ AND ((recent_dashboard_views."user_id" = 99999+ AND recent_dashboard_views."type" = 'dashboard'+ AND recent_dashboard_views."ref" = ("posthog_dashboard"."id")::varchar)))+ LEFT OUTER JOIN "posthog_user" T6 ON ("posthog_dashboard"."created_by_id" = T6."id")+ WHERE ("posthog_team"."project_id" = 99999+ AND NOT ("posthog_dashboard"."deleted")+ AND NOT ("posthog_dashboard"."creation_mode" = 'unlisted'))+ ORDER BY "posthog_dashboard"."pinned" DESC,+ "posthog_dashboard"."name" ASC+ LIMIT 300'''- SELECT "posthog_tag"."name" AS "tag__name"+# ---+# name: TestDashboard.test_listing_dashboards_is_not_nplus1.37+ '''+ SELECT "posthog_sharingconfiguration"."id",+ "posthog_sharingconfiguration"."team_id",+ "posthog_sharingconfiguration"."dashboard_id",+ "posthog_sharingconfiguration"."insight_id",+ "posthog_sharingconfiguration"."recording_id",+ "posthog_sharingconfiguration"."notebook_id",+ "posthog_sharingconfiguration"."interviewee_context_id",+ "posthog_sharingconfiguration"."created_at",+ "posthog_sharingconfiguration"."enabled",+ "posthog_sharingconfiguration"."access_token",+ "posthog_sharingconfiguration"."expires_at",+ "posthog_sharingconfiguration"."settings",+ "posthog_sharingconfiguration"."password_required"+ FROM "posthog_sharingconfiguration"+ WHERE "posthog_sharingconfiguration"."dashboard_id" IN (1,+ 2,+ 3,+ 4,+ 5 /* ... */)+ '''+# ---+# name: TestDashboard.test_listing_dashboards_is_not_nplus1.38+ '''+ SELECT "posthog_taggeditem"."id",+ "posthog_taggeditem"."tag_id",+ "posthog_taggeditem"."dashboard_id",+ "posthog_taggeditem"."insight_id",+ "posthog_taggeditem"."event_definition_id",+ "posthog_taggeditem"."property_definition_id",+ "posthog_taggeditem"."action_id",+ "posthog_taggeditem"."feature_flag_id",+ "posthog_taggeditem"."experiment_saved_metric_id",+ "posthog_taggeditem"."ticket_id",+ "posthog_taggeditem"."account_id",+ "posthog_taggeditem"."endpoint_id",+ "posthog_tag"."id",+ "posthog_tag"."name",+ "posthog_tag"."team_id"FROM "posthog_taggeditem"INNER JOIN "posthog_tag" ON ("posthog_taggeditem"."tag_id" = "posthog_tag"."id")- WHERE "posthog_taggeditem"."insight_id" = 99999+ WHERE "posthog_taggeditem"."dashboard_id" IN (1,+ 2,+ 3,+ 4,+ 5 /* ... */)'''# ----# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.108+# name: TestDashboard.test_listing_dashboards_is_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"."onboarding_skipped_at",- "posthog_user"."onboarding_skipped_reason",- "posthog_user"."onboarding_skipped_organization_id",- "posthog_user"."onboarding_delegated_to_invite_id",- "posthog_user"."onboarding_delegated_to_organization_id",- "posthog_user"."onboarding_delegation_accepted_at",- "posthog_user"."events_column_config",- "posthog_user"."email_opt_in"- FROM "posthog_user"- WHERE ("posthog_user"."is_active"- AND "posthog_user"."id" = 99999)+ SELECT "ee_accesscontrol"."id",+ "ee_accesscontrol"."team_id",+ "ee_accesscontrol"."access_level",+ "ee_accesscontrol"."resource",+ "ee_accesscontrol"."resource_id",+ "ee_accesscontrol"."organization_member_id",+ "ee_accesscontrol"."role_id",+ "ee_accesscontrol"."created_by_id",+ "ee_accesscontrol"."created_at",+ "ee_accesscontrol"."updated_at",+ "posthog_team"."organization_id" AS "_team_organization_id"+ FROM "ee_accesscontrol"+ INNER JOIN "posthog_team" ON ("ee_accesscontrol"."team_id" = "posthog_team"."id")+ LEFT OUTER JOIN "posthog_organizationmembership" ON ("ee_accesscontrol"."organization_member_id" = "posthog_organizationmembership"."id")+ WHERE (("ee_accesscontrol"."organization_member_id" IS NULL+ AND "ee_accesscontrol"."role_id" IS NULL+ AND "ee_accesscontrol"."team_id" = 99999)+ OR ("posthog_organizationmembership"."user_id" = 99999+ AND "ee_accesscontrol"."role_id" IS NULL+ AND "ee_accesscontrol"."team_id" = 99999))'''# ----# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.109+# name: TestDashboard.test_listing_dashboards_is_not_nplus1.5'''- SELECT "posthog_organization"."id",+ SELECT "posthog_organizationmembership"."id",+ "posthog_organizationmembership"."organization_id",+ "posthog_organizationmembership"."user_id",+ "posthog_organizationmembership"."level",+ "posthog_organizationmembership"."joined_at",+ "posthog_organizationmembership"."updated_at",+ "posthog_organizationmembership"."invited_by_id",+ "posthog_organization"."id","posthog_organization"."name","posthog_organization"."slug","posthog_organization"."logo_media_id",@@ -5481,23 +4839,94 @@"posthog_organization"."personalization","posthog_organization"."domain_whitelist","posthog_organization"."is_platform"- FROM "posthog_organization"- WHERE "posthog_organization"."id" = '00000000-0000-0000-0000-000000000000'::uuid+ FROM "posthog_organizationmembership"+ INNER JOIN "posthog_organization" ON ("posthog_organizationmembership"."organization_id" = "posthog_organization"."id")+ WHERE "posthog_organizationmembership"."user_id" = 99999+ '''+# ---+# name: TestDashboard.test_listing_dashboards_is_not_nplus1.6+ '''+ SELECT "posthog_dashboard"."id",+ "posthog_dashboard"."name",+ "posthog_dashboard"."description",+ "posthog_dashboard"."team_id",+ "posthog_dashboard"."pinned",+ "posthog_dashboard"."created_at",+ "posthog_dashboard"."created_by_id",+ "posthog_dashboard"."deleted",+ "posthog_dashboard"."last_accessed_at",+ "posthog_dashboard"."last_refresh",+ "posthog_dashboard"."filters",+ "posthog_dashboard"."variables",+ "posthog_dashboard"."breakdown_colors",+ "posthog_dashboard"."data_color_theme_id",+ "posthog_dashboard"."creation_mode",+ "posthog_dashboard"."restriction_level",+ "posthog_dashboard"."quick_filter_ids",+ "posthog_dashboard"."deprecated_tags",+ "posthog_dashboard"."tags",+ "posthog_dashboard"."share_token",+ "posthog_dashboard"."is_shared"+ FROM "posthog_dashboard"+ INNER JOIN "posthog_team" ON ("posthog_dashboard"."team_id" = "posthog_team"."id")+ WHERE (NOT ("posthog_dashboard"."deleted")+ AND ("posthog_dashboard"."team_id" =+ (SELECT U0."parent_team_id" AS "parent_team_id"+ FROM "posthog_team" U0+ WHERE U0."id" = 99999+ LIMIT 1)+ OR ("posthog_team"."parent_team_id" IS NULL+ AND "posthog_dashboard"."team_id" = 99999))+ AND "posthog_dashboard"."id" = 99999)LIMIT 21'''# ----# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.11+# name: TestDashboard.test_listing_dashboards_is_not_nplus1.7'''- SELECT "posthog_dashboardtile"."id" AS "pk"+ 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 "posthog_dashboardtile"."dashboard_id" = 99999+ AND NOT ("posthog_dashboardtile"."deleted"+ AND "posthog_dashboardtile"."deleted" IS NOT NULL))'''# ----# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.110+# name: TestDashboard.test_listing_dashboards_is_not_nplus1.8+ '''+ SELECT "posthog_dashboard"."id",+ "posthog_dashboard"."name",+ "posthog_dashboard"."description",+ "posthog_dashboard"."team_id",+ "posthog_dashboard"."pinned",+ "posthog_dashboard"."created_at",+ "posthog_dashboard"."created_by_id",+ "posthog_dashboard"."deleted",+ "posthog_dashboard"."last_accessed_at",+ "posthog_dashboard"."last_refresh",+ "posthog_dashboard"."filters",+ "posthog_dashboard"."variables",+ "posthog_dashboard"."breakdown_colors",+ "posthog_dashboard"."data_color_theme_id",+ "posthog_dashboard"."creation_mode",+ "posthog_dashboard"."restriction_level",+ "posthog_dashboard"."quick_filter_ids",+ "posthog_dashboard"."deprecated_tags",+ "posthog_dashboard"."tags",+ "posthog_dashboard"."share_token",+ "posthog_dashboard"."is_shared"+ FROM "posthog_dashboard"+ WHERE (NOT ("posthog_dashboard"."deleted")+ AND "posthog_dashboard"."id" IN (1,+ 2,+ 3,+ 4,+ 5 /* ... */))+ '''+# ---+# name: TestDashboard.test_listing_dashboards_is_not_nplus1.9'''SELECT "posthog_team"."id","posthog_team"."uuid",@@ -5593,58 +5022,60 @@"posthog_team"."experiment_recalculation_time","posthog_team"."default_experiment_confidence_level","posthog_team"."default_experiment_stats_method",- "posthog_team"."business_model",- "posthog_organization"."id",- "posthog_organization"."name",- "posthog_organization"."slug",- "posthog_organization"."logo_media_id",- "posthog_organization"."created_at",- "posthog_organization"."updated_at",- "posthog_organization"."is_active",- "posthog_organization"."is_not_active_reason",- "posthog_organization"."session_cookie_age",- "posthog_organization"."is_member_join_email_enabled",- "posthog_organization"."is_ai_data_processing_approved",- "posthog_organization"."is_ai_training_opted_in",- "posthog_organization"."is_ai_training_locked",- "posthog_organization"."is_ai_training_cta_shown",- "posthog_organization"."enforce_2fa",- "posthog_organization"."members_can_invite",- "posthog_organization"."members_can_create_projects",- "posthog_organization"."members_can_use_personal_api_keys",- "posthog_organization"."allow_publicly_shared_resources",- "posthog_organization"."default_role_id",- "posthog_organization"."plugins_access_level",- "posthog_organization"."for_internal_metrics",- "posthog_organization"."default_experiment_stats_method",- "posthog_organization"."default_anonymize_ips",- "posthog_organization"."is_hipaa",- "posthog_organization"."is_pending_deletion",- "posthog_organization"."customer_id",- "posthog_organization"."available_product_features",- "posthog_organization"."usage",- "posthog_organization"."never_drop_data",- "posthog_organization"."customer_trust_scores",- "posthog_organization"."setup_section_2_completed",- "posthog_organization"."personalization",- "posthog_organization"."domain_whitelist",- "posthog_organization"."is_platform"+ "posthog_team"."business_model"FROM "posthog_team"- INNER JOIN "posthog_organization" ON ("posthog_team"."organization_id" = "posthog_organization"."id")WHERE "posthog_team"."id" = 99999LIMIT 21'''# ----# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.111+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles'''- SELECT "posthog_organizationmembership"."id",- "posthog_organizationmembership"."organization_id",- "posthog_organizationmembership"."user_id",- "posthog_organizationmembership"."level",- "posthog_organizationmembership"."joined_at",- "posthog_organizationmembership"."updated_at",- "posthog_organizationmembership"."invited_by_id",- "posthog_organization"."id",+ SELECT "posthog_user"."id",+ "posthog_user"."password",+ "posthog_user"."last_login",+ "posthog_user"."first_name",+ "posthog_user"."last_name",+ "posthog_user"."is_staff",+ "posthog_user"."date_joined",+ "posthog_user"."uuid",+ "posthog_user"."current_organization_id",+ "posthog_user"."current_team_id",+ "posthog_user"."email",+ "posthog_user"."pending_email",+ "posthog_user"."distinct_id",+ "posthog_user"."is_email_verified",+ "posthog_user"."credentials_reviewed_at",+ "posthog_user"."requested_2fa_reset_at",+ "posthog_user"."has_seen_product_intro_for",+ "posthog_user"."strapi_id",+ "posthog_user"."is_active",+ "posthog_user"."role_at_organization",+ "posthog_user"."theme_mode",+ "posthog_user"."partial_notification_settings",+ "posthog_user"."anonymize_data",+ "posthog_user"."allow_impersonation",+ "posthog_user"."toolbar_mode",+ "posthog_user"."hedgehog_config",+ "posthog_user"."allow_sidebar_suggestions",+ "posthog_user"."shortcut_position",+ "posthog_user"."passkeys_enabled_for_2fa",+ "posthog_user"."hide_mcp_hints",+ "posthog_user"."onboarding_skipped_at",+ "posthog_user"."onboarding_skipped_reason",+ "posthog_user"."onboarding_skipped_organization_id",+ "posthog_user"."onboarding_delegated_to_invite_id",+ "posthog_user"."onboarding_delegated_to_organization_id",+ "posthog_user"."onboarding_delegation_accepted_at",+ "posthog_user"."events_column_config",+ "posthog_user"."email_opt_in"+ FROM "posthog_user"+ WHERE ("posthog_user"."is_active"+ AND "posthog_user"."id" = 99999)+ '''+# ---+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.1+ '''+ SELECT "posthog_organization"."id","posthog_organization"."name","posthog_organization"."slug","posthog_organization"."logo_media_id",@@ -5679,47 +5110,92 @@"posthog_organization"."personalization","posthog_organization"."domain_whitelist","posthog_organization"."is_platform"- FROM "posthog_organizationmembership"- INNER JOIN "posthog_organization" ON ("posthog_organizationmembership"."organization_id" = "posthog_organization"."id")- WHERE ("posthog_organizationmembership"."organization_id" = '00000000-0000-0000-0000-000000000000'::uuid- AND "posthog_organizationmembership"."user_id" = 99999)+ FROM "posthog_organization"+ WHERE "posthog_organization"."id" = '00000000-0000-0000-0000-000000000000'::uuidLIMIT 21'''# ----# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.112+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.10'''- SELECT "ee_accesscontrol"."id",- "ee_accesscontrol"."team_id",- "ee_accesscontrol"."access_level",- "ee_accesscontrol"."resource",- "ee_accesscontrol"."resource_id",- "ee_accesscontrol"."organization_member_id",- "ee_accesscontrol"."role_id",- "ee_accesscontrol"."created_by_id",- "ee_accesscontrol"."created_at",- "ee_accesscontrol"."updated_at",- "posthog_team"."organization_id" AS "_team_organization_id"- FROM "ee_accesscontrol"- INNER JOIN "posthog_team" ON ("ee_accesscontrol"."team_id" = "posthog_team"."id")- LEFT OUTER JOIN "posthog_organizationmembership" ON ("ee_accesscontrol"."organization_member_id" = "posthog_organizationmembership"."id")- WHERE (("ee_accesscontrol"."organization_member_id" IS NULL- AND "ee_accesscontrol"."role_id" IS NULL- AND "ee_accesscontrol"."team_id" = 99999)- OR ("posthog_organizationmembership"."user_id" = 99999- AND "ee_accesscontrol"."role_id" IS NULL- AND "ee_accesscontrol"."team_id" = 99999))+ SELECT "posthog_filesystem"."team_id",+ "posthog_filesystem"."id",+ "posthog_filesystem"."path",+ "posthog_filesystem"."depth",+ "posthog_filesystem"."type",+ "posthog_filesystem"."ref",+ "posthog_filesystem"."href",+ "posthog_filesystem"."shortcut",+ "posthog_filesystem"."meta",+ "posthog_filesystem"."created_at",+ "posthog_filesystem"."created_by_id",+ "posthog_filesystem"."surface",+ "posthog_filesystem"."project_id"+ FROM "posthog_filesystem"+ WHERE (("posthog_filesystem"."surface" IS NULL+ OR "posthog_filesystem"."surface" = 'web')+ AND "posthog_filesystem"."ref" = '0001'+ AND "posthog_filesystem"."team_id" = 99999+ AND "posthog_filesystem"."type" = 'dashboard'+ AND NOT ("posthog_filesystem"."shortcut"+ AND "posthog_filesystem"."shortcut" IS NOT NULL))'''# ----# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.113+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.100'''- 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_tag"."name" AS "tag__name"+ FROM "posthog_taggeditem"+ INNER JOIN "posthog_tag" ON ("posthog_taggeditem"."tag_id" = "posthog_tag"."id")+ WHERE "posthog_taggeditem"."insight_id" = 99999+ '''+# ---+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.101+ '''+ SELECT "posthog_user"."id",+ "posthog_user"."password",+ "posthog_user"."last_login",+ "posthog_user"."first_name",+ "posthog_user"."last_name",+ "posthog_user"."is_staff",+ "posthog_user"."date_joined",+ "posthog_user"."uuid",+ "posthog_user"."current_organization_id",+ "posthog_user"."current_team_id",+ "posthog_user"."email",+ "posthog_user"."pending_email",+ "posthog_user"."distinct_id",+ "posthog_user"."is_email_verified",+ "posthog_user"."credentials_reviewed_at",+ "posthog_user"."requested_2fa_reset_at",+ "posthog_user"."has_seen_product_intro_for",+ "posthog_user"."strapi_id",+ "posthog_user"."is_active",+ "posthog_user"."role_at_organization",+ "posthog_user"."theme_mode",+ "posthog_user"."partial_notification_settings",+ "posthog_user"."anonymize_data",+ "posthog_user"."allow_impersonation",+ "posthog_user"."toolbar_mode",+ "posthog_user"."hedgehog_config",+ "posthog_user"."allow_sidebar_suggestions",+ "posthog_user"."shortcut_position",+ "posthog_user"."passkeys_enabled_for_2fa",+ "posthog_user"."hide_mcp_hints",+ "posthog_user"."onboarding_skipped_at",+ "posthog_user"."onboarding_skipped_reason",+ "posthog_user"."onboarding_skipped_organization_id",+ "posthog_user"."onboarding_delegated_to_invite_id",+ "posthog_user"."onboarding_delegated_to_organization_id",+ "posthog_user"."onboarding_delegation_accepted_at",+ "posthog_user"."events_column_config",+ "posthog_user"."email_opt_in"+ FROM "posthog_user"+ WHERE ("posthog_user"."is_active"+ AND "posthog_user"."id" = 99999)+ '''+# ---+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.102+ '''+ SELECT "posthog_organization"."id","posthog_organization"."name","posthog_organization"."slug","posthog_organization"."logo_media_id",@@ -5754,115 +5230,12 @@"posthog_organization"."personalization","posthog_organization"."domain_whitelist","posthog_organization"."is_platform"- FROM "posthog_organizationmembership"- INNER JOIN "posthog_organization" ON ("posthog_organizationmembership"."organization_id" = "posthog_organization"."id")- WHERE "posthog_organizationmembership"."user_id" = 99999- '''-# ----# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.114- '''- SELECT "ee_accesscontrol"."team_id" AS "team_id",- "ee_accesscontrol"."resource_id" AS "resource_id",- "ee_accesscontrol"."organization_member_id" AS "organization_member_id",- "ee_accesscontrol"."role_id" AS "role_id",- "ee_accesscontrol"."access_level" AS "access_level"- FROM "ee_accesscontrol"- INNER JOIN "posthog_team" ON ("ee_accesscontrol"."team_id" = "posthog_team"."id")- WHERE ("ee_accesscontrol"."resource" = 'project'- AND "posthog_team"."organization_id" IN ('00000000-0000-0000-0000-000000000000'::uuid))- '''-# ----# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.115- '''- SELECT "ee_rolemembership"."organization_member_id" AS "organization_member_id",- "ee_rolemembership"."role_id" AS "role_id"- FROM "ee_rolemembership"- WHERE "ee_rolemembership"."user_id" = 99999- '''-# ----# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.116- '''- SELECT "posthog_dashboard"."id",- "posthog_dashboard"."name",- "posthog_dashboard"."description",- "posthog_dashboard"."team_id",- "posthog_dashboard"."pinned",- "posthog_dashboard"."created_at",- "posthog_dashboard"."created_by_id",- "posthog_dashboard"."deleted",- "posthog_dashboard"."last_accessed_at",- "posthog_dashboard"."last_refresh",- "posthog_dashboard"."filters",- "posthog_dashboard"."variables",- "posthog_dashboard"."breakdown_colors",- "posthog_dashboard"."data_color_theme_id",- "posthog_dashboard"."creation_mode",- "posthog_dashboard"."restriction_level",- "posthog_dashboard"."quick_filter_ids",- "posthog_dashboard"."deprecated_tags",- "posthog_dashboard"."tags",- "posthog_dashboard"."share_token",- "posthog_dashboard"."is_shared"- FROM "posthog_dashboard"- INNER JOIN "posthog_team" ON ("posthog_dashboard"."team_id" = "posthog_team"."id")- WHERE (NOT ("posthog_dashboard"."deleted")- AND ("posthog_dashboard"."team_id" =- (SELECT U0."parent_team_id" AS "parent_team_id"- FROM "posthog_team" U0- WHERE U0."id" = 99999- LIMIT 1)- OR ("posthog_team"."parent_team_id" IS NULL- AND "posthog_dashboard"."team_id" = 99999))- AND "posthog_dashboard"."id" = 99999)+ FROM "posthog_organization"+ WHERE "posthog_organization"."id" = '00000000-0000-0000-0000-000000000000'::uuidLIMIT 21'''# ----# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.117- '''- SELECT COUNT(*) AS "__count"- FROM "posthog_dashboardtile"- INNER JOIN "posthog_dashboard" ON ("posthog_dashboardtile"."dashboard_id" = "posthog_dashboard"."id")- WHERE (NOT ("posthog_dashboardtile"."deleted"- AND "posthog_dashboardtile"."deleted" IS NOT NULL)- AND NOT ("posthog_dashboard"."deleted")- AND "posthog_dashboardtile"."dashboard_id" = 99999- AND NOT ("posthog_dashboardtile"."deleted"- AND "posthog_dashboardtile"."deleted" IS NOT NULL))- '''-# ----# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.118- '''- SELECT "posthog_dashboard"."id",- "posthog_dashboard"."name",- "posthog_dashboard"."description",- "posthog_dashboard"."team_id",- "posthog_dashboard"."pinned",- "posthog_dashboard"."created_at",- "posthog_dashboard"."created_by_id",- "posthog_dashboard"."deleted",- "posthog_dashboard"."last_accessed_at",- "posthog_dashboard"."last_refresh",- "posthog_dashboard"."filters",- "posthog_dashboard"."variables",- "posthog_dashboard"."breakdown_colors",- "posthog_dashboard"."data_color_theme_id",- "posthog_dashboard"."creation_mode",- "posthog_dashboard"."restriction_level",- "posthog_dashboard"."quick_filter_ids",- "posthog_dashboard"."deprecated_tags",- "posthog_dashboard"."tags",- "posthog_dashboard"."share_token",- "posthog_dashboard"."is_shared"- FROM "posthog_dashboard"- WHERE (NOT ("posthog_dashboard"."deleted")- AND "posthog_dashboard"."id" IN (1,- 2,- 3,- 4,- 5 /* ... */))- '''-# ----# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.119+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.103'''SELECT "posthog_team"."id","posthog_team"."uuid",@@ -5958,13 +5331,231 @@"posthog_team"."experiment_recalculation_time","posthog_team"."default_experiment_confidence_level","posthog_team"."default_experiment_stats_method",- "posthog_team"."business_model"+ "posthog_team"."business_model",+ "posthog_organization"."id",+ "posthog_organization"."name",+ "posthog_organization"."slug",+ "posthog_organization"."logo_media_id",+ "posthog_organization"."created_at",+ "posthog_organization"."updated_at",+ "posthog_organization"."is_active",+ "posthog_organization"."is_not_active_reason",+ "posthog_organization"."session_cookie_age",+ "posthog_organization"."is_member_join_email_enabled",+ "posthog_organization"."is_ai_data_processing_approved",+ "posthog_organization"."is_ai_training_opted_in",+ "posthog_organization"."is_ai_training_locked",+ "posthog_organization"."is_ai_training_cta_shown",+ "posthog_organization"."enforce_2fa",+ "posthog_organization"."members_can_invite",+ "posthog_organization"."members_can_create_projects",+ "posthog_organization"."members_can_use_personal_api_keys",+ "posthog_organization"."allow_publicly_shared_resources",+ "posthog_organization"."default_role_id",+ "posthog_organization"."plugins_access_level",+ "posthog_organization"."for_internal_metrics",+ "posthog_organization"."default_experiment_stats_method",+ "posthog_organization"."default_anonymize_ips",+ "posthog_organization"."is_hipaa",+ "posthog_organization"."is_pending_deletion",+ "posthog_organization"."customer_id",+ "posthog_organization"."available_product_features",+ "posthog_organization"."usage",+ "posthog_organization"."never_drop_data",+ "posthog_organization"."customer_trust_scores",+ "posthog_organization"."setup_section_2_completed",+ "posthog_organization"."personalization",+ "posthog_organization"."domain_whitelist",+ "posthog_organization"."is_platform"FROM "posthog_team"+ INNER JOIN "posthog_organization" ON ("posthog_team"."organization_id" = "posthog_organization"."id")WHERE "posthog_team"."id" = 99999LIMIT 21'''# ----# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.12+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.104+ '''+ SELECT "posthog_organizationmembership"."id",+ "posthog_organizationmembership"."organization_id",+ "posthog_organizationmembership"."user_id",+ "posthog_organizationmembership"."level",+ "posthog_organizationmembership"."joined_at",+ "posthog_organizationmembership"."updated_at",+ "posthog_organizationmembership"."invited_by_id",+ "posthog_organization"."id",+ "posthog_organization"."name",+ "posthog_organization"."slug",+ "posthog_organization"."logo_media_id",+ "posthog_organization"."created_at",+ "posthog_organization"."updated_at",+ "posthog_organization"."is_active",+ "posthog_organization"."is_not_active_reason",+ "posthog_organization"."session_cookie_age",+ "posthog_organization"."is_member_join_email_enabled",+ "posthog_organization"."is_ai_data_processing_approved",+ "posthog_organization"."is_ai_training_opted_in",+ "posthog_organization"."is_ai_training_locked",+ "posthog_organization"."is_ai_training_cta_shown",+ "posthog_organization"."enforce_2fa",+ "posthog_organization"."members_can_invite",+ "posthog_organization"."members_can_create_projects",+ "posthog_organization"."members_can_use_personal_api_keys",+ "posthog_organization"."allow_publicly_shared_resources",+ "posthog_organization"."default_role_id",+ "posthog_organization"."plugins_access_level",+ "posthog_organization"."for_internal_metrics",+ "posthog_organization"."default_experiment_stats_method",+ "posthog_organization"."default_anonymize_ips",+ "posthog_organization"."is_hipaa",+ "posthog_organization"."is_pending_deletion",+ "posthog_organization"."customer_id",+ "posthog_organization"."available_product_features",+ "posthog_organization"."usage",+ "posthog_organization"."never_drop_data",+ "posthog_organization"."customer_trust_scores",+ "posthog_organization"."setup_section_2_completed",+ "posthog_organization"."personalization",+ "posthog_organization"."domain_whitelist",+ "posthog_organization"."is_platform"+ FROM "posthog_organizationmembership"+ INNER JOIN "posthog_organization" ON ("posthog_organizationmembership"."organization_id" = "posthog_organization"."id")+ WHERE ("posthog_organizationmembership"."organization_id" = '00000000-0000-0000-0000-000000000000'::uuid+ AND "posthog_organizationmembership"."user_id" = 99999)+ LIMIT 21+ '''+# ---+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.105+ '''+ SELECT "ee_accesscontrol"."id",+ "ee_accesscontrol"."team_id",+ "ee_accesscontrol"."access_level",+ "ee_accesscontrol"."resource",+ "ee_accesscontrol"."resource_id",+ "ee_accesscontrol"."organization_member_id",+ "ee_accesscontrol"."role_id",+ "ee_accesscontrol"."created_by_id",+ "ee_accesscontrol"."created_at",+ "ee_accesscontrol"."updated_at",+ "posthog_team"."organization_id" AS "_team_organization_id"+ FROM "ee_accesscontrol"+ INNER JOIN "posthog_team" ON ("ee_accesscontrol"."team_id" = "posthog_team"."id")+ LEFT OUTER JOIN "posthog_organizationmembership" ON ("ee_accesscontrol"."organization_member_id" = "posthog_organizationmembership"."id")+ WHERE (("ee_accesscontrol"."organization_member_id" IS NULL+ AND "ee_accesscontrol"."role_id" IS NULL+ AND "ee_accesscontrol"."team_id" = 99999)+ OR ("posthog_organizationmembership"."user_id" = 99999+ AND "ee_accesscontrol"."role_id" IS NULL+ AND "ee_accesscontrol"."team_id" = 99999))+ '''+# ---+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.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"."members_can_invite",+ "posthog_organization"."members_can_create_projects",+ "posthog_organization"."members_can_use_personal_api_keys",+ "posthog_organization"."allow_publicly_shared_resources",+ "posthog_organization"."default_role_id",+ "posthog_organization"."plugins_access_level",+ "posthog_organization"."for_internal_metrics",+ "posthog_organization"."default_experiment_stats_method",+ "posthog_organization"."default_anonymize_ips",+ "posthog_organization"."is_hipaa",+ "posthog_organization"."is_pending_deletion",+ "posthog_organization"."customer_id",+ "posthog_organization"."available_product_features",+ "posthog_organization"."usage",+ "posthog_organization"."never_drop_data",+ "posthog_organization"."customer_trust_scores",+ "posthog_organization"."setup_section_2_completed",+ "posthog_organization"."personalization",+ "posthog_organization"."domain_whitelist",+ "posthog_organization"."is_platform"+ FROM "posthog_organizationmembership"+ INNER JOIN "posthog_organization" ON ("posthog_organizationmembership"."organization_id" = "posthog_organization"."id")+ WHERE "posthog_organizationmembership"."user_id" = 99999+ '''+# ---+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.107+ '''+ SELECT "ee_accesscontrol"."team_id" AS "team_id",+ "ee_accesscontrol"."resource_id" AS "resource_id",+ "ee_accesscontrol"."organization_member_id" AS "organization_member_id",+ "ee_accesscontrol"."role_id" AS "role_id",+ "ee_accesscontrol"."access_level" AS "access_level"+ FROM "ee_accesscontrol"+ INNER JOIN "posthog_team" ON ("ee_accesscontrol"."team_id" = "posthog_team"."id")+ WHERE ("ee_accesscontrol"."resource" = 'project'+ AND "posthog_team"."organization_id" IN ('00000000-0000-0000-0000-000000000000'::uuid))+ '''+# ---+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.108+ '''+ SELECT "ee_rolemembership"."organization_member_id" AS "organization_member_id",+ "ee_rolemembership"."role_id" AS "role_id"+ FROM "ee_rolemembership"+ WHERE "ee_rolemembership"."user_id" = 99999+ '''+# ---+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.109+ '''+ SELECT "posthog_dashboard"."id",+ "posthog_dashboard"."name",+ "posthog_dashboard"."description",+ "posthog_dashboard"."team_id",+ "posthog_dashboard"."pinned",+ "posthog_dashboard"."created_at",+ "posthog_dashboard"."created_by_id",+ "posthog_dashboard"."deleted",+ "posthog_dashboard"."last_accessed_at",+ "posthog_dashboard"."last_refresh",+ "posthog_dashboard"."filters",+ "posthog_dashboard"."variables",+ "posthog_dashboard"."breakdown_colors",+ "posthog_dashboard"."data_color_theme_id",+ "posthog_dashboard"."creation_mode",+ "posthog_dashboard"."restriction_level",+ "posthog_dashboard"."quick_filter_ids",+ "posthog_dashboard"."deprecated_tags",+ "posthog_dashboard"."tags",+ "posthog_dashboard"."share_token",+ "posthog_dashboard"."is_shared"+ FROM "posthog_dashboard"+ INNER JOIN "posthog_team" ON ("posthog_dashboard"."team_id" = "posthog_team"."id")+ WHERE (NOT ("posthog_dashboard"."deleted")+ AND ("posthog_dashboard"."team_id" =+ (SELECT U0."parent_team_id" AS "parent_team_id"+ FROM "posthog_team" U0+ WHERE U0."id" = 99999+ LIMIT 1)+ OR ("posthog_team"."parent_team_id" IS NULL+ AND "posthog_dashboard"."team_id" = 99999))+ AND "posthog_dashboard"."id" = 99999)+ LIMIT 21+ '''+# ---+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.11'''SELECT COUNT(*) AS "__count"FROM "posthog_dashboardtile"@@ -5976,170 +5567,52 @@AND NOT ("posthog_dashboardtile"."insight_id" IS NULL))'''# ----# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.120+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.110'''- SELECT "posthog_filesystem"."team_id",- "posthog_filesystem"."id",- "posthog_filesystem"."path",- "posthog_filesystem"."depth",- "posthog_filesystem"."type",- "posthog_filesystem"."ref",- "posthog_filesystem"."href",- "posthog_filesystem"."shortcut",- "posthog_filesystem"."meta",- "posthog_filesystem"."created_at",- "posthog_filesystem"."created_by_id",- "posthog_filesystem"."surface",- "posthog_filesystem"."project_id"- FROM "posthog_filesystem"- WHERE (("posthog_filesystem"."surface" IS NULL- OR "posthog_filesystem"."surface" = 'web')- AND "posthog_filesystem"."ref" = '0001'- AND "posthog_filesystem"."team_id" = 99999- AND "posthog_filesystem"."type" = 'insight'- AND NOT ("posthog_filesystem"."shortcut"- AND "posthog_filesystem"."shortcut" IS NOT NULL))- '''-# ----# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.121- '''- SELECT "posthog_team"."id",- "posthog_team"."uuid",- "posthog_team"."organization_id",- "posthog_team"."parent_team_id",- "posthog_team"."project_id",- "posthog_team"."api_token",- "posthog_team"."app_urls",- "posthog_team"."name",- "posthog_team"."slack_incoming_webhook",- "posthog_team"."created_at",- "posthog_team"."updated_at",- "posthog_team"."anonymize_ips",- "posthog_team"."completed_snippet_onboarding",- "posthog_team"."has_completed_onboarding_for",- "posthog_team"."onboarding_tasks",- "posthog_team"."ingested_event",- "posthog_team"."ingested_production_event",- "posthog_team"."ingested_production_event_last_checked_at",- "posthog_team"."person_processing_opt_out",- "posthog_team"."secret_api_token",- "posthog_team"."secret_api_token_backup",- "posthog_team"."session_recording_opt_in",- "posthog_team"."session_recording_sample_rate",- "posthog_team"."session_recording_minimum_duration_milliseconds",- "posthog_team"."session_recording_linked_flag",- "posthog_team"."session_recording_network_payload_capture_config",- "posthog_team"."session_recording_masking_config",- "posthog_team"."session_recording_url_trigger_config",- "posthog_team"."session_recording_url_blocklist_config",- "posthog_team"."session_recording_event_trigger_config",- "posthog_team"."session_recording_trigger_match_type_config",- "posthog_team"."session_recording_trigger_groups",- "posthog_team"."session_replay_config",- "posthog_team"."session_recording_retention_period",- "posthog_team"."event_retention_months",- "posthog_team"."conversations_enabled",- "posthog_team"."conversations_settings",- "posthog_team"."proactive_tasks_enabled",- "posthog_team"."survey_config",- "posthog_team"."surveys_opt_in",- "posthog_team"."product_tours_opt_in",- "posthog_team"."capture_console_log_opt_in",- "posthog_team"."capture_performance_opt_in",- "posthog_team"."capture_dead_clicks",- "posthog_team"."autocapture_opt_out",- "posthog_team"."autocapture_web_vitals_opt_in",- "posthog_team"."autocapture_web_vitals_allowed_metrics",- "posthog_team"."autocapture_exceptions_opt_in",- "posthog_team"."autocapture_exceptions_errors_to_ignore",- "posthog_team"."logs_settings",- "posthog_team"."llm_gateway_enabled_at",- "posthog_team"."llm_gateway_revoked_at",- "posthog_team"."llm_gateway_overspend_allowance_usd",- "posthog_team"."heatmaps_opt_in",- "posthog_team"."receive_org_level_activity_logs",- "posthog_team"."web_analytics_pre_aggregated_tables_enabled",- "posthog_team"."web_analytics_pre_aggregated_tables_version",- "posthog_team"."flags_persistence_default",- "posthog_team"."feature_flag_confirmation_enabled",- "posthog_team"."feature_flag_confirmation_message",- "posthog_team"."default_evaluation_environments_enabled",- "posthog_team"."require_evaluation_environment_tags",- "posthog_team"."default_evaluation_contexts_enabled",- "posthog_team"."require_evaluation_contexts",- "posthog_team"."session_recording_version",- "posthog_team"."signup_token",- "posthog_team"."is_demo",- "posthog_team"."access_control",- "posthog_team"."week_start_day",- "posthog_team"."inject_web_apps",- "posthog_team"."test_account_filters",- "posthog_team"."test_account_filters_default_checked",- "posthog_team"."path_cleaning_filters",- "posthog_team"."timezone",- "posthog_team"."data_attributes",- "posthog_team"."person_display_name_properties",- "posthog_team"."live_events_columns",- "posthog_team"."recording_domains",- "posthog_team"."human_friendly_comparison_periods",- "posthog_team"."cookieless_server_hash_mode",- "posthog_team"."primary_dashboard_id",- "posthog_team"."default_data_theme",- "posthog_team"."extra_settings",- "posthog_team"."modifiers",- "posthog_team"."correlation_config",- "posthog_team"."session_recording_retention_period_days",- "posthog_team"."external_data_workspace_id",- "posthog_team"."external_data_workspace_last_synced_at",- "posthog_team"."api_query_rate_limit",- "posthog_team"."drop_events_older_than",- "posthog_team"."base_currency",- "posthog_team"."experiment_recalculation_time",- "posthog_team"."default_experiment_confidence_level",- "posthog_team"."default_experiment_stats_method",- "posthog_team"."business_model"- FROM "posthog_team"- WHERE "posthog_team"."id" = 99999- LIMIT 21+ SELECT COUNT(*) AS "__count"+ FROM "posthog_dashboardtile"+ INNER JOIN "posthog_dashboard" ON ("posthog_dashboardtile"."dashboard_id" = "posthog_dashboard"."id")+ WHERE (NOT ("posthog_dashboardtile"."deleted"+ AND "posthog_dashboardtile"."deleted" IS NOT NULL)+ AND NOT ("posthog_dashboard"."deleted")+ AND "posthog_dashboardtile"."dashboard_id" = 99999+ AND NOT ("posthog_dashboardtile"."deleted"+ AND "posthog_dashboardtile"."deleted" IS NOT NULL))'''# ----# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.122+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.111'''- SELECT "posthog_dashboarditem"."id",- "posthog_dashboarditem"."name",- "posthog_dashboarditem"."derived_name",- "posthog_dashboarditem"."description",- "posthog_dashboarditem"."team_id",- "posthog_dashboarditem"."filters",- "posthog_dashboarditem"."filters_hash",- "posthog_dashboarditem"."query",- "posthog_dashboarditem"."query_metadata",- "posthog_dashboarditem"."order",- "posthog_dashboarditem"."deleted",- "posthog_dashboarditem"."saved",- "posthog_dashboarditem"."created_at",- "posthog_dashboarditem"."refreshing",- "posthog_dashboarditem"."created_by_id",- "posthog_dashboarditem"."is_sample",- "posthog_dashboarditem"."short_id",- "posthog_dashboarditem"."favorited",- "posthog_dashboarditem"."refresh_attempt",- "posthog_dashboarditem"."last_modified_at",- "posthog_dashboarditem"."last_modified_by_id",- "posthog_dashboarditem"."dashboard_id",- "posthog_dashboarditem"."last_refresh",- "posthog_dashboarditem"."layouts",- "posthog_dashboarditem"."color",- "posthog_dashboarditem"."dive_dashboard_id",- "posthog_dashboarditem"."updated_at",- "posthog_dashboarditem"."deprecated_tags",- "posthog_dashboarditem"."tags"- FROM "posthog_dashboarditem"- WHERE "posthog_dashboarditem"."id" = 99999- LIMIT 21+ SELECT "posthog_dashboard"."id",+ "posthog_dashboard"."name",+ "posthog_dashboard"."description",+ "posthog_dashboard"."team_id",+ "posthog_dashboard"."pinned",+ "posthog_dashboard"."created_at",+ "posthog_dashboard"."created_by_id",+ "posthog_dashboard"."deleted",+ "posthog_dashboard"."last_accessed_at",+ "posthog_dashboard"."last_refresh",+ "posthog_dashboard"."filters",+ "posthog_dashboard"."variables",+ "posthog_dashboard"."breakdown_colors",+ "posthog_dashboard"."data_color_theme_id",+ "posthog_dashboard"."creation_mode",+ "posthog_dashboard"."restriction_level",+ "posthog_dashboard"."quick_filter_ids",+ "posthog_dashboard"."deprecated_tags",+ "posthog_dashboard"."tags",+ "posthog_dashboard"."share_token",+ "posthog_dashboard"."is_shared"+ FROM "posthog_dashboard"+ WHERE (NOT ("posthog_dashboard"."deleted")+ AND "posthog_dashboard"."id" IN (1,+ 2,+ 3,+ 4,+ 5 /* ... */))'''# ----# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.123+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.112'''SELECT "posthog_team"."id","posthog_team"."uuid",@@ -6241,7 +5714,32 @@LIMIT 21'''# ----# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.124+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.113+ '''+ SELECT "posthog_filesystem"."team_id",+ "posthog_filesystem"."id",+ "posthog_filesystem"."path",+ "posthog_filesystem"."depth",+ "posthog_filesystem"."type",+ "posthog_filesystem"."ref",+ "posthog_filesystem"."href",+ "posthog_filesystem"."shortcut",+ "posthog_filesystem"."meta",+ "posthog_filesystem"."created_at",+ "posthog_filesystem"."created_by_id",+ "posthog_filesystem"."surface",+ "posthog_filesystem"."project_id"+ FROM "posthog_filesystem"+ WHERE (("posthog_filesystem"."surface" IS NULL+ OR "posthog_filesystem"."surface" = 'web')+ AND "posthog_filesystem"."ref" = '0001'+ AND "posthog_filesystem"."team_id" = 99999+ AND "posthog_filesystem"."type" = 'insight'+ AND NOT ("posthog_filesystem"."shortcut"+ AND "posthog_filesystem"."shortcut" IS NOT NULL))+ '''+# ---+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.114'''SELECT "posthog_organization"."id","posthog_organization"."name",@@ -6283,7 +5781,7 @@LIMIT 21'''# ----# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.125+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.115'''SELECT "posthog_team"."id","posthog_team"."uuid",@@ -6385,7 +5883,7 @@LIMIT 21'''# ----# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.126+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.116'''SELECT "posthog_dashboardtile"."id","posthog_dashboardtile"."dashboard_id",@@ -6405,47 +5903,87 @@"posthog_dashboardtile"."transparent_background","posthog_dashboardtile"."deleted"FROM "posthog_dashboardtile"- WHERE "posthog_dashboardtile"."id" = 99999- LIMIT 21+ INNER JOIN "posthog_dashboard" ON ("posthog_dashboardtile"."dashboard_id" = "posthog_dashboard"."id")+ WHERE (NOT ("posthog_dashboardtile"."deleted"+ AND "posthog_dashboardtile"."deleted" IS NOT NULL)+ AND NOT ("posthog_dashboard"."deleted")+ AND "posthog_dashboardtile"."insight_id" = 99999)'''# ----# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.127- '''- SELECT "posthog_dashboarditem"."id",- "posthog_dashboarditem"."name",- "posthog_dashboarditem"."derived_name",- "posthog_dashboarditem"."description",- "posthog_dashboarditem"."team_id",- "posthog_dashboarditem"."filters",- "posthog_dashboarditem"."filters_hash",- "posthog_dashboarditem"."query",- "posthog_dashboarditem"."query_metadata",- "posthog_dashboarditem"."order",- "posthog_dashboarditem"."deleted",- "posthog_dashboarditem"."saved",- "posthog_dashboarditem"."created_at",- "posthog_dashboarditem"."refreshing",- "posthog_dashboarditem"."created_by_id",- "posthog_dashboarditem"."is_sample",- "posthog_dashboarditem"."short_id",- "posthog_dashboarditem"."favorited",- "posthog_dashboarditem"."refresh_attempt",- "posthog_dashboarditem"."last_modified_at",- "posthog_dashboarditem"."last_modified_by_id",- "posthog_dashboarditem"."dashboard_id",- "posthog_dashboarditem"."last_refresh",- "posthog_dashboarditem"."layouts",- "posthog_dashboarditem"."color",- "posthog_dashboarditem"."dive_dashboard_id",- "posthog_dashboarditem"."updated_at",- "posthog_dashboarditem"."deprecated_tags",- "posthog_dashboarditem"."tags"- FROM "posthog_dashboarditem"- WHERE "posthog_dashboarditem"."id" = 99999- LIMIT 21+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.117+ '''+ SELECT "posthog_dashboardtile"."id",+ "posthog_dashboardtile"."dashboard_id",+ "posthog_dashboardtile"."insight_id",+ "posthog_dashboardtile"."text_id",+ "posthog_dashboardtile"."button_tile_id",+ "posthog_dashboardtile"."widget_id",+ "posthog_dashboardtile"."team_id",+ "posthog_dashboardtile"."layouts",+ "posthog_dashboardtile"."color",+ "posthog_dashboardtile"."filters_hash",+ "posthog_dashboardtile"."last_refresh",+ "posthog_dashboardtile"."refreshing",+ "posthog_dashboardtile"."refresh_attempt",+ "posthog_dashboardtile"."filters_overrides",+ "posthog_dashboardtile"."show_description",+ "posthog_dashboardtile"."transparent_background",+ "posthog_dashboardtile"."deleted"+ FROM "posthog_dashboardtile"+ INNER JOIN "posthog_dashboard" ON ("posthog_dashboardtile"."dashboard_id" = "posthog_dashboard"."id")+ WHERE (NOT ("posthog_dashboardtile"."deleted"+ AND "posthog_dashboardtile"."deleted" IS NOT NULL)+ AND NOT ("posthog_dashboard"."deleted")+ AND "posthog_dashboardtile"."insight_id" = 99999)'''# ----# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.128+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.118+ '''+ SELECT "posthog_insightvariable"."created_by_id",+ "posthog_insightvariable"."created_at",+ "posthog_insightvariable"."updated_at",+ "posthog_insightvariable"."id",+ "posthog_insightvariable"."team_id",+ "posthog_insightvariable"."name",+ "posthog_insightvariable"."code_name",+ "posthog_insightvariable"."type",+ "posthog_insightvariable"."default_value",+ "posthog_insightvariable"."values"+ FROM "posthog_insightvariable"+ WHERE "posthog_insightvariable"."team_id" = 99999+ '''+# ---+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.119+ '''+ SELECT "posthog_dashboardtile"."dashboard_id" AS "dashboard_id"+ FROM "posthog_dashboardtile"+ INNER JOIN "posthog_dashboard" ON ("posthog_dashboardtile"."dashboard_id" = "posthog_dashboard"."id")+ WHERE (NOT ("posthog_dashboardtile"."deleted"+ AND "posthog_dashboardtile"."deleted" IS NOT NULL)+ AND NOT ("posthog_dashboard"."deleted")+ AND "posthog_dashboardtile"."insight_id" = 99999)+ '''+# ---+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.12+ '''+ SELECT "posthog_sharingconfiguration"."id",+ "posthog_sharingconfiguration"."team_id",+ "posthog_sharingconfiguration"."dashboard_id",+ "posthog_sharingconfiguration"."insight_id",+ "posthog_sharingconfiguration"."recording_id",+ "posthog_sharingconfiguration"."notebook_id",+ "posthog_sharingconfiguration"."interviewee_context_id",+ "posthog_sharingconfiguration"."created_at",+ "posthog_sharingconfiguration"."enabled",+ "posthog_sharingconfiguration"."access_token",+ "posthog_sharingconfiguration"."expires_at",+ "posthog_sharingconfiguration"."settings",+ "posthog_sharingconfiguration"."password_required"+ FROM "posthog_sharingconfiguration"+ WHERE "posthog_sharingconfiguration"."dashboard_id" = 99999+ '''+# ---+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.120'''SELECT "posthog_dashboard"."id","posthog_dashboard"."name",@@ -6469,11 +6007,110 @@"posthog_dashboard"."share_token","posthog_dashboard"."is_shared"FROM "posthog_dashboard"- WHERE "posthog_dashboard"."id" = 99999+ WHERE (NOT ("posthog_dashboard"."deleted")+ AND "posthog_dashboard"."id" IN (1,+ 2,+ 3,+ 4,+ 5 /* ... */))+ '''+# ---+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.121+ '''+ SELECT "posthog_tag"."name" AS "tag__name"+ FROM "posthog_taggeditem"+ INNER JOIN "posthog_tag" ON ("posthog_taggeditem"."tag_id" = "posthog_tag"."id")+ WHERE "posthog_taggeditem"."insight_id" = 99999+ '''+# ---+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.122+ '''+ SELECT "posthog_user"."id",+ "posthog_user"."password",+ "posthog_user"."last_login",+ "posthog_user"."first_name",+ "posthog_user"."last_name",+ "posthog_user"."is_staff",+ "posthog_user"."date_joined",+ "posthog_user"."uuid",+ "posthog_user"."current_organization_id",+ "posthog_user"."current_team_id",+ "posthog_user"."email",+ "posthog_user"."pending_email",+ "posthog_user"."distinct_id",+ "posthog_user"."is_email_verified",+ "posthog_user"."credentials_reviewed_at",+ "posthog_user"."requested_2fa_reset_at",+ "posthog_user"."has_seen_product_intro_for",+ "posthog_user"."strapi_id",+ "posthog_user"."is_active",+ "posthog_user"."role_at_organization",+ "posthog_user"."theme_mode",+ "posthog_user"."partial_notification_settings",+ "posthog_user"."anonymize_data",+ "posthog_user"."allow_impersonation",+ "posthog_user"."toolbar_mode",+ "posthog_user"."hedgehog_config",+ "posthog_user"."allow_sidebar_suggestions",+ "posthog_user"."shortcut_position",+ "posthog_user"."passkeys_enabled_for_2fa",+ "posthog_user"."hide_mcp_hints",+ "posthog_user"."onboarding_skipped_at",+ "posthog_user"."onboarding_skipped_reason",+ "posthog_user"."onboarding_skipped_organization_id",+ "posthog_user"."onboarding_delegated_to_invite_id",+ "posthog_user"."onboarding_delegated_to_organization_id",+ "posthog_user"."onboarding_delegation_accepted_at",+ "posthog_user"."events_column_config",+ "posthog_user"."email_opt_in"+ FROM "posthog_user"+ WHERE ("posthog_user"."is_active"+ AND "posthog_user"."id" = 99999)+ '''+# ---+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.123+ '''+ SELECT "posthog_organization"."id",+ "posthog_organization"."name",+ "posthog_organization"."slug",+ "posthog_organization"."logo_media_id",+ "posthog_organization"."created_at",+ "posthog_organization"."updated_at",+ "posthog_organization"."is_active",+ "posthog_organization"."is_not_active_reason",+ "posthog_organization"."session_cookie_age",+ "posthog_organization"."is_member_join_email_enabled",+ "posthog_organization"."is_ai_data_processing_approved",+ "posthog_organization"."is_ai_training_opted_in",+ "posthog_organization"."is_ai_training_locked",+ "posthog_organization"."is_ai_training_cta_shown",+ "posthog_organization"."enforce_2fa",+ "posthog_organization"."members_can_invite",+ "posthog_organization"."members_can_create_projects",+ "posthog_organization"."members_can_use_personal_api_keys",+ "posthog_organization"."allow_publicly_shared_resources",+ "posthog_organization"."default_role_id",+ "posthog_organization"."plugins_access_level",+ "posthog_organization"."for_internal_metrics",+ "posthog_organization"."default_experiment_stats_method",+ "posthog_organization"."default_anonymize_ips",+ "posthog_organization"."is_hipaa",+ "posthog_organization"."is_pending_deletion",+ "posthog_organization"."customer_id",+ "posthog_organization"."available_product_features",+ "posthog_organization"."usage",+ "posthog_organization"."never_drop_data",+ "posthog_organization"."customer_trust_scores",+ "posthog_organization"."setup_section_2_completed",+ "posthog_organization"."personalization",+ "posthog_organization"."domain_whitelist",+ "posthog_organization"."is_platform"+ FROM "posthog_organization"+ WHERE "posthog_organization"."id" = '00000000-0000-0000-0000-000000000000'::uuidLIMIT 21'''# ----# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.129+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.124'''SELECT "posthog_team"."id","posthog_team"."uuid",@@ -6569,34 +6206,8 @@"posthog_team"."experiment_recalculation_time","posthog_team"."default_experiment_confidence_level","posthog_team"."default_experiment_stats_method",- "posthog_team"."business_model"- FROM "posthog_team"- WHERE "posthog_team"."id" = 99999- LIMIT 21- '''-# ----# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.13- '''- SELECT "posthog_sharingconfiguration"."id",- "posthog_sharingconfiguration"."team_id",- "posthog_sharingconfiguration"."dashboard_id",- "posthog_sharingconfiguration"."insight_id",- "posthog_sharingconfiguration"."recording_id",- "posthog_sharingconfiguration"."notebook_id",- "posthog_sharingconfiguration"."interviewee_context_id",- "posthog_sharingconfiguration"."created_at",- "posthog_sharingconfiguration"."enabled",- "posthog_sharingconfiguration"."access_token",- "posthog_sharingconfiguration"."expires_at",- "posthog_sharingconfiguration"."settings",- "posthog_sharingconfiguration"."password_required"- FROM "posthog_sharingconfiguration"- WHERE "posthog_sharingconfiguration"."dashboard_id" = 99999- '''-# ----# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.130- '''- SELECT "posthog_organization"."id",+ "posthog_team"."business_model",+ "posthog_organization"."id","posthog_organization"."name","posthog_organization"."slug","posthog_organization"."logo_media_id",@@ -6631,14 +6242,22 @@"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_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.131+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.125'''- SELECT "posthog_organization"."id",+ SELECT "posthog_organizationmembership"."id",+ "posthog_organizationmembership"."organization_id",+ "posthog_organizationmembership"."user_id",+ "posthog_organizationmembership"."level",+ "posthog_organizationmembership"."joined_at",+ "posthog_organizationmembership"."updated_at",+ "posthog_organizationmembership"."invited_by_id",+ "posthog_organization"."id","posthog_organization"."name","posthog_organization"."slug","posthog_organization"."logo_media_id",@@ -6673,195 +6292,115 @@"posthog_organization"."personalization","posthog_organization"."domain_whitelist","posthog_organization"."is_platform"- FROM "posthog_organization"- WHERE "posthog_organization"."id" = '00000000-0000-0000-0000-000000000000'::uuid+ FROM "posthog_organizationmembership"+ INNER JOIN "posthog_organization" ON ("posthog_organizationmembership"."organization_id" = "posthog_organization"."id")+ WHERE ("posthog_organizationmembership"."organization_id" = '00000000-0000-0000-0000-000000000000'::uuid+ AND "posthog_organizationmembership"."user_id" = 99999)LIMIT 21'''# ----# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.132+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.126'''- SELECT "posthog_team"."id",- "posthog_team"."uuid",- "posthog_team"."organization_id",- "posthog_team"."parent_team_id",- "posthog_team"."project_id",- "posthog_team"."api_token",- "posthog_team"."app_urls",- "posthog_team"."name",- "posthog_team"."slack_incoming_webhook",- "posthog_team"."created_at",- "posthog_team"."updated_at",- "posthog_team"."anonymize_ips",- "posthog_team"."completed_snippet_onboarding",- "posthog_team"."has_completed_onboarding_for",- "posthog_team"."onboarding_tasks",- "posthog_team"."ingested_event",- "posthog_team"."ingested_production_event",- "posthog_team"."ingested_production_event_last_checked_at",- "posthog_team"."person_processing_opt_out",- "posthog_team"."secret_api_token",- "posthog_team"."secret_api_token_backup",- "posthog_team"."session_recording_opt_in",- "posthog_team"."session_recording_sample_rate",- "posthog_team"."session_recording_minimum_duration_milliseconds",- "posthog_team"."session_recording_linked_flag",- "posthog_team"."session_recording_network_payload_capture_config",- "posthog_team"."session_recording_masking_config",- "posthog_team"."session_recording_url_trigger_config",- "posthog_team"."session_recording_url_blocklist_config",- "posthog_team"."session_recording_event_trigger_config",- "posthog_team"."session_recording_trigger_match_type_config",- "posthog_team"."session_recording_trigger_groups",- "posthog_team"."session_replay_config",- "posthog_team"."session_recording_retention_period",- "posthog_team"."event_retention_months",- "posthog_team"."conversations_enabled",- "posthog_team"."conversations_settings",- "posthog_team"."proactive_tasks_enabled",- "posthog_team"."survey_config",- "posthog_team"."surveys_opt_in",- "posthog_team"."product_tours_opt_in",- "posthog_team"."capture_console_log_opt_in",- "posthog_team"."capture_performance_opt_in",- "posthog_team"."capture_dead_clicks",- "posthog_team"."autocapture_opt_out",- "posthog_team"."autocapture_web_vitals_opt_in",- "posthog_team"."autocapture_web_vitals_allowed_metrics",- "posthog_team"."autocapture_exceptions_opt_in",- "posthog_team"."autocapture_exceptions_errors_to_ignore",- "posthog_team"."logs_settings",- "posthog_team"."llm_gateway_enabled_at",- "posthog_team"."llm_gateway_revoked_at",- "posthog_team"."llm_gateway_overspend_allowance_usd",- "posthog_team"."heatmaps_opt_in",- "posthog_team"."receive_org_level_activity_logs",- "posthog_team"."web_analytics_pre_aggregated_tables_enabled",- "posthog_team"."web_analytics_pre_aggregated_tables_version",- "posthog_team"."flags_persistence_default",- "posthog_team"."feature_flag_confirmation_enabled",- "posthog_team"."feature_flag_confirmation_message",- "posthog_team"."default_evaluation_environments_enabled",- "posthog_team"."require_evaluation_environment_tags",- "posthog_team"."default_evaluation_contexts_enabled",- "posthog_team"."require_evaluation_contexts",- "posthog_team"."session_recording_version",- "posthog_team"."signup_token",- "posthog_team"."is_demo",- "posthog_team"."access_control",- "posthog_team"."week_start_day",- "posthog_team"."inject_web_apps",- "posthog_team"."test_account_filters",- "posthog_team"."test_account_filters_default_checked",- "posthog_team"."path_cleaning_filters",- "posthog_team"."timezone",- "posthog_team"."data_attributes",- "posthog_team"."person_display_name_properties",- "posthog_team"."live_events_columns",- "posthog_team"."recording_domains",- "posthog_team"."human_friendly_comparison_periods",- "posthog_team"."cookieless_server_hash_mode",- "posthog_team"."primary_dashboard_id",- "posthog_team"."default_data_theme",- "posthog_team"."extra_settings",- "posthog_team"."modifiers",- "posthog_team"."correlation_config",- "posthog_team"."session_recording_retention_period_days",- "posthog_team"."external_data_workspace_id",- "posthog_team"."external_data_workspace_last_synced_at",- "posthog_team"."api_query_rate_limit",- "posthog_team"."drop_events_older_than",- "posthog_team"."base_currency",- "posthog_team"."experiment_recalculation_time",- "posthog_team"."default_experiment_confidence_level",- "posthog_team"."default_experiment_stats_method",- "posthog_team"."business_model"- FROM "posthog_team"- WHERE "posthog_team"."id" = 99999- LIMIT 21+ SELECT "ee_accesscontrol"."id",+ "ee_accesscontrol"."team_id",+ "ee_accesscontrol"."access_level",+ "ee_accesscontrol"."resource",+ "ee_accesscontrol"."resource_id",+ "ee_accesscontrol"."organization_member_id",+ "ee_accesscontrol"."role_id",+ "ee_accesscontrol"."created_by_id",+ "ee_accesscontrol"."created_at",+ "ee_accesscontrol"."updated_at",+ "posthog_team"."organization_id" AS "_team_organization_id"+ FROM "ee_accesscontrol"+ INNER JOIN "posthog_team" ON ("ee_accesscontrol"."team_id" = "posthog_team"."id")+ LEFT OUTER JOIN "posthog_organizationmembership" ON ("ee_accesscontrol"."organization_member_id" = "posthog_organizationmembership"."id")+ WHERE (("ee_accesscontrol"."organization_member_id" IS NULL+ AND "ee_accesscontrol"."role_id" IS NULL+ AND "ee_accesscontrol"."team_id" = 99999)+ OR ("posthog_organizationmembership"."user_id" = 99999+ AND "ee_accesscontrol"."role_id" IS NULL+ AND "ee_accesscontrol"."team_id" = 99999))'''# ----# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.133+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.127'''- SELECT "posthog_dashboardtile"."id",- "posthog_dashboardtile"."dashboard_id",- "posthog_dashboardtile"."insight_id",- "posthog_dashboardtile"."text_id",- "posthog_dashboardtile"."button_tile_id",- "posthog_dashboardtile"."widget_id",- "posthog_dashboardtile"."team_id",- "posthog_dashboardtile"."layouts",- "posthog_dashboardtile"."color",- "posthog_dashboardtile"."filters_hash",- "posthog_dashboardtile"."last_refresh",- "posthog_dashboardtile"."refreshing",- "posthog_dashboardtile"."refresh_attempt",- "posthog_dashboardtile"."filters_overrides",- "posthog_dashboardtile"."show_description",- "posthog_dashboardtile"."transparent_background",- "posthog_dashboardtile"."deleted"- FROM "posthog_dashboardtile"- INNER JOIN "posthog_dashboard" ON ("posthog_dashboardtile"."dashboard_id" = "posthog_dashboard"."id")- WHERE (NOT ("posthog_dashboardtile"."deleted"- AND "posthog_dashboardtile"."deleted" IS NOT NULL)- AND NOT ("posthog_dashboard"."deleted")- AND "posthog_dashboardtile"."insight_id" = 99999)+ SELECT "posthog_organizationmembership"."id",+ "posthog_organizationmembership"."organization_id",+ "posthog_organizationmembership"."user_id",+ "posthog_organizationmembership"."level",+ "posthog_organizationmembership"."joined_at",+ "posthog_organizationmembership"."updated_at",+ "posthog_organizationmembership"."invited_by_id",+ "posthog_organization"."id",+ "posthog_organization"."name",+ "posthog_organization"."slug",+ "posthog_organization"."logo_media_id",+ "posthog_organization"."created_at",+ "posthog_organization"."updated_at",+ "posthog_organization"."is_active",+ "posthog_organization"."is_not_active_reason",+ "posthog_organization"."session_cookie_age",+ "posthog_organization"."is_member_join_email_enabled",+ "posthog_organization"."is_ai_data_processing_approved",+ "posthog_organization"."is_ai_training_opted_in",+ "posthog_organization"."is_ai_training_locked",+ "posthog_organization"."is_ai_training_cta_shown",+ "posthog_organization"."enforce_2fa",+ "posthog_organization"."members_can_invite",+ "posthog_organization"."members_can_create_projects",+ "posthog_organization"."members_can_use_personal_api_keys",+ "posthog_organization"."allow_publicly_shared_resources",+ "posthog_organization"."default_role_id",+ "posthog_organization"."plugins_access_level",+ "posthog_organization"."for_internal_metrics",+ "posthog_organization"."default_experiment_stats_method",+ "posthog_organization"."default_anonymize_ips",+ "posthog_organization"."is_hipaa",+ "posthog_organization"."is_pending_deletion",+ "posthog_organization"."customer_id",+ "posthog_organization"."available_product_features",+ "posthog_organization"."usage",+ "posthog_organization"."never_drop_data",+ "posthog_organization"."customer_trust_scores",+ "posthog_organization"."setup_section_2_completed",+ "posthog_organization"."personalization",+ "posthog_organization"."domain_whitelist",+ "posthog_organization"."is_platform"+ FROM "posthog_organizationmembership"+ INNER JOIN "posthog_organization" ON ("posthog_organizationmembership"."organization_id" = "posthog_organization"."id")+ WHERE "posthog_organizationmembership"."user_id" = 99999'''# ----# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.134+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.128'''- SELECT "posthog_dashboardtile"."id",- "posthog_dashboardtile"."dashboard_id",- "posthog_dashboardtile"."insight_id",- "posthog_dashboardtile"."text_id",- "posthog_dashboardtile"."button_tile_id",- "posthog_dashboardtile"."widget_id",- "posthog_dashboardtile"."team_id",- "posthog_dashboardtile"."layouts",- "posthog_dashboardtile"."color",- "posthog_dashboardtile"."filters_hash",- "posthog_dashboardtile"."last_refresh",- "posthog_dashboardtile"."refreshing",- "posthog_dashboardtile"."refresh_attempt",- "posthog_dashboardtile"."filters_overrides",- "posthog_dashboardtile"."show_description",- "posthog_dashboardtile"."transparent_background",- "posthog_dashboardtile"."deleted"- FROM "posthog_dashboardtile"- INNER JOIN "posthog_dashboard" ON ("posthog_dashboardtile"."dashboard_id" = "posthog_dashboard"."id")- WHERE (NOT ("posthog_dashboardtile"."deleted"- AND "posthog_dashboardtile"."deleted" IS NOT NULL)- AND NOT ("posthog_dashboard"."deleted")- AND "posthog_dashboardtile"."insight_id" = 99999)+ SELECT "ee_accesscontrol"."team_id" AS "team_id",+ "ee_accesscontrol"."resource_id" AS "resource_id",+ "ee_accesscontrol"."organization_member_id" AS "organization_member_id",+ "ee_accesscontrol"."role_id" AS "role_id",+ "ee_accesscontrol"."access_level" AS "access_level"+ FROM "ee_accesscontrol"+ INNER JOIN "posthog_team" ON ("ee_accesscontrol"."team_id" = "posthog_team"."id")+ WHERE ("ee_accesscontrol"."resource" = 'project'+ AND "posthog_team"."organization_id" IN ('00000000-0000-0000-0000-000000000000'::uuid))'''# ----# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.135+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.129'''- SELECT "posthog_insightvariable"."created_by_id",- "posthog_insightvariable"."created_at",- "posthog_insightvariable"."updated_at",- "posthog_insightvariable"."id",- "posthog_insightvariable"."team_id",- "posthog_insightvariable"."name",- "posthog_insightvariable"."code_name",- "posthog_insightvariable"."type",- "posthog_insightvariable"."default_value",- "posthog_insightvariable"."values"- FROM "posthog_insightvariable"- WHERE "posthog_insightvariable"."team_id" = 99999+ SELECT "ee_rolemembership"."organization_member_id" AS "organization_member_id",+ "ee_rolemembership"."role_id" AS "role_id"+ FROM "ee_rolemembership"+ WHERE "ee_rolemembership"."user_id" = 99999'''# ----# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.136+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.13'''- 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)+ SELECT COUNT(*) AS "__count"+ FROM "posthog_taggeditem"+ WHERE "posthog_taggeditem"."dashboard_id" = 99999'''# ----# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.137+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.130'''SELECT "posthog_dashboard"."id","posthog_dashboard"."name",@@ -6883,121 +6422,145 @@"posthog_dashboard"."deprecated_tags","posthog_dashboard"."tags","posthog_dashboard"."share_token",- "posthog_dashboard"."is_shared"- FROM "posthog_dashboard"- WHERE (NOT ("posthog_dashboard"."deleted")- AND "posthog_dashboard"."id" IN (1,- 2,- 3,- 4,- 5 /* ... */))- '''-# ----# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.138- '''- SELECT "posthog_tag"."name" AS "tag__name"- FROM "posthog_taggeditem"- INNER JOIN "posthog_tag" ON ("posthog_taggeditem"."tag_id" = "posthog_tag"."id")- WHERE "posthog_taggeditem"."insight_id" = 99999- '''-# ----# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.139- '''- SELECT "posthog_user"."id",- "posthog_user"."password",- "posthog_user"."last_login",- "posthog_user"."first_name",- "posthog_user"."last_name",- "posthog_user"."is_staff",- "posthog_user"."date_joined",- "posthog_user"."uuid",- "posthog_user"."current_organization_id",- "posthog_user"."current_team_id",- "posthog_user"."email",- "posthog_user"."pending_email",- "posthog_user"."distinct_id",- "posthog_user"."is_email_verified",- "posthog_user"."credentials_reviewed_at",- "posthog_user"."requested_2fa_reset_at",- "posthog_user"."has_seen_product_intro_for",- "posthog_user"."strapi_id",- "posthog_user"."is_active",- "posthog_user"."role_at_organization",- "posthog_user"."theme_mode",- "posthog_user"."partial_notification_settings",- "posthog_user"."anonymize_data",- "posthog_user"."allow_impersonation",- "posthog_user"."toolbar_mode",- "posthog_user"."hedgehog_config",- "posthog_user"."allow_sidebar_suggestions",- "posthog_user"."shortcut_position",- "posthog_user"."passkeys_enabled_for_2fa",- "posthog_user"."hide_mcp_hints",- "posthog_user"."onboarding_skipped_at",- "posthog_user"."onboarding_skipped_reason",- "posthog_user"."onboarding_skipped_organization_id",- "posthog_user"."onboarding_delegated_to_invite_id",- "posthog_user"."onboarding_delegated_to_organization_id",- "posthog_user"."onboarding_delegation_accepted_at",- "posthog_user"."events_column_config",- "posthog_user"."email_opt_in"- FROM "posthog_user"- WHERE ("posthog_user"."is_active"- AND "posthog_user"."id" = 99999)- '''-# ----# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.14- '''- SELECT COUNT(*) AS "__count"- FROM "posthog_taggeditem"- WHERE "posthog_taggeditem"."dashboard_id" = 99999+ "posthog_dashboard"."is_shared",+ recent_dashboard_views."viewed_at" AS "last_viewed_at",+ ("posthog_dashboard"."id")::varchar AS "_ref_id",++ (SELECT U0."path" AS "path"+ FROM "posthog_filesystem" U0+ WHERE ((U0."surface" IS NULL+ OR U0."surface" = 'web')+ AND U0."ref" = ("posthog_dashboard"."id")::varchar+ AND U0."team_id" = ("posthog_dashboard"."team_id")+ AND U0."type" = 'dashboard'+ AND NOT (U0."shortcut"+ AND U0."shortcut" IS NOT NULL))+ ORDER BY U0."id" ASC+ LIMIT 1) AS "_folder_path",+ T6."id",+ T6."password",+ T6."last_login",+ T6."first_name",+ T6."last_name",+ T6."is_staff",+ T6."date_joined",+ T6."uuid",+ T6."current_organization_id",+ T6."current_team_id",+ T6."email",+ T6."pending_email",+ T6."distinct_id",+ T6."is_email_verified",+ T6."credentials_reviewed_at",+ T6."requested_password_reset_at",+ T6."requested_2fa_reset_at",+ T6."has_seen_product_intro_for",+ T6."strapi_id",+ T6."is_active",+ T6."role_at_organization",+ T6."theme_mode",+ T6."partial_notification_settings",+ T6."anonymize_data",+ T6."allow_impersonation",+ T6."toolbar_mode",+ T6."hedgehog_config",+ T6."allow_sidebar_suggestions",+ T6."shortcut_position",+ T6."passkeys_enabled_for_2fa",+ T6."hide_mcp_hints",+ T6."onboarding_skipped_at",+ T6."onboarding_skipped_reason",+ T6."onboarding_skipped_organization_id",+ T6."onboarding_delegated_to_invite_id",+ T6."onboarding_delegated_to_organization_id",+ T6."onboarding_delegation_accepted_at",+ T6."events_column_config",+ T6."email_opt_in"+ FROM "posthog_dashboard"+ INNER JOIN "posthog_team" ON ("posthog_dashboard"."team_id" = "posthog_team"."id")+ LEFT OUTER JOIN "posthog_filesystemviewlog" recent_dashboard_views ON ("posthog_team"."id" = recent_dashboard_views."team_id"+ AND ((recent_dashboard_views."user_id" = 99999+ AND recent_dashboard_views."type" = 'dashboard'+ AND recent_dashboard_views."ref" = ("posthog_dashboard"."id")::varchar)))+ LEFT OUTER JOIN "posthog_user" T6 ON ("posthog_dashboard"."created_by_id" = T6."id")+ WHERE ("posthog_team"."project_id" = 99999+ AND NOT ("posthog_dashboard"."deleted")+ AND "posthog_dashboard"."id" = 99999)+ LIMIT 21'''# ----# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.140+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.131'''- SELECT "posthog_organization"."id",- "posthog_organization"."name",- "posthog_organization"."slug",- "posthog_organization"."logo_media_id",- "posthog_organization"."created_at",- "posthog_organization"."updated_at",- "posthog_organization"."is_active",- "posthog_organization"."is_not_active_reason",- "posthog_organization"."session_cookie_age",- "posthog_organization"."is_member_join_email_enabled",- "posthog_organization"."is_ai_data_processing_approved",- "posthog_organization"."is_ai_training_opted_in",- "posthog_organization"."is_ai_training_locked",- "posthog_organization"."is_ai_training_cta_shown",- "posthog_organization"."enforce_2fa",- "posthog_organization"."members_can_invite",- "posthog_organization"."members_can_create_projects",- "posthog_organization"."members_can_use_personal_api_keys",- "posthog_organization"."allow_publicly_shared_resources",- "posthog_organization"."default_role_id",- "posthog_organization"."plugins_access_level",- "posthog_organization"."for_internal_metrics",- "posthog_organization"."default_experiment_stats_method",- "posthog_organization"."default_anonymize_ips",- "posthog_organization"."is_hipaa",- "posthog_organization"."is_pending_deletion",- "posthog_organization"."customer_id",- "posthog_organization"."available_product_features",- "posthog_organization"."usage",- "posthog_organization"."never_drop_data",- "posthog_organization"."customer_trust_scores",- "posthog_organization"."setup_section_2_completed",- "posthog_organization"."personalization",- "posthog_organization"."domain_whitelist",- "posthog_organization"."is_platform"- FROM "posthog_organization"- WHERE "posthog_organization"."id" = '00000000-0000-0000-0000-000000000000'::uuid- LIMIT 21+ SELECT "posthog_sharingconfiguration"."id",+ "posthog_sharingconfiguration"."team_id",+ "posthog_sharingconfiguration"."dashboard_id",+ "posthog_sharingconfiguration"."insight_id",+ "posthog_sharingconfiguration"."recording_id",+ "posthog_sharingconfiguration"."notebook_id",+ "posthog_sharingconfiguration"."interviewee_context_id",+ "posthog_sharingconfiguration"."created_at",+ "posthog_sharingconfiguration"."enabled",+ "posthog_sharingconfiguration"."access_token",+ "posthog_sharingconfiguration"."expires_at",+ "posthog_sharingconfiguration"."settings",+ "posthog_sharingconfiguration"."password_required"+ FROM "posthog_sharingconfiguration"+ WHERE "posthog_sharingconfiguration"."dashboard_id" IN (1,+ 2,+ 3,+ 4,+ 5 /* ... */)'''# ----# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.141+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.132'''- SELECT "posthog_team"."id",+ SELECT "posthog_dashboardtile"."id",+ "posthog_dashboardtile"."dashboard_id",+ "posthog_dashboardtile"."insight_id",+ "posthog_dashboardtile"."text_id",+ "posthog_dashboardtile"."button_tile_id",+ "posthog_dashboardtile"."widget_id",+ "posthog_dashboardtile"."team_id",+ "posthog_dashboardtile"."layouts",+ "posthog_dashboardtile"."color",+ "posthog_dashboardtile"."filters_hash",+ "posthog_dashboardtile"."last_refresh",+ "posthog_dashboardtile"."refreshing",+ "posthog_dashboardtile"."refresh_attempt",+ "posthog_dashboardtile"."filters_overrides",+ "posthog_dashboardtile"."show_description",+ "posthog_dashboardtile"."transparent_background",+ "posthog_dashboardtile"."deleted",+ "posthog_dashboarditem"."id",+ "posthog_dashboarditem"."name",+ "posthog_dashboarditem"."derived_name",+ "posthog_dashboarditem"."description",+ "posthog_dashboarditem"."team_id",+ "posthog_dashboarditem"."filters",+ "posthog_dashboarditem"."filters_hash",+ "posthog_dashboarditem"."query",+ "posthog_dashboarditem"."query_metadata",+ "posthog_dashboarditem"."order",+ "posthog_dashboarditem"."deleted",+ "posthog_dashboarditem"."saved",+ "posthog_dashboarditem"."created_at",+ "posthog_dashboarditem"."refreshing",+ "posthog_dashboarditem"."created_by_id",+ "posthog_dashboarditem"."is_sample",+ "posthog_dashboarditem"."short_id",+ "posthog_dashboarditem"."favorited",+ "posthog_dashboarditem"."refresh_attempt",+ "posthog_dashboarditem"."last_modified_at",+ "posthog_dashboarditem"."last_modified_by_id",+ "posthog_dashboarditem"."dashboard_id",+ "posthog_dashboarditem"."last_refresh",+ "posthog_dashboarditem"."layouts",+ "posthog_dashboarditem"."color",+ "posthog_dashboarditem"."dive_dashboard_id",+ "posthog_dashboarditem"."updated_at",+ "posthog_dashboarditem"."deprecated_tags",+ "posthog_dashboarditem"."tags",+ "posthog_team"."id","posthog_team"."uuid","posthog_team"."organization_id","posthog_team"."parent_team_id",@@ -7083,2051 +6646,304 @@"posthog_team"."modifiers","posthog_team"."correlation_config","posthog_team"."session_recording_retention_period_days",+ "posthog_team"."plugins_opt_in",+ "posthog_team"."opt_out_capture",+ "posthog_team"."event_names",+ "posthog_team"."event_names_with_usage",+ "posthog_team"."event_properties",+ "posthog_team"."event_properties_with_usage",+ "posthog_team"."event_properties_numerical","posthog_team"."external_data_workspace_id","posthog_team"."external_data_workspace_last_synced_at","posthog_team"."api_query_rate_limit",+ "posthog_team"."revenue_tracking_config","posthog_team"."drop_events_older_than","posthog_team"."base_currency","posthog_team"."experiment_recalculation_time","posthog_team"."default_experiment_confidence_level","posthog_team"."default_experiment_stats_method","posthog_team"."business_model",- "posthog_organization"."id",- "posthog_organization"."name",- "posthog_organization"."slug",- "posthog_organization"."logo_media_id",- "posthog_organization"."created_at",- "posthog_organization"."updated_at",- "posthog_organization"."is_active",- "posthog_organization"."is_not_active_reason",- "posthog_organization"."session_cookie_age",- "posthog_organization"."is_member_join_email_enabled",- "posthog_organization"."is_ai_data_processing_approved",- "posthog_organization"."is_ai_training_opted_in",- "posthog_organization"."is_ai_training_locked",- "posthog_organization"."is_ai_training_cta_shown",- "posthog_organization"."enforce_2fa",- "posthog_organization"."members_can_invite",- "posthog_organization"."members_can_create_projects",- "posthog_organization"."members_can_use_personal_api_keys",- "posthog_organization"."allow_publicly_shared_resources",- "posthog_organization"."default_role_id",- "posthog_organization"."plugins_access_level",- "posthog_organization"."for_internal_metrics",- "posthog_organization"."default_experiment_stats_method",- "posthog_organization"."default_anonymize_ips",- "posthog_organization"."is_hipaa",- "posthog_organization"."is_pending_deletion",- "posthog_organization"."customer_id",- "posthog_organization"."available_product_features",- "posthog_organization"."usage",- "posthog_organization"."never_drop_data",- "posthog_organization"."customer_trust_scores",- "posthog_organization"."setup_section_2_completed",- "posthog_organization"."personalization",- "posthog_organization"."domain_whitelist",- "posthog_organization"."is_platform"- FROM "posthog_team"- INNER JOIN "posthog_organization" ON ("posthog_team"."organization_id" = "posthog_organization"."id")- WHERE "posthog_team"."id" = 99999- LIMIT 21- '''-# ----# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.142- '''- SELECT "posthog_organizationmembership"."id",- "posthog_organizationmembership"."organization_id",- "posthog_organizationmembership"."user_id",- "posthog_organizationmembership"."level",- "posthog_organizationmembership"."joined_at",- "posthog_organizationmembership"."updated_at",- "posthog_organizationmembership"."invited_by_id",- "posthog_organization"."id",- "posthog_organization"."name",- "posthog_organization"."slug",- "posthog_organization"."logo_media_id",- "posthog_organization"."created_at",- "posthog_organization"."updated_at",- "posthog_organization"."is_active",- "posthog_organization"."is_not_active_reason",- "posthog_organization"."session_cookie_age",- "posthog_organization"."is_member_join_email_enabled",- "posthog_organization"."is_ai_data_processing_approved",- "posthog_organization"."is_ai_training_opted_in",- "posthog_organization"."is_ai_training_locked",- "posthog_organization"."is_ai_training_cta_shown",- "posthog_organization"."enforce_2fa",- "posthog_organization"."members_can_invite",- "posthog_organization"."members_can_create_projects",- "posthog_organization"."members_can_use_personal_api_keys",- "posthog_organization"."allow_publicly_shared_resources",- "posthog_organization"."default_role_id",- "posthog_organization"."plugins_access_level",- "posthog_organization"."for_internal_metrics",- "posthog_organization"."default_experiment_stats_method",- "posthog_organization"."default_anonymize_ips",- "posthog_organization"."is_hipaa",- "posthog_organization"."is_pending_deletion",- "posthog_organization"."customer_id",- "posthog_organization"."available_product_features",- "posthog_organization"."usage",- "posthog_organization"."never_drop_data",- "posthog_organization"."customer_trust_scores",- "posthog_organization"."setup_section_2_completed",- "posthog_organization"."personalization",- "posthog_organization"."domain_whitelist",- "posthog_organization"."is_platform"- FROM "posthog_organizationmembership"- INNER JOIN "posthog_organization" ON ("posthog_organizationmembership"."organization_id" = "posthog_organization"."id")- WHERE ("posthog_organizationmembership"."organization_id" = '00000000-0000-0000-0000-000000000000'::uuid- AND "posthog_organizationmembership"."user_id" = 99999)- LIMIT 21- '''-# ----# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.143- '''- SELECT "ee_accesscontrol"."id",- "ee_accesscontrol"."team_id",- "ee_accesscontrol"."access_level",- "ee_accesscontrol"."resource",- "ee_accesscontrol"."resource_id",- "ee_accesscontrol"."organization_member_id",- "ee_accesscontrol"."role_id",- "ee_accesscontrol"."created_by_id",- "ee_accesscontrol"."created_at",- "ee_accesscontrol"."updated_at",- "posthog_team"."organization_id" AS "_team_organization_id"- FROM "ee_accesscontrol"- INNER JOIN "posthog_team" ON ("ee_accesscontrol"."team_id" = "posthog_team"."id")- LEFT OUTER JOIN "posthog_organizationmembership" ON ("ee_accesscontrol"."organization_member_id" = "posthog_organizationmembership"."id")- WHERE (("ee_accesscontrol"."organization_member_id" IS NULL- AND "ee_accesscontrol"."role_id" IS NULL- AND "ee_accesscontrol"."team_id" = 99999)- OR ("posthog_organizationmembership"."user_id" = 99999- AND "ee_accesscontrol"."role_id" IS NULL- AND "ee_accesscontrol"."team_id" = 99999))- '''-# ----# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.144- '''- SELECT "posthog_organizationmembership"."id",- "posthog_organizationmembership"."organization_id",- "posthog_organizationmembership"."user_id",- "posthog_organizationmembership"."level",- "posthog_organizationmembership"."joined_at",- "posthog_organizationmembership"."updated_at",- "posthog_organizationmembership"."invited_by_id",- "posthog_organization"."id",- "posthog_organization"."name",- "posthog_organization"."slug",- "posthog_organization"."logo_media_id",- "posthog_organization"."created_at",- "posthog_organization"."updated_at",- "posthog_organization"."is_active",- "posthog_organization"."is_not_active_reason",- "posthog_organization"."session_cookie_age",- "posthog_organization"."is_member_join_email_enabled",- "posthog_organization"."is_ai_data_processing_approved",- "posthog_organization"."is_ai_training_opted_in",- "posthog_organization"."is_ai_training_locked",- "posthog_organization"."is_ai_training_cta_shown",- "posthog_organization"."enforce_2fa",- "posthog_organization"."members_can_invite",- "posthog_organization"."members_can_create_projects",- "posthog_organization"."members_can_use_personal_api_keys",- "posthog_organization"."allow_publicly_shared_resources",- "posthog_organization"."default_role_id",- "posthog_organization"."plugins_access_level",- "posthog_organization"."for_internal_metrics",- "posthog_organization"."default_experiment_stats_method",- "posthog_organization"."default_anonymize_ips",- "posthog_organization"."is_hipaa",- "posthog_organization"."is_pending_deletion",- "posthog_organization"."customer_id",- "posthog_organization"."available_product_features",- "posthog_organization"."usage",- "posthog_organization"."never_drop_data",- "posthog_organization"."customer_trust_scores",- "posthog_organization"."setup_section_2_completed",- "posthog_organization"."personalization",- "posthog_organization"."domain_whitelist",- "posthog_organization"."is_platform"- FROM "posthog_organizationmembership"- INNER JOIN "posthog_organization" ON ("posthog_organizationmembership"."organization_id" = "posthog_organization"."id")- WHERE "posthog_organizationmembership"."user_id" = 99999- '''-# ----# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.145- '''- SELECT "ee_accesscontrol"."team_id" AS "team_id",- "ee_accesscontrol"."resource_id" AS "resource_id",- "ee_accesscontrol"."organization_member_id" AS "organization_member_id",- "ee_accesscontrol"."role_id" AS "role_id",- "ee_accesscontrol"."access_level" AS "access_level"- FROM "ee_accesscontrol"- INNER JOIN "posthog_team" ON ("ee_accesscontrol"."team_id" = "posthog_team"."id")- WHERE ("ee_accesscontrol"."resource" = 'project'- AND "posthog_team"."organization_id" IN ('00000000-0000-0000-0000-000000000000'::uuid))- '''-# ----# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.146- '''- SELECT "ee_rolemembership"."organization_member_id" AS "organization_member_id",- "ee_rolemembership"."role_id" AS "role_id"- FROM "ee_rolemembership"- WHERE "ee_rolemembership"."user_id" = 99999- '''-# ----# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.147- '''- SELECT "posthog_dashboard"."id",- "posthog_dashboard"."name",- "posthog_dashboard"."description",- "posthog_dashboard"."team_id",- "posthog_dashboard"."pinned",- "posthog_dashboard"."created_at",- "posthog_dashboard"."created_by_id",- "posthog_dashboard"."deleted",- "posthog_dashboard"."last_accessed_at",- "posthog_dashboard"."last_refresh",- "posthog_dashboard"."filters",- "posthog_dashboard"."variables",- "posthog_dashboard"."breakdown_colors",- "posthog_dashboard"."data_color_theme_id",- "posthog_dashboard"."creation_mode",- "posthog_dashboard"."restriction_level",- "posthog_dashboard"."quick_filter_ids",- "posthog_dashboard"."deprecated_tags",- "posthog_dashboard"."tags",- "posthog_dashboard"."share_token",- "posthog_dashboard"."is_shared"- FROM "posthog_dashboard"- INNER JOIN "posthog_team" ON ("posthog_dashboard"."team_id" = "posthog_team"."id")- WHERE (NOT ("posthog_dashboard"."deleted")- AND ("posthog_dashboard"."team_id" =- (SELECT U0."parent_team_id" AS "parent_team_id"- FROM "posthog_team" U0- WHERE U0."id" = 99999- LIMIT 1)- OR ("posthog_team"."parent_team_id" IS NULL- AND "posthog_dashboard"."team_id" = 99999))- AND "posthog_dashboard"."id" = 99999)- LIMIT 21- '''-# ----# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.148- '''- SELECT COUNT(*) AS "__count"- FROM "posthog_dashboardtile"- INNER JOIN "posthog_dashboard" ON ("posthog_dashboardtile"."dashboard_id" = "posthog_dashboard"."id")- WHERE (NOT ("posthog_dashboardtile"."deleted"- AND "posthog_dashboardtile"."deleted" IS NOT NULL)- AND NOT ("posthog_dashboard"."deleted")- AND "posthog_dashboardtile"."dashboard_id" = 99999- AND NOT ("posthog_dashboardtile"."deleted"- AND "posthog_dashboardtile"."deleted" IS NOT NULL))- '''-# ----# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.149- '''- SELECT "posthog_dashboard"."id",- "posthog_dashboard"."name",- "posthog_dashboard"."description",- "posthog_dashboard"."team_id",- "posthog_dashboard"."pinned",- "posthog_dashboard"."created_at",- "posthog_dashboard"."created_by_id",- "posthog_dashboard"."deleted",- "posthog_dashboard"."last_accessed_at",- "posthog_dashboard"."last_refresh",- "posthog_dashboard"."filters",- "posthog_dashboard"."variables",- "posthog_dashboard"."breakdown_colors",- "posthog_dashboard"."data_color_theme_id",- "posthog_dashboard"."creation_mode",- "posthog_dashboard"."restriction_level",- "posthog_dashboard"."quick_filter_ids",- "posthog_dashboard"."deprecated_tags",- "posthog_dashboard"."tags",- "posthog_dashboard"."share_token",- "posthog_dashboard"."is_shared"- FROM "posthog_dashboard"- WHERE (NOT ("posthog_dashboard"."deleted")- AND "posthog_dashboard"."id" IN (1,- 2,- 3,- 4,- 5 /* ... */))- '''-# ----# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.15- '''- SELECT "posthog_sharingconfiguration"."id",- "posthog_sharingconfiguration"."team_id",- "posthog_sharingconfiguration"."dashboard_id",- "posthog_sharingconfiguration"."insight_id",- "posthog_sharingconfiguration"."recording_id",- "posthog_sharingconfiguration"."notebook_id",- "posthog_sharingconfiguration"."interviewee_context_id",- "posthog_sharingconfiguration"."created_at",- "posthog_sharingconfiguration"."enabled",- "posthog_sharingconfiguration"."access_token",- "posthog_sharingconfiguration"."expires_at",- "posthog_sharingconfiguration"."settings",- "posthog_sharingconfiguration"."password_required"- FROM "posthog_sharingconfiguration"- WHERE "posthog_sharingconfiguration"."dashboard_id" = 99999- '''-# ----# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.150- '''- SELECT "posthog_team"."id",- "posthog_team"."uuid",- "posthog_team"."organization_id",- "posthog_team"."parent_team_id",- "posthog_team"."project_id",- "posthog_team"."api_token",- "posthog_team"."app_urls",- "posthog_team"."name",- "posthog_team"."slack_incoming_webhook",- "posthog_team"."created_at",- "posthog_team"."updated_at",- "posthog_team"."anonymize_ips",- "posthog_team"."completed_snippet_onboarding",- "posthog_team"."has_completed_onboarding_for",- "posthog_team"."onboarding_tasks",- "posthog_team"."ingested_event",- "posthog_team"."ingested_production_event",- "posthog_team"."ingested_production_event_last_checked_at",- "posthog_team"."person_processing_opt_out",- "posthog_team"."secret_api_token",- "posthog_team"."secret_api_token_backup",- "posthog_team"."session_recording_opt_in",- "posthog_team"."session_recording_sample_rate",- "posthog_team"."session_recording_minimum_duration_milliseconds",- "posthog_team"."session_recording_linked_flag",- "posthog_team"."session_recording_network_payload_capture_config",- "posthog_team"."session_recording_masking_config",- "posthog_team"."session_recording_url_trigger_config",- "posthog_team"."session_recording_url_blocklist_config",- "posthog_team"."session_recording_event_trigger_config",- "posthog_team"."session_recording_trigger_match_type_config",- "posthog_team"."session_recording_trigger_groups",- "posthog_team"."session_replay_config",- "posthog_team"."session_recording_retention_period",- "posthog_team"."event_retention_months",- "posthog_team"."conversations_enabled",- "posthog_team"."conversations_settings",- "posthog_team"."proactive_tasks_enabled",- "posthog_team"."survey_config",- "posthog_team"."surveys_opt_in",- "posthog_team"."product_tours_opt_in",- "posthog_team"."capture_console_log_opt_in",- "posthog_team"."capture_performance_opt_in",- "posthog_team"."capture_dead_clicks",- "posthog_team"."autocapture_opt_out",- "posthog_team"."autocapture_web_vitals_opt_in",- "posthog_team"."autocapture_web_vitals_allowed_metrics",- "posthog_team"."autocapture_exceptions_opt_in",- "posthog_team"."autocapture_exceptions_errors_to_ignore",- "posthog_team"."logs_settings",- "posthog_team"."llm_gateway_enabled_at",- "posthog_team"."llm_gateway_revoked_at",- "posthog_team"."llm_gateway_overspend_allowance_usd",- "posthog_team"."heatmaps_opt_in",- "posthog_team"."receive_org_level_activity_logs",- "posthog_team"."web_analytics_pre_aggregated_tables_enabled",- "posthog_team"."web_analytics_pre_aggregated_tables_version",- "posthog_team"."flags_persistence_default",- "posthog_team"."feature_flag_confirmation_enabled",- "posthog_team"."feature_flag_confirmation_message",- "posthog_team"."default_evaluation_environments_enabled",- "posthog_team"."require_evaluation_environment_tags",- "posthog_team"."default_evaluation_contexts_enabled",- "posthog_team"."require_evaluation_contexts",- "posthog_team"."session_recording_version",- "posthog_team"."signup_token",- "posthog_team"."is_demo",- "posthog_team"."access_control",- "posthog_team"."week_start_day",- "posthog_team"."inject_web_apps",- "posthog_team"."test_account_filters",- "posthog_team"."test_account_filters_default_checked",- "posthog_team"."path_cleaning_filters",- "posthog_team"."timezone",- "posthog_team"."data_attributes",- "posthog_team"."person_display_name_properties",- "posthog_team"."live_events_columns",- "posthog_team"."recording_domains",- "posthog_team"."human_friendly_comparison_periods",- "posthog_team"."cookieless_server_hash_mode",- "posthog_team"."primary_dashboard_id",- "posthog_team"."default_data_theme",- "posthog_team"."extra_settings",- "posthog_team"."modifiers",- "posthog_team"."correlation_config",- "posthog_team"."session_recording_retention_period_days",- "posthog_team"."external_data_workspace_id",- "posthog_team"."external_data_workspace_last_synced_at",- "posthog_team"."api_query_rate_limit",- "posthog_team"."drop_events_older_than",- "posthog_team"."base_currency",- "posthog_team"."experiment_recalculation_time",- "posthog_team"."default_experiment_confidence_level",- "posthog_team"."default_experiment_stats_method",- "posthog_team"."business_model"- FROM "posthog_team"- WHERE "posthog_team"."id" = 99999- LIMIT 21- '''-# ----# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.151- '''- SELECT "posthog_filesystem"."team_id",- "posthog_filesystem"."id",- "posthog_filesystem"."path",- "posthog_filesystem"."depth",- "posthog_filesystem"."type",- "posthog_filesystem"."ref",- "posthog_filesystem"."href",- "posthog_filesystem"."shortcut",- "posthog_filesystem"."meta",- "posthog_filesystem"."created_at",- "posthog_filesystem"."created_by_id",- "posthog_filesystem"."surface",- "posthog_filesystem"."project_id"- FROM "posthog_filesystem"- WHERE (("posthog_filesystem"."surface" IS NULL- OR "posthog_filesystem"."surface" = 'web')- AND "posthog_filesystem"."ref" = '0001'- AND "posthog_filesystem"."team_id" = 99999- AND "posthog_filesystem"."type" = 'insight'- AND NOT ("posthog_filesystem"."shortcut"- AND "posthog_filesystem"."shortcut" IS NOT NULL))- '''-# ----# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.152- '''- SELECT "posthog_team"."id",- "posthog_team"."uuid",- "posthog_team"."organization_id",- "posthog_team"."parent_team_id",- "posthog_team"."project_id",- "posthog_team"."api_token",- "posthog_team"."app_urls",- "posthog_team"."name",- "posthog_team"."slack_incoming_webhook",- "posthog_team"."created_at",- "posthog_team"."updated_at",- "posthog_team"."anonymize_ips",- "posthog_team"."completed_snippet_onboarding",- "posthog_team"."has_completed_onboarding_for",- "posthog_team"."onboarding_tasks",- "posthog_team"."ingested_event",- "posthog_team"."ingested_production_event",- "posthog_team"."ingested_production_event_last_checked_at",- "posthog_team"."person_processing_opt_out",- "posthog_team"."secret_api_token",- "posthog_team"."secret_api_token_backup",- "posthog_team"."session_recording_opt_in",- "posthog_team"."session_recording_sample_rate",- "posthog_team"."session_recording_minimum_duration_milliseconds",- "posthog_team"."session_recording_linked_flag",- "posthog_team"."session_recording_network_payload_capture_config",- "posthog_team"."session_recording_masking_config",- "posthog_team"."session_recording_url_trigger_config",- "posthog_team"."session_recording_url_blocklist_config",- "posthog_team"."session_recording_event_trigger_config",- "posthog_team"."session_recording_trigger_match_type_config",- "posthog_team"."session_recording_trigger_groups",- "posthog_team"."session_replay_config",- "posthog_team"."session_recording_retention_period",- "posthog_team"."event_retention_months",- "posthog_team"."conversations_enabled",- "posthog_team"."conversations_settings",- "posthog_team"."proactive_tasks_enabled",- "posthog_team"."survey_config",- "posthog_team"."surveys_opt_in",- "posthog_team"."product_tours_opt_in",- "posthog_team"."capture_console_log_opt_in",- "posthog_team"."capture_performance_opt_in",- "posthog_team"."capture_dead_clicks",- "posthog_team"."autocapture_opt_out",- "posthog_team"."autocapture_web_vitals_opt_in",- "posthog_team"."autocapture_web_vitals_allowed_metrics",- "posthog_team"."autocapture_exceptions_opt_in",- "posthog_team"."autocapture_exceptions_errors_to_ignore",- "posthog_team"."logs_settings",- "posthog_team"."llm_gateway_enabled_at",- "posthog_team"."llm_gateway_revoked_at",- "posthog_team"."llm_gateway_overspend_allowance_usd",- "posthog_team"."heatmaps_opt_in",- "posthog_team"."receive_org_level_activity_logs",- "posthog_team"."web_analytics_pre_aggregated_tables_enabled",- "posthog_team"."web_analytics_pre_aggregated_tables_version",- "posthog_team"."flags_persistence_default",- "posthog_team"."feature_flag_confirmation_enabled",- "posthog_team"."feature_flag_confirmation_message",- "posthog_team"."default_evaluation_environments_enabled",- "posthog_team"."require_evaluation_environment_tags",- "posthog_team"."default_evaluation_contexts_enabled",- "posthog_team"."require_evaluation_contexts",- "posthog_team"."session_recording_version",- "posthog_team"."signup_token",- "posthog_team"."is_demo",- "posthog_team"."access_control",- "posthog_team"."week_start_day",- "posthog_team"."inject_web_apps",- "posthog_team"."test_account_filters",- "posthog_team"."test_account_filters_default_checked",- "posthog_team"."path_cleaning_filters",- "posthog_team"."timezone",- "posthog_team"."data_attributes",- "posthog_team"."person_display_name_properties",- "posthog_team"."live_events_columns",- "posthog_team"."recording_domains",- "posthog_team"."human_friendly_comparison_periods",- "posthog_team"."cookieless_server_hash_mode",- "posthog_team"."primary_dashboard_id",- "posthog_team"."default_data_theme",- "posthog_team"."extra_settings",- "posthog_team"."modifiers",- "posthog_team"."correlation_config",- "posthog_team"."session_recording_retention_period_days",- "posthog_team"."external_data_workspace_id",- "posthog_team"."external_data_workspace_last_synced_at",- "posthog_team"."api_query_rate_limit",- "posthog_team"."drop_events_older_than",- "posthog_team"."base_currency",- "posthog_team"."experiment_recalculation_time",- "posthog_team"."default_experiment_confidence_level",- "posthog_team"."default_experiment_stats_method",- "posthog_team"."business_model"- FROM "posthog_team"- WHERE "posthog_team"."id" = 99999- LIMIT 21- '''-# ----# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.153- '''- SELECT "posthog_dashboarditem"."id",- "posthog_dashboarditem"."name",- "posthog_dashboarditem"."derived_name",- "posthog_dashboarditem"."description",- "posthog_dashboarditem"."team_id",- "posthog_dashboarditem"."filters",- "posthog_dashboarditem"."filters_hash",- "posthog_dashboarditem"."query",- "posthog_dashboarditem"."query_metadata",- "posthog_dashboarditem"."order",- "posthog_dashboarditem"."deleted",- "posthog_dashboarditem"."saved",- "posthog_dashboarditem"."created_at",- "posthog_dashboarditem"."refreshing",- "posthog_dashboarditem"."created_by_id",- "posthog_dashboarditem"."is_sample",- "posthog_dashboarditem"."short_id",- "posthog_dashboarditem"."favorited",- "posthog_dashboarditem"."refresh_attempt",- "posthog_dashboarditem"."last_modified_at",- "posthog_dashboarditem"."last_modified_by_id",- "posthog_dashboarditem"."dashboard_id",- "posthog_dashboarditem"."last_refresh",- "posthog_dashboarditem"."layouts",- "posthog_dashboarditem"."color",- "posthog_dashboarditem"."dive_dashboard_id",- "posthog_dashboarditem"."updated_at",- "posthog_dashboarditem"."deprecated_tags",- "posthog_dashboarditem"."tags"- FROM "posthog_dashboarditem"- WHERE "posthog_dashboarditem"."id" = 99999- LIMIT 21- '''-# ----# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.154- '''- SELECT "posthog_team"."id",- "posthog_team"."uuid",- "posthog_team"."organization_id",- "posthog_team"."parent_team_id",- "posthog_team"."project_id",- "posthog_team"."api_token",- "posthog_team"."app_urls",- "posthog_team"."name",- "posthog_team"."slack_incoming_webhook",- "posthog_team"."created_at",- "posthog_team"."updated_at",- "posthog_team"."anonymize_ips",- "posthog_team"."completed_snippet_onboarding",- "posthog_team"."has_completed_onboarding_for",- "posthog_team"."onboarding_tasks",- "posthog_team"."ingested_event",- "posthog_team"."ingested_production_event",- "posthog_team"."ingested_production_event_last_checked_at",- "posthog_team"."person_processing_opt_out",- "posthog_team"."secret_api_token",- "posthog_team"."secret_api_token_backup",- "posthog_team"."session_recording_opt_in",- "posthog_team"."session_recording_sample_rate",- "posthog_team"."session_recording_minimum_duration_milliseconds",- "posthog_team"."session_recording_linked_flag",- "posthog_team"."session_recording_network_payload_capture_config",- "posthog_team"."session_recording_masking_config",- "posthog_team"."session_recording_url_trigger_config",- "posthog_team"."session_recording_url_blocklist_config",- "posthog_team"."session_recording_event_trigger_config",- "posthog_team"."session_recording_trigger_match_type_config",- "posthog_team"."session_recording_trigger_groups",- "posthog_team"."session_replay_config",- "posthog_team"."session_recording_retention_period",- "posthog_team"."event_retention_months",- "posthog_team"."conversations_enabled",- "posthog_team"."conversations_settings",- "posthog_team"."proactive_tasks_enabled",- "posthog_team"."survey_config",- "posthog_team"."surveys_opt_in",- "posthog_team"."product_tours_opt_in",- "posthog_team"."capture_console_log_opt_in",- "posthog_team"."capture_performance_opt_in",- "posthog_team"."capture_dead_clicks",- "posthog_team"."autocapture_opt_out",- "posthog_team"."autocapture_web_vitals_opt_in",- "posthog_team"."autocapture_web_vitals_allowed_metrics",- "posthog_team"."autocapture_exceptions_opt_in",- "posthog_team"."autocapture_exceptions_errors_to_ignore",- "posthog_team"."logs_settings",- "posthog_team"."llm_gateway_enabled_at",- "posthog_team"."llm_gateway_revoked_at",- "posthog_team"."llm_gateway_overspend_allowance_usd",- "posthog_team"."heatmaps_opt_in",- "posthog_team"."receive_org_level_activity_logs",- "posthog_team"."web_analytics_pre_aggregated_tables_enabled",- "posthog_team"."web_analytics_pre_aggregated_tables_version",- "posthog_team"."flags_persistence_default",- "posthog_team"."feature_flag_confirmation_enabled",- "posthog_team"."feature_flag_confirmation_message",- "posthog_team"."default_evaluation_environments_enabled",- "posthog_team"."require_evaluation_environment_tags",- "posthog_team"."default_evaluation_contexts_enabled",- "posthog_team"."require_evaluation_contexts",- "posthog_team"."session_recording_version",- "posthog_team"."signup_token",- "posthog_team"."is_demo",- "posthog_team"."access_control",- "posthog_team"."week_start_day",- "posthog_team"."inject_web_apps",- "posthog_team"."test_account_filters",- "posthog_team"."test_account_filters_default_checked",- "posthog_team"."path_cleaning_filters",- "posthog_team"."timezone",- "posthog_team"."data_attributes",- "posthog_team"."person_display_name_properties",- "posthog_team"."live_events_columns",- "posthog_team"."recording_domains",- "posthog_team"."human_friendly_comparison_periods",- "posthog_team"."cookieless_server_hash_mode",- "posthog_team"."primary_dashboard_id",- "posthog_team"."default_data_theme",- "posthog_team"."extra_settings",- "posthog_team"."modifiers",- "posthog_team"."correlation_config",- "posthog_team"."session_recording_retention_period_days",- "posthog_team"."external_data_workspace_id",- "posthog_team"."external_data_workspace_last_synced_at",- "posthog_team"."api_query_rate_limit",- "posthog_team"."drop_events_older_than",- "posthog_team"."base_currency",- "posthog_team"."experiment_recalculation_time",- "posthog_team"."default_experiment_confidence_level",- "posthog_team"."default_experiment_stats_method",- "posthog_team"."business_model"- FROM "posthog_team"- WHERE "posthog_team"."id" = 99999- LIMIT 21- '''-# ----# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.155- '''- SELECT "posthog_organization"."id",- "posthog_organization"."name",- "posthog_organization"."slug",- "posthog_organization"."logo_media_id",- "posthog_organization"."created_at",- "posthog_organization"."updated_at",- "posthog_organization"."is_active",- "posthog_organization"."is_not_active_reason",- "posthog_organization"."session_cookie_age",- "posthog_organization"."is_member_join_email_enabled",- "posthog_organization"."is_ai_data_processing_approved",- "posthog_organization"."is_ai_training_opted_in",- "posthog_organization"."is_ai_training_locked",- "posthog_organization"."is_ai_training_cta_shown",- "posthog_organization"."enforce_2fa",- "posthog_organization"."members_can_invite",- "posthog_organization"."members_can_create_projects",- "posthog_organization"."members_can_use_personal_api_keys",- "posthog_organization"."allow_publicly_shared_resources",- "posthog_organization"."default_role_id",- "posthog_organization"."plugins_access_level",- "posthog_organization"."for_internal_metrics",- "posthog_organization"."default_experiment_stats_method",- "posthog_organization"."default_anonymize_ips",- "posthog_organization"."is_hipaa",- "posthog_organization"."is_pending_deletion",- "posthog_organization"."customer_id",- "posthog_organization"."available_product_features",- "posthog_organization"."usage",- "posthog_organization"."never_drop_data",- "posthog_organization"."customer_trust_scores",- "posthog_organization"."setup_section_2_completed",- "posthog_organization"."personalization",- "posthog_organization"."domain_whitelist",- "posthog_organization"."is_platform"- FROM "posthog_organization"- WHERE "posthog_organization"."id" = '00000000-0000-0000-0000-000000000000'::uuid- LIMIT 21- '''-# ----# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.156- '''- SELECT "posthog_team"."id",- "posthog_team"."uuid",- "posthog_team"."organization_id",- "posthog_team"."parent_team_id",- "posthog_team"."project_id",- "posthog_team"."api_token",- "posthog_team"."app_urls",- "posthog_team"."name",- "posthog_team"."slack_incoming_webhook",- "posthog_team"."created_at",- "posthog_team"."updated_at",- "posthog_team"."anonymize_ips",- "posthog_team"."completed_snippet_onboarding",- "posthog_team"."has_completed_onboarding_for",- "posthog_team"."onboarding_tasks",- "posthog_team"."ingested_event",- "posthog_team"."ingested_production_event",- "posthog_team"."ingested_production_event_last_checked_at",- "posthog_team"."person_processing_opt_out",- "posthog_team"."secret_api_token",- "posthog_team"."secret_api_token_backup",- "posthog_team"."session_recording_opt_in",- "posthog_team"."session_recording_sample_rate",- "posthog_team"."session_recording_minimum_duration_milliseconds",- "posthog_team"."session_recording_linked_flag",- "posthog_team"."session_recording_network_payload_capture_config",- "posthog_team"."session_recording_masking_config",- "posthog_team"."session_recording_url_trigger_config",- "posthog_team"."session_recording_url_blocklist_config",- "posthog_team"."session_recording_event_trigger_config",- "posthog_team"."session_recording_trigger_match_type_config",- "posthog_team"."session_recording_trigger_groups",- "posthog_team"."session_replay_config",- "posthog_team"."session_recording_retention_period",- "posthog_team"."event_retention_months",- "posthog_team"."conversations_enabled",- "posthog_team"."conversations_settings",- "posthog_team"."proactive_tasks_enabled",- "posthog_team"."survey_config",- "posthog_team"."surveys_opt_in",- "posthog_team"."product_tours_opt_in",- "posthog_team"."capture_console_log_opt_in",- "posthog_team"."capture_performance_opt_in",- "posthog_team"."capture_dead_clicks",- "posthog_team"."autocapture_opt_out",- "posthog_team"."autocapture_web_vitals_opt_in",- "posthog_team"."autocapture_web_vitals_allowed_metrics",- "posthog_team"."autocapture_exceptions_opt_in",- "posthog_team"."autocapture_exceptions_errors_to_ignore",- "posthog_team"."logs_settings",- "posthog_team"."llm_gateway_enabled_at",- "posthog_team"."llm_gateway_revoked_at",- "posthog_team"."llm_gateway_overspend_allowance_usd",- "posthog_team"."heatmaps_opt_in",- "posthog_team"."receive_org_level_activity_logs",- "posthog_team"."web_analytics_pre_aggregated_tables_enabled",- "posthog_team"."web_analytics_pre_aggregated_tables_version",- "posthog_team"."flags_persistence_default",- "posthog_team"."feature_flag_confirmation_enabled",- "posthog_team"."feature_flag_confirmation_message",- "posthog_team"."default_evaluation_environments_enabled",- "posthog_team"."require_evaluation_environment_tags",- "posthog_team"."default_evaluation_contexts_enabled",- "posthog_team"."require_evaluation_contexts",- "posthog_team"."session_recording_version",- "posthog_team"."signup_token",- "posthog_team"."is_demo",- "posthog_team"."access_control",- "posthog_team"."week_start_day",- "posthog_team"."inject_web_apps",- "posthog_team"."test_account_filters",- "posthog_team"."test_account_filters_default_checked",- "posthog_team"."path_cleaning_filters",- "posthog_team"."timezone",- "posthog_team"."data_attributes",- "posthog_team"."person_display_name_properties",- "posthog_team"."live_events_columns",- "posthog_team"."recording_domains",- "posthog_team"."human_friendly_comparison_periods",- "posthog_team"."cookieless_server_hash_mode",- "posthog_team"."primary_dashboard_id",- "posthog_team"."default_data_theme",- "posthog_team"."extra_settings",- "posthog_team"."modifiers",- "posthog_team"."correlation_config",- "posthog_team"."session_recording_retention_period_days",- "posthog_team"."external_data_workspace_id",- "posthog_team"."external_data_workspace_last_synced_at",- "posthog_team"."api_query_rate_limit",- "posthog_team"."drop_events_older_than",- "posthog_team"."base_currency",- "posthog_team"."experiment_recalculation_time",- "posthog_team"."default_experiment_confidence_level",- "posthog_team"."default_experiment_stats_method",- "posthog_team"."business_model"- FROM "posthog_team"- WHERE "posthog_team"."id" = 99999- LIMIT 21- '''-# ----# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.157- '''- SELECT "posthog_dashboardtile"."id",- "posthog_dashboardtile"."dashboard_id",- "posthog_dashboardtile"."insight_id",- "posthog_dashboardtile"."text_id",- "posthog_dashboardtile"."button_tile_id",- "posthog_dashboardtile"."widget_id",- "posthog_dashboardtile"."team_id",- "posthog_dashboardtile"."layouts",- "posthog_dashboardtile"."color",- "posthog_dashboardtile"."filters_hash",- "posthog_dashboardtile"."last_refresh",- "posthog_dashboardtile"."refreshing",- "posthog_dashboardtile"."refresh_attempt",- "posthog_dashboardtile"."filters_overrides",- "posthog_dashboardtile"."show_description",- "posthog_dashboardtile"."transparent_background",- "posthog_dashboardtile"."deleted"- FROM "posthog_dashboardtile"- WHERE "posthog_dashboardtile"."id" = 99999- LIMIT 21- '''-# ----# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.158- '''- SELECT "posthog_dashboarditem"."id",- "posthog_dashboarditem"."name",- "posthog_dashboarditem"."derived_name",- "posthog_dashboarditem"."description",- "posthog_dashboarditem"."team_id",- "posthog_dashboarditem"."filters",- "posthog_dashboarditem"."filters_hash",- "posthog_dashboarditem"."query",- "posthog_dashboarditem"."query_metadata",- "posthog_dashboarditem"."order",- "posthog_dashboarditem"."deleted",- "posthog_dashboarditem"."saved",- "posthog_dashboarditem"."created_at",- "posthog_dashboarditem"."refreshing",- "posthog_dashboarditem"."created_by_id",- "posthog_dashboarditem"."is_sample",- "posthog_dashboarditem"."short_id",- "posthog_dashboarditem"."favorited",- "posthog_dashboarditem"."refresh_attempt",- "posthog_dashboarditem"."last_modified_at",- "posthog_dashboarditem"."last_modified_by_id",- "posthog_dashboarditem"."dashboard_id",- "posthog_dashboarditem"."last_refresh",- "posthog_dashboarditem"."layouts",- "posthog_dashboarditem"."color",- "posthog_dashboarditem"."dive_dashboard_id",- "posthog_dashboarditem"."updated_at",- "posthog_dashboarditem"."deprecated_tags",- "posthog_dashboarditem"."tags"- FROM "posthog_dashboarditem"- WHERE "posthog_dashboarditem"."id" = 99999- LIMIT 21- '''-# ----# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.159- '''- SELECT "posthog_dashboard"."id",- "posthog_dashboard"."name",- "posthog_dashboard"."description",- "posthog_dashboard"."team_id",- "posthog_dashboard"."pinned",- "posthog_dashboard"."created_at",- "posthog_dashboard"."created_by_id",- "posthog_dashboard"."deleted",- "posthog_dashboard"."last_accessed_at",- "posthog_dashboard"."last_refresh",- "posthog_dashboard"."filters",- "posthog_dashboard"."variables",- "posthog_dashboard"."breakdown_colors",- "posthog_dashboard"."data_color_theme_id",- "posthog_dashboard"."creation_mode",- "posthog_dashboard"."restriction_level",- "posthog_dashboard"."quick_filter_ids",- "posthog_dashboard"."deprecated_tags",- "posthog_dashboard"."tags",- "posthog_dashboard"."share_token",- "posthog_dashboard"."is_shared"- FROM "posthog_dashboard"- WHERE "posthog_dashboard"."id" = 99999- LIMIT 21- '''-# ----# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.16- '''- SELECT "posthog_insightvariable"."created_by_id",- "posthog_insightvariable"."created_at",- "posthog_insightvariable"."updated_at",- "posthog_insightvariable"."id",- "posthog_insightvariable"."team_id",- "posthog_insightvariable"."name",- "posthog_insightvariable"."code_name",- "posthog_insightvariable"."type",- "posthog_insightvariable"."default_value",- "posthog_insightvariable"."values"- FROM "posthog_insightvariable"- WHERE "posthog_insightvariable"."team_id" = 99999- '''-# ----# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.160- '''- SELECT "posthog_team"."id",- "posthog_team"."uuid",- "posthog_team"."organization_id",- "posthog_team"."parent_team_id",- "posthog_team"."project_id",- "posthog_team"."api_token",- "posthog_team"."app_urls",- "posthog_team"."name",- "posthog_team"."slack_incoming_webhook",- "posthog_team"."created_at",- "posthog_team"."updated_at",- "posthog_team"."anonymize_ips",- "posthog_team"."completed_snippet_onboarding",- "posthog_team"."has_completed_onboarding_for",- "posthog_team"."onboarding_tasks",- "posthog_team"."ingested_event",- "posthog_team"."ingested_production_event",- "posthog_team"."ingested_production_event_last_checked_at",- "posthog_team"."person_processing_opt_out",- "posthog_team"."secret_api_token",- "posthog_team"."secret_api_token_backup",- "posthog_team"."session_recording_opt_in",- "posthog_team"."session_recording_sample_rate",- "posthog_team"."session_recording_minimum_duration_milliseconds",- "posthog_team"."session_recording_linked_flag",- "posthog_team"."session_recording_network_payload_capture_config",- "posthog_team"."session_recording_masking_config",- "posthog_team"."session_recording_url_trigger_config",- "posthog_team"."session_recording_url_blocklist_config",- "posthog_team"."session_recording_event_trigger_config",- "posthog_team"."session_recording_trigger_match_type_config",- "posthog_team"."session_recording_trigger_groups",- "posthog_team"."session_replay_config",- "posthog_team"."session_recording_retention_period",- "posthog_team"."event_retention_months",- "posthog_team"."conversations_enabled",- "posthog_team"."conversations_settings",- "posthog_team"."proactive_tasks_enabled",- "posthog_team"."survey_config",- "posthog_team"."surveys_opt_in",- "posthog_team"."product_tours_opt_in",- "posthog_team"."capture_console_log_opt_in",- "posthog_team"."capture_performance_opt_in",- "posthog_team"."capture_dead_clicks",- "posthog_team"."autocapture_opt_out",- "posthog_team"."autocapture_web_vitals_opt_in",- "posthog_team"."autocapture_web_vitals_allowed_metrics",- "posthog_team"."autocapture_exceptions_opt_in",- "posthog_team"."autocapture_exceptions_errors_to_ignore",- "posthog_team"."logs_settings",- "posthog_team"."llm_gateway_enabled_at",- "posthog_team"."llm_gateway_revoked_at",- "posthog_team"."llm_gateway_overspend_allowance_usd",- "posthog_team"."heatmaps_opt_in",- "posthog_team"."receive_org_level_activity_logs",- "posthog_team"."web_analytics_pre_aggregated_tables_enabled",- "posthog_team"."web_analytics_pre_aggregated_tables_version",- "posthog_team"."flags_persistence_default",- "posthog_team"."feature_flag_confirmation_enabled",- "posthog_team"."feature_flag_confirmation_message",- "posthog_team"."default_evaluation_environments_enabled",- "posthog_team"."require_evaluation_environment_tags",- "posthog_team"."default_evaluation_contexts_enabled",- "posthog_team"."require_evaluation_contexts",- "posthog_team"."session_recording_version",- "posthog_team"."signup_token",- "posthog_team"."is_demo",- "posthog_team"."access_control",- "posthog_team"."week_start_day",- "posthog_team"."inject_web_apps",- "posthog_team"."test_account_filters",- "posthog_team"."test_account_filters_default_checked",- "posthog_team"."path_cleaning_filters",- "posthog_team"."timezone",- "posthog_team"."data_attributes",- "posthog_team"."person_display_name_properties",- "posthog_team"."live_events_columns",- "posthog_team"."recording_domains",- "posthog_team"."human_friendly_comparison_periods",- "posthog_team"."cookieless_server_hash_mode",- "posthog_team"."primary_dashboard_id",- "posthog_team"."default_data_theme",- "posthog_team"."extra_settings",- "posthog_team"."modifiers",- "posthog_team"."correlation_config",- "posthog_team"."session_recording_retention_period_days",- "posthog_team"."external_data_workspace_id",- "posthog_team"."external_data_workspace_last_synced_at",- "posthog_team"."api_query_rate_limit",- "posthog_team"."drop_events_older_than",- "posthog_team"."base_currency",- "posthog_team"."experiment_recalculation_time",- "posthog_team"."default_experiment_confidence_level",- "posthog_team"."default_experiment_stats_method",- "posthog_team"."business_model"- FROM "posthog_team"- WHERE "posthog_team"."id" = 99999- LIMIT 21- '''-# ----# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.161- '''- SELECT "posthog_organization"."id",- "posthog_organization"."name",- "posthog_organization"."slug",- "posthog_organization"."logo_media_id",- "posthog_organization"."created_at",- "posthog_organization"."updated_at",- "posthog_organization"."is_active",- "posthog_organization"."is_not_active_reason",- "posthog_organization"."session_cookie_age",- "posthog_organization"."is_member_join_email_enabled",- "posthog_organization"."is_ai_data_processing_approved",- "posthog_organization"."is_ai_training_opted_in",- "posthog_organization"."is_ai_training_locked",- "posthog_organization"."is_ai_training_cta_shown",- "posthog_organization"."enforce_2fa",- "posthog_organization"."members_can_invite",- "posthog_organization"."members_can_create_projects",- "posthog_organization"."members_can_use_personal_api_keys",- "posthog_organization"."allow_publicly_shared_resources",- "posthog_organization"."default_role_id",- "posthog_organization"."plugins_access_level",- "posthog_organization"."for_internal_metrics",- "posthog_organization"."default_experiment_stats_method",- "posthog_organization"."default_anonymize_ips",- "posthog_organization"."is_hipaa",- "posthog_organization"."is_pending_deletion",- "posthog_organization"."customer_id",- "posthog_organization"."available_product_features",- "posthog_organization"."usage",- "posthog_organization"."never_drop_data",- "posthog_organization"."customer_trust_scores",- "posthog_organization"."setup_section_2_completed",- "posthog_organization"."personalization",- "posthog_organization"."domain_whitelist",- "posthog_organization"."is_platform"- FROM "posthog_organization"- WHERE "posthog_organization"."id" = '00000000-0000-0000-0000-000000000000'::uuid- LIMIT 21- '''-# ----# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.162- '''- SELECT "posthog_organization"."id",- "posthog_organization"."name",- "posthog_organization"."slug",- "posthog_organization"."logo_media_id",- "posthog_organization"."created_at",- "posthog_organization"."updated_at",- "posthog_organization"."is_active",- "posthog_organization"."is_not_active_reason",- "posthog_organization"."session_cookie_age",- "posthog_organization"."is_member_join_email_enabled",- "posthog_organization"."is_ai_data_processing_approved",- "posthog_organization"."is_ai_training_opted_in",- "posthog_organization"."is_ai_training_locked",- "posthog_organization"."is_ai_training_cta_shown",- "posthog_organization"."enforce_2fa",- "posthog_organization"."members_can_invite",- "posthog_organization"."members_can_create_projects",- "posthog_organization"."members_can_use_personal_api_keys",- "posthog_organization"."allow_publicly_shared_resources",- "posthog_organization"."default_role_id",- "posthog_organization"."plugins_access_level",- "posthog_organization"."for_internal_metrics",- "posthog_organization"."default_experiment_stats_method",- "posthog_organization"."default_anonymize_ips",- "posthog_organization"."is_hipaa",- "posthog_organization"."is_pending_deletion",- "posthog_organization"."customer_id",- "posthog_organization"."available_product_features",- "posthog_organization"."usage",- "posthog_organization"."never_drop_data",- "posthog_organization"."customer_trust_scores",- "posthog_organization"."setup_section_2_completed",- "posthog_organization"."personalization",- "posthog_organization"."domain_whitelist",- "posthog_organization"."is_platform"- FROM "posthog_organization"- WHERE "posthog_organization"."id" = '00000000-0000-0000-0000-000000000000'::uuid- LIMIT 21- '''-# ----# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.163- '''- SELECT "posthog_team"."id",- "posthog_team"."uuid",- "posthog_team"."organization_id",- "posthog_team"."parent_team_id",- "posthog_team"."project_id",- "posthog_team"."api_token",- "posthog_team"."app_urls",- "posthog_team"."name",- "posthog_team"."slack_incoming_webhook",- "posthog_team"."created_at",- "posthog_team"."updated_at",- "posthog_team"."anonymize_ips",- "posthog_team"."completed_snippet_onboarding",- "posthog_team"."has_completed_onboarding_for",- "posthog_team"."onboarding_tasks",- "posthog_team"."ingested_event",- "posthog_team"."ingested_production_event",- "posthog_team"."ingested_production_event_last_checked_at",- "posthog_team"."person_processing_opt_out",- "posthog_team"."secret_api_token",- "posthog_team"."secret_api_token_backup",- "posthog_team"."session_recording_opt_in",- "posthog_team"."session_recording_sample_rate",- "posthog_team"."session_recording_minimum_duration_milliseconds",- "posthog_team"."session_recording_linked_flag",- "posthog_team"."session_recording_network_payload_capture_config",- "posthog_team"."session_recording_masking_config",- "posthog_team"."session_recording_url_trigger_config",- "posthog_team"."session_recording_url_blocklist_config",- "posthog_team"."session_recording_event_trigger_config",- "posthog_team"."session_recording_trigger_match_type_config",- "posthog_team"."session_recording_trigger_groups",- "posthog_team"."session_replay_config",- "posthog_team"."session_recording_retention_period",- "posthog_team"."event_retention_months",- "posthog_team"."conversations_enabled",- "posthog_team"."conversations_settings",- "posthog_team"."proactive_tasks_enabled",- "posthog_team"."survey_config",- "posthog_team"."surveys_opt_in",- "posthog_team"."product_tours_opt_in",- "posthog_team"."capture_console_log_opt_in",- "posthog_team"."capture_performance_opt_in",- "posthog_team"."capture_dead_clicks",- "posthog_team"."autocapture_opt_out",- "posthog_team"."autocapture_web_vitals_opt_in",- "posthog_team"."autocapture_web_vitals_allowed_metrics",- "posthog_team"."autocapture_exceptions_opt_in",- "posthog_team"."autocapture_exceptions_errors_to_ignore",- "posthog_team"."logs_settings",- "posthog_team"."llm_gateway_enabled_at",- "posthog_team"."llm_gateway_revoked_at",- "posthog_team"."llm_gateway_overspend_allowance_usd",- "posthog_team"."heatmaps_opt_in",- "posthog_team"."receive_org_level_activity_logs",- "posthog_team"."web_analytics_pre_aggregated_tables_enabled",- "posthog_team"."web_analytics_pre_aggregated_tables_version",- "posthog_team"."flags_persistence_default",- "posthog_team"."feature_flag_confirmation_enabled",- "posthog_team"."feature_flag_confirmation_message",- "posthog_team"."default_evaluation_environments_enabled",- "posthog_team"."require_evaluation_environment_tags",- "posthog_team"."default_evaluation_contexts_enabled",- "posthog_team"."require_evaluation_contexts",- "posthog_team"."session_recording_version",- "posthog_team"."signup_token",- "posthog_team"."is_demo",- "posthog_team"."access_control",- "posthog_team"."week_start_day",- "posthog_team"."inject_web_apps",- "posthog_team"."test_account_filters",- "posthog_team"."test_account_filters_default_checked",- "posthog_team"."path_cleaning_filters",- "posthog_team"."timezone",- "posthog_team"."data_attributes",- "posthog_team"."person_display_name_properties",- "posthog_team"."live_events_columns",- "posthog_team"."recording_domains",- "posthog_team"."human_friendly_comparison_periods",- "posthog_team"."cookieless_server_hash_mode",- "posthog_team"."primary_dashboard_id",- "posthog_team"."default_data_theme",- "posthog_team"."extra_settings",- "posthog_team"."modifiers",- "posthog_team"."correlation_config",- "posthog_team"."session_recording_retention_period_days",- "posthog_team"."external_data_workspace_id",- "posthog_team"."external_data_workspace_last_synced_at",- "posthog_team"."api_query_rate_limit",- "posthog_team"."drop_events_older_than",- "posthog_team"."base_currency",- "posthog_team"."experiment_recalculation_time",- "posthog_team"."default_experiment_confidence_level",- "posthog_team"."default_experiment_stats_method",- "posthog_team"."business_model"- FROM "posthog_team"- WHERE "posthog_team"."id" = 99999- LIMIT 21- '''-# ----# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.164- '''- SELECT "posthog_dashboardtile"."id",- "posthog_dashboardtile"."dashboard_id",- "posthog_dashboardtile"."insight_id",- "posthog_dashboardtile"."text_id",- "posthog_dashboardtile"."button_tile_id",- "posthog_dashboardtile"."widget_id",- "posthog_dashboardtile"."team_id",- "posthog_dashboardtile"."layouts",- "posthog_dashboardtile"."color",- "posthog_dashboardtile"."filters_hash",- "posthog_dashboardtile"."last_refresh",- "posthog_dashboardtile"."refreshing",- "posthog_dashboardtile"."refresh_attempt",- "posthog_dashboardtile"."filters_overrides",- "posthog_dashboardtile"."show_description",- "posthog_dashboardtile"."transparent_background",- "posthog_dashboardtile"."deleted"- FROM "posthog_dashboardtile"- INNER JOIN "posthog_dashboard" ON ("posthog_dashboardtile"."dashboard_id" = "posthog_dashboard"."id")- WHERE (NOT ("posthog_dashboardtile"."deleted"- AND "posthog_dashboardtile"."deleted" IS NOT NULL)- AND NOT ("posthog_dashboard"."deleted")- AND "posthog_dashboardtile"."insight_id" = 99999)- '''-# ----# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.165- '''- SELECT "posthog_dashboardtile"."id",- "posthog_dashboardtile"."dashboard_id",- "posthog_dashboardtile"."insight_id",- "posthog_dashboardtile"."text_id",- "posthog_dashboardtile"."button_tile_id",- "posthog_dashboardtile"."widget_id",- "posthog_dashboardtile"."team_id",- "posthog_dashboardtile"."layouts",- "posthog_dashboardtile"."color",- "posthog_dashboardtile"."filters_hash",- "posthog_dashboardtile"."last_refresh",- "posthog_dashboardtile"."refreshing",- "posthog_dashboardtile"."refresh_attempt",- "posthog_dashboardtile"."filters_overrides",- "posthog_dashboardtile"."show_description",- "posthog_dashboardtile"."transparent_background",- "posthog_dashboardtile"."deleted"- FROM "posthog_dashboardtile"- INNER JOIN "posthog_dashboard" ON ("posthog_dashboardtile"."dashboard_id" = "posthog_dashboard"."id")- WHERE (NOT ("posthog_dashboardtile"."deleted"- AND "posthog_dashboardtile"."deleted" IS NOT NULL)- AND NOT ("posthog_dashboard"."deleted")- AND "posthog_dashboardtile"."insight_id" = 99999)- '''-# ----# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.166- '''- SELECT "posthog_insightvariable"."created_by_id",- "posthog_insightvariable"."created_at",- "posthog_insightvariable"."updated_at",- "posthog_insightvariable"."id",- "posthog_insightvariable"."team_id",- "posthog_insightvariable"."name",- "posthog_insightvariable"."code_name",- "posthog_insightvariable"."type",- "posthog_insightvariable"."default_value",- "posthog_insightvariable"."values"- FROM "posthog_insightvariable"- WHERE "posthog_insightvariable"."team_id" = 99999- '''-# ----# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.167- '''- SELECT "posthog_dashboardtile"."dashboard_id" AS "dashboard_id"- FROM "posthog_dashboardtile"- INNER JOIN "posthog_dashboard" ON ("posthog_dashboardtile"."dashboard_id" = "posthog_dashboard"."id")- WHERE (NOT ("posthog_dashboardtile"."deleted"- AND "posthog_dashboardtile"."deleted" IS NOT NULL)- AND NOT ("posthog_dashboard"."deleted")- AND "posthog_dashboardtile"."insight_id" = 99999)- '''-# ----# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.168- '''- SELECT "posthog_dashboard"."id",- "posthog_dashboard"."name",- "posthog_dashboard"."description",- "posthog_dashboard"."team_id",- "posthog_dashboard"."pinned",- "posthog_dashboard"."created_at",- "posthog_dashboard"."created_by_id",- "posthog_dashboard"."deleted",- "posthog_dashboard"."last_accessed_at",- "posthog_dashboard"."last_refresh",- "posthog_dashboard"."filters",- "posthog_dashboard"."variables",- "posthog_dashboard"."breakdown_colors",- "posthog_dashboard"."data_color_theme_id",- "posthog_dashboard"."creation_mode",- "posthog_dashboard"."restriction_level",- "posthog_dashboard"."quick_filter_ids",- "posthog_dashboard"."deprecated_tags",- "posthog_dashboard"."tags",- "posthog_dashboard"."share_token",- "posthog_dashboard"."is_shared"- FROM "posthog_dashboard"- WHERE (NOT ("posthog_dashboard"."deleted")- AND "posthog_dashboard"."id" IN (1,- 2,- 3,- 4,- 5 /* ... */))- '''-# ----# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.169- '''- SELECT "posthog_tag"."name" AS "tag__name"- FROM "posthog_taggeditem"- INNER JOIN "posthog_tag" ON ("posthog_taggeditem"."tag_id" = "posthog_tag"."id")- WHERE "posthog_taggeditem"."insight_id" = 99999- '''-# ----# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.17- '''- SELECT "posthog_dashboardtile"."id",- "posthog_dashboardtile"."dashboard_id",- "posthog_dashboardtile"."insight_id",- "posthog_dashboardtile"."text_id",- "posthog_dashboardtile"."button_tile_id",- "posthog_dashboardtile"."widget_id",- "posthog_dashboardtile"."team_id",- "posthog_dashboardtile"."layouts",- "posthog_dashboardtile"."color",- "posthog_dashboardtile"."filters_hash",- "posthog_dashboardtile"."last_refresh",- "posthog_dashboardtile"."refreshing",- "posthog_dashboardtile"."refresh_attempt",- "posthog_dashboardtile"."filters_overrides",- "posthog_dashboardtile"."show_description",- "posthog_dashboardtile"."transparent_background",- "posthog_dashboardtile"."deleted",- "posthog_dashboarditem"."id",- "posthog_dashboarditem"."name",- "posthog_dashboarditem"."derived_name",- "posthog_dashboarditem"."description",- "posthog_dashboarditem"."team_id",- "posthog_dashboarditem"."filters",- "posthog_dashboarditem"."filters_hash",- "posthog_dashboarditem"."query",- "posthog_dashboarditem"."query_metadata",- "posthog_dashboarditem"."order",- "posthog_dashboarditem"."deleted",- "posthog_dashboarditem"."saved",- "posthog_dashboarditem"."created_at",- "posthog_dashboarditem"."refreshing",- "posthog_dashboarditem"."created_by_id",- "posthog_dashboarditem"."is_sample",- "posthog_dashboarditem"."short_id",- "posthog_dashboarditem"."favorited",- "posthog_dashboarditem"."refresh_attempt",- "posthog_dashboarditem"."last_modified_at",- "posthog_dashboarditem"."last_modified_by_id",- "posthog_dashboarditem"."dashboard_id",- "posthog_dashboarditem"."last_refresh",- "posthog_dashboarditem"."layouts",- "posthog_dashboarditem"."color",- "posthog_dashboarditem"."dive_dashboard_id",- "posthog_dashboarditem"."updated_at",- "posthog_dashboarditem"."deprecated_tags",- "posthog_dashboarditem"."tags",- "posthog_team"."id",- "posthog_team"."uuid",- "posthog_team"."organization_id",- "posthog_team"."parent_team_id",- "posthog_team"."project_id",- "posthog_team"."api_token",- "posthog_team"."app_urls",- "posthog_team"."name",- "posthog_team"."slack_incoming_webhook",- "posthog_team"."created_at",- "posthog_team"."updated_at",- "posthog_team"."anonymize_ips",- "posthog_team"."completed_snippet_onboarding",- "posthog_team"."has_completed_onboarding_for",- "posthog_team"."onboarding_tasks",- "posthog_team"."ingested_event",- "posthog_team"."ingested_production_event",- "posthog_team"."ingested_production_event_last_checked_at",- "posthog_team"."person_processing_opt_out",- "posthog_team"."secret_api_token",- "posthog_team"."secret_api_token_backup",- "posthog_team"."session_recording_opt_in",- "posthog_team"."session_recording_sample_rate",- "posthog_team"."session_recording_minimum_duration_milliseconds",- "posthog_team"."session_recording_linked_flag",- "posthog_team"."session_recording_network_payload_capture_config",- "posthog_team"."session_recording_masking_config",- "posthog_team"."session_recording_url_trigger_config",- "posthog_team"."session_recording_url_blocklist_config",- "posthog_team"."session_recording_event_trigger_config",- "posthog_team"."session_recording_trigger_match_type_config",- "posthog_team"."session_recording_trigger_groups",- "posthog_team"."session_replay_config",- "posthog_team"."session_recording_retention_period",- "posthog_team"."event_retention_months",- "posthog_team"."conversations_enabled",- "posthog_team"."conversations_settings",- "posthog_team"."proactive_tasks_enabled",- "posthog_team"."survey_config",- "posthog_team"."surveys_opt_in",- "posthog_team"."product_tours_opt_in",- "posthog_team"."capture_console_log_opt_in",- "posthog_team"."capture_performance_opt_in",- "posthog_team"."capture_dead_clicks",- "posthog_team"."autocapture_opt_out",- "posthog_team"."autocapture_web_vitals_opt_in",- "posthog_team"."autocapture_web_vitals_allowed_metrics",- "posthog_team"."autocapture_exceptions_opt_in",- "posthog_team"."autocapture_exceptions_errors_to_ignore",- "posthog_team"."logs_settings",- "posthog_team"."llm_gateway_enabled_at",- "posthog_team"."llm_gateway_revoked_at",- "posthog_team"."llm_gateway_overspend_allowance_usd",- "posthog_team"."heatmaps_opt_in",- "posthog_team"."receive_org_level_activity_logs",- "posthog_team"."web_analytics_pre_aggregated_tables_enabled",- "posthog_team"."web_analytics_pre_aggregated_tables_version",- "posthog_team"."flags_persistence_default",- "posthog_team"."feature_flag_confirmation_enabled",- "posthog_team"."feature_flag_confirmation_message",- "posthog_team"."default_evaluation_environments_enabled",- "posthog_team"."require_evaluation_environment_tags",- "posthog_team"."default_evaluation_contexts_enabled",- "posthog_team"."require_evaluation_contexts",- "posthog_team"."session_recording_version",- "posthog_team"."signup_token",- "posthog_team"."is_demo",- "posthog_team"."access_control",- "posthog_team"."week_start_day",- "posthog_team"."inject_web_apps",- "posthog_team"."test_account_filters",- "posthog_team"."test_account_filters_default_checked",- "posthog_team"."path_cleaning_filters",- "posthog_team"."timezone",- "posthog_team"."data_attributes",- "posthog_team"."person_display_name_properties",- "posthog_team"."live_events_columns",- "posthog_team"."recording_domains",- "posthog_team"."human_friendly_comparison_periods",- "posthog_team"."cookieless_server_hash_mode",- "posthog_team"."primary_dashboard_id",- "posthog_team"."default_data_theme",- "posthog_team"."extra_settings",- "posthog_team"."modifiers",- "posthog_team"."correlation_config",- "posthog_team"."session_recording_retention_period_days",- "posthog_team"."plugins_opt_in",- "posthog_team"."opt_out_capture",- "posthog_team"."event_names",- "posthog_team"."event_names_with_usage",- "posthog_team"."event_properties",- "posthog_team"."event_properties_with_usage",- "posthog_team"."event_properties_numerical",- "posthog_team"."external_data_workspace_id",- "posthog_team"."external_data_workspace_last_synced_at",- "posthog_team"."api_query_rate_limit",- "posthog_team"."revenue_tracking_config",- "posthog_team"."drop_events_older_than",- "posthog_team"."base_currency",- "posthog_team"."experiment_recalculation_time",- "posthog_team"."default_experiment_confidence_level",- "posthog_team"."default_experiment_stats_method",- "posthog_team"."business_model",- "posthog_user"."id",- "posthog_user"."password",- "posthog_user"."last_login",- "posthog_user"."first_name",- "posthog_user"."last_name",- "posthog_user"."is_staff",- "posthog_user"."date_joined",- "posthog_user"."uuid",- "posthog_user"."current_organization_id",- "posthog_user"."current_team_id",- "posthog_user"."email",- "posthog_user"."pending_email",- "posthog_user"."distinct_id",- "posthog_user"."is_email_verified",- "posthog_user"."credentials_reviewed_at",- "posthog_user"."requested_password_reset_at",- "posthog_user"."requested_2fa_reset_at",- "posthog_user"."has_seen_product_intro_for",- "posthog_user"."strapi_id",- "posthog_user"."is_active",- "posthog_user"."role_at_organization",- "posthog_user"."theme_mode",- "posthog_user"."partial_notification_settings",- "posthog_user"."anonymize_data",- "posthog_user"."allow_impersonation",- "posthog_user"."toolbar_mode",- "posthog_user"."hedgehog_config",- "posthog_user"."allow_sidebar_suggestions",- "posthog_user"."shortcut_position",- "posthog_user"."passkeys_enabled_for_2fa",- "posthog_user"."hide_mcp_hints",- "posthog_user"."onboarding_skipped_at",- "posthog_user"."onboarding_skipped_reason",- "posthog_user"."onboarding_skipped_organization_id",- "posthog_user"."onboarding_delegated_to_invite_id",- "posthog_user"."onboarding_delegated_to_organization_id",- "posthog_user"."onboarding_delegation_accepted_at",- "posthog_user"."events_column_config",- "posthog_user"."email_opt_in",- T6."id",- T6."password",- T6."last_login",- T6."first_name",- T6."last_name",- T6."is_staff",- T6."date_joined",- T6."uuid",- T6."current_organization_id",- T6."current_team_id",- T6."email",- T6."pending_email",- T6."distinct_id",- T6."is_email_verified",- T6."credentials_reviewed_at",- T6."requested_password_reset_at",- T6."requested_2fa_reset_at",- T6."has_seen_product_intro_for",- T6."strapi_id",- T6."is_active",- T6."role_at_organization",- T6."theme_mode",- T6."partial_notification_settings",- T6."anonymize_data",- T6."allow_impersonation",- T6."toolbar_mode",- T6."hedgehog_config",- T6."allow_sidebar_suggestions",- T6."shortcut_position",- T6."passkeys_enabled_for_2fa",- T6."hide_mcp_hints",- T6."onboarding_skipped_at",- T6."onboarding_skipped_reason",- T6."onboarding_skipped_organization_id",- T6."onboarding_delegated_to_invite_id",- T6."onboarding_delegated_to_organization_id",- T6."onboarding_delegation_accepted_at",- T6."events_column_config",- T6."email_opt_in",- "posthog_text"."id",- "posthog_text"."body",- "posthog_text"."created_by_id",- "posthog_text"."last_modified_at",- "posthog_text"."last_modified_by_id",- "posthog_text"."team_id",- "posthog_buttontile"."id",- "posthog_buttontile"."url",- "posthog_buttontile"."text",- "posthog_buttontile"."placement",- "posthog_buttontile"."style",- "posthog_buttontile"."created_by_id",- "posthog_buttontile"."last_modified_at",- "posthog_buttontile"."last_modified_by_id",- "posthog_buttontile"."team_id",- "posthog_dashboardwidget"."id",- "posthog_dashboardwidget"."widget_type",- "posthog_dashboardwidget"."name",- "posthog_dashboardwidget"."description",- "posthog_dashboardwidget"."config",- "posthog_dashboardwidget"."created_by_id",- "posthog_dashboardwidget"."last_modified_at",- "posthog_dashboardwidget"."last_modified_by_id",- "posthog_dashboardwidget"."team_id",- T10."id",- T10."password",- T10."last_login",- T10."first_name",- T10."last_name",- T10."is_staff",- T10."date_joined",- T10."uuid",- T10."current_organization_id",- T10."current_team_id",- T10."email",- T10."pending_email",- T10."distinct_id",- T10."is_email_verified",- T10."credentials_reviewed_at",- T10."requested_password_reset_at",- T10."requested_2fa_reset_at",- T10."has_seen_product_intro_for",- T10."strapi_id",- T10."is_active",- T10."role_at_organization",- T10."theme_mode",- T10."partial_notification_settings",- T10."anonymize_data",- T10."allow_impersonation",- T10."toolbar_mode",- T10."hedgehog_config",- T10."allow_sidebar_suggestions",- T10."shortcut_position",- T10."passkeys_enabled_for_2fa",- T10."hide_mcp_hints",- T10."onboarding_skipped_at",- T10."onboarding_skipped_reason",- T10."onboarding_skipped_organization_id",- T10."onboarding_delegated_to_invite_id",- T10."onboarding_delegated_to_organization_id",- T10."onboarding_delegation_accepted_at",- T10."events_column_config",- T10."email_opt_in",- T11."id",- T11."password",- T11."last_login",- T11."first_name",- T11."last_name",- T11."is_staff",- T11."date_joined",- T11."uuid",- T11."current_organization_id",- T11."current_team_id",- T11."email",- T11."pending_email",- T11."distinct_id",- T11."is_email_verified",- T11."credentials_reviewed_at",- T11."requested_password_reset_at",- T11."requested_2fa_reset_at",- T11."has_seen_product_intro_for",- T11."strapi_id",- T11."is_active",- T11."role_at_organization",- T11."theme_mode",- T11."partial_notification_settings",- T11."anonymize_data",- T11."allow_impersonation",- T11."toolbar_mode",- T11."hedgehog_config",- T11."allow_sidebar_suggestions",- T11."shortcut_position",- T11."passkeys_enabled_for_2fa",- T11."hide_mcp_hints",- T11."onboarding_skipped_at",- T11."onboarding_skipped_reason",- T11."onboarding_skipped_organization_id",- T11."onboarding_delegated_to_invite_id",- T11."onboarding_delegated_to_organization_id",- T11."onboarding_delegation_accepted_at",- T11."events_column_config",- T11."email_opt_in"- FROM "posthog_dashboardtile"- INNER JOIN "posthog_dashboard" ON ("posthog_dashboardtile"."dashboard_id" = "posthog_dashboard"."id")- LEFT OUTER JOIN "posthog_dashboarditem" ON ("posthog_dashboardtile"."insight_id" = "posthog_dashboarditem"."id")- LEFT OUTER JOIN "posthog_team" ON ("posthog_dashboarditem"."team_id" = "posthog_team"."id")- LEFT OUTER JOIN "posthog_user" ON ("posthog_dashboarditem"."created_by_id" = "posthog_user"."id")- LEFT OUTER JOIN "posthog_user" T6 ON ("posthog_dashboarditem"."last_modified_by_id" = T6."id")- LEFT OUTER JOIN "posthog_text" ON ("posthog_dashboardtile"."text_id" = "posthog_text"."id")- LEFT OUTER JOIN "posthog_buttontile" ON ("posthog_dashboardtile"."button_tile_id" = "posthog_buttontile"."id")- LEFT OUTER JOIN "posthog_dashboardwidget" ON ("posthog_dashboardtile"."widget_id" = "posthog_dashboardwidget"."id")- LEFT OUTER JOIN "posthog_user" T10 ON ("posthog_dashboardwidget"."created_by_id" = T10."id")- LEFT OUTER JOIN "posthog_user" T11 ON ("posthog_dashboardwidget"."last_modified_by_id" = T11."id")- WHERE (NOT ("posthog_dashboardtile"."deleted"- AND "posthog_dashboardtile"."deleted" IS NOT NULL)- AND NOT ("posthog_dashboard"."deleted")- AND "posthog_dashboardtile"."dashboard_id" = 99999- AND NOT ("posthog_dashboard"."deleted"- AND "posthog_dashboardtile"."deleted"- AND "posthog_dashboardtile"."deleted" IS NOT NULL)- AND (NOT "posthog_dashboarditem"."deleted"- OR "posthog_dashboardtile"."insight_id" IS NULL))- ORDER BY "posthog_dashboarditem"."order" ASC- '''-# ----# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.170- '''- SELECT "posthog_user"."id",- "posthog_user"."password",- "posthog_user"."last_login",- "posthog_user"."first_name",- "posthog_user"."last_name",- "posthog_user"."is_staff",- "posthog_user"."date_joined",- "posthog_user"."uuid",- "posthog_user"."current_organization_id",- "posthog_user"."current_team_id",- "posthog_user"."email",- "posthog_user"."pending_email",- "posthog_user"."distinct_id",- "posthog_user"."is_email_verified",- "posthog_user"."credentials_reviewed_at",- "posthog_user"."requested_2fa_reset_at",- "posthog_user"."has_seen_product_intro_for",- "posthog_user"."strapi_id",- "posthog_user"."is_active",- "posthog_user"."role_at_organization",- "posthog_user"."theme_mode",- "posthog_user"."partial_notification_settings",- "posthog_user"."anonymize_data",- "posthog_user"."allow_impersonation",- "posthog_user"."toolbar_mode",- "posthog_user"."hedgehog_config",- "posthog_user"."allow_sidebar_suggestions",- "posthog_user"."shortcut_position",- "posthog_user"."passkeys_enabled_for_2fa",- "posthog_user"."hide_mcp_hints",- "posthog_user"."onboarding_skipped_at",- "posthog_user"."onboarding_skipped_reason",- "posthog_user"."onboarding_skipped_organization_id",- "posthog_user"."onboarding_delegated_to_invite_id",- "posthog_user"."onboarding_delegated_to_organization_id",- "posthog_user"."onboarding_delegation_accepted_at",- "posthog_user"."events_column_config",- "posthog_user"."email_opt_in"- FROM "posthog_user"- WHERE ("posthog_user"."is_active"- AND "posthog_user"."id" = 99999)- '''-# ----# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.171- '''- SELECT "posthog_organization"."id",- "posthog_organization"."name",- "posthog_organization"."slug",- "posthog_organization"."logo_media_id",- "posthog_organization"."created_at",- "posthog_organization"."updated_at",- "posthog_organization"."is_active",- "posthog_organization"."is_not_active_reason",- "posthog_organization"."session_cookie_age",- "posthog_organization"."is_member_join_email_enabled",- "posthog_organization"."is_ai_data_processing_approved",- "posthog_organization"."is_ai_training_opted_in",- "posthog_organization"."is_ai_training_locked",- "posthog_organization"."is_ai_training_cta_shown",- "posthog_organization"."enforce_2fa",- "posthog_organization"."members_can_invite",- "posthog_organization"."members_can_create_projects",- "posthog_organization"."members_can_use_personal_api_keys",- "posthog_organization"."allow_publicly_shared_resources",- "posthog_organization"."default_role_id",- "posthog_organization"."plugins_access_level",- "posthog_organization"."for_internal_metrics",- "posthog_organization"."default_experiment_stats_method",- "posthog_organization"."default_anonymize_ips",- "posthog_organization"."is_hipaa",- "posthog_organization"."is_pending_deletion",- "posthog_organization"."customer_id",- "posthog_organization"."available_product_features",- "posthog_organization"."usage",- "posthog_organization"."never_drop_data",- "posthog_organization"."customer_trust_scores",- "posthog_organization"."setup_section_2_completed",- "posthog_organization"."personalization",- "posthog_organization"."domain_whitelist",- "posthog_organization"."is_platform"- FROM "posthog_organization"- WHERE "posthog_organization"."id" = '00000000-0000-0000-0000-000000000000'::uuid- LIMIT 21- '''-# ----# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.172- '''- SELECT "posthog_team"."id",- "posthog_team"."uuid",- "posthog_team"."organization_id",- "posthog_team"."parent_team_id",- "posthog_team"."project_id",- "posthog_team"."api_token",- "posthog_team"."app_urls",- "posthog_team"."name",- "posthog_team"."slack_incoming_webhook",- "posthog_team"."created_at",- "posthog_team"."updated_at",- "posthog_team"."anonymize_ips",- "posthog_team"."completed_snippet_onboarding",- "posthog_team"."has_completed_onboarding_for",- "posthog_team"."onboarding_tasks",- "posthog_team"."ingested_event",- "posthog_team"."ingested_production_event",- "posthog_team"."ingested_production_event_last_checked_at",- "posthog_team"."person_processing_opt_out",- "posthog_team"."secret_api_token",- "posthog_team"."secret_api_token_backup",- "posthog_team"."session_recording_opt_in",- "posthog_team"."session_recording_sample_rate",- "posthog_team"."session_recording_minimum_duration_milliseconds",- "posthog_team"."session_recording_linked_flag",- "posthog_team"."session_recording_network_payload_capture_config",- "posthog_team"."session_recording_masking_config",- "posthog_team"."session_recording_url_trigger_config",- "posthog_team"."session_recording_url_blocklist_config",- "posthog_team"."session_recording_event_trigger_config",- "posthog_team"."session_recording_trigger_match_type_config",- "posthog_team"."session_recording_trigger_groups",- "posthog_team"."session_replay_config",- "posthog_team"."session_recording_retention_period",- "posthog_team"."event_retention_months",- "posthog_team"."conversations_enabled",- "posthog_team"."conversations_settings",- "posthog_team"."proactive_tasks_enabled",- "posthog_team"."survey_config",- "posthog_team"."surveys_opt_in",- "posthog_team"."product_tours_opt_in",- "posthog_team"."capture_console_log_opt_in",- "posthog_team"."capture_performance_opt_in",- "posthog_team"."capture_dead_clicks",- "posthog_team"."autocapture_opt_out",- "posthog_team"."autocapture_web_vitals_opt_in",- "posthog_team"."autocapture_web_vitals_allowed_metrics",- "posthog_team"."autocapture_exceptions_opt_in",- "posthog_team"."autocapture_exceptions_errors_to_ignore",- "posthog_team"."logs_settings",- "posthog_team"."llm_gateway_enabled_at",- "posthog_team"."llm_gateway_revoked_at",- "posthog_team"."llm_gateway_overspend_allowance_usd",- "posthog_team"."heatmaps_opt_in",- "posthog_team"."receive_org_level_activity_logs",- "posthog_team"."web_analytics_pre_aggregated_tables_enabled",- "posthog_team"."web_analytics_pre_aggregated_tables_version",- "posthog_team"."flags_persistence_default",- "posthog_team"."feature_flag_confirmation_enabled",- "posthog_team"."feature_flag_confirmation_message",- "posthog_team"."default_evaluation_environments_enabled",- "posthog_team"."require_evaluation_environment_tags",- "posthog_team"."default_evaluation_contexts_enabled",- "posthog_team"."require_evaluation_contexts",- "posthog_team"."session_recording_version",- "posthog_team"."signup_token",- "posthog_team"."is_demo",- "posthog_team"."access_control",- "posthog_team"."week_start_day",- "posthog_team"."inject_web_apps",- "posthog_team"."test_account_filters",- "posthog_team"."test_account_filters_default_checked",- "posthog_team"."path_cleaning_filters",- "posthog_team"."timezone",- "posthog_team"."data_attributes",- "posthog_team"."person_display_name_properties",- "posthog_team"."live_events_columns",- "posthog_team"."recording_domains",- "posthog_team"."human_friendly_comparison_periods",- "posthog_team"."cookieless_server_hash_mode",- "posthog_team"."primary_dashboard_id",- "posthog_team"."default_data_theme",- "posthog_team"."extra_settings",- "posthog_team"."modifiers",- "posthog_team"."correlation_config",- "posthog_team"."session_recording_retention_period_days",- "posthog_team"."external_data_workspace_id",- "posthog_team"."external_data_workspace_last_synced_at",- "posthog_team"."api_query_rate_limit",- "posthog_team"."drop_events_older_than",- "posthog_team"."base_currency",- "posthog_team"."experiment_recalculation_time",- "posthog_team"."default_experiment_confidence_level",- "posthog_team"."default_experiment_stats_method",- "posthog_team"."business_model",- "posthog_organization"."id",- "posthog_organization"."name",- "posthog_organization"."slug",- "posthog_organization"."logo_media_id",- "posthog_organization"."created_at",- "posthog_organization"."updated_at",- "posthog_organization"."is_active",- "posthog_organization"."is_not_active_reason",- "posthog_organization"."session_cookie_age",- "posthog_organization"."is_member_join_email_enabled",- "posthog_organization"."is_ai_data_processing_approved",- "posthog_organization"."is_ai_training_opted_in",- "posthog_organization"."is_ai_training_locked",- "posthog_organization"."is_ai_training_cta_shown",- "posthog_organization"."enforce_2fa",- "posthog_organization"."members_can_invite",- "posthog_organization"."members_can_create_projects",- "posthog_organization"."members_can_use_personal_api_keys",- "posthog_organization"."allow_publicly_shared_resources",- "posthog_organization"."default_role_id",- "posthog_organization"."plugins_access_level",- "posthog_organization"."for_internal_metrics",- "posthog_organization"."default_experiment_stats_method",- "posthog_organization"."default_anonymize_ips",- "posthog_organization"."is_hipaa",- "posthog_organization"."is_pending_deletion",- "posthog_organization"."customer_id",- "posthog_organization"."available_product_features",- "posthog_organization"."usage",- "posthog_organization"."never_drop_data",- "posthog_organization"."customer_trust_scores",- "posthog_organization"."setup_section_2_completed",- "posthog_organization"."personalization",- "posthog_organization"."domain_whitelist",- "posthog_organization"."is_platform"- FROM "posthog_team"- INNER JOIN "posthog_organization" ON ("posthog_team"."organization_id" = "posthog_organization"."id")- WHERE "posthog_team"."id" = 99999- LIMIT 21- '''-# ----# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.173- '''- SELECT "posthog_organizationmembership"."id",- "posthog_organizationmembership"."organization_id",- "posthog_organizationmembership"."user_id",- "posthog_organizationmembership"."level",- "posthog_organizationmembership"."joined_at",- "posthog_organizationmembership"."updated_at",- "posthog_organizationmembership"."invited_by_id",- "posthog_organization"."id",- "posthog_organization"."name",- "posthog_organization"."slug",- "posthog_organization"."logo_media_id",- "posthog_organization"."created_at",- "posthog_organization"."updated_at",- "posthog_organization"."is_active",- "posthog_organization"."is_not_active_reason",- "posthog_organization"."session_cookie_age",- "posthog_organization"."is_member_join_email_enabled",- "posthog_organization"."is_ai_data_processing_approved",- "posthog_organization"."is_ai_training_opted_in",- "posthog_organization"."is_ai_training_locked",- "posthog_organization"."is_ai_training_cta_shown",- "posthog_organization"."enforce_2fa",- "posthog_organization"."members_can_invite",- "posthog_organization"."members_can_create_projects",- "posthog_organization"."members_can_use_personal_api_keys",- "posthog_organization"."allow_publicly_shared_resources",- "posthog_organization"."default_role_id",- "posthog_organization"."plugins_access_level",- "posthog_organization"."for_internal_metrics",- "posthog_organization"."default_experiment_stats_method",- "posthog_organization"."default_anonymize_ips",- "posthog_organization"."is_hipaa",- "posthog_organization"."is_pending_deletion",- "posthog_organization"."customer_id",- "posthog_organization"."available_product_features",- "posthog_organization"."usage",- "posthog_organization"."never_drop_data",- "posthog_organization"."customer_trust_scores",- "posthog_organization"."setup_section_2_completed",- "posthog_organization"."personalization",- "posthog_organization"."domain_whitelist",- "posthog_organization"."is_platform"- FROM "posthog_organizationmembership"- INNER JOIN "posthog_organization" ON ("posthog_organizationmembership"."organization_id" = "posthog_organization"."id")- WHERE ("posthog_organizationmembership"."organization_id" = '00000000-0000-0000-0000-000000000000'::uuid- AND "posthog_organizationmembership"."user_id" = 99999)- LIMIT 21- '''-# ----# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.174- '''- SELECT "ee_accesscontrol"."id",- "ee_accesscontrol"."team_id",- "ee_accesscontrol"."access_level",- "ee_accesscontrol"."resource",- "ee_accesscontrol"."resource_id",- "ee_accesscontrol"."organization_member_id",- "ee_accesscontrol"."role_id",- "ee_accesscontrol"."created_by_id",- "ee_accesscontrol"."created_at",- "ee_accesscontrol"."updated_at",- "posthog_team"."organization_id" AS "_team_organization_id"- FROM "ee_accesscontrol"- INNER JOIN "posthog_team" ON ("ee_accesscontrol"."team_id" = "posthog_team"."id")- LEFT OUTER JOIN "posthog_organizationmembership" ON ("ee_accesscontrol"."organization_member_id" = "posthog_organizationmembership"."id")- WHERE (("ee_accesscontrol"."organization_member_id" IS NULL- AND "ee_accesscontrol"."role_id" IS NULL- AND "ee_accesscontrol"."team_id" = 99999)- OR ("posthog_organizationmembership"."user_id" = 99999- AND "ee_accesscontrol"."role_id" IS NULL- AND "ee_accesscontrol"."team_id" = 99999))- '''-# ----# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.175- '''- SELECT "posthog_organizationmembership"."id",- "posthog_organizationmembership"."organization_id",- "posthog_organizationmembership"."user_id",- "posthog_organizationmembership"."level",- "posthog_organizationmembership"."joined_at",- "posthog_organizationmembership"."updated_at",- "posthog_organizationmembership"."invited_by_id",- "posthog_organization"."id",- "posthog_organization"."name",- "posthog_organization"."slug",- "posthog_organization"."logo_media_id",- "posthog_organization"."created_at",- "posthog_organization"."updated_at",- "posthog_organization"."is_active",- "posthog_organization"."is_not_active_reason",- "posthog_organization"."session_cookie_age",- "posthog_organization"."is_member_join_email_enabled",- "posthog_organization"."is_ai_data_processing_approved",- "posthog_organization"."is_ai_training_opted_in",- "posthog_organization"."is_ai_training_locked",- "posthog_organization"."is_ai_training_cta_shown",- "posthog_organization"."enforce_2fa",- "posthog_organization"."members_can_invite",- "posthog_organization"."members_can_create_projects",- "posthog_organization"."members_can_use_personal_api_keys",- "posthog_organization"."allow_publicly_shared_resources",- "posthog_organization"."default_role_id",- "posthog_organization"."plugins_access_level",- "posthog_organization"."for_internal_metrics",- "posthog_organization"."default_experiment_stats_method",- "posthog_organization"."default_anonymize_ips",- "posthog_organization"."is_hipaa",- "posthog_organization"."is_pending_deletion",- "posthog_organization"."customer_id",- "posthog_organization"."available_product_features",- "posthog_organization"."usage",- "posthog_organization"."never_drop_data",- "posthog_organization"."customer_trust_scores",- "posthog_organization"."setup_section_2_completed",- "posthog_organization"."personalization",- "posthog_organization"."domain_whitelist",- "posthog_organization"."is_platform"- FROM "posthog_organizationmembership"- INNER JOIN "posthog_organization" ON ("posthog_organizationmembership"."organization_id" = "posthog_organization"."id")- WHERE "posthog_organizationmembership"."user_id" = 99999+ "posthog_user"."id",+ "posthog_user"."password",+ "posthog_user"."last_login",+ "posthog_user"."first_name",+ "posthog_user"."last_name",+ "posthog_user"."is_staff",+ "posthog_user"."date_joined",+ "posthog_user"."uuid",+ "posthog_user"."current_organization_id",+ "posthog_user"."current_team_id",+ "posthog_user"."email",+ "posthog_user"."pending_email",+ "posthog_user"."distinct_id",+ "posthog_user"."is_email_verified",+ "posthog_user"."credentials_reviewed_at",+ "posthog_user"."requested_password_reset_at",+ "posthog_user"."requested_2fa_reset_at",+ "posthog_user"."has_seen_product_intro_for",+ "posthog_user"."strapi_id",+ "posthog_user"."is_active",+ "posthog_user"."role_at_organization",+ "posthog_user"."theme_mode",+ "posthog_user"."partial_notification_settings",+ "posthog_user"."anonymize_data",+ "posthog_user"."allow_impersonation",+ "posthog_user"."toolbar_mode",+ "posthog_user"."hedgehog_config",+ "posthog_user"."allow_sidebar_suggestions",+ "posthog_user"."shortcut_position",+ "posthog_user"."passkeys_enabled_for_2fa",+ "posthog_user"."hide_mcp_hints",+ "posthog_user"."onboarding_skipped_at",+ "posthog_user"."onboarding_skipped_reason",+ "posthog_user"."onboarding_skipped_organization_id",+ "posthog_user"."onboarding_delegated_to_invite_id",+ "posthog_user"."onboarding_delegated_to_organization_id",+ "posthog_user"."onboarding_delegation_accepted_at",+ "posthog_user"."events_column_config",+ "posthog_user"."email_opt_in",+ T6."id",+ T6."password",+ T6."last_login",+ T6."first_name",+ T6."last_name",+ T6."is_staff",+ T6."date_joined",+ T6."uuid",+ T6."current_organization_id",+ T6."current_team_id",+ T6."email",+ T6."pending_email",+ T6."distinct_id",+ T6."is_email_verified",+ T6."credentials_reviewed_at",+ T6."requested_password_reset_at",+ T6."requested_2fa_reset_at",+ T6."has_seen_product_intro_for",+ T6."strapi_id",+ T6."is_active",+ T6."role_at_organization",+ T6."theme_mode",+ T6."partial_notification_settings",+ T6."anonymize_data",+ T6."allow_impersonation",+ T6."toolbar_mode",+ T6."hedgehog_config",+ T6."allow_sidebar_suggestions",+ T6."shortcut_position",+ T6."passkeys_enabled_for_2fa",+ T6."hide_mcp_hints",+ T6."onboarding_skipped_at",+ T6."onboarding_skipped_reason",+ T6."onboarding_skipped_organization_id",+ T6."onboarding_delegated_to_invite_id",+ T6."onboarding_delegated_to_organization_id",+ T6."onboarding_delegation_accepted_at",+ T6."events_column_config",+ T6."email_opt_in",+ "posthog_text"."id",+ "posthog_text"."body",+ "posthog_text"."created_by_id",+ "posthog_text"."last_modified_at",+ "posthog_text"."last_modified_by_id",+ "posthog_text"."team_id",+ "posthog_buttontile"."id",+ "posthog_buttontile"."url",+ "posthog_buttontile"."text",+ "posthog_buttontile"."placement",+ "posthog_buttontile"."style",+ "posthog_buttontile"."created_by_id",+ "posthog_buttontile"."last_modified_at",+ "posthog_buttontile"."last_modified_by_id",+ "posthog_buttontile"."team_id",+ "posthog_dashboardwidget"."id",+ "posthog_dashboardwidget"."widget_type",+ "posthog_dashboardwidget"."name",+ "posthog_dashboardwidget"."description",+ "posthog_dashboardwidget"."config",+ "posthog_dashboardwidget"."created_by_id",+ "posthog_dashboardwidget"."last_modified_at",+ "posthog_dashboardwidget"."last_modified_by_id",+ "posthog_dashboardwidget"."team_id",+ T10."id",+ T10."password",+ T10."last_login",+ T10."first_name",+ T10."last_name",+ T10."is_staff",+ T10."date_joined",+ T10."uuid",+ T10."current_organization_id",+ T10."current_team_id",+ T10."email",+ T10."pending_email",+ T10."distinct_id",+ T10."is_email_verified",+ T10."credentials_reviewed_at",+ T10."requested_password_reset_at",+ T10."requested_2fa_reset_at",+ T10."has_seen_product_intro_for",+ T10."strapi_id",+ T10."is_active",+ T10."role_at_organization",+ T10."theme_mode",+ T10."partial_notification_settings",+ T10."anonymize_data",+ T10."allow_impersonation",+ T10."toolbar_mode",+ T10."hedgehog_config",+ T10."allow_sidebar_suggestions",+ T10."shortcut_position",+ T10."passkeys_enabled_for_2fa",+ T10."hide_mcp_hints",+ T10."onboarding_skipped_at",+ T10."onboarding_skipped_reason",+ T10."onboarding_skipped_organization_id",+ T10."onboarding_delegated_to_invite_id",+ T10."onboarding_delegated_to_organization_id",+ T10."onboarding_delegation_accepted_at",+ T10."events_column_config",+ T10."email_opt_in",+ T11."id",+ T11."password",+ T11."last_login",+ T11."first_name",+ T11."last_name",+ T11."is_staff",+ T11."date_joined",+ T11."uuid",+ T11."current_organization_id",+ T11."current_team_id",+ T11."email",+ T11."pending_email",+ T11."distinct_id",+ T11."is_email_verified",+ T11."credentials_reviewed_at",+ T11."requested_password_reset_at",+ T11."requested_2fa_reset_at",+ T11."has_seen_product_intro_for",+ T11."strapi_id",+ T11."is_active",+ T11."role_at_organization",+ T11."theme_mode",+ T11."partial_notification_settings",+ T11."anonymize_data",+ T11."allow_impersonation",+ T11."toolbar_mode",+ T11."hedgehog_config",+ T11."allow_sidebar_suggestions",+ T11."shortcut_position",+ T11."passkeys_enabled_for_2fa",+ T11."hide_mcp_hints",+ T11."onboarding_skipped_at",+ T11."onboarding_skipped_reason",+ T11."onboarding_skipped_organization_id",+ T11."onboarding_delegated_to_invite_id",+ T11."onboarding_delegated_to_organization_id",+ T11."onboarding_delegation_accepted_at",+ T11."events_column_config",+ T11."email_opt_in"+ FROM "posthog_dashboardtile"+ INNER JOIN "posthog_dashboard" ON ("posthog_dashboardtile"."dashboard_id" = "posthog_dashboard"."id")+ LEFT OUTER JOIN "posthog_dashboarditem" ON ("posthog_dashboardtile"."insight_id" = "posthog_dashboarditem"."id")+ LEFT OUTER JOIN "posthog_team" ON ("posthog_dashboarditem"."team_id" = "posthog_team"."id")+ LEFT OUTER JOIN "posthog_user" ON ("posthog_dashboarditem"."created_by_id" = "posthog_user"."id")+ LEFT OUTER JOIN "posthog_user" T6 ON ("posthog_dashboarditem"."last_modified_by_id" = T6."id")+ LEFT OUTER JOIN "posthog_text" ON ("posthog_dashboardtile"."text_id" = "posthog_text"."id")+ LEFT OUTER JOIN "posthog_buttontile" ON ("posthog_dashboardtile"."button_tile_id" = "posthog_buttontile"."id")+ LEFT OUTER JOIN "posthog_dashboardwidget" ON ("posthog_dashboardtile"."widget_id" = "posthog_dashboardwidget"."id")+ LEFT OUTER JOIN "posthog_user" T10 ON ("posthog_dashboardwidget"."created_by_id" = T10."id")+ LEFT OUTER JOIN "posthog_user" T11 ON ("posthog_dashboardwidget"."last_modified_by_id" = T11."id")+ WHERE (NOT ("posthog_dashboardtile"."deleted"+ AND "posthog_dashboardtile"."deleted" IS NOT NULL)+ AND NOT ("posthog_dashboard"."deleted")+ AND NOT ("posthog_dashboard"."deleted"+ AND "posthog_dashboardtile"."deleted"+ AND "posthog_dashboardtile"."deleted" IS NOT NULL)+ AND (NOT "posthog_dashboarditem"."deleted"+ OR "posthog_dashboardtile"."insight_id" IS NULL)+ AND "posthog_dashboardtile"."dashboard_id" = 99999+ AND "posthog_dashboardtile"."dashboard_id" IN (1,+ 2,+ 3,+ 4,+ 5 /* ... */))+ ORDER BY "posthog_dashboarditem"."order" ASC'''# ----# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.176+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.133'''- SELECT "ee_accesscontrol"."team_id" AS "team_id",- "ee_accesscontrol"."resource_id" AS "resource_id",- "ee_accesscontrol"."organization_member_id" AS "organization_member_id",- "ee_accesscontrol"."role_id" AS "role_id",- "ee_accesscontrol"."access_level" AS "access_level"- FROM "ee_accesscontrol"- INNER JOIN "posthog_team" ON ("ee_accesscontrol"."team_id" = "posthog_team"."id")- WHERE ("ee_accesscontrol"."resource" = 'project'- AND "posthog_team"."organization_id" IN ('00000000-0000-0000-0000-000000000000'::uuid))+ SELECT ("posthog_dashboardtile"."insight_id") AS "_prefetch_related_val_insight_id",+ "posthog_dashboard"."id",+ "posthog_dashboard"."name",+ "posthog_dashboard"."description",+ "posthog_dashboard"."team_id",+ "posthog_dashboard"."pinned",+ "posthog_dashboard"."created_at",+ "posthog_dashboard"."created_by_id",+ "posthog_dashboard"."deleted",+ "posthog_dashboard"."last_accessed_at",+ "posthog_dashboard"."last_refresh",+ "posthog_dashboard"."filters",+ "posthog_dashboard"."variables",+ "posthog_dashboard"."breakdown_colors",+ "posthog_dashboard"."data_color_theme_id",+ "posthog_dashboard"."creation_mode",+ "posthog_dashboard"."restriction_level",+ "posthog_dashboard"."quick_filter_ids",+ "posthog_dashboard"."deprecated_tags",+ "posthog_dashboard"."tags",+ "posthog_dashboard"."share_token",+ "posthog_dashboard"."is_shared"+ FROM "posthog_dashboard"+ INNER JOIN "posthog_dashboardtile" ON ("posthog_dashboard"."id" = "posthog_dashboardtile"."dashboard_id")+ WHERE (NOT ("posthog_dashboard"."deleted")+ AND "posthog_dashboard"."id" IN+ (SELECT U0."dashboard_id" AS "dashboard_id"+ FROM "posthog_dashboardtile" U0+ INNER JOIN "posthog_dashboard" U1 ON (U0."dashboard_id" = U1."id")+ WHERE (NOT (U0."deleted"+ AND U0."deleted" IS NOT NULL)+ AND NOT (U1."deleted")))+ AND "posthog_dashboardtile"."insight_id" IN (1,+ 2,+ 3,+ 4,+ 5 /* ... */))'''# ----# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.177+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.134'''- SELECT "ee_rolemembership"."organization_member_id" AS "organization_member_id",- "ee_rolemembership"."role_id" AS "role_id"- FROM "ee_rolemembership"- WHERE "ee_rolemembership"."user_id" = 99999+ SELECT "posthog_dashboardtile"."id",+ "posthog_dashboardtile"."dashboard_id",+ "posthog_dashboardtile"."insight_id",+ "posthog_dashboardtile"."text_id",+ "posthog_dashboardtile"."button_tile_id",+ "posthog_dashboardtile"."widget_id",+ "posthog_dashboardtile"."team_id",+ "posthog_dashboardtile"."layouts",+ "posthog_dashboardtile"."color",+ "posthog_dashboardtile"."filters_hash",+ "posthog_dashboardtile"."last_refresh",+ "posthog_dashboardtile"."refreshing",+ "posthog_dashboardtile"."refresh_attempt",+ "posthog_dashboardtile"."filters_overrides",+ "posthog_dashboardtile"."show_description",+ "posthog_dashboardtile"."transparent_background",+ "posthog_dashboardtile"."deleted"+ FROM "posthog_dashboardtile"+ INNER JOIN "posthog_dashboard" ON ("posthog_dashboardtile"."dashboard_id" = "posthog_dashboard"."id")+ WHERE (NOT ("posthog_dashboardtile"."deleted"+ AND "posthog_dashboardtile"."deleted" IS NOT NULL)+ AND NOT ("posthog_dashboard"."deleted")+ AND "posthog_dashboardtile"."insight_id" IN (1,+ 2,+ 3,+ 4,+ 5 /* ... */))'''# ----# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.178+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.135'''SELECT "posthog_dashboard"."id","posthog_dashboard"."name",@@ -9149,74 +6965,189 @@"posthog_dashboard"."deprecated_tags","posthog_dashboard"."tags","posthog_dashboard"."share_token",- "posthog_dashboard"."is_shared",- recent_dashboard_views."viewed_at" AS "last_viewed_at",- ("posthog_dashboard"."id")::varchar AS "_ref_id",-- (SELECT U0."path" AS "path"- FROM "posthog_filesystem" U0- WHERE ((U0."surface" IS NULL- OR U0."surface" = 'web')- AND U0."ref" = ("posthog_dashboard"."id")::varchar- AND U0."team_id" = ("posthog_dashboard"."team_id")- AND U0."type" = 'dashboard'- AND NOT (U0."shortcut"- AND U0."shortcut" IS NOT NULL))- ORDER BY U0."id" ASC- LIMIT 1) AS "_folder_path",- T6."id",- T6."password",- T6."last_login",- T6."first_name",- T6."last_name",- T6."is_staff",- T6."date_joined",- T6."uuid",- T6."current_organization_id",- T6."current_team_id",- T6."email",- T6."pending_email",- T6."distinct_id",- T6."is_email_verified",- T6."credentials_reviewed_at",- T6."requested_password_reset_at",- T6."requested_2fa_reset_at",- T6."has_seen_product_intro_for",- T6."strapi_id",- T6."is_active",- T6."role_at_organization",- T6."theme_mode",- T6."partial_notification_settings",- T6."anonymize_data",- T6."allow_impersonation",- T6."toolbar_mode",- T6."hedgehog_config",- T6."allow_sidebar_suggestions",- T6."shortcut_position",- T6."passkeys_enabled_for_2fa",- T6."hide_mcp_hints",- T6."onboarding_skipped_at",- T6."onboarding_skipped_reason",- T6."onboarding_skipped_organization_id",- T6."onboarding_delegated_to_invite_id",- T6."onboarding_delegated_to_organization_id",- T6."onboarding_delegation_accepted_at",- T6."events_column_config",- T6."email_opt_in"+ "posthog_dashboard"."is_shared"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)+ WHERE ("posthog_dashboard"."id") IN ((1,+ 2)/* ... */)+ '''+# ---+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.136+ '''+ SELECT "posthog_taggeditem"."id",+ "posthog_taggeditem"."tag_id",+ "posthog_taggeditem"."dashboard_id",+ "posthog_taggeditem"."insight_id",+ "posthog_taggeditem"."event_definition_id",+ "posthog_taggeditem"."property_definition_id",+ "posthog_taggeditem"."action_id",+ "posthog_taggeditem"."feature_flag_id",+ "posthog_taggeditem"."experiment_saved_metric_id",+ "posthog_taggeditem"."ticket_id",+ "posthog_taggeditem"."account_id",+ "posthog_taggeditem"."endpoint_id",+ "posthog_tag"."id",+ "posthog_tag"."name",+ "posthog_tag"."team_id"+ FROM "posthog_taggeditem"+ INNER JOIN "posthog_tag" ON ("posthog_taggeditem"."tag_id" = "posthog_tag"."id")+ WHERE "posthog_taggeditem"."dashboard_id" IN (1,+ 2,+ 3,+ 4,+ 5 /* ... */)+ '''+# ---+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.137+ '''+ SELECT "posthog_team"."id",+ "posthog_team"."uuid",+ "posthog_team"."organization_id",+ "posthog_team"."parent_team_id",+ "posthog_team"."project_id",+ "posthog_team"."api_token",+ "posthog_team"."app_urls",+ "posthog_team"."name",+ "posthog_team"."slack_incoming_webhook",+ "posthog_team"."created_at",+ "posthog_team"."updated_at",+ "posthog_team"."anonymize_ips",+ "posthog_team"."completed_snippet_onboarding",+ "posthog_team"."has_completed_onboarding_for",+ "posthog_team"."onboarding_tasks",+ "posthog_team"."ingested_event",+ "posthog_team"."ingested_production_event",+ "posthog_team"."ingested_production_event_last_checked_at",+ "posthog_team"."person_processing_opt_out",+ "posthog_team"."secret_api_token",+ "posthog_team"."secret_api_token_backup",+ "posthog_team"."session_recording_opt_in",+ "posthog_team"."session_recording_sample_rate",+ "posthog_team"."session_recording_minimum_duration_milliseconds",+ "posthog_team"."session_recording_linked_flag",+ "posthog_team"."session_recording_network_payload_capture_config",+ "posthog_team"."session_recording_masking_config",+ "posthog_team"."session_recording_url_trigger_config",+ "posthog_team"."session_recording_url_blocklist_config",+ "posthog_team"."session_recording_event_trigger_config",+ "posthog_team"."session_recording_trigger_match_type_config",+ "posthog_team"."session_recording_trigger_groups",+ "posthog_team"."session_replay_config",+ "posthog_team"."session_recording_retention_period",+ "posthog_team"."event_retention_months",+ "posthog_team"."conversations_enabled",+ "posthog_team"."conversations_settings",+ "posthog_team"."proactive_tasks_enabled",+ "posthog_team"."survey_config",+ "posthog_team"."surveys_opt_in",+ "posthog_team"."product_tours_opt_in",+ "posthog_team"."capture_console_log_opt_in",+ "posthog_team"."capture_performance_opt_in",+ "posthog_team"."capture_dead_clicks",+ "posthog_team"."autocapture_opt_out",+ "posthog_team"."autocapture_web_vitals_opt_in",+ "posthog_team"."autocapture_web_vitals_allowed_metrics",+ "posthog_team"."autocapture_exceptions_opt_in",+ "posthog_team"."autocapture_exceptions_errors_to_ignore",+ "posthog_team"."logs_settings",+ "posthog_team"."llm_gateway_enabled_at",+ "posthog_team"."llm_gateway_revoked_at",+ "posthog_team"."llm_gateway_overspend_allowance_usd",+ "posthog_team"."heatmaps_opt_in",+ "posthog_team"."receive_org_level_activity_logs",+ "posthog_team"."web_analytics_pre_aggregated_tables_enabled",+ "posthog_team"."web_analytics_pre_aggregated_tables_version",+ "posthog_team"."flags_persistence_default",+ "posthog_team"."feature_flag_confirmation_enabled",+ "posthog_team"."feature_flag_confirmation_message",+ "posthog_team"."default_evaluation_environments_enabled",+ "posthog_team"."require_evaluation_environment_tags",+ "posthog_team"."default_evaluation_contexts_enabled",+ "posthog_team"."require_evaluation_contexts",+ "posthog_team"."session_recording_version",+ "posthog_team"."signup_token",+ "posthog_team"."is_demo",+ "posthog_team"."access_control",+ "posthog_team"."week_start_day",+ "posthog_team"."inject_web_apps",+ "posthog_team"."test_account_filters",+ "posthog_team"."test_account_filters_default_checked",+ "posthog_team"."path_cleaning_filters",+ "posthog_team"."timezone",+ "posthog_team"."data_attributes",+ "posthog_team"."person_display_name_properties",+ "posthog_team"."live_events_columns",+ "posthog_team"."recording_domains",+ "posthog_team"."human_friendly_comparison_periods",+ "posthog_team"."cookieless_server_hash_mode",+ "posthog_team"."primary_dashboard_id",+ "posthog_team"."default_data_theme",+ "posthog_team"."extra_settings",+ "posthog_team"."modifiers",+ "posthog_team"."correlation_config",+ "posthog_team"."session_recording_retention_period_days",+ "posthog_team"."external_data_workspace_id",+ "posthog_team"."external_data_workspace_last_synced_at",+ "posthog_team"."api_query_rate_limit",+ "posthog_team"."drop_events_older_than",+ "posthog_team"."base_currency",+ "posthog_team"."experiment_recalculation_time",+ "posthog_team"."default_experiment_confidence_level",+ "posthog_team"."default_experiment_stats_method",+ "posthog_team"."business_model"+ FROM "posthog_team"+ WHERE "posthog_team"."id" = 99999LIMIT 21'''# ----# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.179+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.138+ '''+ SELECT "posthog_filesystem"."team_id",+ "posthog_filesystem"."id",+ "posthog_filesystem"."path",+ "posthog_filesystem"."depth",+ "posthog_filesystem"."type",+ "posthog_filesystem"."ref",+ "posthog_filesystem"."href",+ "posthog_filesystem"."shortcut",+ "posthog_filesystem"."meta",+ "posthog_filesystem"."created_at",+ "posthog_filesystem"."created_by_id",+ "posthog_filesystem"."surface",+ "posthog_filesystem"."project_id"+ FROM "posthog_filesystem"+ WHERE (("posthog_filesystem"."surface" IS NULL+ OR "posthog_filesystem"."surface" = 'web')+ AND "posthog_filesystem"."ref" = '0001'+ AND "posthog_filesystem"."team_id" = 99999+ AND "posthog_filesystem"."type" = 'dashboard'+ AND NOT ("posthog_filesystem"."shortcut"+ AND "posthog_filesystem"."shortcut" IS NOT NULL))+ '''+# ---+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.139+ '''+ SELECT "posthog_filesystemshortcut"."id",+ "posthog_filesystemshortcut"."team_id",+ "posthog_filesystemshortcut"."user_id",+ "posthog_filesystemshortcut"."path",+ "posthog_filesystemshortcut"."type",+ "posthog_filesystemshortcut"."ref",+ "posthog_filesystemshortcut"."href",+ "posthog_filesystemshortcut"."order",+ "posthog_filesystemshortcut"."created_at",+ "posthog_filesystemshortcut"."surface"+ FROM "posthog_filesystemshortcut"+ WHERE (("posthog_filesystemshortcut"."surface" IS NULL+ OR "posthog_filesystemshortcut"."surface" = 'web')+ AND "posthog_filesystemshortcut"."ref" = '0001'+ AND "posthog_filesystemshortcut"."team_id" = 99999+ AND "posthog_filesystemshortcut"."type" = 'dashboard'+ AND NOT ("posthog_filesystemshortcut"."path" = 'dashboard-1'+ AND "posthog_filesystemshortcut"."href" = '__skipped__'+ AND "posthog_filesystemshortcut"."href" IS NOT NULL))+ '''+# ---+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.14'''SELECT "posthog_sharingconfiguration"."id","posthog_sharingconfiguration"."team_id",@@ -9232,22 +7163,26 @@"posthog_sharingconfiguration"."settings","posthog_sharingconfiguration"."password_required"FROM "posthog_sharingconfiguration"- WHERE "posthog_sharingconfiguration"."dashboard_id" IN (1,- 2,- 3,- 4,- 5 /* ... */)+ WHERE "posthog_sharingconfiguration"."dashboard_id" = 99999'''# ----# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.18+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.140'''- SELECT "posthog_tag"."name" AS "tag__name"- FROM "posthog_taggeditem"- INNER JOIN "posthog_tag" ON ("posthog_taggeditem"."tag_id" = "posthog_tag"."id")- WHERE "posthog_taggeditem"."dashboard_id" = 99999+ SELECT "posthog_insightvariable"."created_by_id",+ "posthog_insightvariable"."created_at",+ "posthog_insightvariable"."updated_at",+ "posthog_insightvariable"."id",+ "posthog_insightvariable"."team_id",+ "posthog_insightvariable"."name",+ "posthog_insightvariable"."code_name",+ "posthog_insightvariable"."type",+ "posthog_insightvariable"."default_value",+ "posthog_insightvariable"."values"+ FROM "posthog_insightvariable"+ WHERE "posthog_insightvariable"."team_id" = 99999'''# ----# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.180+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.141'''SELECT "posthog_dashboardtile"."id","posthog_dashboardtile"."dashboard_id",@@ -9598,36 +7533,16 @@AND (NOT "posthog_dashboarditem"."deleted"OR "posthog_dashboardtile"."insight_id" IS NULL)AND "posthog_dashboardtile"."dashboard_id" = 99999- AND "posthog_dashboardtile"."dashboard_id" IN (1,- 2,- 3,- 4,- 5 /* ... */))+ AND "posthog_dashboardtile"."dashboard_id" = 99999+ AND NOT ("posthog_dashboard"."deleted"+ AND "posthog_dashboardtile"."deleted"+ AND "posthog_dashboardtile"."deleted" IS NOT NULL)+ AND (NOT "posthog_dashboarditem"."deleted"+ OR "posthog_dashboardtile"."insight_id" IS NULL))ORDER BY "posthog_dashboarditem"."order" ASC'''# ----# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.181- '''- SELECT "posthog_insightcachingstate"."id",- "posthog_insightcachingstate"."team_id",- "posthog_insightcachingstate"."insight_id",- "posthog_insightcachingstate"."dashboard_tile_id",- "posthog_insightcachingstate"."cache_key",- "posthog_insightcachingstate"."target_cache_age_seconds",- "posthog_insightcachingstate"."last_refresh",- "posthog_insightcachingstate"."last_refresh_queued_at",- "posthog_insightcachingstate"."refresh_attempt",- "posthog_insightcachingstate"."created_at",- "posthog_insightcachingstate"."updated_at"- FROM "posthog_insightcachingstate"- WHERE "posthog_insightcachingstate"."dashboard_tile_id" IN (1,- 2,- 3,- 4,- 5 /* ... */)- '''-# ----# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.182+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.142'''SELECT ("posthog_dashboardtile"."insight_id") AS "_prefetch_related_val_insight_id","posthog_dashboard"."id",@@ -9668,7 +7583,7 @@5 /* ... */))'''# ----# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.183+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.143'''SELECT "posthog_dashboardtile"."id","posthog_dashboardtile"."dashboard_id",@@ -9699,7 +7614,7 @@5 /* ... */))'''# ----# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.184+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.144'''SELECT "posthog_dashboard"."id","posthog_dashboard"."name",@@ -9727,33 +7642,198 @@2)/* ... */)'''# ----# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.185+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.145+ '''+ SELECT "posthog_taggeditem"."id",+ "posthog_taggeditem"."tag_id",+ "posthog_taggeditem"."dashboard_id",+ "posthog_taggeditem"."insight_id",+ "posthog_taggeditem"."event_definition_id",+ "posthog_taggeditem"."property_definition_id",+ "posthog_taggeditem"."action_id",+ "posthog_taggeditem"."feature_flag_id",+ "posthog_taggeditem"."experiment_saved_metric_id",+ "posthog_taggeditem"."ticket_id",+ "posthog_taggeditem"."account_id",+ "posthog_taggeditem"."endpoint_id",+ "posthog_tag"."id",+ "posthog_tag"."name",+ "posthog_tag"."team_id"+ FROM "posthog_taggeditem"+ INNER JOIN "posthog_tag" ON ("posthog_taggeditem"."tag_id" = "posthog_tag"."id")+ WHERE "posthog_taggeditem"."insight_id" IN (1,+ 2,+ 3,+ 4,+ 5 /* ... */)+ '''+# ---+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.146+ '''+ SELECT "posthog_alertconfiguration"."created_by_id",+ "posthog_alertconfiguration"."created_at",+ "posthog_alertconfiguration"."id",+ "posthog_alertconfiguration"."team_id",+ "posthog_alertconfiguration"."insight_id",+ "posthog_alertconfiguration"."name",+ "posthog_alertconfiguration"."config",+ "posthog_alertconfiguration"."calculation_interval",+ "posthog_alertconfiguration"."threshold_id",+ "posthog_alertconfiguration"."condition",+ "posthog_alertconfiguration"."detector_config",+ "posthog_alertconfiguration"."state",+ "posthog_alertconfiguration"."enabled",+ "posthog_alertconfiguration"."last_notified_at",+ "posthog_alertconfiguration"."last_checked_at",+ "posthog_alertconfiguration"."next_check_at",+ "posthog_alertconfiguration"."snoozed_until",+ "posthog_alertconfiguration"."skip_weekend",+ "posthog_alertconfiguration"."schedule_restriction",+ "posthog_alertconfiguration"."investigation_agent_enabled",+ "posthog_alertconfiguration"."investigation_gates_notifications",+ "posthog_alertconfiguration"."investigation_inconclusive_action",+ "posthog_user"."id",+ "posthog_user"."password",+ "posthog_user"."last_login",+ "posthog_user"."first_name",+ "posthog_user"."last_name",+ "posthog_user"."is_staff",+ "posthog_user"."date_joined",+ "posthog_user"."uuid",+ "posthog_user"."current_organization_id",+ "posthog_user"."current_team_id",+ "posthog_user"."email",+ "posthog_user"."pending_email",+ "posthog_user"."distinct_id",+ "posthog_user"."is_email_verified",+ "posthog_user"."credentials_reviewed_at",+ "posthog_user"."requested_password_reset_at",+ "posthog_user"."requested_2fa_reset_at",+ "posthog_user"."has_seen_product_intro_for",+ "posthog_user"."strapi_id",+ "posthog_user"."is_active",+ "posthog_user"."role_at_organization",+ "posthog_user"."theme_mode",+ "posthog_user"."partial_notification_settings",+ "posthog_user"."anonymize_data",+ "posthog_user"."allow_impersonation",+ "posthog_user"."toolbar_mode",+ "posthog_user"."hedgehog_config",+ "posthog_user"."allow_sidebar_suggestions",+ "posthog_user"."shortcut_position",+ "posthog_user"."passkeys_enabled_for_2fa",+ "posthog_user"."hide_mcp_hints",+ "posthog_user"."onboarding_skipped_at",+ "posthog_user"."onboarding_skipped_reason",+ "posthog_user"."onboarding_skipped_organization_id",+ "posthog_user"."onboarding_delegated_to_invite_id",+ "posthog_user"."onboarding_delegated_to_organization_id",+ "posthog_user"."onboarding_delegation_accepted_at",+ "posthog_user"."events_column_config",+ "posthog_user"."email_opt_in"+ FROM "posthog_alertconfiguration"+ LEFT OUTER JOIN "posthog_user" ON ("posthog_alertconfiguration"."created_by_id" = "posthog_user"."id")+ WHERE "posthog_alertconfiguration"."insight_id" IN (1,+ 2,+ 3,+ 4,+ 5 /* ... */)+ '''+# ---+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.147+ '''+ SELECT "posthog_dashboard"."id",+ "posthog_dashboard"."name",+ "posthog_dashboard"."description",+ "posthog_dashboard"."team_id",+ "posthog_dashboard"."pinned",+ "posthog_dashboard"."created_at",+ "posthog_dashboard"."created_by_id",+ "posthog_dashboard"."deleted",+ "posthog_dashboard"."last_accessed_at",+ "posthog_dashboard"."last_refresh",+ "posthog_dashboard"."filters",+ "posthog_dashboard"."variables",+ "posthog_dashboard"."breakdown_colors",+ "posthog_dashboard"."data_color_theme_id",+ "posthog_dashboard"."creation_mode",+ "posthog_dashboard"."restriction_level",+ "posthog_dashboard"."quick_filter_ids",+ "posthog_dashboard"."deprecated_tags",+ "posthog_dashboard"."tags",+ "posthog_dashboard"."share_token",+ "posthog_dashboard"."is_shared"+ FROM "posthog_dashboard"+ WHERE (NOT ("posthog_dashboard"."deleted")+ AND "posthog_dashboard"."id" IN (1,+ 2,+ 3,+ 4,+ 5 /* ... */))+ '''+# ---+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.148+ '''+ SELECT COUNT(*) AS "__count"+ FROM "posthog_dashboardtile"+ INNER JOIN "posthog_dashboard" ON ("posthog_dashboardtile"."dashboard_id" = "posthog_dashboard"."id")+ WHERE (NOT ("posthog_dashboardtile"."deleted"+ AND "posthog_dashboardtile"."deleted" IS NOT NULL)+ AND NOT ("posthog_dashboard"."deleted")+ AND "posthog_dashboardtile"."dashboard_id" = 99999+ AND NOT ("posthog_dashboardtile"."deleted"+ AND "posthog_dashboardtile"."deleted" IS NOT NULL))+ '''+# ---+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.149+ '''+ SELECT "posthog_dashboard"."id",+ "posthog_dashboard"."name",+ "posthog_dashboard"."description",+ "posthog_dashboard"."team_id",+ "posthog_dashboard"."pinned",+ "posthog_dashboard"."created_at",+ "posthog_dashboard"."created_by_id",+ "posthog_dashboard"."deleted",+ "posthog_dashboard"."last_accessed_at",+ "posthog_dashboard"."last_refresh",+ "posthog_dashboard"."filters",+ "posthog_dashboard"."variables",+ "posthog_dashboard"."breakdown_colors",+ "posthog_dashboard"."data_color_theme_id",+ "posthog_dashboard"."creation_mode",+ "posthog_dashboard"."restriction_level",+ "posthog_dashboard"."quick_filter_ids",+ "posthog_dashboard"."deprecated_tags",+ "posthog_dashboard"."tags",+ "posthog_dashboard"."share_token",+ "posthog_dashboard"."is_shared"+ FROM "posthog_dashboard"+ WHERE (NOT ("posthog_dashboard"."deleted")+ AND "posthog_dashboard"."id" IN (1,+ 2,+ 3,+ 4,+ 5 /* ... */))+ '''+# ---+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.15'''- SELECT "posthog_taggeditem"."id",- "posthog_taggeditem"."tag_id",- "posthog_taggeditem"."dashboard_id",- "posthog_taggeditem"."insight_id",- "posthog_taggeditem"."event_definition_id",- "posthog_taggeditem"."property_definition_id",- "posthog_taggeditem"."action_id",- "posthog_taggeditem"."feature_flag_id",- "posthog_taggeditem"."experiment_saved_metric_id",- "posthog_taggeditem"."ticket_id",- "posthog_taggeditem"."account_id",- "posthog_taggeditem"."endpoint_id",- "posthog_tag"."id",- "posthog_tag"."name",- "posthog_tag"."team_id"- FROM "posthog_taggeditem"- INNER JOIN "posthog_tag" ON ("posthog_taggeditem"."tag_id" = "posthog_tag"."id")- WHERE "posthog_taggeditem"."dashboard_id" IN (1,- 2,- 3,- 4,- 5 /* ... */)+ SELECT "posthog_insightvariable"."created_by_id",+ "posthog_insightvariable"."created_at",+ "posthog_insightvariable"."updated_at",+ "posthog_insightvariable"."id",+ "posthog_insightvariable"."team_id",+ "posthog_insightvariable"."name",+ "posthog_insightvariable"."code_name",+ "posthog_insightvariable"."type",+ "posthog_insightvariable"."default_value",+ "posthog_insightvariable"."values"+ FROM "posthog_insightvariable"+ WHERE "posthog_insightvariable"."team_id" = 99999'''# ----# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.186+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.150'''SELECT "posthog_team"."id","posthog_team"."uuid",@@ -9855,7 +7935,7 @@LIMIT 21'''# ----# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.187+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.151'''SELECT "posthog_filesystem"."team_id","posthog_filesystem"."id",@@ -9875,115 +7955,116 @@OR "posthog_filesystem"."surface" = 'web')AND "posthog_filesystem"."ref" = '0001'AND "posthog_filesystem"."team_id" = 99999- AND "posthog_filesystem"."type" = 'dashboard'+ AND "posthog_filesystem"."type" = 'insight'AND NOT ("posthog_filesystem"."shortcut"AND "posthog_filesystem"."shortcut" IS NOT NULL))'''# ----# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.188- '''- SELECT "posthog_filesystemshortcut"."id",- "posthog_filesystemshortcut"."team_id",- "posthog_filesystemshortcut"."user_id",- "posthog_filesystemshortcut"."path",- "posthog_filesystemshortcut"."type",- "posthog_filesystemshortcut"."ref",- "posthog_filesystemshortcut"."href",- "posthog_filesystemshortcut"."order",- "posthog_filesystemshortcut"."created_at",- "posthog_filesystemshortcut"."surface"- FROM "posthog_filesystemshortcut"- WHERE (("posthog_filesystemshortcut"."surface" IS NULL- OR "posthog_filesystemshortcut"."surface" = 'web')- AND "posthog_filesystemshortcut"."ref" = '0001'- AND "posthog_filesystemshortcut"."team_id" = 99999- AND "posthog_filesystemshortcut"."type" = 'dashboard'- AND NOT ("posthog_filesystemshortcut"."path" = 'dashboard-1'- AND "posthog_filesystemshortcut"."href" = '__skipped__'- AND "posthog_filesystemshortcut"."href" IS NOT NULL))- '''-# ----# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.189- '''- SELECT "posthog_insightvariable"."created_by_id",- "posthog_insightvariable"."created_at",- "posthog_insightvariable"."updated_at",- "posthog_insightvariable"."id",- "posthog_insightvariable"."team_id",- "posthog_insightvariable"."name",- "posthog_insightvariable"."code_name",- "posthog_insightvariable"."type",- "posthog_insightvariable"."default_value",- "posthog_insightvariable"."values"- FROM "posthog_insightvariable"- WHERE "posthog_insightvariable"."team_id" = 99999- '''-# ----# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.19+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.152'''- SELECT "posthog_user"."id",- "posthog_user"."password",- "posthog_user"."last_login",- "posthog_user"."first_name",- "posthog_user"."last_name",- "posthog_user"."is_staff",- "posthog_user"."date_joined",- "posthog_user"."uuid",- "posthog_user"."current_organization_id",- "posthog_user"."current_team_id",- "posthog_user"."email",- "posthog_user"."pending_email",- "posthog_user"."distinct_id",- "posthog_user"."is_email_verified",- "posthog_user"."credentials_reviewed_at",- "posthog_user"."requested_2fa_reset_at",- "posthog_user"."has_seen_product_intro_for",- "posthog_user"."strapi_id",- "posthog_user"."is_active",- "posthog_user"."role_at_organization",- "posthog_user"."theme_mode",- "posthog_user"."partial_notification_settings",- "posthog_user"."anonymize_data",- "posthog_user"."allow_impersonation",- "posthog_user"."toolbar_mode",- "posthog_user"."hedgehog_config",- "posthog_user"."allow_sidebar_suggestions",- "posthog_user"."shortcut_position",- "posthog_user"."passkeys_enabled_for_2fa",- "posthog_user"."hide_mcp_hints",- "posthog_user"."onboarding_skipped_at",- "posthog_user"."onboarding_skipped_reason",- "posthog_user"."onboarding_skipped_organization_id",- "posthog_user"."onboarding_delegated_to_invite_id",- "posthog_user"."onboarding_delegated_to_organization_id",- "posthog_user"."onboarding_delegation_accepted_at",- "posthog_user"."events_column_config",- "posthog_user"."email_opt_in"- FROM "posthog_user"- WHERE ("posthog_user"."is_active"- AND "posthog_user"."id" = 99999)+ SELECT "posthog_team"."id",+ "posthog_team"."uuid",+ "posthog_team"."organization_id",+ "posthog_team"."parent_team_id",+ "posthog_team"."project_id",+ "posthog_team"."api_token",+ "posthog_team"."app_urls",+ "posthog_team"."name",+ "posthog_team"."slack_incoming_webhook",+ "posthog_team"."created_at",+ "posthog_team"."updated_at",+ "posthog_team"."anonymize_ips",+ "posthog_team"."completed_snippet_onboarding",+ "posthog_team"."has_completed_onboarding_for",+ "posthog_team"."onboarding_tasks",+ "posthog_team"."ingested_event",+ "posthog_team"."ingested_production_event",+ "posthog_team"."ingested_production_event_last_checked_at",+ "posthog_team"."person_processing_opt_out",+ "posthog_team"."secret_api_token",+ "posthog_team"."secret_api_token_backup",+ "posthog_team"."session_recording_opt_in",+ "posthog_team"."session_recording_sample_rate",+ "posthog_team"."session_recording_minimum_duration_milliseconds",+ "posthog_team"."session_recording_linked_flag",+ "posthog_team"."session_recording_network_payload_capture_config",+ "posthog_team"."session_recording_masking_config",+ "posthog_team"."session_recording_url_trigger_config",+ "posthog_team"."session_recording_url_blocklist_config",+ "posthog_team"."session_recording_event_trigger_config",+ "posthog_team"."session_recording_trigger_match_type_config",+ "posthog_team"."session_recording_trigger_groups",+ "posthog_team"."session_replay_config",+ "posthog_team"."session_recording_retention_period",+ "posthog_team"."event_retention_months",+ "posthog_team"."conversations_enabled",+ "posthog_team"."conversations_settings",+ "posthog_team"."proactive_tasks_enabled",+ "posthog_team"."survey_config",+ "posthog_team"."surveys_opt_in",+ "posthog_team"."product_tours_opt_in",+ "posthog_team"."capture_console_log_opt_in",+ "posthog_team"."capture_performance_opt_in",+ "posthog_team"."capture_dead_clicks",+ "posthog_team"."autocapture_opt_out",+ "posthog_team"."autocapture_web_vitals_opt_in",+ "posthog_team"."autocapture_web_vitals_allowed_metrics",+ "posthog_team"."autocapture_exceptions_opt_in",+ "posthog_team"."autocapture_exceptions_errors_to_ignore",+ "posthog_team"."logs_settings",+ "posthog_team"."llm_gateway_enabled_at",+ "posthog_team"."llm_gateway_revoked_at",+ "posthog_team"."llm_gateway_overspend_allowance_usd",+ "posthog_team"."heatmaps_opt_in",+ "posthog_team"."receive_org_level_activity_logs",+ "posthog_team"."web_analytics_pre_aggregated_tables_enabled",+ "posthog_team"."web_analytics_pre_aggregated_tables_version",+ "posthog_team"."flags_persistence_default",+ "posthog_team"."feature_flag_confirmation_enabled",+ "posthog_team"."feature_flag_confirmation_message",+ "posthog_team"."default_evaluation_environments_enabled",+ "posthog_team"."require_evaluation_environment_tags",+ "posthog_team"."default_evaluation_contexts_enabled",+ "posthog_team"."require_evaluation_contexts",+ "posthog_team"."session_recording_version",+ "posthog_team"."signup_token",+ "posthog_team"."is_demo",+ "posthog_team"."access_control",+ "posthog_team"."week_start_day",+ "posthog_team"."inject_web_apps",+ "posthog_team"."test_account_filters",+ "posthog_team"."test_account_filters_default_checked",+ "posthog_team"."path_cleaning_filters",+ "posthog_team"."timezone",+ "posthog_team"."data_attributes",+ "posthog_team"."person_display_name_properties",+ "posthog_team"."live_events_columns",+ "posthog_team"."recording_domains",+ "posthog_team"."human_friendly_comparison_periods",+ "posthog_team"."cookieless_server_hash_mode",+ "posthog_team"."primary_dashboard_id",+ "posthog_team"."default_data_theme",+ "posthog_team"."extra_settings",+ "posthog_team"."modifiers",+ "posthog_team"."correlation_config",+ "posthog_team"."session_recording_retention_period_days",+ "posthog_team"."external_data_workspace_id",+ "posthog_team"."external_data_workspace_last_synced_at",+ "posthog_team"."api_query_rate_limit",+ "posthog_team"."drop_events_older_than",+ "posthog_team"."base_currency",+ "posthog_team"."experiment_recalculation_time",+ "posthog_team"."default_experiment_confidence_level",+ "posthog_team"."default_experiment_stats_method",+ "posthog_team"."business_model"+ FROM "posthog_team"+ WHERE "posthog_team"."id" = 99999+ LIMIT 21'''# ----# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.190+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.153'''- SELECT "posthog_dashboardtile"."id",- "posthog_dashboardtile"."dashboard_id",- "posthog_dashboardtile"."insight_id",- "posthog_dashboardtile"."text_id",- "posthog_dashboardtile"."button_tile_id",- "posthog_dashboardtile"."widget_id",- "posthog_dashboardtile"."team_id",- "posthog_dashboardtile"."layouts",- "posthog_dashboardtile"."color",- "posthog_dashboardtile"."filters_hash",- "posthog_dashboardtile"."last_refresh",- "posthog_dashboardtile"."refreshing",- "posthog_dashboardtile"."refresh_attempt",- "posthog_dashboardtile"."filters_overrides",- "posthog_dashboardtile"."show_description",- "posthog_dashboardtile"."transparent_background",- "posthog_dashboardtile"."deleted",- "posthog_dashboarditem"."id",+ SELECT "posthog_dashboarditem"."id","posthog_dashboarditem"."name","posthog_dashboarditem"."derived_name","posthog_dashboarditem"."description",@@ -10011,8 +8092,15 @@"posthog_dashboarditem"."dive_dashboard_id","posthog_dashboarditem"."updated_at","posthog_dashboarditem"."deprecated_tags",- "posthog_dashboarditem"."tags",- "posthog_team"."id",+ "posthog_dashboarditem"."tags"+ FROM "posthog_dashboarditem"+ WHERE "posthog_dashboarditem"."id" = 99999+ LIMIT 21+ '''+# ---+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.154+ '''+ SELECT "posthog_team"."id","posthog_team"."uuid","posthog_team"."organization_id","posthog_team"."parent_team_id",@@ -10098,295 +8186,165 @@"posthog_team"."modifiers","posthog_team"."correlation_config","posthog_team"."session_recording_retention_period_days",- "posthog_team"."plugins_opt_in",- "posthog_team"."opt_out_capture",- "posthog_team"."event_names",- "posthog_team"."event_names_with_usage",- "posthog_team"."event_properties",- "posthog_team"."event_properties_with_usage",- "posthog_team"."event_properties_numerical","posthog_team"."external_data_workspace_id","posthog_team"."external_data_workspace_last_synced_at","posthog_team"."api_query_rate_limit",- "posthog_team"."revenue_tracking_config","posthog_team"."drop_events_older_than","posthog_team"."base_currency","posthog_team"."experiment_recalculation_time","posthog_team"."default_experiment_confidence_level","posthog_team"."default_experiment_stats_method",- "posthog_team"."business_model",- "posthog_user"."id",- "posthog_user"."password",- "posthog_user"."last_login",- "posthog_user"."first_name",- "posthog_user"."last_name",- "posthog_user"."is_staff",- "posthog_user"."date_joined",- "posthog_user"."uuid",- "posthog_user"."current_organization_id",- "posthog_user"."current_team_id",- "posthog_user"."email",- "posthog_user"."pending_email",- "posthog_user"."distinct_id",- "posthog_user"."is_email_verified",- "posthog_user"."credentials_reviewed_at",- "posthog_user"."requested_password_reset_at",- "posthog_user"."requested_2fa_reset_at",- "posthog_user"."has_seen_product_intro_for",- "posthog_user"."strapi_id",- "posthog_user"."is_active",- "posthog_user"."role_at_organization",- "posthog_user"."theme_mode",- "posthog_user"."partial_notification_settings",- "posthog_user"."anonymize_data",- "posthog_user"."allow_impersonation",- "posthog_user"."toolbar_mode",- "posthog_user"."hedgehog_config",- "posthog_user"."allow_sidebar_suggestions",- "posthog_user"."shortcut_position",- "posthog_user"."passkeys_enabled_for_2fa",- "posthog_user"."hide_mcp_hints",- "posthog_user"."onboarding_skipped_at",- "posthog_user"."onboarding_skipped_reason",- "posthog_user"."onboarding_skipped_organization_id",- "posthog_user"."onboarding_delegated_to_invite_id",- "posthog_user"."onboarding_delegated_to_organization_id",- "posthog_user"."onboarding_delegation_accepted_at",- "posthog_user"."events_column_config",- "posthog_user"."email_opt_in",- T6."id",- T6."password",- T6."last_login",- T6."first_name",- T6."last_name",- T6."is_staff",- T6."date_joined",- T6."uuid",- T6."current_organization_id",- T6."current_team_id",- T6."email",- T6."pending_email",- T6."distinct_id",- T6."is_email_verified",- T6."credentials_reviewed_at",- T6."requested_password_reset_at",- T6."requested_2fa_reset_at",- T6."has_seen_product_intro_for",- T6."strapi_id",- T6."is_active",- T6."role_at_organization",- T6."theme_mode",- T6."partial_notification_settings",- T6."anonymize_data",- T6."allow_impersonation",- T6."toolbar_mode",- T6."hedgehog_config",- T6."allow_sidebar_suggestions",- T6."shortcut_position",- T6."passkeys_enabled_for_2fa",- T6."hide_mcp_hints",- T6."onboarding_skipped_at",- T6."onboarding_skipped_reason",- T6."onboarding_skipped_organization_id",- T6."onboarding_delegated_to_invite_id",- T6."onboarding_delegated_to_organization_id",- T6."onboarding_delegation_accepted_at",- T6."events_column_config",- T6."email_opt_in",- "posthog_text"."id",- "posthog_text"."body",- "posthog_text"."created_by_id",- "posthog_text"."last_modified_at",- "posthog_text"."last_modified_by_id",- "posthog_text"."team_id",- "posthog_buttontile"."id",- "posthog_buttontile"."url",- "posthog_buttontile"."text",- "posthog_buttontile"."placement",- "posthog_buttontile"."style",- "posthog_buttontile"."created_by_id",- "posthog_buttontile"."last_modified_at",- "posthog_buttontile"."last_modified_by_id",- "posthog_buttontile"."team_id",- "posthog_dashboardwidget"."id",- "posthog_dashboardwidget"."widget_type",- "posthog_dashboardwidget"."name",- "posthog_dashboardwidget"."description",- "posthog_dashboardwidget"."config",- "posthog_dashboardwidget"."created_by_id",- "posthog_dashboardwidget"."last_modified_at",- "posthog_dashboardwidget"."last_modified_by_id",- "posthog_dashboardwidget"."team_id",- T10."id",- T10."password",- T10."last_login",- T10."first_name",- T10."last_name",- T10."is_staff",- T10."date_joined",- T10."uuid",- T10."current_organization_id",- T10."current_team_id",- T10."email",- T10."pending_email",- T10."distinct_id",- T10."is_email_verified",- T10."credentials_reviewed_at",- T10."requested_password_reset_at",- T10."requested_2fa_reset_at",- T10."has_seen_product_intro_for",- T10."strapi_id",- T10."is_active",- T10."role_at_organization",- T10."theme_mode",- T10."partial_notification_settings",- T10."anonymize_data",- T10."allow_impersonation",- T10."toolbar_mode",- T10."hedgehog_config",- T10."allow_sidebar_suggestions",- T10."shortcut_position",- T10."passkeys_enabled_for_2fa",- T10."hide_mcp_hints",- T10."onboarding_skipped_at",- T10."onboarding_skipped_reason",- T10."onboarding_skipped_organization_id",- T10."onboarding_delegated_to_invite_id",- T10."onboarding_delegated_to_organization_id",- T10."onboarding_delegation_accepted_at",- T10."events_column_config",- T10."email_opt_in",- T11."id",- T11."password",- T11."last_login",- T11."first_name",- T11."last_name",- T11."is_staff",- T11."date_joined",- T11."uuid",- T11."current_organization_id",- T11."current_team_id",- T11."email",- T11."pending_email",- T11."distinct_id",- T11."is_email_verified",- T11."credentials_reviewed_at",- T11."requested_password_reset_at",- T11."requested_2fa_reset_at",- T11."has_seen_product_intro_for",- T11."strapi_id",- T11."is_active",- T11."role_at_organization",- T11."theme_mode",- T11."partial_notification_settings",- T11."anonymize_data",- T11."allow_impersonation",- T11."toolbar_mode",- T11."hedgehog_config",- T11."allow_sidebar_suggestions",- T11."shortcut_position",- T11."passkeys_enabled_for_2fa",- T11."hide_mcp_hints",- T11."onboarding_skipped_at",- T11."onboarding_skipped_reason",- T11."onboarding_skipped_organization_id",- T11."onboarding_delegated_to_invite_id",- T11."onboarding_delegated_to_organization_id",- T11."onboarding_delegation_accepted_at",- T11."events_column_config",- T11."email_opt_in"- FROM "posthog_dashboardtile"- INNER JOIN "posthog_dashboard" ON ("posthog_dashboardtile"."dashboard_id" = "posthog_dashboard"."id")- LEFT OUTER JOIN "posthog_dashboarditem" ON ("posthog_dashboardtile"."insight_id" = "posthog_dashboarditem"."id")- LEFT OUTER JOIN "posthog_team" ON ("posthog_dashboarditem"."team_id" = "posthog_team"."id")- LEFT OUTER JOIN "posthog_user" ON ("posthog_dashboarditem"."created_by_id" = "posthog_user"."id")- LEFT OUTER JOIN "posthog_user" T6 ON ("posthog_dashboarditem"."last_modified_by_id" = T6."id")- LEFT OUTER JOIN "posthog_text" ON ("posthog_dashboardtile"."text_id" = "posthog_text"."id")- LEFT OUTER JOIN "posthog_buttontile" ON ("posthog_dashboardtile"."button_tile_id" = "posthog_buttontile"."id")- LEFT OUTER JOIN "posthog_dashboardwidget" ON ("posthog_dashboardtile"."widget_id" = "posthog_dashboardwidget"."id")- LEFT OUTER JOIN "posthog_user" T10 ON ("posthog_dashboardwidget"."created_by_id" = T10."id")- LEFT OUTER JOIN "posthog_user" T11 ON ("posthog_dashboardwidget"."last_modified_by_id" = T11."id")- WHERE (NOT ("posthog_dashboardtile"."deleted"- AND "posthog_dashboardtile"."deleted" IS NOT NULL)- AND NOT ("posthog_dashboard"."deleted")- AND NOT ("posthog_dashboard"."deleted"- AND "posthog_dashboardtile"."deleted"- AND "posthog_dashboardtile"."deleted" IS NOT NULL)- AND (NOT "posthog_dashboarditem"."deleted"- OR "posthog_dashboardtile"."insight_id" IS NULL)- AND "posthog_dashboardtile"."dashboard_id" = 99999- AND "posthog_dashboardtile"."dashboard_id" = 99999- AND NOT ("posthog_dashboard"."deleted"- AND "posthog_dashboardtile"."deleted"- AND "posthog_dashboardtile"."deleted" IS NOT NULL)- AND (NOT "posthog_dashboarditem"."deleted"- OR "posthog_dashboardtile"."insight_id" IS NULL))- ORDER BY "posthog_dashboarditem"."order" ASC+ "posthog_team"."business_model"+ FROM "posthog_team"+ WHERE "posthog_team"."id" = 99999+ LIMIT 21'''# ----# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.191+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.155'''- SELECT "posthog_insightcachingstate"."id",- "posthog_insightcachingstate"."team_id",- "posthog_insightcachingstate"."insight_id",- "posthog_insightcachingstate"."dashboard_tile_id",- "posthog_insightcachingstate"."cache_key",- "posthog_insightcachingstate"."target_cache_age_seconds",- "posthog_insightcachingstate"."last_refresh",- "posthog_insightcachingstate"."last_refresh_queued_at",- "posthog_insightcachingstate"."refresh_attempt",- "posthog_insightcachingstate"."created_at",- "posthog_insightcachingstate"."updated_at"- FROM "posthog_insightcachingstate"- WHERE "posthog_insightcachingstate"."dashboard_tile_id" IN (1,- 2,- 3,- 4,- 5 /* ... */)+ SELECT "posthog_organization"."id",+ "posthog_organization"."name",+ "posthog_organization"."slug",+ "posthog_organization"."logo_media_id",+ "posthog_organization"."created_at",+ "posthog_organization"."updated_at",+ "posthog_organization"."is_active",+ "posthog_organization"."is_not_active_reason",+ "posthog_organization"."session_cookie_age",+ "posthog_organization"."is_member_join_email_enabled",+ "posthog_organization"."is_ai_data_processing_approved",+ "posthog_organization"."is_ai_training_opted_in",+ "posthog_organization"."is_ai_training_locked",+ "posthog_organization"."is_ai_training_cta_shown",+ "posthog_organization"."enforce_2fa",+ "posthog_organization"."members_can_invite",+ "posthog_organization"."members_can_create_projects",+ "posthog_organization"."members_can_use_personal_api_keys",+ "posthog_organization"."allow_publicly_shared_resources",+ "posthog_organization"."default_role_id",+ "posthog_organization"."plugins_access_level",+ "posthog_organization"."for_internal_metrics",+ "posthog_organization"."default_experiment_stats_method",+ "posthog_organization"."default_anonymize_ips",+ "posthog_organization"."is_hipaa",+ "posthog_organization"."is_pending_deletion",+ "posthog_organization"."customer_id",+ "posthog_organization"."available_product_features",+ "posthog_organization"."usage",+ "posthog_organization"."never_drop_data",+ "posthog_organization"."customer_trust_scores",+ "posthog_organization"."setup_section_2_completed",+ "posthog_organization"."personalization",+ "posthog_organization"."domain_whitelist",+ "posthog_organization"."is_platform"+ FROM "posthog_organization"+ WHERE "posthog_organization"."id" = '00000000-0000-0000-0000-000000000000'::uuid+ LIMIT 21'''# ----# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.192+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.156'''- SELECT ("posthog_dashboardtile"."insight_id") AS "_prefetch_related_val_insight_id",- "posthog_dashboard"."id",- "posthog_dashboard"."name",- "posthog_dashboard"."description",- "posthog_dashboard"."team_id",- "posthog_dashboard"."pinned",- "posthog_dashboard"."created_at",- "posthog_dashboard"."created_by_id",- "posthog_dashboard"."deleted",- "posthog_dashboard"."last_accessed_at",- "posthog_dashboard"."last_refresh",- "posthog_dashboard"."filters",- "posthog_dashboard"."variables",- "posthog_dashboard"."breakdown_colors",- "posthog_dashboard"."data_color_theme_id",- "posthog_dashboard"."creation_mode",- "posthog_dashboard"."restriction_level",- "posthog_dashboard"."quick_filter_ids",- "posthog_dashboard"."deprecated_tags",- "posthog_dashboard"."tags",- "posthog_dashboard"."share_token",- "posthog_dashboard"."is_shared"- FROM "posthog_dashboard"- INNER JOIN "posthog_dashboardtile" ON ("posthog_dashboard"."id" = "posthog_dashboardtile"."dashboard_id")- WHERE (NOT ("posthog_dashboard"."deleted")- AND "posthog_dashboard"."id" IN- (SELECT U0."dashboard_id" AS "dashboard_id"- FROM "posthog_dashboardtile" U0- INNER JOIN "posthog_dashboard" U1 ON (U0."dashboard_id" = U1."id")- WHERE (NOT (U0."deleted"- AND U0."deleted" IS NOT NULL)- AND NOT (U1."deleted")))- AND "posthog_dashboardtile"."insight_id" IN (1,- 2,- 3,- 4,- 5 /* ... */))+ SELECT "posthog_team"."id",+ "posthog_team"."uuid",+ "posthog_team"."organization_id",+ "posthog_team"."parent_team_id",+ "posthog_team"."project_id",+ "posthog_team"."api_token",+ "posthog_team"."app_urls",+ "posthog_team"."name",+ "posthog_team"."slack_incoming_webhook",+ "posthog_team"."created_at",+ "posthog_team"."updated_at",+ "posthog_team"."anonymize_ips",+ "posthog_team"."completed_snippet_onboarding",+ "posthog_team"."has_completed_onboarding_for",+ "posthog_team"."onboarding_tasks",+ "posthog_team"."ingested_event",+ "posthog_team"."ingested_production_event",+ "posthog_team"."ingested_production_event_last_checked_at",+ "posthog_team"."person_processing_opt_out",+ "posthog_team"."secret_api_token",+ "posthog_team"."secret_api_token_backup",+ "posthog_team"."session_recording_opt_in",+ "posthog_team"."session_recording_sample_rate",+ "posthog_team"."session_recording_minimum_duration_milliseconds",+ "posthog_team"."session_recording_linked_flag",+ "posthog_team"."session_recording_network_payload_capture_config",+ "posthog_team"."session_recording_masking_config",+ "posthog_team"."session_recording_url_trigger_config",+ "posthog_team"."session_recording_url_blocklist_config",+ "posthog_team"."session_recording_event_trigger_config",+ "posthog_team"."session_recording_trigger_match_type_config",+ "posthog_team"."session_recording_trigger_groups",+ "posthog_team"."session_replay_config",+ "posthog_team"."session_recording_retention_period",+ "posthog_team"."event_retention_months",+ "posthog_team"."conversations_enabled",+ "posthog_team"."conversations_settings",+ "posthog_team"."proactive_tasks_enabled",+ "posthog_team"."survey_config",+ "posthog_team"."surveys_opt_in",+ "posthog_team"."product_tours_opt_in",+ "posthog_team"."capture_console_log_opt_in",+ "posthog_team"."capture_performance_opt_in",+ "posthog_team"."capture_dead_clicks",+ "posthog_team"."autocapture_opt_out",+ "posthog_team"."autocapture_web_vitals_opt_in",+ "posthog_team"."autocapture_web_vitals_allowed_metrics",+ "posthog_team"."autocapture_exceptions_opt_in",+ "posthog_team"."autocapture_exceptions_errors_to_ignore",+ "posthog_team"."logs_settings",+ "posthog_team"."llm_gateway_enabled_at",+ "posthog_team"."llm_gateway_revoked_at",+ "posthog_team"."llm_gateway_overspend_allowance_usd",+ "posthog_team"."heatmaps_opt_in",+ "posthog_team"."receive_org_level_activity_logs",+ "posthog_team"."web_analytics_pre_aggregated_tables_enabled",+ "posthog_team"."web_analytics_pre_aggregated_tables_version",+ "posthog_team"."flags_persistence_default",+ "posthog_team"."feature_flag_confirmation_enabled",+ "posthog_team"."feature_flag_confirmation_message",+ "posthog_team"."default_evaluation_environments_enabled",+ "posthog_team"."require_evaluation_environment_tags",+ "posthog_team"."default_evaluation_contexts_enabled",+ "posthog_team"."require_evaluation_contexts",+ "posthog_team"."session_recording_version",+ "posthog_team"."signup_token",+ "posthog_team"."is_demo",+ "posthog_team"."access_control",+ "posthog_team"."week_start_day",+ "posthog_team"."inject_web_apps",+ "posthog_team"."test_account_filters",+ "posthog_team"."test_account_filters_default_checked",+ "posthog_team"."path_cleaning_filters",+ "posthog_team"."timezone",+ "posthog_team"."data_attributes",+ "posthog_team"."person_display_name_properties",+ "posthog_team"."live_events_columns",+ "posthog_team"."recording_domains",+ "posthog_team"."human_friendly_comparison_periods",+ "posthog_team"."cookieless_server_hash_mode",+ "posthog_team"."primary_dashboard_id",+ "posthog_team"."default_data_theme",+ "posthog_team"."extra_settings",+ "posthog_team"."modifiers",+ "posthog_team"."correlation_config",+ "posthog_team"."session_recording_retention_period_days",+ "posthog_team"."external_data_workspace_id",+ "posthog_team"."external_data_workspace_last_synced_at",+ "posthog_team"."api_query_rate_limit",+ "posthog_team"."drop_events_older_than",+ "posthog_team"."base_currency",+ "posthog_team"."experiment_recalculation_time",+ "posthog_team"."default_experiment_confidence_level",+ "posthog_team"."default_experiment_stats_method",+ "posthog_team"."business_model"+ FROM "posthog_team"+ WHERE "posthog_team"."id" = 99999+ LIMIT 21'''# ----# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.193+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.157'''SELECT "posthog_dashboardtile"."id","posthog_dashboardtile"."dashboard_id",@@ -10406,95 +8364,225 @@"posthog_dashboardtile"."transparent_background","posthog_dashboardtile"."deleted"FROM "posthog_dashboardtile"- INNER JOIN "posthog_dashboard" ON ("posthog_dashboardtile"."dashboard_id" = "posthog_dashboard"."id")- WHERE (NOT ("posthog_dashboardtile"."deleted"- AND "posthog_dashboardtile"."deleted" IS NOT NULL)- AND NOT ("posthog_dashboard"."deleted")- AND "posthog_dashboardtile"."insight_id" IN (1,- 2,- 3,- 4,- 5 /* ... */))+ WHERE "posthog_dashboardtile"."id" = 99999+ LIMIT 21'''# ----# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.194+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.158'''- SELECT "posthog_dashboard"."id",- "posthog_dashboard"."name",- "posthog_dashboard"."description",- "posthog_dashboard"."team_id",- "posthog_dashboard"."pinned",- "posthog_dashboard"."created_at",- "posthog_dashboard"."created_by_id",- "posthog_dashboard"."deleted",- "posthog_dashboard"."last_accessed_at",- "posthog_dashboard"."last_refresh",- "posthog_dashboard"."filters",- "posthog_dashboard"."variables",- "posthog_dashboard"."breakdown_colors",- "posthog_dashboard"."data_color_theme_id",- "posthog_dashboard"."creation_mode",- "posthog_dashboard"."restriction_level",- "posthog_dashboard"."quick_filter_ids",- "posthog_dashboard"."deprecated_tags",- "posthog_dashboard"."tags",- "posthog_dashboard"."share_token",- "posthog_dashboard"."is_shared"- FROM "posthog_dashboard"- WHERE ("posthog_dashboard"."id") IN ((1,- 2)/* ... */)+ SELECT "posthog_dashboarditem"."id",+ "posthog_dashboarditem"."name",+ "posthog_dashboarditem"."derived_name",+ "posthog_dashboarditem"."description",+ "posthog_dashboarditem"."team_id",+ "posthog_dashboarditem"."filters",+ "posthog_dashboarditem"."filters_hash",+ "posthog_dashboarditem"."query",+ "posthog_dashboarditem"."query_metadata",+ "posthog_dashboarditem"."order",+ "posthog_dashboarditem"."deleted",+ "posthog_dashboarditem"."saved",+ "posthog_dashboarditem"."created_at",+ "posthog_dashboarditem"."refreshing",+ "posthog_dashboarditem"."created_by_id",+ "posthog_dashboarditem"."is_sample",+ "posthog_dashboarditem"."short_id",+ "posthog_dashboarditem"."favorited",+ "posthog_dashboarditem"."refresh_attempt",+ "posthog_dashboarditem"."last_modified_at",+ "posthog_dashboarditem"."last_modified_by_id",+ "posthog_dashboarditem"."dashboard_id",+ "posthog_dashboarditem"."last_refresh",+ "posthog_dashboarditem"."layouts",+ "posthog_dashboarditem"."color",+ "posthog_dashboarditem"."dive_dashboard_id",+ "posthog_dashboarditem"."updated_at",+ "posthog_dashboarditem"."deprecated_tags",+ "posthog_dashboarditem"."tags"+ FROM "posthog_dashboarditem"+ WHERE "posthog_dashboarditem"."id" = 99999+ LIMIT 21'''# ----# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.195+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.159'''- SELECT "posthog_taggeditem"."id",- "posthog_taggeditem"."tag_id",- "posthog_taggeditem"."dashboard_id",- "posthog_taggeditem"."insight_id",- "posthog_taggeditem"."event_definition_id",- "posthog_taggeditem"."property_definition_id",- "posthog_taggeditem"."action_id",- "posthog_taggeditem"."feature_flag_id",- "posthog_taggeditem"."experiment_saved_metric_id",- "posthog_taggeditem"."ticket_id",- "posthog_taggeditem"."account_id",- "posthog_taggeditem"."endpoint_id",- "posthog_tag"."id",- "posthog_tag"."name",- "posthog_tag"."team_id"- FROM "posthog_taggeditem"- INNER JOIN "posthog_tag" ON ("posthog_taggeditem"."tag_id" = "posthog_tag"."id")- WHERE "posthog_taggeditem"."insight_id" IN (1,- 2,- 3,- 4,- 5 /* ... */)+ SELECT "posthog_dashboard"."id",+ "posthog_dashboard"."name",+ "posthog_dashboard"."description",+ "posthog_dashboard"."team_id",+ "posthog_dashboard"."pinned",+ "posthog_dashboard"."created_at",+ "posthog_dashboard"."created_by_id",+ "posthog_dashboard"."deleted",+ "posthog_dashboard"."last_accessed_at",+ "posthog_dashboard"."last_refresh",+ "posthog_dashboard"."filters",+ "posthog_dashboard"."variables",+ "posthog_dashboard"."breakdown_colors",+ "posthog_dashboard"."data_color_theme_id",+ "posthog_dashboard"."creation_mode",+ "posthog_dashboard"."restriction_level",+ "posthog_dashboard"."quick_filter_ids",+ "posthog_dashboard"."deprecated_tags",+ "posthog_dashboard"."tags",+ "posthog_dashboard"."share_token",+ "posthog_dashboard"."is_shared"+ FROM "posthog_dashboard"+ WHERE "posthog_dashboard"."id" = 99999+ LIMIT 21'''# ----# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.196+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.16'''- SELECT "posthog_alertconfiguration"."created_by_id",- "posthog_alertconfiguration"."created_at",- "posthog_alertconfiguration"."id",- "posthog_alertconfiguration"."team_id",- "posthog_alertconfiguration"."insight_id",- "posthog_alertconfiguration"."name",- "posthog_alertconfiguration"."config",- "posthog_alertconfiguration"."calculation_interval",- "posthog_alertconfiguration"."threshold_id",- "posthog_alertconfiguration"."condition",- "posthog_alertconfiguration"."detector_config",- "posthog_alertconfiguration"."state",- "posthog_alertconfiguration"."enabled",- "posthog_alertconfiguration"."last_notified_at",- "posthog_alertconfiguration"."last_checked_at",- "posthog_alertconfiguration"."next_check_at",- "posthog_alertconfiguration"."snoozed_until",- "posthog_alertconfiguration"."skip_weekend",- "posthog_alertconfiguration"."schedule_restriction",- "posthog_alertconfiguration"."investigation_agent_enabled",- "posthog_alertconfiguration"."investigation_gates_notifications",- "posthog_alertconfiguration"."investigation_inconclusive_action",+ SELECT "posthog_dashboardtile"."id",+ "posthog_dashboardtile"."dashboard_id",+ "posthog_dashboardtile"."insight_id",+ "posthog_dashboardtile"."text_id",+ "posthog_dashboardtile"."button_tile_id",+ "posthog_dashboardtile"."widget_id",+ "posthog_dashboardtile"."team_id",+ "posthog_dashboardtile"."layouts",+ "posthog_dashboardtile"."color",+ "posthog_dashboardtile"."filters_hash",+ "posthog_dashboardtile"."last_refresh",+ "posthog_dashboardtile"."refreshing",+ "posthog_dashboardtile"."refresh_attempt",+ "posthog_dashboardtile"."filters_overrides",+ "posthog_dashboardtile"."show_description",+ "posthog_dashboardtile"."transparent_background",+ "posthog_dashboardtile"."deleted",+ "posthog_dashboarditem"."id",+ "posthog_dashboarditem"."name",+ "posthog_dashboarditem"."derived_name",+ "posthog_dashboarditem"."description",+ "posthog_dashboarditem"."team_id",+ "posthog_dashboarditem"."filters",+ "posthog_dashboarditem"."filters_hash",+ "posthog_dashboarditem"."query",+ "posthog_dashboarditem"."query_metadata",+ "posthog_dashboarditem"."order",+ "posthog_dashboarditem"."deleted",+ "posthog_dashboarditem"."saved",+ "posthog_dashboarditem"."created_at",+ "posthog_dashboarditem"."refreshing",+ "posthog_dashboarditem"."created_by_id",+ "posthog_dashboarditem"."is_sample",+ "posthog_dashboarditem"."short_id",+ "posthog_dashboarditem"."favorited",+ "posthog_dashboarditem"."refresh_attempt",+ "posthog_dashboarditem"."last_modified_at",+ "posthog_dashboarditem"."last_modified_by_id",+ "posthog_dashboarditem"."dashboard_id",+ "posthog_dashboarditem"."last_refresh",+ "posthog_dashboarditem"."layouts",+ "posthog_dashboarditem"."color",+ "posthog_dashboarditem"."dive_dashboard_id",+ "posthog_dashboarditem"."updated_at",+ "posthog_dashboarditem"."deprecated_tags",+ "posthog_dashboarditem"."tags",+ "posthog_team"."id",+ "posthog_team"."uuid",+ "posthog_team"."organization_id",+ "posthog_team"."parent_team_id",+ "posthog_team"."project_id",+ "posthog_team"."api_token",+ "posthog_team"."app_urls",+ "posthog_team"."name",+ "posthog_team"."slack_incoming_webhook",+ "posthog_team"."created_at",+ "posthog_team"."updated_at",+ "posthog_team"."anonymize_ips",+ "posthog_team"."completed_snippet_onboarding",+ "posthog_team"."has_completed_onboarding_for",+ "posthog_team"."onboarding_tasks",+ "posthog_team"."ingested_event",+ "posthog_team"."ingested_production_event",+ "posthog_team"."ingested_production_event_last_checked_at",+ "posthog_team"."person_processing_opt_out",+ "posthog_team"."secret_api_token",+ "posthog_team"."secret_api_token_backup",+ "posthog_team"."session_recording_opt_in",+ "posthog_team"."session_recording_sample_rate",+ "posthog_team"."session_recording_minimum_duration_milliseconds",+ "posthog_team"."session_recording_linked_flag",+ "posthog_team"."session_recording_network_payload_capture_config",+ "posthog_team"."session_recording_masking_config",+ "posthog_team"."session_recording_url_trigger_config",+ "posthog_team"."session_recording_url_blocklist_config",+ "posthog_team"."session_recording_event_trigger_config",+ "posthog_team"."session_recording_trigger_match_type_config",+ "posthog_team"."session_recording_trigger_groups",+ "posthog_team"."session_replay_config",+ "posthog_team"."session_recording_retention_period",+ "posthog_team"."event_retention_months",+ "posthog_team"."conversations_enabled",+ "posthog_team"."conversations_settings",+ "posthog_team"."proactive_tasks_enabled",+ "posthog_team"."survey_config",+ "posthog_team"."surveys_opt_in",+ "posthog_team"."product_tours_opt_in",+ "posthog_team"."capture_console_log_opt_in",+ "posthog_team"."capture_performance_opt_in",+ "posthog_team"."capture_dead_clicks",+ "posthog_team"."autocapture_opt_out",+ "posthog_team"."autocapture_web_vitals_opt_in",+ "posthog_team"."autocapture_web_vitals_allowed_metrics",+ "posthog_team"."autocapture_exceptions_opt_in",+ "posthog_team"."autocapture_exceptions_errors_to_ignore",+ "posthog_team"."logs_settings",+ "posthog_team"."llm_gateway_enabled_at",+ "posthog_team"."llm_gateway_revoked_at",+ "posthog_team"."llm_gateway_overspend_allowance_usd",+ "posthog_team"."heatmaps_opt_in",+ "posthog_team"."receive_org_level_activity_logs",+ "posthog_team"."web_analytics_pre_aggregated_tables_enabled",+ "posthog_team"."web_analytics_pre_aggregated_tables_version",+ "posthog_team"."flags_persistence_default",+ "posthog_team"."feature_flag_confirmation_enabled",+ "posthog_team"."feature_flag_confirmation_message",+ "posthog_team"."default_evaluation_environments_enabled",+ "posthog_team"."require_evaluation_environment_tags",+ "posthog_team"."default_evaluation_contexts_enabled",+ "posthog_team"."require_evaluation_contexts",+ "posthog_team"."session_recording_version",+ "posthog_team"."signup_token",+ "posthog_team"."is_demo",+ "posthog_team"."access_control",+ "posthog_team"."week_start_day",+ "posthog_team"."inject_web_apps",+ "posthog_team"."test_account_filters",+ "posthog_team"."test_account_filters_default_checked",+ "posthog_team"."path_cleaning_filters",+ "posthog_team"."timezone",+ "posthog_team"."data_attributes",+ "posthog_team"."person_display_name_properties",+ "posthog_team"."live_events_columns",+ "posthog_team"."recording_domains",+ "posthog_team"."human_friendly_comparison_periods",+ "posthog_team"."cookieless_server_hash_mode",+ "posthog_team"."primary_dashboard_id",+ "posthog_team"."default_data_theme",+ "posthog_team"."extra_settings",+ "posthog_team"."modifiers",+ "posthog_team"."correlation_config",+ "posthog_team"."session_recording_retention_period_days",+ "posthog_team"."plugins_opt_in",+ "posthog_team"."opt_out_capture",+ "posthog_team"."event_names",+ "posthog_team"."event_names_with_usage",+ "posthog_team"."event_properties",+ "posthog_team"."event_properties_with_usage",+ "posthog_team"."event_properties_numerical",+ "posthog_team"."external_data_workspace_id",+ "posthog_team"."external_data_workspace_last_synced_at",+ "posthog_team"."api_query_rate_limit",+ "posthog_team"."revenue_tracking_config",+ "posthog_team"."drop_events_older_than",+ "posthog_team"."base_currency",+ "posthog_team"."experiment_recalculation_time",+ "posthog_team"."default_experiment_confidence_level",+ "posthog_team"."default_experiment_stats_method",+ "posthog_team"."business_model","posthog_user"."id","posthog_user"."password","posthog_user"."last_login",@@ -10533,49 +8621,172 @@"posthog_user"."onboarding_delegated_to_organization_id","posthog_user"."onboarding_delegation_accepted_at","posthog_user"."events_column_config",- "posthog_user"."email_opt_in"- FROM "posthog_alertconfiguration"- LEFT OUTER JOIN "posthog_user" ON ("posthog_alertconfiguration"."created_by_id" = "posthog_user"."id")- WHERE "posthog_alertconfiguration"."insight_id" IN (1,- 2,- 3,- 4,- 5 /* ... */)- '''-# ----# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.197- '''- SELECT "posthog_dashboard"."id",- "posthog_dashboard"."name",- "posthog_dashboard"."description",- "posthog_dashboard"."team_id",- "posthog_dashboard"."pinned",- "posthog_dashboard"."created_at",- "posthog_dashboard"."created_by_id",- "posthog_dashboard"."deleted",- "posthog_dashboard"."last_accessed_at",- "posthog_dashboard"."last_refresh",- "posthog_dashboard"."filters",- "posthog_dashboard"."variables",- "posthog_dashboard"."breakdown_colors",- "posthog_dashboard"."data_color_theme_id",- "posthog_dashboard"."creation_mode",- "posthog_dashboard"."restriction_level",- "posthog_dashboard"."quick_filter_ids",- "posthog_dashboard"."deprecated_tags",- "posthog_dashboard"."tags",- "posthog_dashboard"."share_token",- "posthog_dashboard"."is_shared"- FROM "posthog_dashboard"- WHERE (NOT ("posthog_dashboard"."deleted")- AND "posthog_dashboard"."id" IN (1,- 2,- 3,- 4,- 5 /* ... */))+ "posthog_user"."email_opt_in",+ T6."id",+ T6."password",+ T6."last_login",+ T6."first_name",+ T6."last_name",+ T6."is_staff",+ T6."date_joined",+ T6."uuid",+ T6."current_organization_id",+ T6."current_team_id",+ T6."email",+ T6."pending_email",+ T6."distinct_id",+ T6."is_email_verified",+ T6."credentials_reviewed_at",+ T6."requested_password_reset_at",+ T6."requested_2fa_reset_at",+ T6."has_seen_product_intro_for",+ T6."strapi_id",+ T6."is_active",+ T6."role_at_organization",+ T6."theme_mode",+ T6."partial_notification_settings",+ T6."anonymize_data",+ T6."allow_impersonation",+ T6."toolbar_mode",+ T6."hedgehog_config",+ T6."allow_sidebar_suggestions",+ T6."shortcut_position",+ T6."passkeys_enabled_for_2fa",+ T6."hide_mcp_hints",+ T6."onboarding_skipped_at",+ T6."onboarding_skipped_reason",+ T6."onboarding_skipped_organization_id",+ T6."onboarding_delegated_to_invite_id",+ T6."onboarding_delegated_to_organization_id",+ T6."onboarding_delegation_accepted_at",+ T6."events_column_config",+ T6."email_opt_in",+ "posthog_text"."id",+ "posthog_text"."body",+ "posthog_text"."created_by_id",+ "posthog_text"."last_modified_at",+ "posthog_text"."last_modified_by_id",+ "posthog_text"."team_id",+ "posthog_buttontile"."id",+ "posthog_buttontile"."url",+ "posthog_buttontile"."text",+ "posthog_buttontile"."placement",+ "posthog_buttontile"."style",+ "posthog_buttontile"."created_by_id",+ "posthog_buttontile"."last_modified_at",+ "posthog_buttontile"."last_modified_by_id",+ "posthog_buttontile"."team_id",+ "posthog_dashboardwidget"."id",+ "posthog_dashboardwidget"."widget_type",+ "posthog_dashboardwidget"."name",+ "posthog_dashboardwidget"."description",+ "posthog_dashboardwidget"."config",+ "posthog_dashboardwidget"."created_by_id",+ "posthog_dashboardwidget"."last_modified_at",+ "posthog_dashboardwidget"."last_modified_by_id",+ "posthog_dashboardwidget"."team_id",+ T10."id",+ T10."password",+ T10."last_login",+ T10."first_name",+ T10."last_name",+ T10."is_staff",+ T10."date_joined",+ T10."uuid",+ T10."current_organization_id",+ T10."current_team_id",+ T10."email",+ T10."pending_email",+ T10."distinct_id",+ T10."is_email_verified",+ T10."credentials_reviewed_at",+ T10."requested_password_reset_at",+ T10."requested_2fa_reset_at",+ T10."has_seen_product_intro_for",+ T10."strapi_id",+ T10."is_active",+ T10."role_at_organization",+ T10."theme_mode",+ T10."partial_notification_settings",+ T10."anonymize_data",+ T10."allow_impersonation",+ T10."toolbar_mode",+ T10."hedgehog_config",+ T10."allow_sidebar_suggestions",+ T10."shortcut_position",+ T10."passkeys_enabled_for_2fa",+ T10."hide_mcp_hints",+ T10."onboarding_skipped_at",+ T10."onboarding_skipped_reason",+ T10."onboarding_skipped_organization_id",+ T10."onboarding_delegated_to_invite_id",+ T10."onboarding_delegated_to_organization_id",+ T10."onboarding_delegation_accepted_at",+ T10."events_column_config",+ T10."email_opt_in",+ T11."id",+ T11."password",+ T11."last_login",+ T11."first_name",+ T11."last_name",+ T11."is_staff",+ T11."date_joined",+ T11."uuid",+ T11."current_organization_id",+ T11."current_team_id",+ T11."email",+ T11."pending_email",+ T11."distinct_id",+ T11."is_email_verified",+ T11."credentials_reviewed_at",+ T11."requested_password_reset_at",+ T11."requested_2fa_reset_at",+ T11."has_seen_product_intro_for",+ T11."strapi_id",+ T11."is_active",+ T11."role_at_organization",+ T11."theme_mode",+ T11."partial_notification_settings",+ T11."anonymize_data",+ T11."allow_impersonation",+ T11."toolbar_mode",+ T11."hedgehog_config",+ T11."allow_sidebar_suggestions",+ T11."shortcut_position",+ T11."passkeys_enabled_for_2fa",+ T11."hide_mcp_hints",+ T11."onboarding_skipped_at",+ T11."onboarding_skipped_reason",+ T11."onboarding_skipped_organization_id",+ T11."onboarding_delegated_to_invite_id",+ T11."onboarding_delegated_to_organization_id",+ T11."onboarding_delegation_accepted_at",+ T11."events_column_config",+ T11."email_opt_in"+ FROM "posthog_dashboardtile"+ INNER JOIN "posthog_dashboard" ON ("posthog_dashboardtile"."dashboard_id" = "posthog_dashboard"."id")+ LEFT OUTER JOIN "posthog_dashboarditem" ON ("posthog_dashboardtile"."insight_id" = "posthog_dashboarditem"."id")+ LEFT OUTER JOIN "posthog_team" ON ("posthog_dashboarditem"."team_id" = "posthog_team"."id")+ LEFT OUTER JOIN "posthog_user" ON ("posthog_dashboarditem"."created_by_id" = "posthog_user"."id")+ LEFT OUTER JOIN "posthog_user" T6 ON ("posthog_dashboarditem"."last_modified_by_id" = T6."id")+ LEFT OUTER JOIN "posthog_text" ON ("posthog_dashboardtile"."text_id" = "posthog_text"."id")+ LEFT OUTER JOIN "posthog_buttontile" ON ("posthog_dashboardtile"."button_tile_id" = "posthog_buttontile"."id")+ LEFT OUTER JOIN "posthog_dashboardwidget" ON ("posthog_dashboardtile"."widget_id" = "posthog_dashboardwidget"."id")+ LEFT OUTER JOIN "posthog_user" T10 ON ("posthog_dashboardwidget"."created_by_id" = T10."id")+ LEFT OUTER JOIN "posthog_user" T11 ON ("posthog_dashboardwidget"."last_modified_by_id" = T11."id")+ WHERE (NOT ("posthog_dashboardtile"."deleted"+ AND "posthog_dashboardtile"."deleted" IS NOT NULL)+ AND NOT ("posthog_dashboard"."deleted")+ AND "posthog_dashboardtile"."dashboard_id" = 99999+ AND NOT ("posthog_dashboard"."deleted"+ AND "posthog_dashboardtile"."deleted"+ AND "posthog_dashboardtile"."deleted" IS NOT NULL)+ AND (NOT "posthog_dashboarditem"."deleted"+ OR "posthog_dashboardtile"."insight_id" IS NULL))+ ORDER BY "posthog_dashboarditem"."order" ASC'''# ----# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.2+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.160'''SELECT "posthog_team"."id","posthog_team"."uuid",@@ -10671,8 +8882,15 @@"posthog_team"."experiment_recalculation_time","posthog_team"."default_experiment_confidence_level","posthog_team"."default_experiment_stats_method",- "posthog_team"."business_model",- "posthog_organization"."id",+ "posthog_team"."business_model"+ FROM "posthog_team"+ WHERE "posthog_team"."id" = 99999+ LIMIT 21+ '''+# ---+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.161+ '''+ SELECT "posthog_organization"."id","posthog_organization"."name","posthog_organization"."slug","posthog_organization"."logo_media_id",@@ -10707,13 +8925,12 @@"posthog_organization"."personalization","posthog_organization"."domain_whitelist","posthog_organization"."is_platform"- FROM "posthog_team"- INNER JOIN "posthog_organization" ON ("posthog_team"."organization_id" = "posthog_organization"."id")- WHERE "posthog_team"."id" = 99999+ FROM "posthog_organization"+ WHERE "posthog_organization"."id" = '00000000-0000-0000-0000-000000000000'::uuidLIMIT 21'''# ----# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.20+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.162'''SELECT "posthog_organization"."id","posthog_organization"."name",@@ -10755,7 +8972,7 @@LIMIT 21'''# ----# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.21+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.163'''SELECT "posthog_team"."id","posthog_team"."uuid",@@ -10851,133 +9068,189 @@"posthog_team"."experiment_recalculation_time","posthog_team"."default_experiment_confidence_level","posthog_team"."default_experiment_stats_method",- "posthog_team"."business_model",- "posthog_organization"."id",- "posthog_organization"."name",- "posthog_organization"."slug",- "posthog_organization"."logo_media_id",- "posthog_organization"."created_at",- "posthog_organization"."updated_at",- "posthog_organization"."is_active",- "posthog_organization"."is_not_active_reason",- "posthog_organization"."session_cookie_age",- "posthog_organization"."is_member_join_email_enabled",- "posthog_organization"."is_ai_data_processing_approved",- "posthog_organization"."is_ai_training_opted_in",- "posthog_organization"."is_ai_training_locked",- "posthog_organization"."is_ai_training_cta_shown",- "posthog_organization"."enforce_2fa",- "posthog_organization"."members_can_invite",- "posthog_organization"."members_can_create_projects",- "posthog_organization"."members_can_use_personal_api_keys",- "posthog_organization"."allow_publicly_shared_resources",- "posthog_organization"."default_role_id",- "posthog_organization"."plugins_access_level",- "posthog_organization"."for_internal_metrics",- "posthog_organization"."default_experiment_stats_method",- "posthog_organization"."default_anonymize_ips",- "posthog_organization"."is_hipaa",- "posthog_organization"."is_pending_deletion",- "posthog_organization"."customer_id",- "posthog_organization"."available_product_features",- "posthog_organization"."usage",- "posthog_organization"."never_drop_data",- "posthog_organization"."customer_trust_scores",- "posthog_organization"."setup_section_2_completed",- "posthog_organization"."personalization",- "posthog_organization"."domain_whitelist",- "posthog_organization"."is_platform"+ "posthog_team"."business_model"FROM "posthog_team"- INNER JOIN "posthog_organization" ON ("posthog_team"."organization_id" = "posthog_organization"."id")WHERE "posthog_team"."id" = 99999LIMIT 21'''# ----# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.22+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.164+ '''+ SELECT "posthog_dashboardtile"."id",+ "posthog_dashboardtile"."dashboard_id",+ "posthog_dashboardtile"."insight_id",+ "posthog_dashboardtile"."text_id",+ "posthog_dashboardtile"."button_tile_id",+ "posthog_dashboardtile"."widget_id",+ "posthog_dashboardtile"."team_id",+ "posthog_dashboardtile"."layouts",+ "posthog_dashboardtile"."color",+ "posthog_dashboardtile"."filters_hash",+ "posthog_dashboardtile"."last_refresh",+ "posthog_dashboardtile"."refreshing",+ "posthog_dashboardtile"."refresh_attempt",+ "posthog_dashboardtile"."filters_overrides",+ "posthog_dashboardtile"."show_description",+ "posthog_dashboardtile"."transparent_background",+ "posthog_dashboardtile"."deleted"+ FROM "posthog_dashboardtile"+ INNER JOIN "posthog_dashboard" ON ("posthog_dashboardtile"."dashboard_id" = "posthog_dashboard"."id")+ WHERE (NOT ("posthog_dashboardtile"."deleted"+ AND "posthog_dashboardtile"."deleted" IS NOT NULL)+ AND NOT ("posthog_dashboard"."deleted")+ AND "posthog_dashboardtile"."insight_id" = 99999)+ '''+# ---+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.165+ '''+ SELECT "posthog_dashboardtile"."id",+ "posthog_dashboardtile"."dashboard_id",+ "posthog_dashboardtile"."insight_id",+ "posthog_dashboardtile"."text_id",+ "posthog_dashboardtile"."button_tile_id",+ "posthog_dashboardtile"."widget_id",+ "posthog_dashboardtile"."team_id",+ "posthog_dashboardtile"."layouts",+ "posthog_dashboardtile"."color",+ "posthog_dashboardtile"."filters_hash",+ "posthog_dashboardtile"."last_refresh",+ "posthog_dashboardtile"."refreshing",+ "posthog_dashboardtile"."refresh_attempt",+ "posthog_dashboardtile"."filters_overrides",+ "posthog_dashboardtile"."show_description",+ "posthog_dashboardtile"."transparent_background",+ "posthog_dashboardtile"."deleted"+ FROM "posthog_dashboardtile"+ INNER JOIN "posthog_dashboard" ON ("posthog_dashboardtile"."dashboard_id" = "posthog_dashboard"."id")+ WHERE (NOT ("posthog_dashboardtile"."deleted"+ AND "posthog_dashboardtile"."deleted" IS NOT NULL)+ AND NOT ("posthog_dashboard"."deleted")+ AND "posthog_dashboardtile"."insight_id" = 99999)+ '''+# ---+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.166'''- SELECT "posthog_organizationmembership"."id",- "posthog_organizationmembership"."organization_id",- "posthog_organizationmembership"."user_id",- "posthog_organizationmembership"."level",- "posthog_organizationmembership"."joined_at",- "posthog_organizationmembership"."updated_at",- "posthog_organizationmembership"."invited_by_id",- "posthog_organization"."id",- "posthog_organization"."name",- "posthog_organization"."slug",- "posthog_organization"."logo_media_id",- "posthog_organization"."created_at",- "posthog_organization"."updated_at",- "posthog_organization"."is_active",- "posthog_organization"."is_not_active_reason",- "posthog_organization"."session_cookie_age",- "posthog_organization"."is_member_join_email_enabled",- "posthog_organization"."is_ai_data_processing_approved",- "posthog_organization"."is_ai_training_opted_in",- "posthog_organization"."is_ai_training_locked",- "posthog_organization"."is_ai_training_cta_shown",- "posthog_organization"."enforce_2fa",- "posthog_organization"."members_can_invite",- "posthog_organization"."members_can_create_projects",- "posthog_organization"."members_can_use_personal_api_keys",- "posthog_organization"."allow_publicly_shared_resources",- "posthog_organization"."default_role_id",- "posthog_organization"."plugins_access_level",- "posthog_organization"."for_internal_metrics",- "posthog_organization"."default_experiment_stats_method",- "posthog_organization"."default_anonymize_ips",- "posthog_organization"."is_hipaa",- "posthog_organization"."is_pending_deletion",- "posthog_organization"."customer_id",- "posthog_organization"."available_product_features",- "posthog_organization"."usage",- "posthog_organization"."never_drop_data",- "posthog_organization"."customer_trust_scores",- "posthog_organization"."setup_section_2_completed",- "posthog_organization"."personalization",- "posthog_organization"."domain_whitelist",- "posthog_organization"."is_platform"- FROM "posthog_organizationmembership"- INNER JOIN "posthog_organization" ON ("posthog_organizationmembership"."organization_id" = "posthog_organization"."id")- WHERE ("posthog_organizationmembership"."organization_id" = '00000000-0000-0000-0000-000000000000'::uuid- AND "posthog_organizationmembership"."user_id" = 99999)- LIMIT 21+ SELECT "posthog_insightvariable"."created_by_id",+ "posthog_insightvariable"."created_at",+ "posthog_insightvariable"."updated_at",+ "posthog_insightvariable"."id",+ "posthog_insightvariable"."team_id",+ "posthog_insightvariable"."name",+ "posthog_insightvariable"."code_name",+ "posthog_insightvariable"."type",+ "posthog_insightvariable"."default_value",+ "posthog_insightvariable"."values"+ FROM "posthog_insightvariable"+ WHERE "posthog_insightvariable"."team_id" = 99999'''# ----# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.23+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.167'''- SELECT "ee_accesscontrol"."id",- "ee_accesscontrol"."team_id",- "ee_accesscontrol"."access_level",- "ee_accesscontrol"."resource",- "ee_accesscontrol"."resource_id",- "ee_accesscontrol"."organization_member_id",- "ee_accesscontrol"."role_id",- "ee_accesscontrol"."created_by_id",- "ee_accesscontrol"."created_at",- "ee_accesscontrol"."updated_at",- "posthog_team"."organization_id" AS "_team_organization_id"- FROM "ee_accesscontrol"- INNER JOIN "posthog_team" ON ("ee_accesscontrol"."team_id" = "posthog_team"."id")- LEFT OUTER JOIN "posthog_organizationmembership" ON ("ee_accesscontrol"."organization_member_id" = "posthog_organizationmembership"."id")- WHERE (("ee_accesscontrol"."organization_member_id" IS NULL- AND "ee_accesscontrol"."role_id" IS NULL- AND "ee_accesscontrol"."team_id" = 99999)- OR ("posthog_organizationmembership"."user_id" = 99999- AND "ee_accesscontrol"."role_id" IS NULL- AND "ee_accesscontrol"."team_id" = 99999))+ SELECT "posthog_dashboardtile"."dashboard_id" AS "dashboard_id"+ FROM "posthog_dashboardtile"+ INNER JOIN "posthog_dashboard" ON ("posthog_dashboardtile"."dashboard_id" = "posthog_dashboard"."id")+ WHERE (NOT ("posthog_dashboardtile"."deleted"+ AND "posthog_dashboardtile"."deleted" IS NOT NULL)+ AND NOT ("posthog_dashboard"."deleted")+ AND "posthog_dashboardtile"."insight_id" = 99999)'''# ----# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.24+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.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",+ SELECT "posthog_dashboard"."id",+ "posthog_dashboard"."name",+ "posthog_dashboard"."description",+ "posthog_dashboard"."team_id",+ "posthog_dashboard"."pinned",+ "posthog_dashboard"."created_at",+ "posthog_dashboard"."created_by_id",+ "posthog_dashboard"."deleted",+ "posthog_dashboard"."last_accessed_at",+ "posthog_dashboard"."last_refresh",+ "posthog_dashboard"."filters",+ "posthog_dashboard"."variables",+ "posthog_dashboard"."breakdown_colors",+ "posthog_dashboard"."data_color_theme_id",+ "posthog_dashboard"."creation_mode",+ "posthog_dashboard"."restriction_level",+ "posthog_dashboard"."quick_filter_ids",+ "posthog_dashboard"."deprecated_tags",+ "posthog_dashboard"."tags",+ "posthog_dashboard"."share_token",+ "posthog_dashboard"."is_shared"+ FROM "posthog_dashboard"+ WHERE (NOT ("posthog_dashboard"."deleted")+ AND "posthog_dashboard"."id" IN (1,+ 2,+ 3,+ 4,+ 5 /* ... */))+ '''+# ---+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.169+ '''+ SELECT "posthog_tag"."name" AS "tag__name"+ FROM "posthog_taggeditem"+ INNER JOIN "posthog_tag" ON ("posthog_taggeditem"."tag_id" = "posthog_tag"."id")+ WHERE "posthog_taggeditem"."insight_id" = 99999+ '''+# ---+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.17+ '''+ SELECT "posthog_tag"."name" AS "tag__name"+ FROM "posthog_taggeditem"+ INNER JOIN "posthog_tag" ON ("posthog_taggeditem"."tag_id" = "posthog_tag"."id")+ WHERE "posthog_taggeditem"."dashboard_id" = 99999+ '''+# ---+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.170+ '''+ SELECT "posthog_user"."id",+ "posthog_user"."password",+ "posthog_user"."last_login",+ "posthog_user"."first_name",+ "posthog_user"."last_name",+ "posthog_user"."is_staff",+ "posthog_user"."date_joined",+ "posthog_user"."uuid",+ "posthog_user"."current_organization_id",+ "posthog_user"."current_team_id",+ "posthog_user"."email",+ "posthog_user"."pending_email",+ "posthog_user"."distinct_id",+ "posthog_user"."is_email_verified",+ "posthog_user"."credentials_reviewed_at",+ "posthog_user"."requested_2fa_reset_at",+ "posthog_user"."has_seen_product_intro_for",+ "posthog_user"."strapi_id",+ "posthog_user"."is_active",+ "posthog_user"."role_at_organization",+ "posthog_user"."theme_mode",+ "posthog_user"."partial_notification_settings",+ "posthog_user"."anonymize_data",+ "posthog_user"."allow_impersonation",+ "posthog_user"."toolbar_mode",+ "posthog_user"."hedgehog_config",+ "posthog_user"."allow_sidebar_suggestions",+ "posthog_user"."shortcut_position",+ "posthog_user"."passkeys_enabled_for_2fa",+ "posthog_user"."hide_mcp_hints",+ "posthog_user"."onboarding_skipped_at",+ "posthog_user"."onboarding_skipped_reason",+ "posthog_user"."onboarding_skipped_organization_id",+ "posthog_user"."onboarding_delegated_to_invite_id",+ "posthog_user"."onboarding_delegated_to_organization_id",+ "posthog_user"."onboarding_delegation_accepted_at",+ "posthog_user"."events_column_config",+ "posthog_user"."email_opt_in"+ FROM "posthog_user"+ WHERE ("posthog_user"."is_active"+ AND "posthog_user"."id" = 99999)+ '''+# ---+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.171+ '''+ SELECT "posthog_organization"."id","posthog_organization"."name","posthog_organization"."slug","posthog_organization"."logo_media_id",@@ -10991,70 +9264,33 @@"posthog_organization"."is_ai_training_opted_in","posthog_organization"."is_ai_training_locked","posthog_organization"."is_ai_training_cta_shown",- "posthog_organization"."enforce_2fa",- "posthog_organization"."members_can_invite",- "posthog_organization"."members_can_create_projects",- "posthog_organization"."members_can_use_personal_api_keys",- "posthog_organization"."allow_publicly_shared_resources",- "posthog_organization"."default_role_id",- "posthog_organization"."plugins_access_level",- "posthog_organization"."for_internal_metrics",- "posthog_organization"."default_experiment_stats_method",- "posthog_organization"."default_anonymize_ips",- "posthog_organization"."is_hipaa",- "posthog_organization"."is_pending_deletion",- "posthog_organization"."customer_id",- "posthog_organization"."available_product_features",- "posthog_organization"."usage",- "posthog_organization"."never_drop_data",- "posthog_organization"."customer_trust_scores",- "posthog_organization"."setup_section_2_completed",- "posthog_organization"."personalization",- "posthog_organization"."domain_whitelist",- "posthog_organization"."is_platform"- FROM "posthog_organizationmembership"- INNER JOIN "posthog_organization" ON ("posthog_organizationmembership"."organization_id" = "posthog_organization"."id")- WHERE "posthog_organizationmembership"."user_id" = 99999- '''-# ----# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.25- '''- SELECT "ee_accesscontrol"."team_id" AS "team_id",- "ee_accesscontrol"."resource_id" AS "resource_id",- "ee_accesscontrol"."organization_member_id" AS "organization_member_id",- "ee_accesscontrol"."role_id" AS "role_id",- "ee_accesscontrol"."access_level" AS "access_level"- FROM "ee_accesscontrol"- INNER JOIN "posthog_team" ON ("ee_accesscontrol"."team_id" = "posthog_team"."id")- WHERE ("ee_accesscontrol"."resource" = 'project'- AND "posthog_team"."organization_id" IN ('00000000-0000-0000-0000-000000000000'::uuid))- '''-# ----# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.26- '''- SELECT "ee_rolemembership"."organization_member_id" AS "organization_member_id",- "ee_rolemembership"."role_id" AS "role_id"- FROM "ee_rolemembership"- WHERE "ee_rolemembership"."user_id" = 99999- '''-# ----# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.27- '''- 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")+ "posthog_organization"."enforce_2fa",+ "posthog_organization"."members_can_invite",+ "posthog_organization"."members_can_create_projects",+ "posthog_organization"."members_can_use_personal_api_keys",+ "posthog_organization"."allow_publicly_shared_resources",+ "posthog_organization"."default_role_id",+ "posthog_organization"."plugins_access_level",+ "posthog_organization"."for_internal_metrics",+ "posthog_organization"."default_experiment_stats_method",+ "posthog_organization"."default_anonymize_ips",+ "posthog_organization"."is_hipaa",+ "posthog_organization"."is_pending_deletion",+ "posthog_organization"."customer_id",+ "posthog_organization"."available_product_features",+ "posthog_organization"."usage",+ "posthog_organization"."never_drop_data",+ "posthog_organization"."customer_trust_scores",+ "posthog_organization"."setup_section_2_completed",+ "posthog_organization"."personalization",+ "posthog_organization"."domain_whitelist",+ "posthog_organization"."is_platform"+ FROM "posthog_organization"+ WHERE "posthog_organization"."id" = '00000000-0000-0000-0000-000000000000'::uuid+ LIMIT 21'''# ----# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.28+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.172'''SELECT "posthog_team"."id","posthog_team"."uuid",@@ -11150,38 +9386,49 @@"posthog_team"."experiment_recalculation_time","posthog_team"."default_experiment_confidence_level","posthog_team"."default_experiment_stats_method",- "posthog_team"."business_model"+ "posthog_team"."business_model",+ "posthog_organization"."id",+ "posthog_organization"."name",+ "posthog_organization"."slug",+ "posthog_organization"."logo_media_id",+ "posthog_organization"."created_at",+ "posthog_organization"."updated_at",+ "posthog_organization"."is_active",+ "posthog_organization"."is_not_active_reason",+ "posthog_organization"."session_cookie_age",+ "posthog_organization"."is_member_join_email_enabled",+ "posthog_organization"."is_ai_data_processing_approved",+ "posthog_organization"."is_ai_training_opted_in",+ "posthog_organization"."is_ai_training_locked",+ "posthog_organization"."is_ai_training_cta_shown",+ "posthog_organization"."enforce_2fa",+ "posthog_organization"."members_can_invite",+ "posthog_organization"."members_can_create_projects",+ "posthog_organization"."members_can_use_personal_api_keys",+ "posthog_organization"."allow_publicly_shared_resources",+ "posthog_organization"."default_role_id",+ "posthog_organization"."plugins_access_level",+ "posthog_organization"."for_internal_metrics",+ "posthog_organization"."default_experiment_stats_method",+ "posthog_organization"."default_anonymize_ips",+ "posthog_organization"."is_hipaa",+ "posthog_organization"."is_pending_deletion",+ "posthog_organization"."customer_id",+ "posthog_organization"."available_product_features",+ "posthog_organization"."usage",+ "posthog_organization"."never_drop_data",+ "posthog_organization"."customer_trust_scores",+ "posthog_organization"."setup_section_2_completed",+ "posthog_organization"."personalization",+ "posthog_organization"."domain_whitelist",+ "posthog_organization"."is_platform"FROM "posthog_team"+ INNER JOIN "posthog_organization" ON ("posthog_team"."organization_id" = "posthog_organization"."id")WHERE "posthog_team"."id" = 99999LIMIT 21'''# ----# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.29- '''- SELECT "posthog_filesystem"."team_id",- "posthog_filesystem"."id",- "posthog_filesystem"."path",- "posthog_filesystem"."depth",- "posthog_filesystem"."type",- "posthog_filesystem"."ref",- "posthog_filesystem"."href",- "posthog_filesystem"."shortcut",- "posthog_filesystem"."meta",- "posthog_filesystem"."created_at",- "posthog_filesystem"."created_by_id",- "posthog_filesystem"."surface",- "posthog_filesystem"."project_id"- FROM "posthog_filesystem"- WHERE (("posthog_filesystem"."surface" IS NULL- OR "posthog_filesystem"."surface" = 'web')- AND "posthog_filesystem"."ref" = '0001'- AND "posthog_filesystem"."team_id" = 99999- AND "posthog_filesystem"."type" = 'dashboard'- AND NOT ("posthog_filesystem"."shortcut"- AND "posthog_filesystem"."shortcut" IS NOT NULL))- '''-# ----# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.3+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.173'''SELECT "posthog_organizationmembership"."id","posthog_organizationmembership"."organization_id",@@ -11232,56 +9479,190 @@LIMIT 21'''# ----# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.30+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.174'''- SELECT "posthog_dashboardtile"."id" AS "pk"- 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)+ SELECT "ee_accesscontrol"."id",+ "ee_accesscontrol"."team_id",+ "ee_accesscontrol"."access_level",+ "ee_accesscontrol"."resource",+ "ee_accesscontrol"."resource_id",+ "ee_accesscontrol"."organization_member_id",+ "ee_accesscontrol"."role_id",+ "ee_accesscontrol"."created_by_id",+ "ee_accesscontrol"."created_at",+ "ee_accesscontrol"."updated_at",+ "posthog_team"."organization_id" AS "_team_organization_id"+ FROM "ee_accesscontrol"+ INNER JOIN "posthog_team" ON ("ee_accesscontrol"."team_id" = "posthog_team"."id")+ LEFT OUTER JOIN "posthog_organizationmembership" ON ("ee_accesscontrol"."organization_member_id" = "posthog_organizationmembership"."id")+ WHERE (("ee_accesscontrol"."organization_member_id" IS NULL+ AND "ee_accesscontrol"."role_id" IS NULL+ AND "ee_accesscontrol"."team_id" = 99999)+ OR ("posthog_organizationmembership"."user_id" = 99999+ AND "ee_accesscontrol"."role_id" IS NULL+ AND "ee_accesscontrol"."team_id" = 99999))'''# ----# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.31+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.175'''- 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)+ SELECT "posthog_organizationmembership"."id",+ "posthog_organizationmembership"."organization_id",+ "posthog_organizationmembership"."user_id",+ "posthog_organizationmembership"."level",+ "posthog_organizationmembership"."joined_at",+ "posthog_organizationmembership"."updated_at",+ "posthog_organizationmembership"."invited_by_id",+ "posthog_organization"."id",+ "posthog_organization"."name",+ "posthog_organization"."slug",+ "posthog_organization"."logo_media_id",+ "posthog_organization"."created_at",+ "posthog_organization"."updated_at",+ "posthog_organization"."is_active",+ "posthog_organization"."is_not_active_reason",+ "posthog_organization"."session_cookie_age",+ "posthog_organization"."is_member_join_email_enabled",+ "posthog_organization"."is_ai_data_processing_approved",+ "posthog_organization"."is_ai_training_opted_in",+ "posthog_organization"."is_ai_training_locked",+ "posthog_organization"."is_ai_training_cta_shown",+ "posthog_organization"."enforce_2fa",+ "posthog_organization"."members_can_invite",+ "posthog_organization"."members_can_create_projects",+ "posthog_organization"."members_can_use_personal_api_keys",+ "posthog_organization"."allow_publicly_shared_resources",+ "posthog_organization"."default_role_id",+ "posthog_organization"."plugins_access_level",+ "posthog_organization"."for_internal_metrics",+ "posthog_organization"."default_experiment_stats_method",+ "posthog_organization"."default_anonymize_ips",+ "posthog_organization"."is_hipaa",+ "posthog_organization"."is_pending_deletion",+ "posthog_organization"."customer_id",+ "posthog_organization"."available_product_features",+ "posthog_organization"."usage",+ "posthog_organization"."never_drop_data",+ "posthog_organization"."customer_trust_scores",+ "posthog_organization"."setup_section_2_completed",+ "posthog_organization"."personalization",+ "posthog_organization"."domain_whitelist",+ "posthog_organization"."is_platform"+ FROM "posthog_organizationmembership"+ INNER JOIN "posthog_organization" ON ("posthog_organizationmembership"."organization_id" = "posthog_organization"."id")+ WHERE "posthog_organizationmembership"."user_id" = 99999+ '''+# ---+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.176+ '''+ SELECT "ee_accesscontrol"."team_id" AS "team_id",+ "ee_accesscontrol"."resource_id" AS "resource_id",+ "ee_accesscontrol"."organization_member_id" AS "organization_member_id",+ "ee_accesscontrol"."role_id" AS "role_id",+ "ee_accesscontrol"."access_level" AS "access_level"+ FROM "ee_accesscontrol"+ INNER JOIN "posthog_team" ON ("ee_accesscontrol"."team_id" = "posthog_team"."id")+ WHERE ("ee_accesscontrol"."resource" = 'project'+ AND "posthog_team"."organization_id" IN ('00000000-0000-0000-0000-000000000000'::uuid))+ '''+# ---+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.177+ '''+ SELECT "ee_rolemembership"."organization_member_id" AS "organization_member_id",+ "ee_rolemembership"."role_id" AS "role_id"+ FROM "ee_rolemembership"+ WHERE "ee_rolemembership"."user_id" = 99999+ '''+# ---+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.178+ '''+ SELECT "posthog_dashboard"."id",+ "posthog_dashboard"."name",+ "posthog_dashboard"."description",+ "posthog_dashboard"."team_id",+ "posthog_dashboard"."pinned",+ "posthog_dashboard"."created_at",+ "posthog_dashboard"."created_by_id",+ "posthog_dashboard"."deleted",+ "posthog_dashboard"."last_accessed_at",+ "posthog_dashboard"."last_refresh",+ "posthog_dashboard"."filters",+ "posthog_dashboard"."variables",+ "posthog_dashboard"."breakdown_colors",+ "posthog_dashboard"."data_color_theme_id",+ "posthog_dashboard"."creation_mode",+ "posthog_dashboard"."restriction_level",+ "posthog_dashboard"."quick_filter_ids",+ "posthog_dashboard"."deprecated_tags",+ "posthog_dashboard"."tags",+ "posthog_dashboard"."share_token",+ "posthog_dashboard"."is_shared",+ recent_dashboard_views."viewed_at" AS "last_viewed_at",+ ("posthog_dashboard"."id")::varchar AS "_ref_id",++ (SELECT U0."path" AS "path"+ FROM "posthog_filesystem" U0+ WHERE ((U0."surface" IS NULL+ OR U0."surface" = 'web')+ AND U0."ref" = ("posthog_dashboard"."id")::varchar+ AND U0."team_id" = ("posthog_dashboard"."team_id")+ AND U0."type" = 'dashboard'+ AND NOT (U0."shortcut"+ AND U0."shortcut" IS NOT NULL))+ ORDER BY U0."id" ASC+ LIMIT 1) AS "_folder_path",+ T6."id",+ T6."password",+ T6."last_login",+ T6."first_name",+ T6."last_name",+ T6."is_staff",+ T6."date_joined",+ T6."uuid",+ T6."current_organization_id",+ T6."current_team_id",+ T6."email",+ T6."pending_email",+ T6."distinct_id",+ T6."is_email_verified",+ T6."credentials_reviewed_at",+ T6."requested_password_reset_at",+ T6."requested_2fa_reset_at",+ T6."has_seen_product_intro_for",+ T6."strapi_id",+ T6."is_active",+ T6."role_at_organization",+ T6."theme_mode",+ T6."partial_notification_settings",+ T6."anonymize_data",+ T6."allow_impersonation",+ T6."toolbar_mode",+ T6."hedgehog_config",+ T6."allow_sidebar_suggestions",+ T6."shortcut_position",+ T6."passkeys_enabled_for_2fa",+ T6."hide_mcp_hints",+ T6."onboarding_skipped_at",+ T6."onboarding_skipped_reason",+ T6."onboarding_skipped_organization_id",+ T6."onboarding_delegated_to_invite_id",+ T6."onboarding_delegated_to_organization_id",+ T6."onboarding_delegation_accepted_at",+ T6."events_column_config",+ T6."email_opt_in"+ FROM "posthog_dashboard"+ INNER JOIN "posthog_team" ON ("posthog_dashboard"."team_id" = "posthog_team"."id")+ LEFT OUTER JOIN "posthog_filesystemviewlog" recent_dashboard_views ON ("posthog_team"."id" = recent_dashboard_views."team_id"+ AND ((recent_dashboard_views."user_id" = 99999+ AND recent_dashboard_views."type" = 'dashboard'+ AND recent_dashboard_views."ref" = ("posthog_dashboard"."id")::varchar)))+ LEFT OUTER JOIN "posthog_user" T6 ON ("posthog_dashboard"."created_by_id" = T6."id")+ WHERE ("posthog_team"."project_id" = 99999AND NOT ("posthog_dashboard"."deleted")- AND "posthog_dashboardtile"."dashboard_id" = 99999- AND NOT ("posthog_dashboardtile"."insight_id" IS NULL))- '''-# ----# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.32- '''- SELECT "posthog_sharingconfiguration"."id",- "posthog_sharingconfiguration"."team_id",- "posthog_sharingconfiguration"."dashboard_id",- "posthog_sharingconfiguration"."insight_id",- "posthog_sharingconfiguration"."recording_id",- "posthog_sharingconfiguration"."notebook_id",- "posthog_sharingconfiguration"."interviewee_context_id",- "posthog_sharingconfiguration"."created_at",- "posthog_sharingconfiguration"."enabled",- "posthog_sharingconfiguration"."access_token",- "posthog_sharingconfiguration"."expires_at",- "posthog_sharingconfiguration"."settings",- "posthog_sharingconfiguration"."password_required"- FROM "posthog_sharingconfiguration"- WHERE "posthog_sharingconfiguration"."dashboard_id" = 99999- '''-# ----# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.33- '''- SELECT COUNT(*) AS "__count"- FROM "posthog_taggeditem"- WHERE "posthog_taggeditem"."dashboard_id" = 99999+ AND "posthog_dashboard"."id" = 99999)+ LIMIT 21'''# ----# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.34+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.179'''SELECT "posthog_sharingconfiguration"."id","posthog_sharingconfiguration"."team_id",@@ -11297,26 +9678,59 @@"posthog_sharingconfiguration"."settings","posthog_sharingconfiguration"."password_required"FROM "posthog_sharingconfiguration"- WHERE "posthog_sharingconfiguration"."dashboard_id" = 99999+ WHERE "posthog_sharingconfiguration"."dashboard_id" IN (1,+ 2,+ 3,+ 4,+ 5 /* ... */)'''# ----# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.35+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.18'''- SELECT "posthog_insightvariable"."created_by_id",- "posthog_insightvariable"."created_at",- "posthog_insightvariable"."updated_at",- "posthog_insightvariable"."id",- "posthog_insightvariable"."team_id",- "posthog_insightvariable"."name",- "posthog_insightvariable"."code_name",- "posthog_insightvariable"."type",- "posthog_insightvariable"."default_value",- "posthog_insightvariable"."values"- FROM "posthog_insightvariable"- WHERE "posthog_insightvariable"."team_id" = 99999+ SELECT "posthog_user"."id",+ "posthog_user"."password",+ "posthog_user"."last_login",+ "posthog_user"."first_name",+ "posthog_user"."last_name",+ "posthog_user"."is_staff",+ "posthog_user"."date_joined",+ "posthog_user"."uuid",+ "posthog_user"."current_organization_id",+ "posthog_user"."current_team_id",+ "posthog_user"."email",+ "posthog_user"."pending_email",+ "posthog_user"."distinct_id",+ "posthog_user"."is_email_verified",+ "posthog_user"."credentials_reviewed_at",+ "posthog_user"."requested_2fa_reset_at",+ "posthog_user"."has_seen_product_intro_for",+ "posthog_user"."strapi_id",+ "posthog_user"."is_active",+ "posthog_user"."role_at_organization",+ "posthog_user"."theme_mode",+ "posthog_user"."partial_notification_settings",+ "posthog_user"."anonymize_data",+ "posthog_user"."allow_impersonation",+ "posthog_user"."toolbar_mode",+ "posthog_user"."hedgehog_config",+ "posthog_user"."allow_sidebar_suggestions",+ "posthog_user"."shortcut_position",+ "posthog_user"."passkeys_enabled_for_2fa",+ "posthog_user"."hide_mcp_hints",+ "posthog_user"."onboarding_skipped_at",+ "posthog_user"."onboarding_skipped_reason",+ "posthog_user"."onboarding_skipped_organization_id",+ "posthog_user"."onboarding_delegated_to_invite_id",+ "posthog_user"."onboarding_delegated_to_organization_id",+ "posthog_user"."onboarding_delegation_accepted_at",+ "posthog_user"."events_column_config",+ "posthog_user"."email_opt_in"+ FROM "posthog_user"+ WHERE ("posthog_user"."is_active"+ AND "posthog_user"."id" = 99999)'''# ----# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.36+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.180'''SELECT "posthog_dashboardtile"."id","posthog_dashboardtile"."dashboard_id",@@ -11661,69 +10075,334 @@WHERE (NOT ("posthog_dashboardtile"."deleted"AND "posthog_dashboardtile"."deleted" IS NOT NULL)AND NOT ("posthog_dashboard"."deleted")- AND "posthog_dashboardtile"."dashboard_id" = 99999AND NOT ("posthog_dashboard"."deleted"AND "posthog_dashboardtile"."deleted"AND "posthog_dashboardtile"."deleted" IS NOT NULL)AND (NOT "posthog_dashboarditem"."deleted"- OR "posthog_dashboardtile"."insight_id" IS NULL))+ OR "posthog_dashboardtile"."insight_id" IS NULL)+ AND "posthog_dashboardtile"."dashboard_id" = 99999+ AND "posthog_dashboardtile"."dashboard_id" IN (1,+ 2,+ 3,+ 4,+ 5 /* ... */))ORDER BY "posthog_dashboarditem"."order" ASC'''# ----# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.37+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.181+ '''+ SELECT "posthog_insightcachingstate"."id",+ "posthog_insightcachingstate"."team_id",+ "posthog_insightcachingstate"."insight_id",+ "posthog_insightcachingstate"."dashboard_tile_id",+ "posthog_insightcachingstate"."cache_key",+ "posthog_insightcachingstate"."target_cache_age_seconds",+ "posthog_insightcachingstate"."last_refresh",+ "posthog_insightcachingstate"."last_refresh_queued_at",+ "posthog_insightcachingstate"."refresh_attempt",+ "posthog_insightcachingstate"."created_at",+ "posthog_insightcachingstate"."updated_at"+ FROM "posthog_insightcachingstate"+ WHERE "posthog_insightcachingstate"."dashboard_tile_id" IN (1,+ 2,+ 3,+ 4,+ 5 /* ... */)+ '''+# ---+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.182+ '''+ SELECT ("posthog_dashboardtile"."insight_id") AS "_prefetch_related_val_insight_id",+ "posthog_dashboard"."id",+ "posthog_dashboard"."name",+ "posthog_dashboard"."description",+ "posthog_dashboard"."team_id",+ "posthog_dashboard"."pinned",+ "posthog_dashboard"."created_at",+ "posthog_dashboard"."created_by_id",+ "posthog_dashboard"."deleted",+ "posthog_dashboard"."last_accessed_at",+ "posthog_dashboard"."last_refresh",+ "posthog_dashboard"."filters",+ "posthog_dashboard"."variables",+ "posthog_dashboard"."breakdown_colors",+ "posthog_dashboard"."data_color_theme_id",+ "posthog_dashboard"."creation_mode",+ "posthog_dashboard"."restriction_level",+ "posthog_dashboard"."quick_filter_ids",+ "posthog_dashboard"."deprecated_tags",+ "posthog_dashboard"."tags",+ "posthog_dashboard"."share_token",+ "posthog_dashboard"."is_shared"+ FROM "posthog_dashboard"+ INNER JOIN "posthog_dashboardtile" ON ("posthog_dashboard"."id" = "posthog_dashboardtile"."dashboard_id")+ WHERE (NOT ("posthog_dashboard"."deleted")+ AND "posthog_dashboard"."id" IN+ (SELECT U0."dashboard_id" AS "dashboard_id"+ FROM "posthog_dashboardtile" U0+ INNER JOIN "posthog_dashboard" U1 ON (U0."dashboard_id" = U1."id")+ WHERE (NOT (U0."deleted"+ AND U0."deleted" IS NOT NULL)+ AND NOT (U1."deleted")))+ AND "posthog_dashboardtile"."insight_id" IN (1,+ 2,+ 3,+ 4,+ 5 /* ... */))+ '''+# ---+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.183+ '''+ SELECT "posthog_dashboardtile"."id",+ "posthog_dashboardtile"."dashboard_id",+ "posthog_dashboardtile"."insight_id",+ "posthog_dashboardtile"."text_id",+ "posthog_dashboardtile"."button_tile_id",+ "posthog_dashboardtile"."widget_id",+ "posthog_dashboardtile"."team_id",+ "posthog_dashboardtile"."layouts",+ "posthog_dashboardtile"."color",+ "posthog_dashboardtile"."filters_hash",+ "posthog_dashboardtile"."last_refresh",+ "posthog_dashboardtile"."refreshing",+ "posthog_dashboardtile"."refresh_attempt",+ "posthog_dashboardtile"."filters_overrides",+ "posthog_dashboardtile"."show_description",+ "posthog_dashboardtile"."transparent_background",+ "posthog_dashboardtile"."deleted"+ FROM "posthog_dashboardtile"+ INNER JOIN "posthog_dashboard" ON ("posthog_dashboardtile"."dashboard_id" = "posthog_dashboard"."id")+ WHERE (NOT ("posthog_dashboardtile"."deleted"+ AND "posthog_dashboardtile"."deleted" IS NOT NULL)+ AND NOT ("posthog_dashboard"."deleted")+ AND "posthog_dashboardtile"."insight_id" IN (1,+ 2,+ 3,+ 4,+ 5 /* ... */))+ '''+# ---+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.184+ '''+ SELECT "posthog_dashboard"."id",+ "posthog_dashboard"."name",+ "posthog_dashboard"."description",+ "posthog_dashboard"."team_id",+ "posthog_dashboard"."pinned",+ "posthog_dashboard"."created_at",+ "posthog_dashboard"."created_by_id",+ "posthog_dashboard"."deleted",+ "posthog_dashboard"."last_accessed_at",+ "posthog_dashboard"."last_refresh",+ "posthog_dashboard"."filters",+ "posthog_dashboard"."variables",+ "posthog_dashboard"."breakdown_colors",+ "posthog_dashboard"."data_color_theme_id",+ "posthog_dashboard"."creation_mode",+ "posthog_dashboard"."restriction_level",+ "posthog_dashboard"."quick_filter_ids",+ "posthog_dashboard"."deprecated_tags",+ "posthog_dashboard"."tags",+ "posthog_dashboard"."share_token",+ "posthog_dashboard"."is_shared"+ FROM "posthog_dashboard"+ WHERE ("posthog_dashboard"."id") IN ((1,+ 2)/* ... */)+ '''+# ---+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.185+ '''+ SELECT "posthog_taggeditem"."id",+ "posthog_taggeditem"."tag_id",+ "posthog_taggeditem"."dashboard_id",+ "posthog_taggeditem"."insight_id",+ "posthog_taggeditem"."event_definition_id",+ "posthog_taggeditem"."property_definition_id",+ "posthog_taggeditem"."action_id",+ "posthog_taggeditem"."feature_flag_id",+ "posthog_taggeditem"."experiment_saved_metric_id",+ "posthog_taggeditem"."ticket_id",+ "posthog_taggeditem"."account_id",+ "posthog_taggeditem"."endpoint_id",+ "posthog_tag"."id",+ "posthog_tag"."name",+ "posthog_tag"."team_id"+ FROM "posthog_taggeditem"+ INNER JOIN "posthog_tag" ON ("posthog_taggeditem"."tag_id" = "posthog_tag"."id")+ WHERE "posthog_taggeditem"."dashboard_id" IN (1,+ 2,+ 3,+ 4,+ 5 /* ... */)+ '''+# ---+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.186'''- SELECT "posthog_tag"."name" AS "tag__name"- FROM "posthog_taggeditem"- INNER JOIN "posthog_tag" ON ("posthog_taggeditem"."tag_id" = "posthog_tag"."id")- WHERE "posthog_taggeditem"."dashboard_id" = 99999+ SELECT "posthog_team"."id",+ "posthog_team"."uuid",+ "posthog_team"."organization_id",+ "posthog_team"."parent_team_id",+ "posthog_team"."project_id",+ "posthog_team"."api_token",+ "posthog_team"."app_urls",+ "posthog_team"."name",+ "posthog_team"."slack_incoming_webhook",+ "posthog_team"."created_at",+ "posthog_team"."updated_at",+ "posthog_team"."anonymize_ips",+ "posthog_team"."completed_snippet_onboarding",+ "posthog_team"."has_completed_onboarding_for",+ "posthog_team"."onboarding_tasks",+ "posthog_team"."ingested_event",+ "posthog_team"."ingested_production_event",+ "posthog_team"."ingested_production_event_last_checked_at",+ "posthog_team"."person_processing_opt_out",+ "posthog_team"."secret_api_token",+ "posthog_team"."secret_api_token_backup",+ "posthog_team"."session_recording_opt_in",+ "posthog_team"."session_recording_sample_rate",+ "posthog_team"."session_recording_minimum_duration_milliseconds",+ "posthog_team"."session_recording_linked_flag",+ "posthog_team"."session_recording_network_payload_capture_config",+ "posthog_team"."session_recording_masking_config",+ "posthog_team"."session_recording_url_trigger_config",+ "posthog_team"."session_recording_url_blocklist_config",+ "posthog_team"."session_recording_event_trigger_config",+ "posthog_team"."session_recording_trigger_match_type_config",+ "posthog_team"."session_recording_trigger_groups",+ "posthog_team"."session_replay_config",+ "posthog_team"."session_recording_retention_period",+ "posthog_team"."event_retention_months",+ "posthog_team"."conversations_enabled",+ "posthog_team"."conversations_settings",+ "posthog_team"."proactive_tasks_enabled",+ "posthog_team"."survey_config",+ "posthog_team"."surveys_opt_in",+ "posthog_team"."product_tours_opt_in",+ "posthog_team"."capture_console_log_opt_in",+ "posthog_team"."capture_performance_opt_in",+ "posthog_team"."capture_dead_clicks",+ "posthog_team"."autocapture_opt_out",+ "posthog_team"."autocapture_web_vitals_opt_in",+ "posthog_team"."autocapture_web_vitals_allowed_metrics",+ "posthog_team"."autocapture_exceptions_opt_in",+ "posthog_team"."autocapture_exceptions_errors_to_ignore",+ "posthog_team"."logs_settings",+ "posthog_team"."llm_gateway_enabled_at",+ "posthog_team"."llm_gateway_revoked_at",+ "posthog_team"."llm_gateway_overspend_allowance_usd",+ "posthog_team"."heatmaps_opt_in",+ "posthog_team"."receive_org_level_activity_logs",+ "posthog_team"."web_analytics_pre_aggregated_tables_enabled",+ "posthog_team"."web_analytics_pre_aggregated_tables_version",+ "posthog_team"."flags_persistence_default",+ "posthog_team"."feature_flag_confirmation_enabled",+ "posthog_team"."feature_flag_confirmation_message",+ "posthog_team"."default_evaluation_environments_enabled",+ "posthog_team"."require_evaluation_environment_tags",+ "posthog_team"."default_evaluation_contexts_enabled",+ "posthog_team"."require_evaluation_contexts",+ "posthog_team"."session_recording_version",+ "posthog_team"."signup_token",+ "posthog_team"."is_demo",+ "posthog_team"."access_control",+ "posthog_team"."week_start_day",+ "posthog_team"."inject_web_apps",+ "posthog_team"."test_account_filters",+ "posthog_team"."test_account_filters_default_checked",+ "posthog_team"."path_cleaning_filters",+ "posthog_team"."timezone",+ "posthog_team"."data_attributes",+ "posthog_team"."person_display_name_properties",+ "posthog_team"."live_events_columns",+ "posthog_team"."recording_domains",+ "posthog_team"."human_friendly_comparison_periods",+ "posthog_team"."cookieless_server_hash_mode",+ "posthog_team"."primary_dashboard_id",+ "posthog_team"."default_data_theme",+ "posthog_team"."extra_settings",+ "posthog_team"."modifiers",+ "posthog_team"."correlation_config",+ "posthog_team"."session_recording_retention_period_days",+ "posthog_team"."external_data_workspace_id",+ "posthog_team"."external_data_workspace_last_synced_at",+ "posthog_team"."api_query_rate_limit",+ "posthog_team"."drop_events_older_than",+ "posthog_team"."base_currency",+ "posthog_team"."experiment_recalculation_time",+ "posthog_team"."default_experiment_confidence_level",+ "posthog_team"."default_experiment_stats_method",+ "posthog_team"."business_model"+ FROM "posthog_team"+ WHERE "posthog_team"."id" = 99999+ LIMIT 21'''# ----# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.38+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.187'''- SELECT "posthog_user"."id",- "posthog_user"."password",- "posthog_user"."last_login",- "posthog_user"."first_name",- "posthog_user"."last_name",- "posthog_user"."is_staff",- "posthog_user"."date_joined",- "posthog_user"."uuid",- "posthog_user"."current_organization_id",- "posthog_user"."current_team_id",- "posthog_user"."email",- "posthog_user"."pending_email",- "posthog_user"."distinct_id",- "posthog_user"."is_email_verified",- "posthog_user"."credentials_reviewed_at",- "posthog_user"."requested_2fa_reset_at",- "posthog_user"."has_seen_product_intro_for",- "posthog_user"."strapi_id",- "posthog_user"."is_active",- "posthog_user"."role_at_organization",- "posthog_user"."theme_mode",- "posthog_user"."partial_notification_settings",- "posthog_user"."anonymize_data",- "posthog_user"."allow_impersonation",- "posthog_user"."toolbar_mode",- "posthog_user"."hedgehog_config",- "posthog_user"."allow_sidebar_suggestions",- "posthog_user"."shortcut_position",- "posthog_user"."passkeys_enabled_for_2fa",- "posthog_user"."hide_mcp_hints",- "posthog_user"."onboarding_skipped_at",- "posthog_user"."onboarding_skipped_reason",- "posthog_user"."onboarding_skipped_organization_id",- "posthog_user"."onboarding_delegated_to_invite_id",- "posthog_user"."onboarding_delegated_to_organization_id",- "posthog_user"."onboarding_delegation_accepted_at",- "posthog_user"."events_column_config",- "posthog_user"."email_opt_in"- FROM "posthog_user"- WHERE ("posthog_user"."is_active"- AND "posthog_user"."id" = 99999)+ SELECT "posthog_filesystem"."team_id",+ "posthog_filesystem"."id",+ "posthog_filesystem"."path",+ "posthog_filesystem"."depth",+ "posthog_filesystem"."type",+ "posthog_filesystem"."ref",+ "posthog_filesystem"."href",+ "posthog_filesystem"."shortcut",+ "posthog_filesystem"."meta",+ "posthog_filesystem"."created_at",+ "posthog_filesystem"."created_by_id",+ "posthog_filesystem"."surface",+ "posthog_filesystem"."project_id"+ FROM "posthog_filesystem"+ WHERE (("posthog_filesystem"."surface" IS NULL+ OR "posthog_filesystem"."surface" = 'web')+ AND "posthog_filesystem"."ref" = '0001'+ AND "posthog_filesystem"."team_id" = 99999+ AND "posthog_filesystem"."type" = 'dashboard'+ AND NOT ("posthog_filesystem"."shortcut"+ AND "posthog_filesystem"."shortcut" IS NOT NULL))'''# ----# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.39+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.188+ '''+ SELECT "posthog_filesystemshortcut"."id",+ "posthog_filesystemshortcut"."team_id",+ "posthog_filesystemshortcut"."user_id",+ "posthog_filesystemshortcut"."path",+ "posthog_filesystemshortcut"."type",+ "posthog_filesystemshortcut"."ref",+ "posthog_filesystemshortcut"."href",+ "posthog_filesystemshortcut"."order",+ "posthog_filesystemshortcut"."created_at",+ "posthog_filesystemshortcut"."surface"+ FROM "posthog_filesystemshortcut"+ WHERE (("posthog_filesystemshortcut"."surface" IS NULL+ OR "posthog_filesystemshortcut"."surface" = 'web')+ AND "posthog_filesystemshortcut"."ref" = '0001'+ AND "posthog_filesystemshortcut"."team_id" = 99999+ AND "posthog_filesystemshortcut"."type" = 'dashboard'+ AND NOT ("posthog_filesystemshortcut"."path" = 'dashboard-1'+ AND "posthog_filesystemshortcut"."href" = '__skipped__'+ AND "posthog_filesystemshortcut"."href" IS NOT NULL))+ '''+# ---+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.189+ '''+ SELECT "posthog_insightvariable"."created_by_id",+ "posthog_insightvariable"."created_at",+ "posthog_insightvariable"."updated_at",+ "posthog_insightvariable"."id",+ "posthog_insightvariable"."team_id",+ "posthog_insightvariable"."name",+ "posthog_insightvariable"."code_name",+ "posthog_insightvariable"."type",+ "posthog_insightvariable"."default_value",+ "posthog_insightvariable"."values"+ FROM "posthog_insightvariable"+ WHERE "posthog_insightvariable"."team_id" = 99999+ '''+# ---+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.19'''SELECT "posthog_organization"."id","posthog_organization"."name",@@ -11756,42 +10435,64 @@"posthog_organization"."usage","posthog_organization"."never_drop_data","posthog_organization"."customer_trust_scores",- "posthog_organization"."setup_section_2_completed",- "posthog_organization"."personalization",- "posthog_organization"."domain_whitelist",- "posthog_organization"."is_platform"- FROM "posthog_organization"- WHERE "posthog_organization"."id" = '00000000-0000-0000-0000-000000000000'::uuid- LIMIT 21- '''-# ----# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.4- '''- SELECT "ee_accesscontrol"."id",- "ee_accesscontrol"."team_id",- "ee_accesscontrol"."access_level",- "ee_accesscontrol"."resource",- "ee_accesscontrol"."resource_id",- "ee_accesscontrol"."organization_member_id",- "ee_accesscontrol"."role_id",- "ee_accesscontrol"."created_by_id",- "ee_accesscontrol"."created_at",- "ee_accesscontrol"."updated_at",- "posthog_team"."organization_id" AS "_team_organization_id"- FROM "ee_accesscontrol"- INNER JOIN "posthog_team" ON ("ee_accesscontrol"."team_id" = "posthog_team"."id")- LEFT OUTER JOIN "posthog_organizationmembership" ON ("ee_accesscontrol"."organization_member_id" = "posthog_organizationmembership"."id")- WHERE (("ee_accesscontrol"."organization_member_id" IS NULL- AND "ee_accesscontrol"."role_id" IS NULL- AND "ee_accesscontrol"."team_id" = 99999)- OR ("posthog_organizationmembership"."user_id" = 99999- AND "ee_accesscontrol"."role_id" IS NULL- AND "ee_accesscontrol"."team_id" = 99999))+ "posthog_organization"."setup_section_2_completed",+ "posthog_organization"."personalization",+ "posthog_organization"."domain_whitelist",+ "posthog_organization"."is_platform"+ FROM "posthog_organization"+ WHERE "posthog_organization"."id" = '00000000-0000-0000-0000-000000000000'::uuid+ LIMIT 21'''# ----# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.40+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.190'''- SELECT "posthog_team"."id",+ SELECT "posthog_dashboardtile"."id",+ "posthog_dashboardtile"."dashboard_id",+ "posthog_dashboardtile"."insight_id",+ "posthog_dashboardtile"."text_id",+ "posthog_dashboardtile"."button_tile_id",+ "posthog_dashboardtile"."widget_id",+ "posthog_dashboardtile"."team_id",+ "posthog_dashboardtile"."layouts",+ "posthog_dashboardtile"."color",+ "posthog_dashboardtile"."filters_hash",+ "posthog_dashboardtile"."last_refresh",+ "posthog_dashboardtile"."refreshing",+ "posthog_dashboardtile"."refresh_attempt",+ "posthog_dashboardtile"."filters_overrides",+ "posthog_dashboardtile"."show_description",+ "posthog_dashboardtile"."transparent_background",+ "posthog_dashboardtile"."deleted",+ "posthog_dashboarditem"."id",+ "posthog_dashboarditem"."name",+ "posthog_dashboarditem"."derived_name",+ "posthog_dashboarditem"."description",+ "posthog_dashboarditem"."team_id",+ "posthog_dashboarditem"."filters",+ "posthog_dashboarditem"."filters_hash",+ "posthog_dashboarditem"."query",+ "posthog_dashboarditem"."query_metadata",+ "posthog_dashboarditem"."order",+ "posthog_dashboarditem"."deleted",+ "posthog_dashboarditem"."saved",+ "posthog_dashboarditem"."created_at",+ "posthog_dashboarditem"."refreshing",+ "posthog_dashboarditem"."created_by_id",+ "posthog_dashboarditem"."is_sample",+ "posthog_dashboarditem"."short_id",+ "posthog_dashboarditem"."favorited",+ "posthog_dashboarditem"."refresh_attempt",+ "posthog_dashboarditem"."last_modified_at",+ "posthog_dashboarditem"."last_modified_by_id",+ "posthog_dashboarditem"."dashboard_id",+ "posthog_dashboarditem"."last_refresh",+ "posthog_dashboarditem"."layouts",+ "posthog_dashboarditem"."color",+ "posthog_dashboarditem"."dive_dashboard_id",+ "posthog_dashboarditem"."updated_at",+ "posthog_dashboarditem"."deprecated_tags",+ "posthog_dashboarditem"."tags",+ "posthog_team"."id","posthog_team"."uuid","posthog_team"."organization_id","posthog_team"."parent_team_id",@@ -11863,218 +10564,271 @@"posthog_team"."inject_web_apps","posthog_team"."test_account_filters","posthog_team"."test_account_filters_default_checked",- "posthog_team"."path_cleaning_filters",- "posthog_team"."timezone",- "posthog_team"."data_attributes",- "posthog_team"."person_display_name_properties",- "posthog_team"."live_events_columns",- "posthog_team"."recording_domains",- "posthog_team"."human_friendly_comparison_periods",- "posthog_team"."cookieless_server_hash_mode",- "posthog_team"."primary_dashboard_id",- "posthog_team"."default_data_theme",- "posthog_team"."extra_settings",- "posthog_team"."modifiers",- "posthog_team"."correlation_config",- "posthog_team"."session_recording_retention_period_days",- "posthog_team"."external_data_workspace_id",- "posthog_team"."external_data_workspace_last_synced_at",- "posthog_team"."api_query_rate_limit",- "posthog_team"."drop_events_older_than",- "posthog_team"."base_currency",- "posthog_team"."experiment_recalculation_time",- "posthog_team"."default_experiment_confidence_level",- "posthog_team"."default_experiment_stats_method",- "posthog_team"."business_model",- "posthog_organization"."id",- "posthog_organization"."name",- "posthog_organization"."slug",- "posthog_organization"."logo_media_id",- "posthog_organization"."created_at",- "posthog_organization"."updated_at",- "posthog_organization"."is_active",- "posthog_organization"."is_not_active_reason",- "posthog_organization"."session_cookie_age",- "posthog_organization"."is_member_join_email_enabled",- "posthog_organization"."is_ai_data_processing_approved",- "posthog_organization"."is_ai_training_opted_in",- "posthog_organization"."is_ai_training_locked",- "posthog_organization"."is_ai_training_cta_shown",- "posthog_organization"."enforce_2fa",- "posthog_organization"."members_can_invite",- "posthog_organization"."members_can_create_projects",- "posthog_organization"."members_can_use_personal_api_keys",- "posthog_organization"."allow_publicly_shared_resources",- "posthog_organization"."default_role_id",- "posthog_organization"."plugins_access_level",- "posthog_organization"."for_internal_metrics",- "posthog_organization"."default_experiment_stats_method",- "posthog_organization"."default_anonymize_ips",- "posthog_organization"."is_hipaa",- "posthog_organization"."is_pending_deletion",- "posthog_organization"."customer_id",- "posthog_organization"."available_product_features",- "posthog_organization"."usage",- "posthog_organization"."never_drop_data",- "posthog_organization"."customer_trust_scores",- "posthog_organization"."setup_section_2_completed",- "posthog_organization"."personalization",- "posthog_organization"."domain_whitelist",- "posthog_organization"."is_platform"- FROM "posthog_team"- INNER JOIN "posthog_organization" ON ("posthog_team"."organization_id" = "posthog_organization"."id")- WHERE "posthog_team"."id" = 99999- LIMIT 21- '''-# ----# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.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",- "posthog_organization"."id",- "posthog_organization"."name",- "posthog_organization"."slug",- "posthog_organization"."logo_media_id",- "posthog_organization"."created_at",- "posthog_organization"."updated_at",- "posthog_organization"."is_active",- "posthog_organization"."is_not_active_reason",- "posthog_organization"."session_cookie_age",- "posthog_organization"."is_member_join_email_enabled",- "posthog_organization"."is_ai_data_processing_approved",- "posthog_organization"."is_ai_training_opted_in",- "posthog_organization"."is_ai_training_locked",- "posthog_organization"."is_ai_training_cta_shown",- "posthog_organization"."enforce_2fa",- "posthog_organization"."members_can_invite",- "posthog_organization"."members_can_create_projects",- "posthog_organization"."members_can_use_personal_api_keys",- "posthog_organization"."allow_publicly_shared_resources",- "posthog_organization"."default_role_id",- "posthog_organization"."plugins_access_level",- "posthog_organization"."for_internal_metrics",- "posthog_organization"."default_experiment_stats_method",- "posthog_organization"."default_anonymize_ips",- "posthog_organization"."is_hipaa",- "posthog_organization"."is_pending_deletion",- "posthog_organization"."customer_id",- "posthog_organization"."available_product_features",- "posthog_organization"."usage",- "posthog_organization"."never_drop_data",- "posthog_organization"."customer_trust_scores",- "posthog_organization"."setup_section_2_completed",- "posthog_organization"."personalization",- "posthog_organization"."domain_whitelist",- "posthog_organization"."is_platform"- FROM "posthog_organizationmembership"- INNER JOIN "posthog_organization" ON ("posthog_organizationmembership"."organization_id" = "posthog_organization"."id")- WHERE ("posthog_organizationmembership"."organization_id" = '00000000-0000-0000-0000-000000000000'::uuid- AND "posthog_organizationmembership"."user_id" = 99999)- LIMIT 21- '''-# ----# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.42- '''- SELECT "ee_accesscontrol"."id",- "ee_accesscontrol"."team_id",- "ee_accesscontrol"."access_level",- "ee_accesscontrol"."resource",- "ee_accesscontrol"."resource_id",- "ee_accesscontrol"."organization_member_id",- "ee_accesscontrol"."role_id",- "ee_accesscontrol"."created_by_id",- "ee_accesscontrol"."created_at",- "ee_accesscontrol"."updated_at",- "posthog_team"."organization_id" AS "_team_organization_id"- FROM "ee_accesscontrol"- INNER JOIN "posthog_team" ON ("ee_accesscontrol"."team_id" = "posthog_team"."id")- LEFT OUTER JOIN "posthog_organizationmembership" ON ("ee_accesscontrol"."organization_member_id" = "posthog_organizationmembership"."id")- WHERE (("ee_accesscontrol"."organization_member_id" IS NULL- AND "ee_accesscontrol"."role_id" IS NULL- AND "ee_accesscontrol"."team_id" = 99999)- OR ("posthog_organizationmembership"."user_id" = 99999- AND "ee_accesscontrol"."role_id" IS NULL- AND "ee_accesscontrol"."team_id" = 99999))- '''-# ----# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.43- '''- SELECT "posthog_organizationmembership"."id",- "posthog_organizationmembership"."organization_id",- "posthog_organizationmembership"."user_id",- "posthog_organizationmembership"."level",- "posthog_organizationmembership"."joined_at",- "posthog_organizationmembership"."updated_at",- "posthog_organizationmembership"."invited_by_id",- "posthog_organization"."id",- "posthog_organization"."name",- "posthog_organization"."slug",- "posthog_organization"."logo_media_id",- "posthog_organization"."created_at",- "posthog_organization"."updated_at",- "posthog_organization"."is_active",- "posthog_organization"."is_not_active_reason",- "posthog_organization"."session_cookie_age",- "posthog_organization"."is_member_join_email_enabled",- "posthog_organization"."is_ai_data_processing_approved",- "posthog_organization"."is_ai_training_opted_in",- "posthog_organization"."is_ai_training_locked",- "posthog_organization"."is_ai_training_cta_shown",- "posthog_organization"."enforce_2fa",- "posthog_organization"."members_can_invite",- "posthog_organization"."members_can_create_projects",- "posthog_organization"."members_can_use_personal_api_keys",- "posthog_organization"."allow_publicly_shared_resources",- "posthog_organization"."default_role_id",- "posthog_organization"."plugins_access_level",- "posthog_organization"."for_internal_metrics",- "posthog_organization"."default_experiment_stats_method",- "posthog_organization"."default_anonymize_ips",- "posthog_organization"."is_hipaa",- "posthog_organization"."is_pending_deletion",- "posthog_organization"."customer_id",- "posthog_organization"."available_product_features",- "posthog_organization"."usage",- "posthog_organization"."never_drop_data",- "posthog_organization"."customer_trust_scores",- "posthog_organization"."setup_section_2_completed",- "posthog_organization"."personalization",- "posthog_organization"."domain_whitelist",- "posthog_organization"."is_platform"- FROM "posthog_organizationmembership"- INNER JOIN "posthog_organization" ON ("posthog_organizationmembership"."organization_id" = "posthog_organization"."id")- WHERE "posthog_organizationmembership"."user_id" = 99999- '''-# ----# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.44- '''- SELECT "ee_accesscontrol"."team_id" AS "team_id",- "ee_accesscontrol"."resource_id" AS "resource_id",- "ee_accesscontrol"."organization_member_id" AS "organization_member_id",- "ee_accesscontrol"."role_id" AS "role_id",- "ee_accesscontrol"."access_level" AS "access_level"- FROM "ee_accesscontrol"- INNER JOIN "posthog_team" ON ("ee_accesscontrol"."team_id" = "posthog_team"."id")- WHERE ("ee_accesscontrol"."resource" = 'project'- AND "posthog_team"."organization_id" IN ('00000000-0000-0000-0000-000000000000'::uuid))+ "posthog_team"."path_cleaning_filters",+ "posthog_team"."timezone",+ "posthog_team"."data_attributes",+ "posthog_team"."person_display_name_properties",+ "posthog_team"."live_events_columns",+ "posthog_team"."recording_domains",+ "posthog_team"."human_friendly_comparison_periods",+ "posthog_team"."cookieless_server_hash_mode",+ "posthog_team"."primary_dashboard_id",+ "posthog_team"."default_data_theme",+ "posthog_team"."extra_settings",+ "posthog_team"."modifiers",+ "posthog_team"."correlation_config",+ "posthog_team"."session_recording_retention_period_days",+ "posthog_team"."plugins_opt_in",+ "posthog_team"."opt_out_capture",+ "posthog_team"."event_names",+ "posthog_team"."event_names_with_usage",+ "posthog_team"."event_properties",+ "posthog_team"."event_properties_with_usage",+ "posthog_team"."event_properties_numerical",+ "posthog_team"."external_data_workspace_id",+ "posthog_team"."external_data_workspace_last_synced_at",+ "posthog_team"."api_query_rate_limit",+ "posthog_team"."revenue_tracking_config",+ "posthog_team"."drop_events_older_than",+ "posthog_team"."base_currency",+ "posthog_team"."experiment_recalculation_time",+ "posthog_team"."default_experiment_confidence_level",+ "posthog_team"."default_experiment_stats_method",+ "posthog_team"."business_model",+ "posthog_user"."id",+ "posthog_user"."password",+ "posthog_user"."last_login",+ "posthog_user"."first_name",+ "posthog_user"."last_name",+ "posthog_user"."is_staff",+ "posthog_user"."date_joined",+ "posthog_user"."uuid",+ "posthog_user"."current_organization_id",+ "posthog_user"."current_team_id",+ "posthog_user"."email",+ "posthog_user"."pending_email",+ "posthog_user"."distinct_id",+ "posthog_user"."is_email_verified",+ "posthog_user"."credentials_reviewed_at",+ "posthog_user"."requested_password_reset_at",+ "posthog_user"."requested_2fa_reset_at",+ "posthog_user"."has_seen_product_intro_for",+ "posthog_user"."strapi_id",+ "posthog_user"."is_active",+ "posthog_user"."role_at_organization",+ "posthog_user"."theme_mode",+ "posthog_user"."partial_notification_settings",+ "posthog_user"."anonymize_data",+ "posthog_user"."allow_impersonation",+ "posthog_user"."toolbar_mode",+ "posthog_user"."hedgehog_config",+ "posthog_user"."allow_sidebar_suggestions",+ "posthog_user"."shortcut_position",+ "posthog_user"."passkeys_enabled_for_2fa",+ "posthog_user"."hide_mcp_hints",+ "posthog_user"."onboarding_skipped_at",+ "posthog_user"."onboarding_skipped_reason",+ "posthog_user"."onboarding_skipped_organization_id",+ "posthog_user"."onboarding_delegated_to_invite_id",+ "posthog_user"."onboarding_delegated_to_organization_id",+ "posthog_user"."onboarding_delegation_accepted_at",+ "posthog_user"."events_column_config",+ "posthog_user"."email_opt_in",+ T6."id",+ T6."password",+ T6."last_login",+ T6."first_name",+ T6."last_name",+ T6."is_staff",+ T6."date_joined",+ T6."uuid",+ T6."current_organization_id",+ T6."current_team_id",+ T6."email",+ T6."pending_email",+ T6."distinct_id",+ T6."is_email_verified",+ T6."credentials_reviewed_at",+ T6."requested_password_reset_at",+ T6."requested_2fa_reset_at",+ T6."has_seen_product_intro_for",+ T6."strapi_id",+ T6."is_active",+ T6."role_at_organization",+ T6."theme_mode",+ T6."partial_notification_settings",+ T6."anonymize_data",+ T6."allow_impersonation",+ T6."toolbar_mode",+ T6."hedgehog_config",+ T6."allow_sidebar_suggestions",+ T6."shortcut_position",+ T6."passkeys_enabled_for_2fa",+ T6."hide_mcp_hints",+ T6."onboarding_skipped_at",+ T6."onboarding_skipped_reason",+ T6."onboarding_skipped_organization_id",+ T6."onboarding_delegated_to_invite_id",+ T6."onboarding_delegated_to_organization_id",+ T6."onboarding_delegation_accepted_at",+ T6."events_column_config",+ T6."email_opt_in",+ "posthog_text"."id",+ "posthog_text"."body",+ "posthog_text"."created_by_id",+ "posthog_text"."last_modified_at",+ "posthog_text"."last_modified_by_id",+ "posthog_text"."team_id",+ "posthog_buttontile"."id",+ "posthog_buttontile"."url",+ "posthog_buttontile"."text",+ "posthog_buttontile"."placement",+ "posthog_buttontile"."style",+ "posthog_buttontile"."created_by_id",+ "posthog_buttontile"."last_modified_at",+ "posthog_buttontile"."last_modified_by_id",+ "posthog_buttontile"."team_id",+ "posthog_dashboardwidget"."id",+ "posthog_dashboardwidget"."widget_type",+ "posthog_dashboardwidget"."name",+ "posthog_dashboardwidget"."description",+ "posthog_dashboardwidget"."config",+ "posthog_dashboardwidget"."created_by_id",+ "posthog_dashboardwidget"."last_modified_at",+ "posthog_dashboardwidget"."last_modified_by_id",+ "posthog_dashboardwidget"."team_id",+ T10."id",+ T10."password",+ T10."last_login",+ T10."first_name",+ T10."last_name",+ T10."is_staff",+ T10."date_joined",+ T10."uuid",+ T10."current_organization_id",+ T10."current_team_id",+ T10."email",+ T10."pending_email",+ T10."distinct_id",+ T10."is_email_verified",+ T10."credentials_reviewed_at",+ T10."requested_password_reset_at",+ T10."requested_2fa_reset_at",+ T10."has_seen_product_intro_for",+ T10."strapi_id",+ T10."is_active",+ T10."role_at_organization",+ T10."theme_mode",+ T10."partial_notification_settings",+ T10."anonymize_data",+ T10."allow_impersonation",+ T10."toolbar_mode",+ T10."hedgehog_config",+ T10."allow_sidebar_suggestions",+ T10."shortcut_position",+ T10."passkeys_enabled_for_2fa",+ T10."hide_mcp_hints",+ T10."onboarding_skipped_at",+ T10."onboarding_skipped_reason",+ T10."onboarding_skipped_organization_id",+ T10."onboarding_delegated_to_invite_id",+ T10."onboarding_delegated_to_organization_id",+ T10."onboarding_delegation_accepted_at",+ T10."events_column_config",+ T10."email_opt_in",+ T11."id",+ T11."password",+ T11."last_login",+ T11."first_name",+ T11."last_name",+ T11."is_staff",+ T11."date_joined",+ T11."uuid",+ T11."current_organization_id",+ T11."current_team_id",+ T11."email",+ T11."pending_email",+ T11."distinct_id",+ T11."is_email_verified",+ T11."credentials_reviewed_at",+ T11."requested_password_reset_at",+ T11."requested_2fa_reset_at",+ T11."has_seen_product_intro_for",+ T11."strapi_id",+ T11."is_active",+ T11."role_at_organization",+ T11."theme_mode",+ T11."partial_notification_settings",+ T11."anonymize_data",+ T11."allow_impersonation",+ T11."toolbar_mode",+ T11."hedgehog_config",+ T11."allow_sidebar_suggestions",+ T11."shortcut_position",+ T11."passkeys_enabled_for_2fa",+ T11."hide_mcp_hints",+ T11."onboarding_skipped_at",+ T11."onboarding_skipped_reason",+ T11."onboarding_skipped_organization_id",+ T11."onboarding_delegated_to_invite_id",+ T11."onboarding_delegated_to_organization_id",+ T11."onboarding_delegation_accepted_at",+ T11."events_column_config",+ T11."email_opt_in"+ FROM "posthog_dashboardtile"+ INNER JOIN "posthog_dashboard" ON ("posthog_dashboardtile"."dashboard_id" = "posthog_dashboard"."id")+ LEFT OUTER JOIN "posthog_dashboarditem" ON ("posthog_dashboardtile"."insight_id" = "posthog_dashboarditem"."id")+ LEFT OUTER JOIN "posthog_team" ON ("posthog_dashboarditem"."team_id" = "posthog_team"."id")+ LEFT OUTER JOIN "posthog_user" ON ("posthog_dashboarditem"."created_by_id" = "posthog_user"."id")+ LEFT OUTER JOIN "posthog_user" T6 ON ("posthog_dashboarditem"."last_modified_by_id" = T6."id")+ LEFT OUTER JOIN "posthog_text" ON ("posthog_dashboardtile"."text_id" = "posthog_text"."id")+ LEFT OUTER JOIN "posthog_buttontile" ON ("posthog_dashboardtile"."button_tile_id" = "posthog_buttontile"."id")+ LEFT OUTER JOIN "posthog_dashboardwidget" ON ("posthog_dashboardtile"."widget_id" = "posthog_dashboardwidget"."id")+ LEFT OUTER JOIN "posthog_user" T10 ON ("posthog_dashboardwidget"."created_by_id" = T10."id")+ LEFT OUTER JOIN "posthog_user" T11 ON ("posthog_dashboardwidget"."last_modified_by_id" = T11."id")+ WHERE (NOT ("posthog_dashboardtile"."deleted"+ AND "posthog_dashboardtile"."deleted" IS NOT NULL)+ AND NOT ("posthog_dashboard"."deleted")+ AND NOT ("posthog_dashboard"."deleted"+ AND "posthog_dashboardtile"."deleted"+ AND "posthog_dashboardtile"."deleted" IS NOT NULL)+ AND (NOT "posthog_dashboarditem"."deleted"+ OR "posthog_dashboardtile"."insight_id" IS NULL)+ AND "posthog_dashboardtile"."dashboard_id" = 99999+ AND "posthog_dashboardtile"."dashboard_id" = 99999+ AND NOT ("posthog_dashboard"."deleted"+ AND "posthog_dashboardtile"."deleted"+ AND "posthog_dashboardtile"."deleted" IS NOT NULL)+ AND (NOT "posthog_dashboarditem"."deleted"+ OR "posthog_dashboardtile"."insight_id" IS NULL))+ ORDER BY "posthog_dashboarditem"."order" ASC'''# ----# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.45+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.191'''- SELECT "ee_rolemembership"."organization_member_id" AS "organization_member_id",- "ee_rolemembership"."role_id" AS "role_id"- FROM "ee_rolemembership"- WHERE "ee_rolemembership"."user_id" = 99999+ SELECT "posthog_insightcachingstate"."id",+ "posthog_insightcachingstate"."team_id",+ "posthog_insightcachingstate"."insight_id",+ "posthog_insightcachingstate"."dashboard_tile_id",+ "posthog_insightcachingstate"."cache_key",+ "posthog_insightcachingstate"."target_cache_age_seconds",+ "posthog_insightcachingstate"."last_refresh",+ "posthog_insightcachingstate"."last_refresh_queued_at",+ "posthog_insightcachingstate"."refresh_attempt",+ "posthog_insightcachingstate"."created_at",+ "posthog_insightcachingstate"."updated_at"+ FROM "posthog_insightcachingstate"+ WHERE "posthog_insightcachingstate"."dashboard_tile_id" IN (1,+ 2,+ 3,+ 4,+ 5 /* ... */)'''# ----# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.46+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.192'''- SELECT "posthog_dashboard"."id",+ SELECT ("posthog_dashboardtile"."insight_id") AS "_prefetch_related_val_insight_id",+ "posthog_dashboard"."id","posthog_dashboard"."name","posthog_dashboard"."description","posthog_dashboard"."team_id",@@ -12096,20 +10850,54 @@"posthog_dashboard"."share_token","posthog_dashboard"."is_shared"FROM "posthog_dashboard"- INNER JOIN "posthog_team" ON ("posthog_dashboard"."team_id" = "posthog_team"."id")+ INNER JOIN "posthog_dashboardtile" ON ("posthog_dashboard"."id" = "posthog_dashboardtile"."dashboard_id")WHERE (NOT ("posthog_dashboard"."deleted")- AND ("posthog_dashboard"."team_id" =- (SELECT U0."parent_team_id" AS "parent_team_id"- FROM "posthog_team" U0- WHERE U0."id" = 99999- LIMIT 1)- OR ("posthog_team"."parent_team_id" IS NULL- AND "posthog_dashboard"."team_id" = 99999))- AND "posthog_dashboard"."id" = 99999)- LIMIT 21+ AND "posthog_dashboard"."id" IN+ (SELECT U0."dashboard_id" AS "dashboard_id"+ FROM "posthog_dashboardtile" U0+ INNER JOIN "posthog_dashboard" U1 ON (U0."dashboard_id" = U1."id")+ WHERE (NOT (U0."deleted"+ AND U0."deleted" IS NOT NULL)+ AND NOT (U1."deleted")))+ AND "posthog_dashboardtile"."insight_id" IN (1,+ 2,+ 3,+ 4,+ 5 /* ... */))'''# ----# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.47+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.193+ '''+ SELECT "posthog_dashboardtile"."id",+ "posthog_dashboardtile"."dashboard_id",+ "posthog_dashboardtile"."insight_id",+ "posthog_dashboardtile"."text_id",+ "posthog_dashboardtile"."button_tile_id",+ "posthog_dashboardtile"."widget_id",+ "posthog_dashboardtile"."team_id",+ "posthog_dashboardtile"."layouts",+ "posthog_dashboardtile"."color",+ "posthog_dashboardtile"."filters_hash",+ "posthog_dashboardtile"."last_refresh",+ "posthog_dashboardtile"."refreshing",+ "posthog_dashboardtile"."refresh_attempt",+ "posthog_dashboardtile"."filters_overrides",+ "posthog_dashboardtile"."show_description",+ "posthog_dashboardtile"."transparent_background",+ "posthog_dashboardtile"."deleted"+ FROM "posthog_dashboardtile"+ INNER JOIN "posthog_dashboard" ON ("posthog_dashboardtile"."dashboard_id" = "posthog_dashboard"."id")+ WHERE (NOT ("posthog_dashboardtile"."deleted"+ AND "posthog_dashboardtile"."deleted" IS NOT NULL)+ AND NOT ("posthog_dashboard"."deleted")+ AND "posthog_dashboardtile"."insight_id" IN (1,+ 2,+ 3,+ 4,+ 5 /* ... */))+ '''+# ---+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.194'''SELECT "posthog_dashboard"."id","posthog_dashboard"."name",@@ -12133,95 +10921,109 @@"posthog_dashboard"."share_token","posthog_dashboard"."is_shared"FROM "posthog_dashboard"- INNER JOIN "posthog_team" ON ("posthog_dashboard"."team_id" = "posthog_team"."id")- WHERE (NOT ("posthog_dashboard"."deleted")- AND ("posthog_dashboard"."team_id" =- (SELECT U0."parent_team_id" AS "parent_team_id"- FROM "posthog_team" U0- WHERE U0."id" = 99999- LIMIT 1)- OR ("posthog_team"."parent_team_id" IS NULL- AND "posthog_dashboard"."team_id" = 99999))- AND "posthog_dashboard"."id" = 99999)- LIMIT 21- '''-# ----# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.48- '''- 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))+ WHERE ("posthog_dashboard"."id") IN ((1,+ 2)/* ... */)'''# ----# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.49+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.195'''- 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_taggeditem"."id",+ "posthog_taggeditem"."tag_id",+ "posthog_taggeditem"."dashboard_id",+ "posthog_taggeditem"."insight_id",+ "posthog_taggeditem"."event_definition_id",+ "posthog_taggeditem"."property_definition_id",+ "posthog_taggeditem"."action_id",+ "posthog_taggeditem"."feature_flag_id",+ "posthog_taggeditem"."experiment_saved_metric_id",+ "posthog_taggeditem"."ticket_id",+ "posthog_taggeditem"."account_id",+ "posthog_taggeditem"."endpoint_id",+ "posthog_tag"."id",+ "posthog_tag"."name",+ "posthog_tag"."team_id"+ FROM "posthog_taggeditem"+ INNER JOIN "posthog_tag" ON ("posthog_taggeditem"."tag_id" = "posthog_tag"."id")+ WHERE "posthog_taggeditem"."insight_id" IN (1,+ 2,+ 3,+ 4,+ 5 /* ... */)'''# ----# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.5+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.196'''- SELECT "posthog_organizationmembership"."id",- "posthog_organizationmembership"."organization_id",- "posthog_organizationmembership"."user_id",- "posthog_organizationmembership"."level",- "posthog_organizationmembership"."joined_at",- "posthog_organizationmembership"."updated_at",- "posthog_organizationmembership"."invited_by_id",- "posthog_organization"."id",- "posthog_organization"."name",- "posthog_organization"."slug",- "posthog_organization"."logo_media_id",- "posthog_organization"."created_at",- "posthog_organization"."updated_at",- "posthog_organization"."is_active",- "posthog_organization"."is_not_active_reason",- "posthog_organization"."session_cookie_age",- "posthog_organization"."is_member_join_email_enabled",- "posthog_organization"."is_ai_data_processing_approved",- "posthog_organization"."is_ai_training_opted_in",- "posthog_organization"."is_ai_training_locked",- "posthog_organization"."is_ai_training_cta_shown",- "posthog_organization"."enforce_2fa",- "posthog_organization"."members_can_invite",- "posthog_organization"."members_can_create_projects",- "posthog_organization"."members_can_use_personal_api_keys",- "posthog_organization"."allow_publicly_shared_resources",- "posthog_organization"."default_role_id",- "posthog_organization"."plugins_access_level",- "posthog_organization"."for_internal_metrics",- "posthog_organization"."default_experiment_stats_method",- "posthog_organization"."default_anonymize_ips",- "posthog_organization"."is_hipaa",- "posthog_organization"."is_pending_deletion",- "posthog_organization"."customer_id",- "posthog_organization"."available_product_features",- "posthog_organization"."usage",- "posthog_organization"."never_drop_data",- "posthog_organization"."customer_trust_scores",- "posthog_organization"."setup_section_2_completed",- "posthog_organization"."personalization",- "posthog_organization"."domain_whitelist",- "posthog_organization"."is_platform"- FROM "posthog_organizationmembership"- INNER JOIN "posthog_organization" ON ("posthog_organizationmembership"."organization_id" = "posthog_organization"."id")- WHERE "posthog_organizationmembership"."user_id" = 99999+ SELECT "posthog_alertconfiguration"."created_by_id",+ "posthog_alertconfiguration"."created_at",+ "posthog_alertconfiguration"."id",+ "posthog_alertconfiguration"."team_id",+ "posthog_alertconfiguration"."insight_id",+ "posthog_alertconfiguration"."name",+ "posthog_alertconfiguration"."config",+ "posthog_alertconfiguration"."calculation_interval",+ "posthog_alertconfiguration"."threshold_id",+ "posthog_alertconfiguration"."condition",+ "posthog_alertconfiguration"."detector_config",+ "posthog_alertconfiguration"."state",+ "posthog_alertconfiguration"."enabled",+ "posthog_alertconfiguration"."last_notified_at",+ "posthog_alertconfiguration"."last_checked_at",+ "posthog_alertconfiguration"."next_check_at",+ "posthog_alertconfiguration"."snoozed_until",+ "posthog_alertconfiguration"."skip_weekend",+ "posthog_alertconfiguration"."schedule_restriction",+ "posthog_alertconfiguration"."investigation_agent_enabled",+ "posthog_alertconfiguration"."investigation_gates_notifications",+ "posthog_alertconfiguration"."investigation_inconclusive_action",+ "posthog_user"."id",+ "posthog_user"."password",+ "posthog_user"."last_login",+ "posthog_user"."first_name",+ "posthog_user"."last_name",+ "posthog_user"."is_staff",+ "posthog_user"."date_joined",+ "posthog_user"."uuid",+ "posthog_user"."current_organization_id",+ "posthog_user"."current_team_id",+ "posthog_user"."email",+ "posthog_user"."pending_email",+ "posthog_user"."distinct_id",+ "posthog_user"."is_email_verified",+ "posthog_user"."credentials_reviewed_at",+ "posthog_user"."requested_password_reset_at",+ "posthog_user"."requested_2fa_reset_at",+ "posthog_user"."has_seen_product_intro_for",+ "posthog_user"."strapi_id",+ "posthog_user"."is_active",+ "posthog_user"."role_at_organization",+ "posthog_user"."theme_mode",+ "posthog_user"."partial_notification_settings",+ "posthog_user"."anonymize_data",+ "posthog_user"."allow_impersonation",+ "posthog_user"."toolbar_mode",+ "posthog_user"."hedgehog_config",+ "posthog_user"."allow_sidebar_suggestions",+ "posthog_user"."shortcut_position",+ "posthog_user"."passkeys_enabled_for_2fa",+ "posthog_user"."hide_mcp_hints",+ "posthog_user"."onboarding_skipped_at",+ "posthog_user"."onboarding_skipped_reason",+ "posthog_user"."onboarding_skipped_organization_id",+ "posthog_user"."onboarding_delegated_to_invite_id",+ "posthog_user"."onboarding_delegated_to_organization_id",+ "posthog_user"."onboarding_delegation_accepted_at",+ "posthog_user"."events_column_config",+ "posthog_user"."email_opt_in"+ FROM "posthog_alertconfiguration"+ LEFT OUTER JOIN "posthog_user" ON ("posthog_alertconfiguration"."created_by_id" = "posthog_user"."id")+ WHERE "posthog_alertconfiguration"."insight_id" IN (1,+ 2,+ 3,+ 4,+ 5 /* ... */)'''# ----# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.50+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.197'''SELECT "posthog_dashboard"."id","posthog_dashboard"."name",@@ -12253,7 +11055,7 @@5 /* ... */))'''# ----# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.51+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.2'''SELECT "posthog_team"."id","posthog_team"."uuid",@@ -12349,38 +11151,49 @@"posthog_team"."experiment_recalculation_time","posthog_team"."default_experiment_confidence_level","posthog_team"."default_experiment_stats_method",- "posthog_team"."business_model"+ "posthog_team"."business_model",+ "posthog_organization"."id",+ "posthog_organization"."name",+ "posthog_organization"."slug",+ "posthog_organization"."logo_media_id",+ "posthog_organization"."created_at",+ "posthog_organization"."updated_at",+ "posthog_organization"."is_active",+ "posthog_organization"."is_not_active_reason",+ "posthog_organization"."session_cookie_age",+ "posthog_organization"."is_member_join_email_enabled",+ "posthog_organization"."is_ai_data_processing_approved",+ "posthog_organization"."is_ai_training_opted_in",+ "posthog_organization"."is_ai_training_locked",+ "posthog_organization"."is_ai_training_cta_shown",+ "posthog_organization"."enforce_2fa",+ "posthog_organization"."members_can_invite",+ "posthog_organization"."members_can_create_projects",+ "posthog_organization"."members_can_use_personal_api_keys",+ "posthog_organization"."allow_publicly_shared_resources",+ "posthog_organization"."default_role_id",+ "posthog_organization"."plugins_access_level",+ "posthog_organization"."for_internal_metrics",+ "posthog_organization"."default_experiment_stats_method",+ "posthog_organization"."default_anonymize_ips",+ "posthog_organization"."is_hipaa",+ "posthog_organization"."is_pending_deletion",+ "posthog_organization"."customer_id",+ "posthog_organization"."available_product_features",+ "posthog_organization"."usage",+ "posthog_organization"."never_drop_data",+ "posthog_organization"."customer_trust_scores",+ "posthog_organization"."setup_section_2_completed",+ "posthog_organization"."personalization",+ "posthog_organization"."domain_whitelist",+ "posthog_organization"."is_platform"FROM "posthog_team"+ INNER JOIN "posthog_organization" ON ("posthog_team"."organization_id" = "posthog_organization"."id")WHERE "posthog_team"."id" = 99999LIMIT 21'''# ----# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.52- '''- SELECT "posthog_filesystem"."team_id",- "posthog_filesystem"."id",- "posthog_filesystem"."path",- "posthog_filesystem"."depth",- "posthog_filesystem"."type",- "posthog_filesystem"."ref",- "posthog_filesystem"."href",- "posthog_filesystem"."shortcut",- "posthog_filesystem"."meta",- "posthog_filesystem"."created_at",- "posthog_filesystem"."created_by_id",- "posthog_filesystem"."surface",- "posthog_filesystem"."project_id"- FROM "posthog_filesystem"- WHERE (("posthog_filesystem"."surface" IS NULL- OR "posthog_filesystem"."surface" = 'web')- AND "posthog_filesystem"."ref" = '0001'- AND "posthog_filesystem"."team_id" = 99999- AND "posthog_filesystem"."type" = 'insight'- AND NOT ("posthog_filesystem"."shortcut"- AND "posthog_filesystem"."shortcut" IS NOT NULL))- '''-# ----# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.53+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.20'''SELECT "posthog_team"."id","posthog_team"."uuid",@@ -12476,49 +11289,210 @@"posthog_team"."experiment_recalculation_time","posthog_team"."default_experiment_confidence_level","posthog_team"."default_experiment_stats_method",- "posthog_team"."business_model"+ "posthog_team"."business_model",+ "posthog_organization"."id",+ "posthog_organization"."name",+ "posthog_organization"."slug",+ "posthog_organization"."logo_media_id",+ "posthog_organization"."created_at",+ "posthog_organization"."updated_at",+ "posthog_organization"."is_active",+ "posthog_organization"."is_not_active_reason",+ "posthog_organization"."session_cookie_age",+ "posthog_organization"."is_member_join_email_enabled",+ "posthog_organization"."is_ai_data_processing_approved",+ "posthog_organization"."is_ai_training_opted_in",+ "posthog_organization"."is_ai_training_locked",+ "posthog_organization"."is_ai_training_cta_shown",+ "posthog_organization"."enforce_2fa",+ "posthog_organization"."members_can_invite",+ "posthog_organization"."members_can_create_projects",+ "posthog_organization"."members_can_use_personal_api_keys",+ "posthog_organization"."allow_publicly_shared_resources",+ "posthog_organization"."default_role_id",+ "posthog_organization"."plugins_access_level",+ "posthog_organization"."for_internal_metrics",+ "posthog_organization"."default_experiment_stats_method",+ "posthog_organization"."default_anonymize_ips",+ "posthog_organization"."is_hipaa",+ "posthog_organization"."is_pending_deletion",+ "posthog_organization"."customer_id",+ "posthog_organization"."available_product_features",+ "posthog_organization"."usage",+ "posthog_organization"."never_drop_data",+ "posthog_organization"."customer_trust_scores",+ "posthog_organization"."setup_section_2_completed",+ "posthog_organization"."personalization",+ "posthog_organization"."domain_whitelist",+ "posthog_organization"."is_platform"FROM "posthog_team"+ INNER JOIN "posthog_organization" ON ("posthog_team"."organization_id" = "posthog_organization"."id")WHERE "posthog_team"."id" = 99999LIMIT 21'''# ----# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.54+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.21'''- SELECT "posthog_dashboarditem"."id",- "posthog_dashboarditem"."name",- "posthog_dashboarditem"."derived_name",- "posthog_dashboarditem"."description",- "posthog_dashboarditem"."team_id",- "posthog_dashboarditem"."filters",- "posthog_dashboarditem"."filters_hash",- "posthog_dashboarditem"."query",- "posthog_dashboarditem"."query_metadata",- "posthog_dashboarditem"."order",- "posthog_dashboarditem"."deleted",- "posthog_dashboarditem"."saved",- "posthog_dashboarditem"."created_at",- "posthog_dashboarditem"."refreshing",- "posthog_dashboarditem"."created_by_id",- "posthog_dashboarditem"."is_sample",- "posthog_dashboarditem"."short_id",- "posthog_dashboarditem"."favorited",- "posthog_dashboarditem"."refresh_attempt",- "posthog_dashboarditem"."last_modified_at",- "posthog_dashboarditem"."last_modified_by_id",- "posthog_dashboarditem"."dashboard_id",- "posthog_dashboarditem"."last_refresh",- "posthog_dashboarditem"."layouts",- "posthog_dashboarditem"."color",- "posthog_dashboarditem"."dive_dashboard_id",- "posthog_dashboarditem"."updated_at",- "posthog_dashboarditem"."deprecated_tags",- "posthog_dashboarditem"."tags"- FROM "posthog_dashboarditem"- WHERE "posthog_dashboarditem"."id" = 99999+ SELECT "posthog_organizationmembership"."id",+ "posthog_organizationmembership"."organization_id",+ "posthog_organizationmembership"."user_id",+ "posthog_organizationmembership"."level",+ "posthog_organizationmembership"."joined_at",+ "posthog_organizationmembership"."updated_at",+ "posthog_organizationmembership"."invited_by_id",+ "posthog_organization"."id",+ "posthog_organization"."name",+ "posthog_organization"."slug",+ "posthog_organization"."logo_media_id",+ "posthog_organization"."created_at",+ "posthog_organization"."updated_at",+ "posthog_organization"."is_active",+ "posthog_organization"."is_not_active_reason",+ "posthog_organization"."session_cookie_age",+ "posthog_organization"."is_member_join_email_enabled",+ "posthog_organization"."is_ai_data_processing_approved",+ "posthog_organization"."is_ai_training_opted_in",+ "posthog_organization"."is_ai_training_locked",+ "posthog_organization"."is_ai_training_cta_shown",+ "posthog_organization"."enforce_2fa",+ "posthog_organization"."members_can_invite",+ "posthog_organization"."members_can_create_projects",+ "posthog_organization"."members_can_use_personal_api_keys",+ "posthog_organization"."allow_publicly_shared_resources",+ "posthog_organization"."default_role_id",+ "posthog_organization"."plugins_access_level",+ "posthog_organization"."for_internal_metrics",+ "posthog_organization"."default_experiment_stats_method",+ "posthog_organization"."default_anonymize_ips",+ "posthog_organization"."is_hipaa",+ "posthog_organization"."is_pending_deletion",+ "posthog_organization"."customer_id",+ "posthog_organization"."available_product_features",+ "posthog_organization"."usage",+ "posthog_organization"."never_drop_data",+ "posthog_organization"."customer_trust_scores",+ "posthog_organization"."setup_section_2_completed",+ "posthog_organization"."personalization",+ "posthog_organization"."domain_whitelist",+ "posthog_organization"."is_platform"+ FROM "posthog_organizationmembership"+ INNER JOIN "posthog_organization" ON ("posthog_organizationmembership"."organization_id" = "posthog_organization"."id")+ WHERE ("posthog_organizationmembership"."organization_id" = '00000000-0000-0000-0000-000000000000'::uuid+ AND "posthog_organizationmembership"."user_id" = 99999)LIMIT 21'''# ----# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.55+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.22+ '''+ SELECT "ee_accesscontrol"."id",+ "ee_accesscontrol"."team_id",+ "ee_accesscontrol"."access_level",+ "ee_accesscontrol"."resource",+ "ee_accesscontrol"."resource_id",+ "ee_accesscontrol"."organization_member_id",+ "ee_accesscontrol"."role_id",+ "ee_accesscontrol"."created_by_id",+ "ee_accesscontrol"."created_at",+ "ee_accesscontrol"."updated_at",+ "posthog_team"."organization_id" AS "_team_organization_id"+ FROM "ee_accesscontrol"+ INNER JOIN "posthog_team" ON ("ee_accesscontrol"."team_id" = "posthog_team"."id")+ LEFT OUTER JOIN "posthog_organizationmembership" ON ("ee_accesscontrol"."organization_member_id" = "posthog_organizationmembership"."id")+ WHERE (("ee_accesscontrol"."organization_member_id" IS NULL+ AND "ee_accesscontrol"."role_id" IS NULL+ AND "ee_accesscontrol"."team_id" = 99999)+ OR ("posthog_organizationmembership"."user_id" = 99999+ AND "ee_accesscontrol"."role_id" IS NULL+ AND "ee_accesscontrol"."team_id" = 99999))+ '''+# ---+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.23+ '''+ SELECT "posthog_organizationmembership"."id",+ "posthog_organizationmembership"."organization_id",+ "posthog_organizationmembership"."user_id",+ "posthog_organizationmembership"."level",+ "posthog_organizationmembership"."joined_at",+ "posthog_organizationmembership"."updated_at",+ "posthog_organizationmembership"."invited_by_id",+ "posthog_organization"."id",+ "posthog_organization"."name",+ "posthog_organization"."slug",+ "posthog_organization"."logo_media_id",+ "posthog_organization"."created_at",+ "posthog_organization"."updated_at",+ "posthog_organization"."is_active",+ "posthog_organization"."is_not_active_reason",+ "posthog_organization"."session_cookie_age",+ "posthog_organization"."is_member_join_email_enabled",+ "posthog_organization"."is_ai_data_processing_approved",+ "posthog_organization"."is_ai_training_opted_in",+ "posthog_organization"."is_ai_training_locked",+ "posthog_organization"."is_ai_training_cta_shown",+ "posthog_organization"."enforce_2fa",+ "posthog_organization"."members_can_invite",+ "posthog_organization"."members_can_create_projects",+ "posthog_organization"."members_can_use_personal_api_keys",+ "posthog_organization"."allow_publicly_shared_resources",+ "posthog_organization"."default_role_id",+ "posthog_organization"."plugins_access_level",+ "posthog_organization"."for_internal_metrics",+ "posthog_organization"."default_experiment_stats_method",+ "posthog_organization"."default_anonymize_ips",+ "posthog_organization"."is_hipaa",+ "posthog_organization"."is_pending_deletion",+ "posthog_organization"."customer_id",+ "posthog_organization"."available_product_features",+ "posthog_organization"."usage",+ "posthog_organization"."never_drop_data",+ "posthog_organization"."customer_trust_scores",+ "posthog_organization"."setup_section_2_completed",+ "posthog_organization"."personalization",+ "posthog_organization"."domain_whitelist",+ "posthog_organization"."is_platform"+ FROM "posthog_organizationmembership"+ INNER JOIN "posthog_organization" ON ("posthog_organizationmembership"."organization_id" = "posthog_organization"."id")+ WHERE "posthog_organizationmembership"."user_id" = 99999+ '''+# ---+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.24+ '''+ SELECT "ee_accesscontrol"."team_id" AS "team_id",+ "ee_accesscontrol"."resource_id" AS "resource_id",+ "ee_accesscontrol"."organization_member_id" AS "organization_member_id",+ "ee_accesscontrol"."role_id" AS "role_id",+ "ee_accesscontrol"."access_level" AS "access_level"+ FROM "ee_accesscontrol"+ INNER JOIN "posthog_team" ON ("ee_accesscontrol"."team_id" = "posthog_team"."id")+ WHERE ("ee_accesscontrol"."resource" = 'project'+ AND "posthog_team"."organization_id" IN ('00000000-0000-0000-0000-000000000000'::uuid))+ '''+# ---+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.25+ '''+ SELECT "ee_rolemembership"."organization_member_id" AS "organization_member_id",+ "ee_rolemembership"."role_id" AS "role_id"+ FROM "ee_rolemembership"+ WHERE "ee_rolemembership"."user_id" = 99999+ '''+# ---+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.26+ '''+ SELECT COUNT(*) AS "__count"+ FROM "posthog_dashboard"+ INNER JOIN "posthog_team" ON ("posthog_dashboard"."team_id" = "posthog_team"."id")+ WHERE (NOT ("posthog_dashboard"."deleted")+ AND ("posthog_dashboard"."team_id" =+ (SELECT U0."parent_team_id" AS "parent_team_id"+ FROM "posthog_team" U0+ WHERE U0."id" = 99999+ LIMIT 1)+ OR ("posthog_team"."parent_team_id" IS NULL+ AND "posthog_dashboard"."team_id" = 99999))+ AND NOT "posthog_dashboard"."deleted")+ '''+# ---+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.27'''SELECT "posthog_team"."id","posthog_team"."uuid",@@ -12620,9 +11594,53 @@LIMIT 21'''# ----# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.56+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.28'''- SELECT "posthog_organization"."id",+ SELECT "posthog_filesystem"."team_id",+ "posthog_filesystem"."id",+ "posthog_filesystem"."path",+ "posthog_filesystem"."depth",+ "posthog_filesystem"."type",+ "posthog_filesystem"."ref",+ "posthog_filesystem"."href",+ "posthog_filesystem"."shortcut",+ "posthog_filesystem"."meta",+ "posthog_filesystem"."created_at",+ "posthog_filesystem"."created_by_id",+ "posthog_filesystem"."surface",+ "posthog_filesystem"."project_id"+ FROM "posthog_filesystem"+ WHERE (("posthog_filesystem"."surface" IS NULL+ OR "posthog_filesystem"."surface" = 'web')+ AND "posthog_filesystem"."ref" = '0001'+ AND "posthog_filesystem"."team_id" = 99999+ AND "posthog_filesystem"."type" = 'dashboard'+ AND NOT ("posthog_filesystem"."shortcut"+ AND "posthog_filesystem"."shortcut" IS NOT NULL))+ '''+# ---+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.29+ '''+ SELECT COUNT(*) AS "__count"+ FROM "posthog_dashboardtile"+ INNER JOIN "posthog_dashboard" ON ("posthog_dashboardtile"."dashboard_id" = "posthog_dashboard"."id")+ WHERE (NOT ("posthog_dashboardtile"."deleted"+ AND "posthog_dashboardtile"."deleted" IS NOT NULL)+ AND NOT ("posthog_dashboard"."deleted")+ AND "posthog_dashboardtile"."dashboard_id" = 99999+ AND NOT ("posthog_dashboardtile"."insight_id" IS NULL))+ '''+# ---+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.3+ '''+ SELECT "posthog_organizationmembership"."id",+ "posthog_organizationmembership"."organization_id",+ "posthog_organizationmembership"."user_id",+ "posthog_organizationmembership"."level",+ "posthog_organizationmembership"."joined_at",+ "posthog_organizationmembership"."updated_at",+ "posthog_organizationmembership"."invited_by_id",+ "posthog_organization"."id","posthog_organization"."name","posthog_organization"."slug","posthog_organization"."logo_media_id",@@ -12657,14 +11675,123 @@"posthog_organization"."personalization","posthog_organization"."domain_whitelist","posthog_organization"."is_platform"- FROM "posthog_organization"- WHERE "posthog_organization"."id" = '00000000-0000-0000-0000-000000000000'::uuid+ FROM "posthog_organizationmembership"+ INNER JOIN "posthog_organization" ON ("posthog_organizationmembership"."organization_id" = "posthog_organization"."id")+ WHERE ("posthog_organizationmembership"."organization_id" = '00000000-0000-0000-0000-000000000000'::uuid+ AND "posthog_organizationmembership"."user_id" = 99999)LIMIT 21'''# ----# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.57+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.30'''- SELECT "posthog_team"."id",+ SELECT "posthog_sharingconfiguration"."id",+ "posthog_sharingconfiguration"."team_id",+ "posthog_sharingconfiguration"."dashboard_id",+ "posthog_sharingconfiguration"."insight_id",+ "posthog_sharingconfiguration"."recording_id",+ "posthog_sharingconfiguration"."notebook_id",+ "posthog_sharingconfiguration"."interviewee_context_id",+ "posthog_sharingconfiguration"."created_at",+ "posthog_sharingconfiguration"."enabled",+ "posthog_sharingconfiguration"."access_token",+ "posthog_sharingconfiguration"."expires_at",+ "posthog_sharingconfiguration"."settings",+ "posthog_sharingconfiguration"."password_required"+ FROM "posthog_sharingconfiguration"+ WHERE "posthog_sharingconfiguration"."dashboard_id" = 99999+ '''+# ---+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.31+ '''+ SELECT COUNT(*) AS "__count"+ FROM "posthog_taggeditem"+ WHERE "posthog_taggeditem"."dashboard_id" = 99999+ '''+# ---+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.32+ '''+ SELECT "posthog_sharingconfiguration"."id",+ "posthog_sharingconfiguration"."team_id",+ "posthog_sharingconfiguration"."dashboard_id",+ "posthog_sharingconfiguration"."insight_id",+ "posthog_sharingconfiguration"."recording_id",+ "posthog_sharingconfiguration"."notebook_id",+ "posthog_sharingconfiguration"."interviewee_context_id",+ "posthog_sharingconfiguration"."created_at",+ "posthog_sharingconfiguration"."enabled",+ "posthog_sharingconfiguration"."access_token",+ "posthog_sharingconfiguration"."expires_at",+ "posthog_sharingconfiguration"."settings",+ "posthog_sharingconfiguration"."password_required"+ FROM "posthog_sharingconfiguration"+ WHERE "posthog_sharingconfiguration"."dashboard_id" = 99999+ '''+# ---+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.33+ '''+ SELECT "posthog_insightvariable"."created_by_id",+ "posthog_insightvariable"."created_at",+ "posthog_insightvariable"."updated_at",+ "posthog_insightvariable"."id",+ "posthog_insightvariable"."team_id",+ "posthog_insightvariable"."name",+ "posthog_insightvariable"."code_name",+ "posthog_insightvariable"."type",+ "posthog_insightvariable"."default_value",+ "posthog_insightvariable"."values"+ FROM "posthog_insightvariable"+ WHERE "posthog_insightvariable"."team_id" = 99999+ '''+# ---+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.34+ '''+ SELECT "posthog_dashboardtile"."id",+ "posthog_dashboardtile"."dashboard_id",+ "posthog_dashboardtile"."insight_id",+ "posthog_dashboardtile"."text_id",+ "posthog_dashboardtile"."button_tile_id",+ "posthog_dashboardtile"."widget_id",+ "posthog_dashboardtile"."team_id",+ "posthog_dashboardtile"."layouts",+ "posthog_dashboardtile"."color",+ "posthog_dashboardtile"."filters_hash",+ "posthog_dashboardtile"."last_refresh",+ "posthog_dashboardtile"."refreshing",+ "posthog_dashboardtile"."refresh_attempt",+ "posthog_dashboardtile"."filters_overrides",+ "posthog_dashboardtile"."show_description",+ "posthog_dashboardtile"."transparent_background",+ "posthog_dashboardtile"."deleted",+ "posthog_dashboarditem"."id",+ "posthog_dashboarditem"."name",+ "posthog_dashboarditem"."derived_name",+ "posthog_dashboarditem"."description",+ "posthog_dashboarditem"."team_id",+ "posthog_dashboarditem"."filters",+ "posthog_dashboarditem"."filters_hash",+ "posthog_dashboarditem"."query",+ "posthog_dashboarditem"."query_metadata",+ "posthog_dashboarditem"."order",+ "posthog_dashboarditem"."deleted",+ "posthog_dashboarditem"."saved",+ "posthog_dashboarditem"."created_at",+ "posthog_dashboarditem"."refreshing",+ "posthog_dashboarditem"."created_by_id",+ "posthog_dashboarditem"."is_sample",+ "posthog_dashboarditem"."short_id",+ "posthog_dashboarditem"."favorited",+ "posthog_dashboarditem"."refresh_attempt",+ "posthog_dashboarditem"."last_modified_at",+ "posthog_dashboarditem"."last_modified_by_id",+ "posthog_dashboarditem"."dashboard_id",+ "posthog_dashboarditem"."last_refresh",+ "posthog_dashboarditem"."layouts",+ "posthog_dashboarditem"."color",+ "posthog_dashboarditem"."dive_dashboard_id",+ "posthog_dashboarditem"."updated_at",+ "posthog_dashboarditem"."deprecated_tags",+ "posthog_dashboarditem"."tags",+ "posthog_team"."id","posthog_team"."uuid","posthog_team"."organization_id","posthog_team"."parent_team_id",@@ -12750,122 +11877,322 @@"posthog_team"."modifiers","posthog_team"."correlation_config","posthog_team"."session_recording_retention_period_days",+ "posthog_team"."plugins_opt_in",+ "posthog_team"."opt_out_capture",+ "posthog_team"."event_names",+ "posthog_team"."event_names_with_usage",+ "posthog_team"."event_properties",+ "posthog_team"."event_properties_with_usage",+ "posthog_team"."event_properties_numerical","posthog_team"."external_data_workspace_id","posthog_team"."external_data_workspace_last_synced_at","posthog_team"."api_query_rate_limit",+ "posthog_team"."revenue_tracking_config","posthog_team"."drop_events_older_than","posthog_team"."base_currency","posthog_team"."experiment_recalculation_time","posthog_team"."default_experiment_confidence_level","posthog_team"."default_experiment_stats_method",- "posthog_team"."business_model"- FROM "posthog_team"- WHERE "posthog_team"."id" = 99999- LIMIT 21- '''-# ----# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.58- '''- SELECT "posthog_dashboardtile"."id",- "posthog_dashboardtile"."dashboard_id",- "posthog_dashboardtile"."insight_id",- "posthog_dashboardtile"."text_id",- "posthog_dashboardtile"."button_tile_id",- "posthog_dashboardtile"."widget_id",- "posthog_dashboardtile"."team_id",- "posthog_dashboardtile"."layouts",- "posthog_dashboardtile"."color",- "posthog_dashboardtile"."filters_hash",- "posthog_dashboardtile"."last_refresh",- "posthog_dashboardtile"."refreshing",- "posthog_dashboardtile"."refresh_attempt",- "posthog_dashboardtile"."filters_overrides",- "posthog_dashboardtile"."show_description",- "posthog_dashboardtile"."transparent_background",- "posthog_dashboardtile"."deleted"+ "posthog_team"."business_model",+ "posthog_user"."id",+ "posthog_user"."password",+ "posthog_user"."last_login",+ "posthog_user"."first_name",+ "posthog_user"."last_name",+ "posthog_user"."is_staff",+ "posthog_user"."date_joined",+ "posthog_user"."uuid",+ "posthog_user"."current_organization_id",+ "posthog_user"."current_team_id",+ "posthog_user"."email",+ "posthog_user"."pending_email",+ "posthog_user"."distinct_id",+ "posthog_user"."is_email_verified",+ "posthog_user"."credentials_reviewed_at",+ "posthog_user"."requested_password_reset_at",+ "posthog_user"."requested_2fa_reset_at",+ "posthog_user"."has_seen_product_intro_for",+ "posthog_user"."strapi_id",+ "posthog_user"."is_active",+ "posthog_user"."role_at_organization",+ "posthog_user"."theme_mode",+ "posthog_user"."partial_notification_settings",+ "posthog_user"."anonymize_data",+ "posthog_user"."allow_impersonation",+ "posthog_user"."toolbar_mode",+ "posthog_user"."hedgehog_config",+ "posthog_user"."allow_sidebar_suggestions",+ "posthog_user"."shortcut_position",+ "posthog_user"."passkeys_enabled_for_2fa",+ "posthog_user"."hide_mcp_hints",+ "posthog_user"."onboarding_skipped_at",+ "posthog_user"."onboarding_skipped_reason",+ "posthog_user"."onboarding_skipped_organization_id",+ "posthog_user"."onboarding_delegated_to_invite_id",+ "posthog_user"."onboarding_delegated_to_organization_id",+ "posthog_user"."onboarding_delegation_accepted_at",+ "posthog_user"."events_column_config",+ "posthog_user"."email_opt_in",+ T6."id",+ T6."password",+ T6."last_login",+ T6."first_name",+ T6."last_name",+ T6."is_staff",+ T6."date_joined",+ T6."uuid",+ T6."current_organization_id",+ T6."current_team_id",+ T6."email",+ T6."pending_email",+ T6."distinct_id",+ T6."is_email_verified",+ T6."credentials_reviewed_at",+ T6."requested_password_reset_at",+ T6."requested_2fa_reset_at",+ T6."has_seen_product_intro_for",+ T6."strapi_id",+ T6."is_active",+ T6."role_at_organization",+ T6."theme_mode",+ T6."partial_notification_settings",+ T6."anonymize_data",+ T6."allow_impersonation",+ T6."toolbar_mode",+ T6."hedgehog_config",+ T6."allow_sidebar_suggestions",+ T6."shortcut_position",+ T6."passkeys_enabled_for_2fa",+ T6."hide_mcp_hints",+ T6."onboarding_skipped_at",+ T6."onboarding_skipped_reason",+ T6."onboarding_skipped_organization_id",+ T6."onboarding_delegated_to_invite_id",+ T6."onboarding_delegated_to_organization_id",+ T6."onboarding_delegation_accepted_at",+ T6."events_column_config",+ T6."email_opt_in",+ "posthog_text"."id",+ "posthog_text"."body",+ "posthog_text"."created_by_id",+ "posthog_text"."last_modified_at",+ "posthog_text"."last_modified_by_id",+ "posthog_text"."team_id",+ "posthog_buttontile"."id",+ "posthog_buttontile"."url",+ "posthog_buttontile"."text",+ "posthog_buttontile"."placement",+ "posthog_buttontile"."style",+ "posthog_buttontile"."created_by_id",+ "posthog_buttontile"."last_modified_at",+ "posthog_buttontile"."last_modified_by_id",+ "posthog_buttontile"."team_id",+ "posthog_dashboardwidget"."id",+ "posthog_dashboardwidget"."widget_type",+ "posthog_dashboardwidget"."name",+ "posthog_dashboardwidget"."description",+ "posthog_dashboardwidget"."config",+ "posthog_dashboardwidget"."created_by_id",+ "posthog_dashboardwidget"."last_modified_at",+ "posthog_dashboardwidget"."last_modified_by_id",+ "posthog_dashboardwidget"."team_id",+ T10."id",+ T10."password",+ T10."last_login",+ T10."first_name",+ T10."last_name",+ T10."is_staff",+ T10."date_joined",+ T10."uuid",+ T10."current_organization_id",+ T10."current_team_id",+ T10."email",+ T10."pending_email",+ T10."distinct_id",+ T10."is_email_verified",+ T10."credentials_reviewed_at",+ T10."requested_password_reset_at",+ T10."requested_2fa_reset_at",+ T10."has_seen_product_intro_for",+ T10."strapi_id",+ T10."is_active",+ T10."role_at_organization",+ T10."theme_mode",+ T10."partial_notification_settings",+ T10."anonymize_data",+ T10."allow_impersonation",+ T10."toolbar_mode",+ T10."hedgehog_config",+ T10."allow_sidebar_suggestions",+ T10."shortcut_position",+ T10."passkeys_enabled_for_2fa",+ T10."hide_mcp_hints",+ T10."onboarding_skipped_at",+ T10."onboarding_skipped_reason",+ T10."onboarding_skipped_organization_id",+ T10."onboarding_delegated_to_invite_id",+ T10."onboarding_delegated_to_organization_id",+ T10."onboarding_delegation_accepted_at",+ T10."events_column_config",+ T10."email_opt_in",+ T11."id",+ T11."password",+ T11."last_login",+ T11."first_name",+ T11."last_name",+ T11."is_staff",+ T11."date_joined",+ T11."uuid",+ T11."current_organization_id",+ T11."current_team_id",+ T11."email",+ T11."pending_email",+ T11."distinct_id",+ T11."is_email_verified",+ T11."credentials_reviewed_at",+ T11."requested_password_reset_at",+ T11."requested_2fa_reset_at",+ T11."has_seen_product_intro_for",+ T11."strapi_id",+ T11."is_active",+ T11."role_at_organization",+ T11."theme_mode",+ T11."partial_notification_settings",+ T11."anonymize_data",+ T11."allow_impersonation",+ T11."toolbar_mode",+ T11."hedgehog_config",+ T11."allow_sidebar_suggestions",+ T11."shortcut_position",+ T11."passkeys_enabled_for_2fa",+ T11."hide_mcp_hints",+ T11."onboarding_skipped_at",+ T11."onboarding_skipped_reason",+ T11."onboarding_skipped_organization_id",+ T11."onboarding_delegated_to_invite_id",+ T11."onboarding_delegated_to_organization_id",+ T11."onboarding_delegation_accepted_at",+ T11."events_column_config",+ T11."email_opt_in"FROM "posthog_dashboardtile"- WHERE "posthog_dashboardtile"."id" = 99999- LIMIT 21+ INNER JOIN "posthog_dashboard" ON ("posthog_dashboardtile"."dashboard_id" = "posthog_dashboard"."id")+ LEFT OUTER JOIN "posthog_dashboarditem" ON ("posthog_dashboardtile"."insight_id" = "posthog_dashboarditem"."id")+ LEFT OUTER JOIN "posthog_team" ON ("posthog_dashboarditem"."team_id" = "posthog_team"."id")+ LEFT OUTER JOIN "posthog_user" ON ("posthog_dashboarditem"."created_by_id" = "posthog_user"."id")+ LEFT OUTER JOIN "posthog_user" T6 ON ("posthog_dashboarditem"."last_modified_by_id" = T6."id")+ LEFT OUTER JOIN "posthog_text" ON ("posthog_dashboardtile"."text_id" = "posthog_text"."id")+ LEFT OUTER JOIN "posthog_buttontile" ON ("posthog_dashboardtile"."button_tile_id" = "posthog_buttontile"."id")+ LEFT OUTER JOIN "posthog_dashboardwidget" ON ("posthog_dashboardtile"."widget_id" = "posthog_dashboardwidget"."id")+ LEFT OUTER JOIN "posthog_user" T10 ON ("posthog_dashboardwidget"."created_by_id" = T10."id")+ LEFT OUTER JOIN "posthog_user" T11 ON ("posthog_dashboardwidget"."last_modified_by_id" = T11."id")+ WHERE (NOT ("posthog_dashboardtile"."deleted"+ AND "posthog_dashboardtile"."deleted" IS NOT NULL)+ AND NOT ("posthog_dashboard"."deleted")+ AND "posthog_dashboardtile"."dashboard_id" = 99999+ AND NOT ("posthog_dashboard"."deleted"+ AND "posthog_dashboardtile"."deleted"+ AND "posthog_dashboardtile"."deleted" IS NOT NULL)+ AND (NOT "posthog_dashboarditem"."deleted"+ OR "posthog_dashboardtile"."insight_id" IS NULL))+ ORDER BY "posthog_dashboarditem"."order" ASC'''# ----# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.59+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.35'''- SELECT "posthog_dashboarditem"."id",- "posthog_dashboarditem"."name",- "posthog_dashboarditem"."derived_name",- "posthog_dashboarditem"."description",- "posthog_dashboarditem"."team_id",- "posthog_dashboarditem"."filters",- "posthog_dashboarditem"."filters_hash",- "posthog_dashboarditem"."query",- "posthog_dashboarditem"."query_metadata",- "posthog_dashboarditem"."order",- "posthog_dashboarditem"."deleted",- "posthog_dashboarditem"."saved",- "posthog_dashboarditem"."created_at",- "posthog_dashboarditem"."refreshing",- "posthog_dashboarditem"."created_by_id",- "posthog_dashboarditem"."is_sample",- "posthog_dashboarditem"."short_id",- "posthog_dashboarditem"."favorited",- "posthog_dashboarditem"."refresh_attempt",- "posthog_dashboarditem"."last_modified_at",- "posthog_dashboarditem"."last_modified_by_id",- "posthog_dashboarditem"."dashboard_id",- "posthog_dashboarditem"."last_refresh",- "posthog_dashboarditem"."layouts",- "posthog_dashboarditem"."color",- "posthog_dashboarditem"."dive_dashboard_id",- "posthog_dashboarditem"."updated_at",- "posthog_dashboarditem"."deprecated_tags",- "posthog_dashboarditem"."tags"- FROM "posthog_dashboarditem"- WHERE "posthog_dashboarditem"."id" = 99999- LIMIT 21+ SELECT "posthog_tag"."name" AS "tag__name"+ FROM "posthog_taggeditem"+ INNER JOIN "posthog_tag" ON ("posthog_taggeditem"."tag_id" = "posthog_tag"."id")+ WHERE "posthog_taggeditem"."dashboard_id" = 99999'''# ----# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.6+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.36'''- SELECT "ee_accesscontrol"."team_id" AS "team_id",- "ee_accesscontrol"."resource_id" AS "resource_id",- "ee_accesscontrol"."organization_member_id" AS "organization_member_id",- "ee_accesscontrol"."role_id" AS "role_id",- "ee_accesscontrol"."access_level" AS "access_level"- FROM "ee_accesscontrol"- INNER JOIN "posthog_team" ON ("ee_accesscontrol"."team_id" = "posthog_team"."id")- WHERE ("ee_accesscontrol"."resource" = 'project'- AND "posthog_team"."organization_id" IN ('00000000-0000-0000-0000-000000000000'::uuid))+ SELECT "posthog_user"."id",+ "posthog_user"."password",+ "posthog_user"."last_login",+ "posthog_user"."first_name",+ "posthog_user"."last_name",+ "posthog_user"."is_staff",+ "posthog_user"."date_joined",+ "posthog_user"."uuid",+ "posthog_user"."current_organization_id",+ "posthog_user"."current_team_id",+ "posthog_user"."email",+ "posthog_user"."pending_email",+ "posthog_user"."distinct_id",+ "posthog_user"."is_email_verified",+ "posthog_user"."credentials_reviewed_at",+ "posthog_user"."requested_2fa_reset_at",+ "posthog_user"."has_seen_product_intro_for",+ "posthog_user"."strapi_id",+ "posthog_user"."is_active",+ "posthog_user"."role_at_organization",+ "posthog_user"."theme_mode",+ "posthog_user"."partial_notification_settings",+ "posthog_user"."anonymize_data",+ "posthog_user"."allow_impersonation",+ "posthog_user"."toolbar_mode",+ "posthog_user"."hedgehog_config",+ "posthog_user"."allow_sidebar_suggestions",+ "posthog_user"."shortcut_position",+ "posthog_user"."passkeys_enabled_for_2fa",+ "posthog_user"."hide_mcp_hints",+ "posthog_user"."onboarding_skipped_at",+ "posthog_user"."onboarding_skipped_reason",+ "posthog_user"."onboarding_skipped_organization_id",+ "posthog_user"."onboarding_delegated_to_invite_id",+ "posthog_user"."onboarding_delegated_to_organization_id",+ "posthog_user"."onboarding_delegation_accepted_at",+ "posthog_user"."events_column_config",+ "posthog_user"."email_opt_in"+ FROM "posthog_user"+ WHERE ("posthog_user"."is_active"+ AND "posthog_user"."id" = 99999)'''# ----# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.60+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.37'''- SELECT "posthog_dashboard"."id",- "posthog_dashboard"."name",- "posthog_dashboard"."description",- "posthog_dashboard"."team_id",- "posthog_dashboard"."pinned",- "posthog_dashboard"."created_at",- "posthog_dashboard"."created_by_id",- "posthog_dashboard"."deleted",- "posthog_dashboard"."last_accessed_at",- "posthog_dashboard"."last_refresh",- "posthog_dashboard"."filters",- "posthog_dashboard"."variables",- "posthog_dashboard"."breakdown_colors",- "posthog_dashboard"."data_color_theme_id",- "posthog_dashboard"."creation_mode",- "posthog_dashboard"."restriction_level",- "posthog_dashboard"."quick_filter_ids",- "posthog_dashboard"."deprecated_tags",- "posthog_dashboard"."tags",- "posthog_dashboard"."share_token",- "posthog_dashboard"."is_shared"- FROM "posthog_dashboard"- WHERE "posthog_dashboard"."id" = 99999+ SELECT "posthog_organization"."id",+ "posthog_organization"."name",+ "posthog_organization"."slug",+ "posthog_organization"."logo_media_id",+ "posthog_organization"."created_at",+ "posthog_organization"."updated_at",+ "posthog_organization"."is_active",+ "posthog_organization"."is_not_active_reason",+ "posthog_organization"."session_cookie_age",+ "posthog_organization"."is_member_join_email_enabled",+ "posthog_organization"."is_ai_data_processing_approved",+ "posthog_organization"."is_ai_training_opted_in",+ "posthog_organization"."is_ai_training_locked",+ "posthog_organization"."is_ai_training_cta_shown",+ "posthog_organization"."enforce_2fa",+ "posthog_organization"."members_can_invite",+ "posthog_organization"."members_can_create_projects",+ "posthog_organization"."members_can_use_personal_api_keys",+ "posthog_organization"."allow_publicly_shared_resources",+ "posthog_organization"."default_role_id",+ "posthog_organization"."plugins_access_level",+ "posthog_organization"."for_internal_metrics",+ "posthog_organization"."default_experiment_stats_method",+ "posthog_organization"."default_anonymize_ips",+ "posthog_organization"."is_hipaa",+ "posthog_organization"."is_pending_deletion",+ "posthog_organization"."customer_id",+ "posthog_organization"."available_product_features",+ "posthog_organization"."usage",+ "posthog_organization"."never_drop_data",+ "posthog_organization"."customer_trust_scores",+ "posthog_organization"."setup_section_2_completed",+ "posthog_organization"."personalization",+ "posthog_organization"."domain_whitelist",+ "posthog_organization"."is_platform"+ FROM "posthog_organization"+ WHERE "posthog_organization"."id" = '00000000-0000-0000-0000-000000000000'::uuidLIMIT 21'''# ----# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.61+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.38'''SELECT "posthog_team"."id","posthog_team"."uuid",@@ -12961,15 +12288,58 @@"posthog_team"."experiment_recalculation_time","posthog_team"."default_experiment_confidence_level","posthog_team"."default_experiment_stats_method",- "posthog_team"."business_model"+ "posthog_team"."business_model",+ "posthog_organization"."id",+ "posthog_organization"."name",+ "posthog_organization"."slug",+ "posthog_organization"."logo_media_id",+ "posthog_organization"."created_at",+ "posthog_organization"."updated_at",+ "posthog_organization"."is_active",+ "posthog_organization"."is_not_active_reason",+ "posthog_organization"."session_cookie_age",+ "posthog_organization"."is_member_join_email_enabled",+ "posthog_organization"."is_ai_data_processing_approved",+ "posthog_organization"."is_ai_training_opted_in",+ "posthog_organization"."is_ai_training_locked",+ "posthog_organization"."is_ai_training_cta_shown",+ "posthog_organization"."enforce_2fa",+ "posthog_organization"."members_can_invite",+ "posthog_organization"."members_can_create_projects",+ "posthog_organization"."members_can_use_personal_api_keys",+ "posthog_organization"."allow_publicly_shared_resources",+ "posthog_organization"."default_role_id",+ "posthog_organization"."plugins_access_level",+ "posthog_organization"."for_internal_metrics",+ "posthog_organization"."default_experiment_stats_method",+ "posthog_organization"."default_anonymize_ips",+ "posthog_organization"."is_hipaa",+ "posthog_organization"."is_pending_deletion",+ "posthog_organization"."customer_id",+ "posthog_organization"."available_product_features",+ "posthog_organization"."usage",+ "posthog_organization"."never_drop_data",+ "posthog_organization"."customer_trust_scores",+ "posthog_organization"."setup_section_2_completed",+ "posthog_organization"."personalization",+ "posthog_organization"."domain_whitelist",+ "posthog_organization"."is_platform"FROM "posthog_team"+ INNER JOIN "posthog_organization" ON ("posthog_team"."organization_id" = "posthog_organization"."id")WHERE "posthog_team"."id" = 99999LIMIT 21'''# ----# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.62+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.39'''- SELECT "posthog_organization"."id",+ SELECT "posthog_organizationmembership"."id",+ "posthog_organizationmembership"."organization_id",+ "posthog_organizationmembership"."user_id",+ "posthog_organizationmembership"."level",+ "posthog_organizationmembership"."joined_at",+ "posthog_organizationmembership"."updated_at",+ "posthog_organizationmembership"."invited_by_id",+ "posthog_organization"."id","posthog_organization"."name","posthog_organization"."slug","posthog_organization"."logo_media_id",@@ -13004,174 +12374,232 @@"posthog_organization"."personalization","posthog_organization"."domain_whitelist","posthog_organization"."is_platform"- FROM "posthog_organization"- WHERE "posthog_organization"."id" = '00000000-0000-0000-0000-000000000000'::uuid+ FROM "posthog_organizationmembership"+ INNER JOIN "posthog_organization" ON ("posthog_organizationmembership"."organization_id" = "posthog_organization"."id")+ WHERE ("posthog_organizationmembership"."organization_id" = '00000000-0000-0000-0000-000000000000'::uuid+ AND "posthog_organizationmembership"."user_id" = 99999)+ LIMIT 21+ '''+# ---+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.4+ '''+ SELECT "ee_accesscontrol"."id",+ "ee_accesscontrol"."team_id",+ "ee_accesscontrol"."access_level",+ "ee_accesscontrol"."resource",+ "ee_accesscontrol"."resource_id",+ "ee_accesscontrol"."organization_member_id",+ "ee_accesscontrol"."role_id",+ "ee_accesscontrol"."created_by_id",+ "ee_accesscontrol"."created_at",+ "ee_accesscontrol"."updated_at",+ "posthog_team"."organization_id" AS "_team_organization_id"+ FROM "ee_accesscontrol"+ INNER JOIN "posthog_team" ON ("ee_accesscontrol"."team_id" = "posthog_team"."id")+ LEFT OUTER JOIN "posthog_organizationmembership" ON ("ee_accesscontrol"."organization_member_id" = "posthog_organizationmembership"."id")+ WHERE (("ee_accesscontrol"."organization_member_id" IS NULL+ AND "ee_accesscontrol"."role_id" IS NULL+ AND "ee_accesscontrol"."team_id" = 99999)+ OR ("posthog_organizationmembership"."user_id" = 99999+ AND "ee_accesscontrol"."role_id" IS NULL+ AND "ee_accesscontrol"."team_id" = 99999))+ '''+# ---+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.40+ '''+ SELECT "ee_accesscontrol"."id",+ "ee_accesscontrol"."team_id",+ "ee_accesscontrol"."access_level",+ "ee_accesscontrol"."resource",+ "ee_accesscontrol"."resource_id",+ "ee_accesscontrol"."organization_member_id",+ "ee_accesscontrol"."role_id",+ "ee_accesscontrol"."created_by_id",+ "ee_accesscontrol"."created_at",+ "ee_accesscontrol"."updated_at",+ "posthog_team"."organization_id" AS "_team_organization_id"+ FROM "ee_accesscontrol"+ INNER JOIN "posthog_team" ON ("ee_accesscontrol"."team_id" = "posthog_team"."id")+ LEFT OUTER JOIN "posthog_organizationmembership" ON ("ee_accesscontrol"."organization_member_id" = "posthog_organizationmembership"."id")+ WHERE (("ee_accesscontrol"."organization_member_id" IS NULL+ AND "ee_accesscontrol"."role_id" IS NULL+ AND "ee_accesscontrol"."team_id" = 99999)+ OR ("posthog_organizationmembership"."user_id" = 99999+ AND "ee_accesscontrol"."role_id" IS NULL+ AND "ee_accesscontrol"."team_id" = 99999))+ '''+# ---+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.41+ '''+ SELECT "posthog_organizationmembership"."id",+ "posthog_organizationmembership"."organization_id",+ "posthog_organizationmembership"."user_id",+ "posthog_organizationmembership"."level",+ "posthog_organizationmembership"."joined_at",+ "posthog_organizationmembership"."updated_at",+ "posthog_organizationmembership"."invited_by_id",+ "posthog_organization"."id",+ "posthog_organization"."name",+ "posthog_organization"."slug",+ "posthog_organization"."logo_media_id",+ "posthog_organization"."created_at",+ "posthog_organization"."updated_at",+ "posthog_organization"."is_active",+ "posthog_organization"."is_not_active_reason",+ "posthog_organization"."session_cookie_age",+ "posthog_organization"."is_member_join_email_enabled",+ "posthog_organization"."is_ai_data_processing_approved",+ "posthog_organization"."is_ai_training_opted_in",+ "posthog_organization"."is_ai_training_locked",+ "posthog_organization"."is_ai_training_cta_shown",+ "posthog_organization"."enforce_2fa",+ "posthog_organization"."members_can_invite",+ "posthog_organization"."members_can_create_projects",+ "posthog_organization"."members_can_use_personal_api_keys",+ "posthog_organization"."allow_publicly_shared_resources",+ "posthog_organization"."default_role_id",+ "posthog_organization"."plugins_access_level",+ "posthog_organization"."for_internal_metrics",+ "posthog_organization"."default_experiment_stats_method",+ "posthog_organization"."default_anonymize_ips",+ "posthog_organization"."is_hipaa",+ "posthog_organization"."is_pending_deletion",+ "posthog_organization"."customer_id",+ "posthog_organization"."available_product_features",+ "posthog_organization"."usage",+ "posthog_organization"."never_drop_data",+ "posthog_organization"."customer_trust_scores",+ "posthog_organization"."setup_section_2_completed",+ "posthog_organization"."personalization",+ "posthog_organization"."domain_whitelist",+ "posthog_organization"."is_platform"+ FROM "posthog_organizationmembership"+ INNER JOIN "posthog_organization" ON ("posthog_organizationmembership"."organization_id" = "posthog_organization"."id")+ WHERE "posthog_organizationmembership"."user_id" = 99999+ '''+# ---+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.42+ '''+ SELECT "ee_accesscontrol"."team_id" AS "team_id",+ "ee_accesscontrol"."resource_id" AS "resource_id",+ "ee_accesscontrol"."organization_member_id" AS "organization_member_id",+ "ee_accesscontrol"."role_id" AS "role_id",+ "ee_accesscontrol"."access_level" AS "access_level"+ FROM "ee_accesscontrol"+ INNER JOIN "posthog_team" ON ("ee_accesscontrol"."team_id" = "posthog_team"."id")+ WHERE ("ee_accesscontrol"."resource" = 'project'+ AND "posthog_team"."organization_id" IN ('00000000-0000-0000-0000-000000000000'::uuid))+ '''+# ---+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.43+ '''+ SELECT "ee_rolemembership"."organization_member_id" AS "organization_member_id",+ "ee_rolemembership"."role_id" AS "role_id"+ FROM "ee_rolemembership"+ WHERE "ee_rolemembership"."user_id" = 99999+ '''+# ---+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.44+ '''+ SELECT "posthog_dashboard"."id",+ "posthog_dashboard"."name",+ "posthog_dashboard"."description",+ "posthog_dashboard"."team_id",+ "posthog_dashboard"."pinned",+ "posthog_dashboard"."created_at",+ "posthog_dashboard"."created_by_id",+ "posthog_dashboard"."deleted",+ "posthog_dashboard"."last_accessed_at",+ "posthog_dashboard"."last_refresh",+ "posthog_dashboard"."filters",+ "posthog_dashboard"."variables",+ "posthog_dashboard"."breakdown_colors",+ "posthog_dashboard"."data_color_theme_id",+ "posthog_dashboard"."creation_mode",+ "posthog_dashboard"."restriction_level",+ "posthog_dashboard"."quick_filter_ids",+ "posthog_dashboard"."deprecated_tags",+ "posthog_dashboard"."tags",+ "posthog_dashboard"."share_token",+ "posthog_dashboard"."is_shared"+ FROM "posthog_dashboard"+ INNER JOIN "posthog_team" ON ("posthog_dashboard"."team_id" = "posthog_team"."id")+ WHERE (NOT ("posthog_dashboard"."deleted")+ AND ("posthog_dashboard"."team_id" =+ (SELECT U0."parent_team_id" AS "parent_team_id"+ FROM "posthog_team" U0+ WHERE U0."id" = 99999+ LIMIT 1)+ OR ("posthog_team"."parent_team_id" IS NULL+ AND "posthog_dashboard"."team_id" = 99999))+ AND "posthog_dashboard"."id" = 99999)LIMIT 21'''# ----# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.63+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.45'''- SELECT "posthog_team"."id",- "posthog_team"."uuid",- "posthog_team"."organization_id",- "posthog_team"."parent_team_id",- "posthog_team"."project_id",- "posthog_team"."api_token",- "posthog_team"."app_urls",- "posthog_team"."name",- "posthog_team"."slack_incoming_webhook",- "posthog_team"."created_at",- "posthog_team"."updated_at",- "posthog_team"."anonymize_ips",- "posthog_team"."completed_snippet_onboarding",- "posthog_team"."has_completed_onboarding_for",- "posthog_team"."onboarding_tasks",- "posthog_team"."ingested_event",- "posthog_team"."ingested_production_event",- "posthog_team"."ingested_production_event_last_checked_at",- "posthog_team"."person_processing_opt_out",- "posthog_team"."secret_api_token",- "posthog_team"."secret_api_token_backup",- "posthog_team"."session_recording_opt_in",- "posthog_team"."session_recording_sample_rate",- "posthog_team"."session_recording_minimum_duration_milliseconds",- "posthog_team"."session_recording_linked_flag",- "posthog_team"."session_recording_network_payload_capture_config",- "posthog_team"."session_recording_masking_config",- "posthog_team"."session_recording_url_trigger_config",- "posthog_team"."session_recording_url_blocklist_config",- "posthog_team"."session_recording_event_trigger_config",- "posthog_team"."session_recording_trigger_match_type_config",- "posthog_team"."session_recording_trigger_groups",- "posthog_team"."session_replay_config",- "posthog_team"."session_recording_retention_period",- "posthog_team"."event_retention_months",- "posthog_team"."conversations_enabled",- "posthog_team"."conversations_settings",- "posthog_team"."proactive_tasks_enabled",- "posthog_team"."survey_config",- "posthog_team"."surveys_opt_in",- "posthog_team"."product_tours_opt_in",- "posthog_team"."capture_console_log_opt_in",- "posthog_team"."capture_performance_opt_in",- "posthog_team"."capture_dead_clicks",- "posthog_team"."autocapture_opt_out",- "posthog_team"."autocapture_web_vitals_opt_in",- "posthog_team"."autocapture_web_vitals_allowed_metrics",- "posthog_team"."autocapture_exceptions_opt_in",- "posthog_team"."autocapture_exceptions_errors_to_ignore",- "posthog_team"."logs_settings",- "posthog_team"."llm_gateway_enabled_at",- "posthog_team"."llm_gateway_revoked_at",- "posthog_team"."llm_gateway_overspend_allowance_usd",- "posthog_team"."heatmaps_opt_in",- "posthog_team"."receive_org_level_activity_logs",- "posthog_team"."web_analytics_pre_aggregated_tables_enabled",- "posthog_team"."web_analytics_pre_aggregated_tables_version",- "posthog_team"."flags_persistence_default",- "posthog_team"."feature_flag_confirmation_enabled",- "posthog_team"."feature_flag_confirmation_message",- "posthog_team"."default_evaluation_environments_enabled",- "posthog_team"."require_evaluation_environment_tags",- "posthog_team"."default_evaluation_contexts_enabled",- "posthog_team"."require_evaluation_contexts",- "posthog_team"."session_recording_version",- "posthog_team"."signup_token",- "posthog_team"."is_demo",- "posthog_team"."access_control",- "posthog_team"."week_start_day",- "posthog_team"."inject_web_apps",- "posthog_team"."test_account_filters",- "posthog_team"."test_account_filters_default_checked",- "posthog_team"."path_cleaning_filters",- "posthog_team"."timezone",- "posthog_team"."data_attributes",- "posthog_team"."person_display_name_properties",- "posthog_team"."live_events_columns",- "posthog_team"."recording_domains",- "posthog_team"."human_friendly_comparison_periods",- "posthog_team"."cookieless_server_hash_mode",- "posthog_team"."primary_dashboard_id",- "posthog_team"."default_data_theme",- "posthog_team"."extra_settings",- "posthog_team"."modifiers",- "posthog_team"."correlation_config",- "posthog_team"."session_recording_retention_period_days",- "posthog_team"."external_data_workspace_id",- "posthog_team"."external_data_workspace_last_synced_at",- "posthog_team"."api_query_rate_limit",- "posthog_team"."drop_events_older_than",- "posthog_team"."base_currency",- "posthog_team"."experiment_recalculation_time",- "posthog_team"."default_experiment_confidence_level",- "posthog_team"."default_experiment_stats_method",- "posthog_team"."business_model"- FROM "posthog_team"- WHERE "posthog_team"."id" = 99999+ SELECT "posthog_dashboard"."id",+ "posthog_dashboard"."name",+ "posthog_dashboard"."description",+ "posthog_dashboard"."team_id",+ "posthog_dashboard"."pinned",+ "posthog_dashboard"."created_at",+ "posthog_dashboard"."created_by_id",+ "posthog_dashboard"."deleted",+ "posthog_dashboard"."last_accessed_at",+ "posthog_dashboard"."last_refresh",+ "posthog_dashboard"."filters",+ "posthog_dashboard"."variables",+ "posthog_dashboard"."breakdown_colors",+ "posthog_dashboard"."data_color_theme_id",+ "posthog_dashboard"."creation_mode",+ "posthog_dashboard"."restriction_level",+ "posthog_dashboard"."quick_filter_ids",+ "posthog_dashboard"."deprecated_tags",+ "posthog_dashboard"."tags",+ "posthog_dashboard"."share_token",+ "posthog_dashboard"."is_shared"+ FROM "posthog_dashboard"+ INNER JOIN "posthog_team" ON ("posthog_dashboard"."team_id" = "posthog_team"."id")+ WHERE (NOT ("posthog_dashboard"."deleted")+ AND ("posthog_dashboard"."team_id" =+ (SELECT U0."parent_team_id" AS "parent_team_id"+ FROM "posthog_team" U0+ WHERE U0."id" = 99999+ LIMIT 1)+ OR ("posthog_team"."parent_team_id" IS NULL+ AND "posthog_dashboard"."team_id" = 99999))+ AND "posthog_dashboard"."id" = 99999)LIMIT 21'''# ----# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.64+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.46'''- SELECT "posthog_dashboardtile"."id",- "posthog_dashboardtile"."dashboard_id",- "posthog_dashboardtile"."insight_id",- "posthog_dashboardtile"."text_id",- "posthog_dashboardtile"."button_tile_id",- "posthog_dashboardtile"."widget_id",- "posthog_dashboardtile"."team_id",- "posthog_dashboardtile"."layouts",- "posthog_dashboardtile"."color",- "posthog_dashboardtile"."filters_hash",- "posthog_dashboardtile"."last_refresh",- "posthog_dashboardtile"."refreshing",- "posthog_dashboardtile"."refresh_attempt",- "posthog_dashboardtile"."filters_overrides",- "posthog_dashboardtile"."show_description",- "posthog_dashboardtile"."transparent_background",- "posthog_dashboardtile"."deleted"+ SELECT COUNT(*) AS "__count"FROM "posthog_dashboardtile"- WHERE "posthog_dashboardtile"."id" = 99999- LIMIT 21+ INNER JOIN "posthog_dashboard" ON ("posthog_dashboardtile"."dashboard_id" = "posthog_dashboard"."id")+ WHERE (NOT ("posthog_dashboardtile"."deleted"+ AND "posthog_dashboardtile"."deleted" IS NOT NULL)+ AND NOT ("posthog_dashboard"."deleted")+ AND "posthog_dashboardtile"."dashboard_id" = 99999+ AND NOT ("posthog_dashboardtile"."deleted"+ AND "posthog_dashboardtile"."deleted" IS NOT NULL))'''# ----# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.65+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.47'''- SELECT "posthog_dashboarditem"."id",- "posthog_dashboarditem"."name",- "posthog_dashboarditem"."derived_name",- "posthog_dashboarditem"."description",- "posthog_dashboarditem"."team_id",- "posthog_dashboarditem"."filters",- "posthog_dashboarditem"."filters_hash",- "posthog_dashboarditem"."query",- "posthog_dashboarditem"."query_metadata",- "posthog_dashboarditem"."order",- "posthog_dashboarditem"."deleted",- "posthog_dashboarditem"."saved",- "posthog_dashboarditem"."created_at",- "posthog_dashboarditem"."refreshing",- "posthog_dashboarditem"."created_by_id",- "posthog_dashboarditem"."is_sample",- "posthog_dashboarditem"."short_id",- "posthog_dashboarditem"."favorited",- "posthog_dashboarditem"."refresh_attempt",- "posthog_dashboarditem"."last_modified_at",- "posthog_dashboarditem"."last_modified_by_id",- "posthog_dashboarditem"."dashboard_id",- "posthog_dashboarditem"."last_refresh",- "posthog_dashboarditem"."layouts",- "posthog_dashboarditem"."color",- "posthog_dashboarditem"."dive_dashboard_id",- "posthog_dashboarditem"."updated_at",- "posthog_dashboarditem"."deprecated_tags",- "posthog_dashboarditem"."tags"- FROM "posthog_dashboarditem"- WHERE "posthog_dashboarditem"."id" = 99999- LIMIT 21+ SELECT COUNT(*) AS "__count"+ FROM "posthog_dashboardtile"+ INNER JOIN "posthog_dashboard" ON ("posthog_dashboardtile"."dashboard_id" = "posthog_dashboard"."id")+ WHERE (NOT ("posthog_dashboardtile"."deleted"+ AND "posthog_dashboardtile"."deleted" IS NOT NULL)+ AND NOT ("posthog_dashboard"."deleted")+ AND "posthog_dashboardtile"."dashboard_id" = 99999+ AND NOT ("posthog_dashboardtile"."deleted"+ AND "posthog_dashboardtile"."deleted" IS NOT NULL))'''# ----# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.66+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.48'''SELECT "posthog_dashboard"."id","posthog_dashboard"."name",@@ -13195,11 +12623,15 @@"posthog_dashboard"."share_token","posthog_dashboard"."is_shared"FROM "posthog_dashboard"- WHERE "posthog_dashboard"."id" = 99999- LIMIT 21+ WHERE (NOT ("posthog_dashboard"."deleted")+ AND "posthog_dashboard"."id" IN (1,+ 2,+ 3,+ 4,+ 5 /* ... */))'''# ----# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.67+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.49'''SELECT "posthog_team"."id","posthog_team"."uuid",@@ -13301,9 +12733,16 @@LIMIT 21'''# ----# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.68+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.5'''- SELECT "posthog_organization"."id",+ SELECT "posthog_organizationmembership"."id",+ "posthog_organizationmembership"."organization_id",+ "posthog_organizationmembership"."user_id",+ "posthog_organizationmembership"."level",+ "posthog_organizationmembership"."joined_at",+ "posthog_organizationmembership"."updated_at",+ "posthog_organizationmembership"."invited_by_id",+ "posthog_organization"."id","posthog_organization"."name","posthog_organization"."slug","posthog_organization"."logo_media_id",@@ -13338,12 +12777,37 @@"posthog_organization"."personalization","posthog_organization"."domain_whitelist","posthog_organization"."is_platform"- FROM "posthog_organization"- WHERE "posthog_organization"."id" = '00000000-0000-0000-0000-000000000000'::uuid- LIMIT 21+ FROM "posthog_organizationmembership"+ INNER JOIN "posthog_organization" ON ("posthog_organizationmembership"."organization_id" = "posthog_organization"."id")+ WHERE "posthog_organizationmembership"."user_id" = 99999+ '''+# ---+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.50+ '''+ SELECT "posthog_filesystem"."team_id",+ "posthog_filesystem"."id",+ "posthog_filesystem"."path",+ "posthog_filesystem"."depth",+ "posthog_filesystem"."type",+ "posthog_filesystem"."ref",+ "posthog_filesystem"."href",+ "posthog_filesystem"."shortcut",+ "posthog_filesystem"."meta",+ "posthog_filesystem"."created_at",+ "posthog_filesystem"."created_by_id",+ "posthog_filesystem"."surface",+ "posthog_filesystem"."project_id"+ FROM "posthog_filesystem"+ WHERE (("posthog_filesystem"."surface" IS NULL+ OR "posthog_filesystem"."surface" = 'web')+ AND "posthog_filesystem"."ref" = '0001'+ AND "posthog_filesystem"."team_id" = 99999+ AND "posthog_filesystem"."type" = 'insight'+ AND NOT ("posthog_filesystem"."shortcut"+ AND "posthog_filesystem"."shortcut" IS NOT NULL))'''# ----# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.69+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.51'''SELECT "posthog_organization"."id","posthog_organization"."name",@@ -13385,15 +12849,7 @@LIMIT 21'''# ----# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.7- '''- SELECT "ee_rolemembership"."organization_member_id" AS "organization_member_id",- "ee_rolemembership"."role_id" AS "role_id"- FROM "ee_rolemembership"- WHERE "ee_rolemembership"."user_id" = 99999- '''-# ----# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.70+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.52'''SELECT "posthog_team"."id","posthog_team"."uuid",@@ -13495,7 +12951,7 @@LIMIT 21'''# ----# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.71+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.53'''SELECT "posthog_dashboardtile"."id","posthog_dashboardtile"."dashboard_id",@@ -13522,7 +12978,7 @@AND "posthog_dashboardtile"."insight_id" = 99999)'''# ----# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.72+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.54'''SELECT "posthog_dashboardtile"."id","posthog_dashboardtile"."dashboard_id",@@ -13549,7 +13005,7 @@AND "posthog_dashboardtile"."insight_id" = 99999)'''# ----# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.73+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.55'''SELECT "posthog_insightvariable"."created_by_id","posthog_insightvariable"."created_at",@@ -13565,7 +13021,7 @@WHERE "posthog_insightvariable"."team_id" = 99999'''# ----# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.74+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.56'''SELECT "posthog_dashboardtile"."dashboard_id" AS "dashboard_id"FROM "posthog_dashboardtile"@@ -13576,7 +13032,7 @@AND "posthog_dashboardtile"."insight_id" = 99999)'''# ----# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.75+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.57'''SELECT "posthog_dashboard"."id","posthog_dashboard"."name",@@ -13608,7 +13064,7 @@5 /* ... */))'''# ----# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.76+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.58'''SELECT "posthog_tag"."name" AS "tag__name"FROM "posthog_taggeditem"@@ -13616,7 +13072,7 @@WHERE "posthog_taggeditem"."insight_id" = 99999'''# ----# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.77+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.59'''SELECT "posthog_user"."id","posthog_user"."password",@@ -13661,7 +13117,20 @@AND "posthog_user"."id" = 99999)'''# ----# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.78+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.6+ '''+ SELECT "ee_accesscontrol"."team_id" AS "team_id",+ "ee_accesscontrol"."resource_id" AS "resource_id",+ "ee_accesscontrol"."organization_member_id" AS "organization_member_id",+ "ee_accesscontrol"."role_id" AS "role_id",+ "ee_accesscontrol"."access_level" AS "access_level"+ FROM "ee_accesscontrol"+ INNER JOIN "posthog_team" ON ("ee_accesscontrol"."team_id" = "posthog_team"."id")+ WHERE ("ee_accesscontrol"."resource" = 'project'+ AND "posthog_team"."organization_id" IN ('00000000-0000-0000-0000-000000000000'::uuid))+ '''+# ---+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.60'''SELECT "posthog_organization"."id","posthog_organization"."name",@@ -13703,7 +13172,7 @@LIMIT 21'''# ----# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.79+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.61'''SELECT "posthog_team"."id","posthog_team"."uuid",@@ -13841,23 +13310,7 @@LIMIT 21'''# ----# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.8- '''- SELECT COUNT(*) AS "__count"- FROM "posthog_dashboard"- INNER JOIN "posthog_team" ON ("posthog_dashboard"."team_id" = "posthog_team"."id")- WHERE (NOT ("posthog_dashboard"."deleted")- AND ("posthog_dashboard"."team_id" =- (SELECT U0."parent_team_id" AS "parent_team_id"- FROM "posthog_team" U0- WHERE U0."id" = 99999- LIMIT 1)- OR ("posthog_team"."parent_team_id" IS NULL- AND "posthog_dashboard"."team_id" = 99999))- AND NOT "posthog_dashboard"."deleted")- '''-# ----# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.80+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.62'''SELECT "posthog_organizationmembership"."id","posthog_organizationmembership"."organization_id",@@ -13908,7 +13361,7 @@LIMIT 21'''# ----# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.81+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.63'''SELECT "ee_accesscontrol"."id","ee_accesscontrol"."team_id",@@ -13932,7 +13385,7 @@AND "ee_accesscontrol"."team_id" = 99999))'''# ----# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.82+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.64'''SELECT "posthog_organizationmembership"."id","posthog_organizationmembership"."organization_id",@@ -13981,7 +13434,7 @@WHERE "posthog_organizationmembership"."user_id" = 99999'''# ----# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.83+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.65'''SELECT "ee_accesscontrol"."team_id" AS "team_id","ee_accesscontrol"."resource_id" AS "resource_id",@@ -13994,7 +13447,7 @@AND "posthog_team"."organization_id" IN ('00000000-0000-0000-0000-000000000000'::uuid))'''# ----# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.84+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.66'''SELECT "ee_rolemembership"."organization_member_id" AS "organization_member_id","ee_rolemembership"."role_id" AS "role_id"@@ -14002,7 +13455,7 @@WHERE "ee_rolemembership"."user_id" = 99999'''# ----# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.85+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.67'''SELECT "posthog_dashboard"."id","posthog_dashboard"."name",@@ -14039,7 +13492,7 @@LIMIT 21'''# ----# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.86+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.68'''SELECT COUNT(*) AS "__count"FROM "posthog_dashboardtile"@@ -14052,7 +13505,7 @@AND "posthog_dashboardtile"."deleted" IS NOT NULL))'''# ----# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.87+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.69'''SELECT "posthog_dashboard"."id","posthog_dashboard"."name",@@ -14084,7 +13537,184 @@5 /* ... */))'''# ----# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.88+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.7+ '''+ SELECT "ee_rolemembership"."organization_member_id" AS "organization_member_id",+ "ee_rolemembership"."role_id" AS "role_id"+ FROM "ee_rolemembership"+ WHERE "ee_rolemembership"."user_id" = 99999+ '''+# ---+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.70+ '''+ SELECT "posthog_team"."id",+ "posthog_team"."uuid",+ "posthog_team"."organization_id",+ "posthog_team"."parent_team_id",+ "posthog_team"."project_id",+ "posthog_team"."api_token",+ "posthog_team"."app_urls",+ "posthog_team"."name",+ "posthog_team"."slack_incoming_webhook",+ "posthog_team"."created_at",+ "posthog_team"."updated_at",+ "posthog_team"."anonymize_ips",+ "posthog_team"."completed_snippet_onboarding",+ "posthog_team"."has_completed_onboarding_for",+ "posthog_team"."onboarding_tasks",+ "posthog_team"."ingested_event",+ "posthog_team"."ingested_production_event",+ "posthog_team"."ingested_production_event_last_checked_at",+ "posthog_team"."person_processing_opt_out",+ "posthog_team"."secret_api_token",+ "posthog_team"."secret_api_token_backup",+ "posthog_team"."session_recording_opt_in",+ "posthog_team"."session_recording_sample_rate",+ "posthog_team"."session_recording_minimum_duration_milliseconds",+ "posthog_team"."session_recording_linked_flag",+ "posthog_team"."session_recording_network_payload_capture_config",+ "posthog_team"."session_recording_masking_config",+ "posthog_team"."session_recording_url_trigger_config",+ "posthog_team"."session_recording_url_blocklist_config",+ "posthog_team"."session_recording_event_trigger_config",+ "posthog_team"."session_recording_trigger_match_type_config",+ "posthog_team"."session_recording_trigger_groups",+ "posthog_team"."session_replay_config",+ "posthog_team"."session_recording_retention_period",+ "posthog_team"."event_retention_months",+ "posthog_team"."conversations_enabled",+ "posthog_team"."conversations_settings",+ "posthog_team"."proactive_tasks_enabled",+ "posthog_team"."survey_config",+ "posthog_team"."surveys_opt_in",+ "posthog_team"."product_tours_opt_in",+ "posthog_team"."capture_console_log_opt_in",+ "posthog_team"."capture_performance_opt_in",+ "posthog_team"."capture_dead_clicks",+ "posthog_team"."autocapture_opt_out",+ "posthog_team"."autocapture_web_vitals_opt_in",+ "posthog_team"."autocapture_web_vitals_allowed_metrics",+ "posthog_team"."autocapture_exceptions_opt_in",+ "posthog_team"."autocapture_exceptions_errors_to_ignore",+ "posthog_team"."logs_settings",+ "posthog_team"."llm_gateway_enabled_at",+ "posthog_team"."llm_gateway_revoked_at",+ "posthog_team"."llm_gateway_overspend_allowance_usd",+ "posthog_team"."heatmaps_opt_in",+ "posthog_team"."receive_org_level_activity_logs",+ "posthog_team"."web_analytics_pre_aggregated_tables_enabled",+ "posthog_team"."web_analytics_pre_aggregated_tables_version",+ "posthog_team"."flags_persistence_default",+ "posthog_team"."feature_flag_confirmation_enabled",+ "posthog_team"."feature_flag_confirmation_message",+ "posthog_team"."default_evaluation_environments_enabled",+ "posthog_team"."require_evaluation_environment_tags",+ "posthog_team"."default_evaluation_contexts_enabled",+ "posthog_team"."require_evaluation_contexts",+ "posthog_team"."session_recording_version",+ "posthog_team"."signup_token",+ "posthog_team"."is_demo",+ "posthog_team"."access_control",+ "posthog_team"."week_start_day",+ "posthog_team"."inject_web_apps",+ "posthog_team"."test_account_filters",+ "posthog_team"."test_account_filters_default_checked",+ "posthog_team"."path_cleaning_filters",+ "posthog_team"."timezone",+ "posthog_team"."data_attributes",+ "posthog_team"."person_display_name_properties",+ "posthog_team"."live_events_columns",+ "posthog_team"."recording_domains",+ "posthog_team"."human_friendly_comparison_periods",+ "posthog_team"."cookieless_server_hash_mode",+ "posthog_team"."primary_dashboard_id",+ "posthog_team"."default_data_theme",+ "posthog_team"."extra_settings",+ "posthog_team"."modifiers",+ "posthog_team"."correlation_config",+ "posthog_team"."session_recording_retention_period_days",+ "posthog_team"."external_data_workspace_id",+ "posthog_team"."external_data_workspace_last_synced_at",+ "posthog_team"."api_query_rate_limit",+ "posthog_team"."drop_events_older_than",+ "posthog_team"."base_currency",+ "posthog_team"."experiment_recalculation_time",+ "posthog_team"."default_experiment_confidence_level",+ "posthog_team"."default_experiment_stats_method",+ "posthog_team"."business_model"+ FROM "posthog_team"+ WHERE "posthog_team"."id" = 99999+ LIMIT 21+ '''+# ---+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.71+ '''+ SELECT "posthog_filesystem"."team_id",+ "posthog_filesystem"."id",+ "posthog_filesystem"."path",+ "posthog_filesystem"."depth",+ "posthog_filesystem"."type",+ "posthog_filesystem"."ref",+ "posthog_filesystem"."href",+ "posthog_filesystem"."shortcut",+ "posthog_filesystem"."meta",+ "posthog_filesystem"."created_at",+ "posthog_filesystem"."created_by_id",+ "posthog_filesystem"."surface",+ "posthog_filesystem"."project_id"+ FROM "posthog_filesystem"+ WHERE (("posthog_filesystem"."surface" IS NULL+ OR "posthog_filesystem"."surface" = 'web')+ AND "posthog_filesystem"."ref" = '0001'+ AND "posthog_filesystem"."team_id" = 99999+ AND "posthog_filesystem"."type" = 'insight'+ AND NOT ("posthog_filesystem"."shortcut"+ AND "posthog_filesystem"."shortcut" IS NOT NULL))+ '''+# ---+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.72+ '''+ SELECT "posthog_organization"."id",+ "posthog_organization"."name",+ "posthog_organization"."slug",+ "posthog_organization"."logo_media_id",+ "posthog_organization"."created_at",+ "posthog_organization"."updated_at",+ "posthog_organization"."is_active",+ "posthog_organization"."is_not_active_reason",+ "posthog_organization"."session_cookie_age",+ "posthog_organization"."is_member_join_email_enabled",+ "posthog_organization"."is_ai_data_processing_approved",+ "posthog_organization"."is_ai_training_opted_in",+ "posthog_organization"."is_ai_training_locked",+ "posthog_organization"."is_ai_training_cta_shown",+ "posthog_organization"."enforce_2fa",+ "posthog_organization"."members_can_invite",+ "posthog_organization"."members_can_create_projects",+ "posthog_organization"."members_can_use_personal_api_keys",+ "posthog_organization"."allow_publicly_shared_resources",+ "posthog_organization"."default_role_id",+ "posthog_organization"."plugins_access_level",+ "posthog_organization"."for_internal_metrics",+ "posthog_organization"."default_experiment_stats_method",+ "posthog_organization"."default_anonymize_ips",+ "posthog_organization"."is_hipaa",+ "posthog_organization"."is_pending_deletion",+ "posthog_organization"."customer_id",+ "posthog_organization"."available_product_features",+ "posthog_organization"."usage",+ "posthog_organization"."never_drop_data",+ "posthog_organization"."customer_trust_scores",+ "posthog_organization"."setup_section_2_completed",+ "posthog_organization"."personalization",+ "posthog_organization"."domain_whitelist",+ "posthog_organization"."is_platform"+ FROM "posthog_organization"+ WHERE "posthog_organization"."id" = '00000000-0000-0000-0000-000000000000'::uuid+ LIMIT 21+ '''+# ---+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.73'''SELECT "posthog_team"."id","posthog_team"."uuid",@@ -14186,32 +13816,231 @@LIMIT 21'''# ----# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.89+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.74'''- SELECT "posthog_filesystem"."team_id",- "posthog_filesystem"."id",- "posthog_filesystem"."path",- "posthog_filesystem"."depth",- "posthog_filesystem"."type",- "posthog_filesystem"."ref",- "posthog_filesystem"."href",- "posthog_filesystem"."shortcut",- "posthog_filesystem"."meta",- "posthog_filesystem"."created_at",- "posthog_filesystem"."created_by_id",- "posthog_filesystem"."surface",- "posthog_filesystem"."project_id"- FROM "posthog_filesystem"- WHERE (("posthog_filesystem"."surface" IS NULL- OR "posthog_filesystem"."surface" = 'web')- AND "posthog_filesystem"."ref" = '0001'- AND "posthog_filesystem"."team_id" = 99999- AND "posthog_filesystem"."type" = 'insight'- AND NOT ("posthog_filesystem"."shortcut"- AND "posthog_filesystem"."shortcut" IS NOT NULL))+ SELECT "posthog_dashboardtile"."id",+ "posthog_dashboardtile"."dashboard_id",+ "posthog_dashboardtile"."insight_id",+ "posthog_dashboardtile"."text_id",+ "posthog_dashboardtile"."button_tile_id",+ "posthog_dashboardtile"."widget_id",+ "posthog_dashboardtile"."team_id",+ "posthog_dashboardtile"."layouts",+ "posthog_dashboardtile"."color",+ "posthog_dashboardtile"."filters_hash",+ "posthog_dashboardtile"."last_refresh",+ "posthog_dashboardtile"."refreshing",+ "posthog_dashboardtile"."refresh_attempt",+ "posthog_dashboardtile"."filters_overrides",+ "posthog_dashboardtile"."show_description",+ "posthog_dashboardtile"."transparent_background",+ "posthog_dashboardtile"."deleted"+ FROM "posthog_dashboardtile"+ INNER JOIN "posthog_dashboard" ON ("posthog_dashboardtile"."dashboard_id" = "posthog_dashboard"."id")+ WHERE (NOT ("posthog_dashboardtile"."deleted"+ AND "posthog_dashboardtile"."deleted" IS NOT NULL)+ AND NOT ("posthog_dashboard"."deleted")+ AND "posthog_dashboardtile"."insight_id" = 99999)+ '''+# ---+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.75+ '''+ SELECT "posthog_dashboardtile"."id",+ "posthog_dashboardtile"."dashboard_id",+ "posthog_dashboardtile"."insight_id",+ "posthog_dashboardtile"."text_id",+ "posthog_dashboardtile"."button_tile_id",+ "posthog_dashboardtile"."widget_id",+ "posthog_dashboardtile"."team_id",+ "posthog_dashboardtile"."layouts",+ "posthog_dashboardtile"."color",+ "posthog_dashboardtile"."filters_hash",+ "posthog_dashboardtile"."last_refresh",+ "posthog_dashboardtile"."refreshing",+ "posthog_dashboardtile"."refresh_attempt",+ "posthog_dashboardtile"."filters_overrides",+ "posthog_dashboardtile"."show_description",+ "posthog_dashboardtile"."transparent_background",+ "posthog_dashboardtile"."deleted"+ FROM "posthog_dashboardtile"+ INNER JOIN "posthog_dashboard" ON ("posthog_dashboardtile"."dashboard_id" = "posthog_dashboard"."id")+ WHERE (NOT ("posthog_dashboardtile"."deleted"+ AND "posthog_dashboardtile"."deleted" IS NOT NULL)+ AND NOT ("posthog_dashboard"."deleted")+ AND "posthog_dashboardtile"."insight_id" = 99999)+ '''+# ---+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.76+ '''+ SELECT "posthog_insightvariable"."created_by_id",+ "posthog_insightvariable"."created_at",+ "posthog_insightvariable"."updated_at",+ "posthog_insightvariable"."id",+ "posthog_insightvariable"."team_id",+ "posthog_insightvariable"."name",+ "posthog_insightvariable"."code_name",+ "posthog_insightvariable"."type",+ "posthog_insightvariable"."default_value",+ "posthog_insightvariable"."values"+ FROM "posthog_insightvariable"+ WHERE "posthog_insightvariable"."team_id" = 99999+ '''+# ---+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.77+ '''+ SELECT "posthog_dashboardtile"."dashboard_id" AS "dashboard_id"+ FROM "posthog_dashboardtile"+ INNER JOIN "posthog_dashboard" ON ("posthog_dashboardtile"."dashboard_id" = "posthog_dashboard"."id")+ WHERE (NOT ("posthog_dashboardtile"."deleted"+ AND "posthog_dashboardtile"."deleted" IS NOT NULL)+ AND NOT ("posthog_dashboard"."deleted")+ AND "posthog_dashboardtile"."insight_id" = 99999)+ '''+# ---+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.78+ '''+ SELECT "posthog_dashboard"."id",+ "posthog_dashboard"."name",+ "posthog_dashboard"."description",+ "posthog_dashboard"."team_id",+ "posthog_dashboard"."pinned",+ "posthog_dashboard"."created_at",+ "posthog_dashboard"."created_by_id",+ "posthog_dashboard"."deleted",+ "posthog_dashboard"."last_accessed_at",+ "posthog_dashboard"."last_refresh",+ "posthog_dashboard"."filters",+ "posthog_dashboard"."variables",+ "posthog_dashboard"."breakdown_colors",+ "posthog_dashboard"."data_color_theme_id",+ "posthog_dashboard"."creation_mode",+ "posthog_dashboard"."restriction_level",+ "posthog_dashboard"."quick_filter_ids",+ "posthog_dashboard"."deprecated_tags",+ "posthog_dashboard"."tags",+ "posthog_dashboard"."share_token",+ "posthog_dashboard"."is_shared"+ FROM "posthog_dashboard"+ WHERE (NOT ("posthog_dashboard"."deleted")+ AND "posthog_dashboard"."id" IN (1,+ 2,+ 3,+ 4,+ 5 /* ... */))+ '''+# ---+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.79+ '''+ SELECT "posthog_tag"."name" AS "tag__name"+ FROM "posthog_taggeditem"+ INNER JOIN "posthog_tag" ON ("posthog_taggeditem"."tag_id" = "posthog_tag"."id")+ WHERE "posthog_taggeditem"."insight_id" = 99999+ '''+# ---+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.8+ '''+ SELECT COUNT(*) AS "__count"+ FROM "posthog_dashboard"+ INNER JOIN "posthog_team" ON ("posthog_dashboard"."team_id" = "posthog_team"."id")+ WHERE (NOT ("posthog_dashboard"."deleted")+ AND ("posthog_dashboard"."team_id" =+ (SELECT U0."parent_team_id" AS "parent_team_id"+ FROM "posthog_team" U0+ WHERE U0."id" = 99999+ LIMIT 1)+ OR ("posthog_team"."parent_team_id" IS NULL+ AND "posthog_dashboard"."team_id" = 99999))+ AND NOT "posthog_dashboard"."deleted")+ '''+# ---+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.80+ '''+ SELECT "posthog_user"."id",+ "posthog_user"."password",+ "posthog_user"."last_login",+ "posthog_user"."first_name",+ "posthog_user"."last_name",+ "posthog_user"."is_staff",+ "posthog_user"."date_joined",+ "posthog_user"."uuid",+ "posthog_user"."current_organization_id",+ "posthog_user"."current_team_id",+ "posthog_user"."email",+ "posthog_user"."pending_email",+ "posthog_user"."distinct_id",+ "posthog_user"."is_email_verified",+ "posthog_user"."credentials_reviewed_at",+ "posthog_user"."requested_2fa_reset_at",+ "posthog_user"."has_seen_product_intro_for",+ "posthog_user"."strapi_id",+ "posthog_user"."is_active",+ "posthog_user"."role_at_organization",+ "posthog_user"."theme_mode",+ "posthog_user"."partial_notification_settings",+ "posthog_user"."anonymize_data",+ "posthog_user"."allow_impersonation",+ "posthog_user"."toolbar_mode",+ "posthog_user"."hedgehog_config",+ "posthog_user"."allow_sidebar_suggestions",+ "posthog_user"."shortcut_position",+ "posthog_user"."passkeys_enabled_for_2fa",+ "posthog_user"."hide_mcp_hints",+ "posthog_user"."onboarding_skipped_at",+ "posthog_user"."onboarding_skipped_reason",+ "posthog_user"."onboarding_skipped_organization_id",+ "posthog_user"."onboarding_delegated_to_invite_id",+ "posthog_user"."onboarding_delegated_to_organization_id",+ "posthog_user"."onboarding_delegation_accepted_at",+ "posthog_user"."events_column_config",+ "posthog_user"."email_opt_in"+ FROM "posthog_user"+ WHERE ("posthog_user"."is_active"+ AND "posthog_user"."id" = 99999)+ '''+# ---+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.81+ '''+ SELECT "posthog_organization"."id",+ "posthog_organization"."name",+ "posthog_organization"."slug",+ "posthog_organization"."logo_media_id",+ "posthog_organization"."created_at",+ "posthog_organization"."updated_at",+ "posthog_organization"."is_active",+ "posthog_organization"."is_not_active_reason",+ "posthog_organization"."session_cookie_age",+ "posthog_organization"."is_member_join_email_enabled",+ "posthog_organization"."is_ai_data_processing_approved",+ "posthog_organization"."is_ai_training_opted_in",+ "posthog_organization"."is_ai_training_locked",+ "posthog_organization"."is_ai_training_cta_shown",+ "posthog_organization"."enforce_2fa",+ "posthog_organization"."members_can_invite",+ "posthog_organization"."members_can_create_projects",+ "posthog_organization"."members_can_use_personal_api_keys",+ "posthog_organization"."allow_publicly_shared_resources",+ "posthog_organization"."default_role_id",+ "posthog_organization"."plugins_access_level",+ "posthog_organization"."for_internal_metrics",+ "posthog_organization"."default_experiment_stats_method",+ "posthog_organization"."default_anonymize_ips",+ "posthog_organization"."is_hipaa",+ "posthog_organization"."is_pending_deletion",+ "posthog_organization"."customer_id",+ "posthog_organization"."available_product_features",+ "posthog_organization"."usage",+ "posthog_organization"."never_drop_data",+ "posthog_organization"."customer_trust_scores",+ "posthog_organization"."setup_section_2_completed",+ "posthog_organization"."personalization",+ "posthog_organization"."domain_whitelist",+ "posthog_organization"."is_platform"+ FROM "posthog_organization"+ WHERE "posthog_organization"."id" = '00000000-0000-0000-0000-000000000000'::uuid+ LIMIT 21'''# ----# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.9+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.82'''SELECT "posthog_team"."id","posthog_team"."uuid",@@ -14307,151 +14136,244 @@"posthog_team"."experiment_recalculation_time","posthog_team"."default_experiment_confidence_level","posthog_team"."default_experiment_stats_method",- "posthog_team"."business_model"+ "posthog_team"."business_model",+ "posthog_organization"."id",+ "posthog_organization"."name",+ "posthog_organization"."slug",+ "posthog_organization"."logo_media_id",+ "posthog_organization"."created_at",+ "posthog_organization"."updated_at",+ "posthog_organization"."is_active",+ "posthog_organization"."is_not_active_reason",+ "posthog_organization"."session_cookie_age",+ "posthog_organization"."is_member_join_email_enabled",+ "posthog_organization"."is_ai_data_processing_approved",+ "posthog_organization"."is_ai_training_opted_in",+ "posthog_organization"."is_ai_training_locked",+ "posthog_organization"."is_ai_training_cta_shown",+ "posthog_organization"."enforce_2fa",+ "posthog_organization"."members_can_invite",+ "posthog_organization"."members_can_create_projects",+ "posthog_organization"."members_can_use_personal_api_keys",+ "posthog_organization"."allow_publicly_shared_resources",+ "posthog_organization"."default_role_id",+ "posthog_organization"."plugins_access_level",+ "posthog_organization"."for_internal_metrics",+ "posthog_organization"."default_experiment_stats_method",+ "posthog_organization"."default_anonymize_ips",+ "posthog_organization"."is_hipaa",+ "posthog_organization"."is_pending_deletion",+ "posthog_organization"."customer_id",+ "posthog_organization"."available_product_features",+ "posthog_organization"."usage",+ "posthog_organization"."never_drop_data",+ "posthog_organization"."customer_trust_scores",+ "posthog_organization"."setup_section_2_completed",+ "posthog_organization"."personalization",+ "posthog_organization"."domain_whitelist",+ "posthog_organization"."is_platform"FROM "posthog_team"+ INNER JOIN "posthog_organization" ON ("posthog_team"."organization_id" = "posthog_organization"."id")WHERE "posthog_team"."id" = 99999LIMIT 21'''# ----# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.90+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.83'''- SELECT "posthog_team"."id",- "posthog_team"."uuid",- "posthog_team"."organization_id",- "posthog_team"."parent_team_id",- "posthog_team"."project_id",- "posthog_team"."api_token",- "posthog_team"."app_urls",- "posthog_team"."name",- "posthog_team"."slack_incoming_webhook",- "posthog_team"."created_at",- "posthog_team"."updated_at",- "posthog_team"."anonymize_ips",- "posthog_team"."completed_snippet_onboarding",- "posthog_team"."has_completed_onboarding_for",- "posthog_team"."onboarding_tasks",- "posthog_team"."ingested_event",- "posthog_team"."ingested_production_event",- "posthog_team"."ingested_production_event_last_checked_at",- "posthog_team"."person_processing_opt_out",- "posthog_team"."secret_api_token",- "posthog_team"."secret_api_token_backup",- "posthog_team"."session_recording_opt_in",- "posthog_team"."session_recording_sample_rate",- "posthog_team"."session_recording_minimum_duration_milliseconds",- "posthog_team"."session_recording_linked_flag",- "posthog_team"."session_recording_network_payload_capture_config",- "posthog_team"."session_recording_masking_config",- "posthog_team"."session_recording_url_trigger_config",- "posthog_team"."session_recording_url_blocklist_config",- "posthog_team"."session_recording_event_trigger_config",- "posthog_team"."session_recording_trigger_match_type_config",- "posthog_team"."session_recording_trigger_groups",- "posthog_team"."session_replay_config",- "posthog_team"."session_recording_retention_period",- "posthog_team"."event_retention_months",- "posthog_team"."conversations_enabled",- "posthog_team"."conversations_settings",- "posthog_team"."proactive_tasks_enabled",- "posthog_team"."survey_config",- "posthog_team"."surveys_opt_in",- "posthog_team"."product_tours_opt_in",- "posthog_team"."capture_console_log_opt_in",- "posthog_team"."capture_performance_opt_in",- "posthog_team"."capture_dead_clicks",- "posthog_team"."autocapture_opt_out",- "posthog_team"."autocapture_web_vitals_opt_in",- "posthog_team"."autocapture_web_vitals_allowed_metrics",- "posthog_team"."autocapture_exceptions_opt_in",- "posthog_team"."autocapture_exceptions_errors_to_ignore",- "posthog_team"."logs_settings",- "posthog_team"."llm_gateway_enabled_at",- "posthog_team"."llm_gateway_revoked_at",- "posthog_team"."llm_gateway_overspend_allowance_usd",- "posthog_team"."heatmaps_opt_in",- "posthog_team"."receive_org_level_activity_logs",- "posthog_team"."web_analytics_pre_aggregated_tables_enabled",- "posthog_team"."web_analytics_pre_aggregated_tables_version",- "posthog_team"."flags_persistence_default",- "posthog_team"."feature_flag_confirmation_enabled",- "posthog_team"."feature_flag_confirmation_message",- "posthog_team"."default_evaluation_environments_enabled",- "posthog_team"."require_evaluation_environment_tags",- "posthog_team"."default_evaluation_contexts_enabled",- "posthog_team"."require_evaluation_contexts",- "posthog_team"."session_recording_version",- "posthog_team"."signup_token",- "posthog_team"."is_demo",- "posthog_team"."access_control",- "posthog_team"."week_start_day",- "posthog_team"."inject_web_apps",- "posthog_team"."test_account_filters",- "posthog_team"."test_account_filters_default_checked",- "posthog_team"."path_cleaning_filters",- "posthog_team"."timezone",- "posthog_team"."data_attributes",- "posthog_team"."person_display_name_properties",- "posthog_team"."live_events_columns",- "posthog_team"."recording_domains",- "posthog_team"."human_friendly_comparison_periods",- "posthog_team"."cookieless_server_hash_mode",- "posthog_team"."primary_dashboard_id",- "posthog_team"."default_data_theme",- "posthog_team"."extra_settings",- "posthog_team"."modifiers",- "posthog_team"."correlation_config",- "posthog_team"."session_recording_retention_period_days",- "posthog_team"."external_data_workspace_id",- "posthog_team"."external_data_workspace_last_synced_at",- "posthog_team"."api_query_rate_limit",- "posthog_team"."drop_events_older_than",- "posthog_team"."base_currency",- "posthog_team"."experiment_recalculation_time",- "posthog_team"."default_experiment_confidence_level",- "posthog_team"."default_experiment_stats_method",- "posthog_team"."business_model"- FROM "posthog_team"- WHERE "posthog_team"."id" = 99999+ SELECT "posthog_organizationmembership"."id",+ "posthog_organizationmembership"."organization_id",+ "posthog_organizationmembership"."user_id",+ "posthog_organizationmembership"."level",+ "posthog_organizationmembership"."joined_at",+ "posthog_organizationmembership"."updated_at",+ "posthog_organizationmembership"."invited_by_id",+ "posthog_organization"."id",+ "posthog_organization"."name",+ "posthog_organization"."slug",+ "posthog_organization"."logo_media_id",+ "posthog_organization"."created_at",+ "posthog_organization"."updated_at",+ "posthog_organization"."is_active",+ "posthog_organization"."is_not_active_reason",+ "posthog_organization"."session_cookie_age",+ "posthog_organization"."is_member_join_email_enabled",+ "posthog_organization"."is_ai_data_processing_approved",+ "posthog_organization"."is_ai_training_opted_in",+ "posthog_organization"."is_ai_training_locked",+ "posthog_organization"."is_ai_training_cta_shown",+ "posthog_organization"."enforce_2fa",+ "posthog_organization"."members_can_invite",+ "posthog_organization"."members_can_create_projects",+ "posthog_organization"."members_can_use_personal_api_keys",+ "posthog_organization"."allow_publicly_shared_resources",+ "posthog_organization"."default_role_id",+ "posthog_organization"."plugins_access_level",+ "posthog_organization"."for_internal_metrics",+ "posthog_organization"."default_experiment_stats_method",+ "posthog_organization"."default_anonymize_ips",+ "posthog_organization"."is_hipaa",+ "posthog_organization"."is_pending_deletion",+ "posthog_organization"."customer_id",+ "posthog_organization"."available_product_features",+ "posthog_organization"."usage",+ "posthog_organization"."never_drop_data",+ "posthog_organization"."customer_trust_scores",+ "posthog_organization"."setup_section_2_completed",+ "posthog_organization"."personalization",+ "posthog_organization"."domain_whitelist",+ "posthog_organization"."is_platform"+ FROM "posthog_organizationmembership"+ INNER JOIN "posthog_organization" ON ("posthog_organizationmembership"."organization_id" = "posthog_organization"."id")+ WHERE ("posthog_organizationmembership"."organization_id" = '00000000-0000-0000-0000-000000000000'::uuid+ AND "posthog_organizationmembership"."user_id" = 99999)LIMIT 21'''# ----# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.91+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.84+ '''+ SELECT "ee_accesscontrol"."id",+ "ee_accesscontrol"."team_id",+ "ee_accesscontrol"."access_level",+ "ee_accesscontrol"."resource",+ "ee_accesscontrol"."resource_id",+ "ee_accesscontrol"."organization_member_id",+ "ee_accesscontrol"."role_id",+ "ee_accesscontrol"."created_by_id",+ "ee_accesscontrol"."created_at",+ "ee_accesscontrol"."updated_at",+ "posthog_team"."organization_id" AS "_team_organization_id"+ FROM "ee_accesscontrol"+ INNER JOIN "posthog_team" ON ("ee_accesscontrol"."team_id" = "posthog_team"."id")+ LEFT OUTER JOIN "posthog_organizationmembership" ON ("ee_accesscontrol"."organization_member_id" = "posthog_organizationmembership"."id")+ WHERE (("ee_accesscontrol"."organization_member_id" IS NULL+ AND "ee_accesscontrol"."role_id" IS NULL+ AND "ee_accesscontrol"."team_id" = 99999)+ OR ("posthog_organizationmembership"."user_id" = 99999+ AND "ee_accesscontrol"."role_id" IS NULL+ AND "ee_accesscontrol"."team_id" = 99999))+ '''+# ---+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.85+ '''+ SELECT "posthog_organizationmembership"."id",+ "posthog_organizationmembership"."organization_id",+ "posthog_organizationmembership"."user_id",+ "posthog_organizationmembership"."level",+ "posthog_organizationmembership"."joined_at",+ "posthog_organizationmembership"."updated_at",+ "posthog_organizationmembership"."invited_by_id",+ "posthog_organization"."id",+ "posthog_organization"."name",+ "posthog_organization"."slug",+ "posthog_organization"."logo_media_id",+ "posthog_organization"."created_at",+ "posthog_organization"."updated_at",+ "posthog_organization"."is_active",+ "posthog_organization"."is_not_active_reason",+ "posthog_organization"."session_cookie_age",+ "posthog_organization"."is_member_join_email_enabled",+ "posthog_organization"."is_ai_data_processing_approved",+ "posthog_organization"."is_ai_training_opted_in",+ "posthog_organization"."is_ai_training_locked",+ "posthog_organization"."is_ai_training_cta_shown",+ "posthog_organization"."enforce_2fa",+ "posthog_organization"."members_can_invite",+ "posthog_organization"."members_can_create_projects",+ "posthog_organization"."members_can_use_personal_api_keys",+ "posthog_organization"."allow_publicly_shared_resources",+ "posthog_organization"."default_role_id",+ "posthog_organization"."plugins_access_level",+ "posthog_organization"."for_internal_metrics",+ "posthog_organization"."default_experiment_stats_method",+ "posthog_organization"."default_anonymize_ips",+ "posthog_organization"."is_hipaa",+ "posthog_organization"."is_pending_deletion",+ "posthog_organization"."customer_id",+ "posthog_organization"."available_product_features",+ "posthog_organization"."usage",+ "posthog_organization"."never_drop_data",+ "posthog_organization"."customer_trust_scores",+ "posthog_organization"."setup_section_2_completed",+ "posthog_organization"."personalization",+ "posthog_organization"."domain_whitelist",+ "posthog_organization"."is_platform"+ FROM "posthog_organizationmembership"+ INNER JOIN "posthog_organization" ON ("posthog_organizationmembership"."organization_id" = "posthog_organization"."id")+ WHERE "posthog_organizationmembership"."user_id" = 99999+ '''+# ---+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.86'''- SELECT "posthog_dashboarditem"."id",- "posthog_dashboarditem"."name",- "posthog_dashboarditem"."derived_name",- "posthog_dashboarditem"."description",- "posthog_dashboarditem"."team_id",- "posthog_dashboarditem"."filters",- "posthog_dashboarditem"."filters_hash",- "posthog_dashboarditem"."query",- "posthog_dashboarditem"."query_metadata",- "posthog_dashboarditem"."order",- "posthog_dashboarditem"."deleted",- "posthog_dashboarditem"."saved",- "posthog_dashboarditem"."created_at",- "posthog_dashboarditem"."refreshing",- "posthog_dashboarditem"."created_by_id",- "posthog_dashboarditem"."is_sample",- "posthog_dashboarditem"."short_id",- "posthog_dashboarditem"."favorited",- "posthog_dashboarditem"."refresh_attempt",- "posthog_dashboarditem"."last_modified_at",- "posthog_dashboarditem"."last_modified_by_id",- "posthog_dashboarditem"."dashboard_id",- "posthog_dashboarditem"."last_refresh",- "posthog_dashboarditem"."layouts",- "posthog_dashboarditem"."color",- "posthog_dashboarditem"."dive_dashboard_id",- "posthog_dashboarditem"."updated_at",- "posthog_dashboarditem"."deprecated_tags",- "posthog_dashboarditem"."tags"- FROM "posthog_dashboarditem"- WHERE "posthog_dashboarditem"."id" = 99999+ SELECT "ee_accesscontrol"."team_id" AS "team_id",+ "ee_accesscontrol"."resource_id" AS "resource_id",+ "ee_accesscontrol"."organization_member_id" AS "organization_member_id",+ "ee_accesscontrol"."role_id" AS "role_id",+ "ee_accesscontrol"."access_level" AS "access_level"+ FROM "ee_accesscontrol"+ INNER JOIN "posthog_team" ON ("ee_accesscontrol"."team_id" = "posthog_team"."id")+ WHERE ("ee_accesscontrol"."resource" = 'project'+ AND "posthog_team"."organization_id" IN ('00000000-0000-0000-0000-000000000000'::uuid))+ '''+# ---+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.87+ '''+ SELECT "ee_rolemembership"."organization_member_id" AS "organization_member_id",+ "ee_rolemembership"."role_id" AS "role_id"+ FROM "ee_rolemembership"+ WHERE "ee_rolemembership"."user_id" = 99999+ '''+# ---+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.88+ '''+ SELECT "posthog_dashboard"."id",+ "posthog_dashboard"."name",+ "posthog_dashboard"."description",+ "posthog_dashboard"."team_id",+ "posthog_dashboard"."pinned",+ "posthog_dashboard"."created_at",+ "posthog_dashboard"."created_by_id",+ "posthog_dashboard"."deleted",+ "posthog_dashboard"."last_accessed_at",+ "posthog_dashboard"."last_refresh",+ "posthog_dashboard"."filters",+ "posthog_dashboard"."variables",+ "posthog_dashboard"."breakdown_colors",+ "posthog_dashboard"."data_color_theme_id",+ "posthog_dashboard"."creation_mode",+ "posthog_dashboard"."restriction_level",+ "posthog_dashboard"."quick_filter_ids",+ "posthog_dashboard"."deprecated_tags",+ "posthog_dashboard"."tags",+ "posthog_dashboard"."share_token",+ "posthog_dashboard"."is_shared"+ FROM "posthog_dashboard"+ INNER JOIN "posthog_team" ON ("posthog_dashboard"."team_id" = "posthog_team"."id")+ WHERE (NOT ("posthog_dashboard"."deleted")+ AND ("posthog_dashboard"."team_id" =+ (SELECT U0."parent_team_id" AS "parent_team_id"+ FROM "posthog_team" U0+ WHERE U0."id" = 99999+ LIMIT 1)+ OR ("posthog_team"."parent_team_id" IS NULL+ AND "posthog_dashboard"."team_id" = 99999))+ AND "posthog_dashboard"."id" = 99999)LIMIT 21'''# ----# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.92+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.89+ '''+ SELECT COUNT(*) AS "__count"+ FROM "posthog_dashboardtile"+ INNER JOIN "posthog_dashboard" ON ("posthog_dashboardtile"."dashboard_id" = "posthog_dashboard"."id")+ WHERE (NOT ("posthog_dashboardtile"."deleted"+ AND "posthog_dashboardtile"."deleted" IS NOT NULL)+ AND NOT ("posthog_dashboard"."deleted")+ AND "posthog_dashboardtile"."dashboard_id" = 99999+ AND NOT ("posthog_dashboardtile"."deleted"+ AND "posthog_dashboardtile"."deleted" IS NOT NULL))+ '''+# ---+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.9'''SELECT "posthog_team"."id","posthog_team"."uuid",@@ -14553,49 +14475,39 @@LIMIT 21'''# ----# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.93+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.90'''- SELECT "posthog_organization"."id",- "posthog_organization"."name",- "posthog_organization"."slug",- "posthog_organization"."logo_media_id",- "posthog_organization"."created_at",- "posthog_organization"."updated_at",- "posthog_organization"."is_active",- "posthog_organization"."is_not_active_reason",- "posthog_organization"."session_cookie_age",- "posthog_organization"."is_member_join_email_enabled",- "posthog_organization"."is_ai_data_processing_approved",- "posthog_organization"."is_ai_training_opted_in",- "posthog_organization"."is_ai_training_locked",- "posthog_organization"."is_ai_training_cta_shown",- "posthog_organization"."enforce_2fa",- "posthog_organization"."members_can_invite",- "posthog_organization"."members_can_create_projects",- "posthog_organization"."members_can_use_personal_api_keys",- "posthog_organization"."allow_publicly_shared_resources",- "posthog_organization"."default_role_id",- "posthog_organization"."plugins_access_level",- "posthog_organization"."for_internal_metrics",- "posthog_organization"."default_experiment_stats_method",- "posthog_organization"."default_anonymize_ips",- "posthog_organization"."is_hipaa",- "posthog_organization"."is_pending_deletion",- "posthog_organization"."customer_id",- "posthog_organization"."available_product_features",- "posthog_organization"."usage",- "posthog_organization"."never_drop_data",- "posthog_organization"."customer_trust_scores",- "posthog_organization"."setup_section_2_completed",- "posthog_organization"."personalization",- "posthog_organization"."domain_whitelist",- "posthog_organization"."is_platform"- FROM "posthog_organization"- WHERE "posthog_organization"."id" = '00000000-0000-0000-0000-000000000000'::uuid- LIMIT 21+ SELECT "posthog_dashboard"."id",+ "posthog_dashboard"."name",+ "posthog_dashboard"."description",+ "posthog_dashboard"."team_id",+ "posthog_dashboard"."pinned",+ "posthog_dashboard"."created_at",+ "posthog_dashboard"."created_by_id",+ "posthog_dashboard"."deleted",+ "posthog_dashboard"."last_accessed_at",+ "posthog_dashboard"."last_refresh",+ "posthog_dashboard"."filters",+ "posthog_dashboard"."variables",+ "posthog_dashboard"."breakdown_colors",+ "posthog_dashboard"."data_color_theme_id",+ "posthog_dashboard"."creation_mode",+ "posthog_dashboard"."restriction_level",+ "posthog_dashboard"."quick_filter_ids",+ "posthog_dashboard"."deprecated_tags",+ "posthog_dashboard"."tags",+ "posthog_dashboard"."share_token",+ "posthog_dashboard"."is_shared"+ FROM "posthog_dashboard"+ WHERE (NOT ("posthog_dashboard"."deleted")+ AND "posthog_dashboard"."id" IN (1,+ 2,+ 3,+ 4,+ 5 /* ... */))'''# ----# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.94+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.91'''SELECT "posthog_team"."id","posthog_team"."uuid",@@ -14697,95 +14609,74 @@LIMIT 21'''# ----# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.95- '''- SELECT "posthog_dashboardtile"."id",- "posthog_dashboardtile"."dashboard_id",- "posthog_dashboardtile"."insight_id",- "posthog_dashboardtile"."text_id",- "posthog_dashboardtile"."button_tile_id",- "posthog_dashboardtile"."widget_id",- "posthog_dashboardtile"."team_id",- "posthog_dashboardtile"."layouts",- "posthog_dashboardtile"."color",- "posthog_dashboardtile"."filters_hash",- "posthog_dashboardtile"."last_refresh",- "posthog_dashboardtile"."refreshing",- "posthog_dashboardtile"."refresh_attempt",- "posthog_dashboardtile"."filters_overrides",- "posthog_dashboardtile"."show_description",- "posthog_dashboardtile"."transparent_background",- "posthog_dashboardtile"."deleted"- FROM "posthog_dashboardtile"- WHERE "posthog_dashboardtile"."id" = 99999- LIMIT 21- '''-# ----# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.96+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.92'''- SELECT "posthog_dashboarditem"."id",- "posthog_dashboarditem"."name",- "posthog_dashboarditem"."derived_name",- "posthog_dashboarditem"."description",- "posthog_dashboarditem"."team_id",- "posthog_dashboarditem"."filters",- "posthog_dashboarditem"."filters_hash",- "posthog_dashboarditem"."query",- "posthog_dashboarditem"."query_metadata",- "posthog_dashboarditem"."order",- "posthog_dashboarditem"."deleted",- "posthog_dashboarditem"."saved",- "posthog_dashboarditem"."created_at",- "posthog_dashboarditem"."refreshing",- "posthog_dashboarditem"."created_by_id",- "posthog_dashboarditem"."is_sample",- "posthog_dashboarditem"."short_id",- "posthog_dashboarditem"."favorited",- "posthog_dashboarditem"."refresh_attempt",- "posthog_dashboarditem"."last_modified_at",- "posthog_dashboarditem"."last_modified_by_id",- "posthog_dashboarditem"."dashboard_id",- "posthog_dashboarditem"."last_refresh",- "posthog_dashboarditem"."layouts",- "posthog_dashboarditem"."color",- "posthog_dashboarditem"."dive_dashboard_id",- "posthog_dashboarditem"."updated_at",- "posthog_dashboarditem"."deprecated_tags",- "posthog_dashboarditem"."tags"- FROM "posthog_dashboarditem"- WHERE "posthog_dashboarditem"."id" = 99999- LIMIT 21+ SELECT "posthog_filesystem"."team_id",+ "posthog_filesystem"."id",+ "posthog_filesystem"."path",+ "posthog_filesystem"."depth",+ "posthog_filesystem"."type",+ "posthog_filesystem"."ref",+ "posthog_filesystem"."href",+ "posthog_filesystem"."shortcut",+ "posthog_filesystem"."meta",+ "posthog_filesystem"."created_at",+ "posthog_filesystem"."created_by_id",+ "posthog_filesystem"."surface",+ "posthog_filesystem"."project_id"+ FROM "posthog_filesystem"+ WHERE (("posthog_filesystem"."surface" IS NULL+ OR "posthog_filesystem"."surface" = 'web')+ AND "posthog_filesystem"."ref" = '0001'+ AND "posthog_filesystem"."team_id" = 99999+ AND "posthog_filesystem"."type" = 'insight'+ AND NOT ("posthog_filesystem"."shortcut"+ AND "posthog_filesystem"."shortcut" IS NOT NULL))'''# ----# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.97+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.93'''- SELECT "posthog_dashboard"."id",- "posthog_dashboard"."name",- "posthog_dashboard"."description",- "posthog_dashboard"."team_id",- "posthog_dashboard"."pinned",- "posthog_dashboard"."created_at",- "posthog_dashboard"."created_by_id",- "posthog_dashboard"."deleted",- "posthog_dashboard"."last_accessed_at",- "posthog_dashboard"."last_refresh",- "posthog_dashboard"."filters",- "posthog_dashboard"."variables",- "posthog_dashboard"."breakdown_colors",- "posthog_dashboard"."data_color_theme_id",- "posthog_dashboard"."creation_mode",- "posthog_dashboard"."restriction_level",- "posthog_dashboard"."quick_filter_ids",- "posthog_dashboard"."deprecated_tags",- "posthog_dashboard"."tags",- "posthog_dashboard"."share_token",- "posthog_dashboard"."is_shared"- FROM "posthog_dashboard"- WHERE "posthog_dashboard"."id" = 99999+ SELECT "posthog_organization"."id",+ "posthog_organization"."name",+ "posthog_organization"."slug",+ "posthog_organization"."logo_media_id",+ "posthog_organization"."created_at",+ "posthog_organization"."updated_at",+ "posthog_organization"."is_active",+ "posthog_organization"."is_not_active_reason",+ "posthog_organization"."session_cookie_age",+ "posthog_organization"."is_member_join_email_enabled",+ "posthog_organization"."is_ai_data_processing_approved",+ "posthog_organization"."is_ai_training_opted_in",+ "posthog_organization"."is_ai_training_locked",+ "posthog_organization"."is_ai_training_cta_shown",+ "posthog_organization"."enforce_2fa",+ "posthog_organization"."members_can_invite",+ "posthog_organization"."members_can_create_projects",+ "posthog_organization"."members_can_use_personal_api_keys",+ "posthog_organization"."allow_publicly_shared_resources",+ "posthog_organization"."default_role_id",+ "posthog_organization"."plugins_access_level",+ "posthog_organization"."for_internal_metrics",+ "posthog_organization"."default_experiment_stats_method",+ "posthog_organization"."default_anonymize_ips",+ "posthog_organization"."is_hipaa",+ "posthog_organization"."is_pending_deletion",+ "posthog_organization"."customer_id",+ "posthog_organization"."available_product_features",+ "posthog_organization"."usage",+ "posthog_organization"."never_drop_data",+ "posthog_organization"."customer_trust_scores",+ "posthog_organization"."setup_section_2_completed",+ "posthog_organization"."personalization",+ "posthog_organization"."domain_whitelist",+ "posthog_organization"."is_platform"+ FROM "posthog_organization"+ WHERE "posthog_organization"."id" = '00000000-0000-0000-0000-000000000000'::uuidLIMIT 21'''# ----# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.98+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.94'''SELECT "posthog_team"."id","posthog_team"."uuid",@@ -14887,85 +14778,88 @@LIMIT 21'''# ----# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.99+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.95'''- SELECT "posthog_organization"."id",- "posthog_organization"."name",- "posthog_organization"."slug",- "posthog_organization"."logo_media_id",- "posthog_organization"."created_at",- "posthog_organization"."updated_at",- "posthog_organization"."is_active",- "posthog_organization"."is_not_active_reason",- "posthog_organization"."session_cookie_age",- "posthog_organization"."is_member_join_email_enabled",- "posthog_organization"."is_ai_data_processing_approved",- "posthog_organization"."is_ai_training_opted_in",- "posthog_organization"."is_ai_training_locked",- "posthog_organization"."is_ai_training_cta_shown",- "posthog_organization"."enforce_2fa",- "posthog_organization"."members_can_invite",- "posthog_organization"."members_can_create_projects",- "posthog_organization"."members_can_use_personal_api_keys",- "posthog_organization"."allow_publicly_shared_resources",- "posthog_organization"."default_role_id",- "posthog_organization"."plugins_access_level",- "posthog_organization"."for_internal_metrics",- "posthog_organization"."default_experiment_stats_method",- "posthog_organization"."default_anonymize_ips",- "posthog_organization"."is_hipaa",- "posthog_organization"."is_pending_deletion",- "posthog_organization"."customer_id",- "posthog_organization"."available_product_features",- "posthog_organization"."usage",- "posthog_organization"."never_drop_data",- "posthog_organization"."customer_trust_scores",- "posthog_organization"."setup_section_2_completed",- "posthog_organization"."personalization",- "posthog_organization"."domain_whitelist",- "posthog_organization"."is_platform"- FROM "posthog_organization"- WHERE "posthog_organization"."id" = '00000000-0000-0000-0000-000000000000'::uuid- LIMIT 21+ SELECT "posthog_dashboardtile"."id",+ "posthog_dashboardtile"."dashboard_id",+ "posthog_dashboardtile"."insight_id",+ "posthog_dashboardtile"."text_id",+ "posthog_dashboardtile"."button_tile_id",+ "posthog_dashboardtile"."widget_id",+ "posthog_dashboardtile"."team_id",+ "posthog_dashboardtile"."layouts",+ "posthog_dashboardtile"."color",+ "posthog_dashboardtile"."filters_hash",+ "posthog_dashboardtile"."last_refresh",+ "posthog_dashboardtile"."refreshing",+ "posthog_dashboardtile"."refresh_attempt",+ "posthog_dashboardtile"."filters_overrides",+ "posthog_dashboardtile"."show_description",+ "posthog_dashboardtile"."transparent_background",+ "posthog_dashboardtile"."deleted"+ FROM "posthog_dashboardtile"+ INNER JOIN "posthog_dashboard" ON ("posthog_dashboardtile"."dashboard_id" = "posthog_dashboard"."id")+ WHERE (NOT ("posthog_dashboardtile"."deleted"+ AND "posthog_dashboardtile"."deleted" IS NOT NULL)+ AND NOT ("posthog_dashboard"."deleted")+ AND "posthog_dashboardtile"."insight_id" = 99999)'''# ----# name: TestDashboard.test_retrieve_dashboard+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.96'''- SELECT "posthog_filesystem"."team_id",- "posthog_filesystem"."id",- "posthog_filesystem"."path",- "posthog_filesystem"."depth",- "posthog_filesystem"."type",- "posthog_filesystem"."ref",- "posthog_filesystem"."href",- "posthog_filesystem"."shortcut",- "posthog_filesystem"."meta",- "posthog_filesystem"."created_at",- "posthog_filesystem"."created_by_id",- "posthog_filesystem"."surface",- "posthog_filesystem"."project_id"- FROM "posthog_filesystem"- WHERE (("posthog_filesystem"."surface" IS NULL- OR "posthog_filesystem"."surface" = 'web')- AND "posthog_filesystem"."ref" = '0001'- AND "posthog_filesystem"."team_id" = 99999- AND "posthog_filesystem"."type" = 'dashboard'- AND NOT ("posthog_filesystem"."shortcut"- AND "posthog_filesystem"."shortcut" IS NOT NULL))+ SELECT "posthog_dashboardtile"."id",+ "posthog_dashboardtile"."dashboard_id",+ "posthog_dashboardtile"."insight_id",+ "posthog_dashboardtile"."text_id",+ "posthog_dashboardtile"."button_tile_id",+ "posthog_dashboardtile"."widget_id",+ "posthog_dashboardtile"."team_id",+ "posthog_dashboardtile"."layouts",+ "posthog_dashboardtile"."color",+ "posthog_dashboardtile"."filters_hash",+ "posthog_dashboardtile"."last_refresh",+ "posthog_dashboardtile"."refreshing",+ "posthog_dashboardtile"."refresh_attempt",+ "posthog_dashboardtile"."filters_overrides",+ "posthog_dashboardtile"."show_description",+ "posthog_dashboardtile"."transparent_background",+ "posthog_dashboardtile"."deleted"+ FROM "posthog_dashboardtile"+ INNER JOIN "posthog_dashboard" ON ("posthog_dashboardtile"."dashboard_id" = "posthog_dashboard"."id")+ WHERE (NOT ("posthog_dashboardtile"."deleted"+ AND "posthog_dashboardtile"."deleted" IS NOT NULL)+ AND NOT ("posthog_dashboard"."deleted")+ AND "posthog_dashboardtile"."insight_id" = 99999)'''# ----# name: TestDashboard.test_retrieve_dashboard.1+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.97+ '''+ SELECT "posthog_insightvariable"."created_by_id",+ "posthog_insightvariable"."created_at",+ "posthog_insightvariable"."updated_at",+ "posthog_insightvariable"."id",+ "posthog_insightvariable"."team_id",+ "posthog_insightvariable"."name",+ "posthog_insightvariable"."code_name",+ "posthog_insightvariable"."type",+ "posthog_insightvariable"."default_value",+ "posthog_insightvariable"."values"+ FROM "posthog_insightvariable"+ WHERE "posthog_insightvariable"."team_id" = 99999+ '''+# ---+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.98'''- SELECT "posthog_dashboardtile"."id" AS "pk"+ SELECT "posthog_dashboardtile"."dashboard_id" AS "dashboard_id"FROM "posthog_dashboardtile"INNER JOIN "posthog_dashboard" ON ("posthog_dashboardtile"."dashboard_id" = "posthog_dashboard"."id")WHERE (NOT ("posthog_dashboardtile"."deleted"AND "posthog_dashboardtile"."deleted" IS NOT NULL)AND NOT ("posthog_dashboard"."deleted")- AND "posthog_dashboardtile"."dashboard_id" = 99999)+ AND "posthog_dashboardtile"."insight_id" = 99999)'''# ----# name: TestDashboard.test_retrieve_dashboard.10+# name: TestDashboard.test_loading_individual_dashboard_does_not_prefetch_all_possible_tiles.99'''SELECT "posthog_dashboard"."id","posthog_dashboard"."name",@@ -14985,76 +14879,89 @@"posthog_dashboard"."restriction_level","posthog_dashboard"."quick_filter_ids","posthog_dashboard"."deprecated_tags",- "posthog_dashboard"."tags",- "posthog_dashboard"."share_token",- "posthog_dashboard"."is_shared",- recent_dashboard_views."viewed_at" AS "last_viewed_at",- ("posthog_dashboard"."id")::varchar AS "_ref_id",-- (SELECT U0."path" AS "path"- FROM "posthog_filesystem" U0- WHERE ((U0."surface" IS NULL- OR U0."surface" = 'web')- AND U0."ref" = ("posthog_dashboard"."id")::varchar- AND U0."team_id" = ("posthog_dashboard"."team_id")- AND U0."type" = 'dashboard'- AND NOT (U0."shortcut"- AND U0."shortcut" IS NOT NULL))- ORDER BY U0."id" ASC- LIMIT 1) AS "_folder_path",- T6."id",- T6."password",- T6."last_login",- T6."first_name",- T6."last_name",- T6."is_staff",- T6."date_joined",- T6."uuid",- T6."current_organization_id",- T6."current_team_id",- T6."email",- T6."pending_email",- T6."distinct_id",- T6."is_email_verified",- T6."credentials_reviewed_at",- T6."requested_password_reset_at",- T6."requested_2fa_reset_at",- T6."has_seen_product_intro_for",- T6."strapi_id",- T6."is_active",- T6."role_at_organization",- T6."theme_mode",- T6."partial_notification_settings",- T6."anonymize_data",- T6."allow_impersonation",- T6."toolbar_mode",- T6."hedgehog_config",- T6."allow_sidebar_suggestions",- T6."shortcut_position",- T6."passkeys_enabled_for_2fa",- T6."hide_mcp_hints",- T6."onboarding_skipped_at",- T6."onboarding_skipped_reason",- T6."onboarding_skipped_organization_id",- T6."onboarding_delegated_to_invite_id",- T6."onboarding_delegated_to_organization_id",- T6."onboarding_delegation_accepted_at",- T6."events_column_config",- T6."email_opt_in"+ "posthog_dashboard"."tags",+ "posthog_dashboard"."share_token",+ "posthog_dashboard"."is_shared"FROM "posthog_dashboard"- INNER JOIN "posthog_team" ON ("posthog_dashboard"."team_id" = "posthog_team"."id")- 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+ WHERE (NOT ("posthog_dashboard"."deleted")+ AND "posthog_dashboard"."id" IN (1,+ 2,+ 3,+ 4,+ 5 /* ... */))'''# ----# name: TestDashboard.test_retrieve_dashboard.11+# name: TestDashboard.test_retrieve_dashboard+ '''+ SELECT "posthog_filesystem"."team_id",+ "posthog_filesystem"."id",+ "posthog_filesystem"."path",+ "posthog_filesystem"."depth",+ "posthog_filesystem"."type",+ "posthog_filesystem"."ref",+ "posthog_filesystem"."href",+ "posthog_filesystem"."shortcut",+ "posthog_filesystem"."meta",+ "posthog_filesystem"."created_at",+ "posthog_filesystem"."created_by_id",+ "posthog_filesystem"."surface",+ "posthog_filesystem"."project_id"+ FROM "posthog_filesystem"+ WHERE (("posthog_filesystem"."surface" IS NULL+ OR "posthog_filesystem"."surface" = 'web')+ AND "posthog_filesystem"."ref" = '0001'+ AND "posthog_filesystem"."team_id" = 99999+ AND "posthog_filesystem"."type" = 'dashboard'+ AND NOT ("posthog_filesystem"."shortcut"+ AND "posthog_filesystem"."shortcut" IS NOT NULL))+ '''+# ---+# name: TestDashboard.test_retrieve_dashboard.1+ '''+ SELECT "posthog_user"."id",+ "posthog_user"."password",+ "posthog_user"."last_login",+ "posthog_user"."first_name",+ "posthog_user"."last_name",+ "posthog_user"."is_staff",+ "posthog_user"."date_joined",+ "posthog_user"."uuid",+ "posthog_user"."current_organization_id",+ "posthog_user"."current_team_id",+ "posthog_user"."email",+ "posthog_user"."pending_email",+ "posthog_user"."distinct_id",+ "posthog_user"."is_email_verified",+ "posthog_user"."credentials_reviewed_at",+ "posthog_user"."requested_2fa_reset_at",+ "posthog_user"."has_seen_product_intro_for",+ "posthog_user"."strapi_id",+ "posthog_user"."is_active",+ "posthog_user"."role_at_organization",+ "posthog_user"."theme_mode",+ "posthog_user"."partial_notification_settings",+ "posthog_user"."anonymize_data",+ "posthog_user"."allow_impersonation",+ "posthog_user"."toolbar_mode",+ "posthog_user"."hedgehog_config",+ "posthog_user"."allow_sidebar_suggestions",+ "posthog_user"."shortcut_position",+ "posthog_user"."passkeys_enabled_for_2fa",+ "posthog_user"."hide_mcp_hints",+ "posthog_user"."onboarding_skipped_at",+ "posthog_user"."onboarding_skipped_reason",+ "posthog_user"."onboarding_skipped_organization_id",+ "posthog_user"."onboarding_delegated_to_invite_id",+ "posthog_user"."onboarding_delegated_to_organization_id",+ "posthog_user"."onboarding_delegation_accepted_at",+ "posthog_user"."events_column_config",+ "posthog_user"."email_opt_in"+ FROM "posthog_user"+ WHERE ("posthog_user"."is_active"+ AND "posthog_user"."id" = 99999)+ '''+# ---+# name: TestDashboard.test_retrieve_dashboard.10'''SELECT "posthog_sharingconfiguration"."id","posthog_sharingconfiguration"."team_id",@@ -15077,7 +14984,7 @@5 /* ... */)'''# ----# name: TestDashboard.test_retrieve_dashboard.12+# name: TestDashboard.test_retrieve_dashboard.11'''SELECT "posthog_dashboardtile"."id","posthog_dashboardtile"."dashboard_id",@@ -15436,7 +15343,7 @@ORDER BY "posthog_dashboarditem"."order" ASC'''# ----# name: TestDashboard.test_retrieve_dashboard.13+# name: TestDashboard.test_retrieve_dashboard.12'''SELECT "posthog_taggeditem"."id","posthog_taggeditem"."tag_id",@@ -15462,9 +15369,221 @@5 /* ... */)'''# ----# name: TestDashboard.test_retrieve_dashboard.14+# name: TestDashboard.test_retrieve_dashboard.13+ '''+ SELECT "posthog_team"."id",+ "posthog_team"."uuid",+ "posthog_team"."organization_id",+ "posthog_team"."parent_team_id",+ "posthog_team"."project_id",+ "posthog_team"."api_token",+ "posthog_team"."app_urls",+ "posthog_team"."name",+ "posthog_team"."slack_incoming_webhook",+ "posthog_team"."created_at",+ "posthog_team"."updated_at",+ "posthog_team"."anonymize_ips",+ "posthog_team"."completed_snippet_onboarding",+ "posthog_team"."has_completed_onboarding_for",+ "posthog_team"."onboarding_tasks",+ "posthog_team"."ingested_event",+ "posthog_team"."ingested_production_event",+ "posthog_team"."ingested_production_event_last_checked_at",+ "posthog_team"."person_processing_opt_out",+ "posthog_team"."secret_api_token",+ "posthog_team"."secret_api_token_backup",+ "posthog_team"."session_recording_opt_in",+ "posthog_team"."session_recording_sample_rate",+ "posthog_team"."session_recording_minimum_duration_milliseconds",+ "posthog_team"."session_recording_linked_flag",+ "posthog_team"."session_recording_network_payload_capture_config",+ "posthog_team"."session_recording_masking_config",+ "posthog_team"."session_recording_url_trigger_config",+ "posthog_team"."session_recording_url_blocklist_config",+ "posthog_team"."session_recording_event_trigger_config",+ "posthog_team"."session_recording_trigger_match_type_config",+ "posthog_team"."session_recording_trigger_groups",+ "posthog_team"."session_replay_config",+ "posthog_team"."session_recording_retention_period",+ "posthog_team"."event_retention_months",+ "posthog_team"."conversations_enabled",+ "posthog_team"."conversations_settings",+ "posthog_team"."proactive_tasks_enabled",+ "posthog_team"."survey_config",+ "posthog_team"."surveys_opt_in",+ "posthog_team"."product_tours_opt_in",+ "posthog_team"."capture_console_log_opt_in",+ "posthog_team"."capture_performance_opt_in",+ "posthog_team"."capture_dead_clicks",+ "posthog_team"."autocapture_opt_out",+ "posthog_team"."autocapture_web_vitals_opt_in",+ "posthog_team"."autocapture_web_vitals_allowed_metrics",+ "posthog_team"."autocapture_exceptions_opt_in",+ "posthog_team"."autocapture_exceptions_errors_to_ignore",+ "posthog_team"."logs_settings",+ "posthog_team"."llm_gateway_enabled_at",+ "posthog_team"."llm_gateway_revoked_at",+ "posthog_team"."llm_gateway_overspend_allowance_usd",+ "posthog_team"."heatmaps_opt_in",+ "posthog_team"."receive_org_level_activity_logs",+ "posthog_team"."web_analytics_pre_aggregated_tables_enabled",+ "posthog_team"."web_analytics_pre_aggregated_tables_version",+ "posthog_team"."flags_persistence_default",+ "posthog_team"."feature_flag_confirmation_enabled",+ "posthog_team"."feature_flag_confirmation_message",+ "posthog_team"."default_evaluation_environments_enabled",+ "posthog_team"."require_evaluation_environment_tags",+ "posthog_team"."default_evaluation_contexts_enabled",+ "posthog_team"."require_evaluation_contexts",+ "posthog_team"."session_recording_version",+ "posthog_team"."signup_token",+ "posthog_team"."is_demo",+ "posthog_team"."access_control",+ "posthog_team"."week_start_day",+ "posthog_team"."inject_web_apps",+ "posthog_team"."test_account_filters",+ "posthog_team"."test_account_filters_default_checked",+ "posthog_team"."path_cleaning_filters",+ "posthog_team"."timezone",+ "posthog_team"."data_attributes",+ "posthog_team"."person_display_name_properties",+ "posthog_team"."live_events_columns",+ "posthog_team"."recording_domains",+ "posthog_team"."human_friendly_comparison_periods",+ "posthog_team"."cookieless_server_hash_mode",+ "posthog_team"."primary_dashboard_id",+ "posthog_team"."default_data_theme",+ "posthog_team"."extra_settings",+ "posthog_team"."modifiers",+ "posthog_team"."correlation_config",+ "posthog_team"."session_recording_retention_period_days",+ "posthog_team"."external_data_workspace_id",+ "posthog_team"."external_data_workspace_last_synced_at",+ "posthog_team"."api_query_rate_limit",+ "posthog_team"."drop_events_older_than",+ "posthog_team"."base_currency",+ "posthog_team"."experiment_recalculation_time",+ "posthog_team"."default_experiment_confidence_level",+ "posthog_team"."default_experiment_stats_method",+ "posthog_team"."business_model"+ FROM "posthog_team"+ WHERE "posthog_team"."id" = 99999+ LIMIT 21+ '''+# ---+# name: TestDashboard.test_retrieve_dashboard.14+ '''+ SELECT "posthog_filesystem"."team_id",+ "posthog_filesystem"."id",+ "posthog_filesystem"."path",+ "posthog_filesystem"."depth",+ "posthog_filesystem"."type",+ "posthog_filesystem"."ref",+ "posthog_filesystem"."href",+ "posthog_filesystem"."shortcut",+ "posthog_filesystem"."meta",+ "posthog_filesystem"."created_at",+ "posthog_filesystem"."created_by_id",+ "posthog_filesystem"."surface",+ "posthog_filesystem"."project_id"+ FROM "posthog_filesystem"+ WHERE (("posthog_filesystem"."surface" IS NULL+ OR "posthog_filesystem"."surface" = 'web')+ AND "posthog_filesystem"."ref" = '0001'+ AND "posthog_filesystem"."team_id" = 99999+ AND "posthog_filesystem"."type" = 'dashboard'+ AND NOT ("posthog_filesystem"."shortcut"+ AND "posthog_filesystem"."shortcut" IS NOT NULL))+ '''+# ---+# name: TestDashboard.test_retrieve_dashboard.15+ '''+ SELECT "posthog_filesystemshortcut"."id",+ "posthog_filesystemshortcut"."team_id",+ "posthog_filesystemshortcut"."user_id",+ "posthog_filesystemshortcut"."path",+ "posthog_filesystemshortcut"."type",+ "posthog_filesystemshortcut"."ref",+ "posthog_filesystemshortcut"."href",+ "posthog_filesystemshortcut"."order",+ "posthog_filesystemshortcut"."created_at",+ "posthog_filesystemshortcut"."surface"+ FROM "posthog_filesystemshortcut"+ WHERE (("posthog_filesystemshortcut"."surface" IS NULL+ OR "posthog_filesystemshortcut"."surface" = 'web')+ AND "posthog_filesystemshortcut"."ref" = '0001'+ AND "posthog_filesystemshortcut"."team_id" = 99999+ AND "posthog_filesystemshortcut"."type" = 'dashboard'+ AND NOT ("posthog_filesystemshortcut"."path" = 'private dashboard'+ AND "posthog_filesystemshortcut"."href" = '__skipped__'+ AND "posthog_filesystemshortcut"."href" IS NOT NULL))+ '''+# ---+# name: TestDashboard.test_retrieve_dashboard.16+ '''+ SELECT "posthog_insightvariable"."created_by_id",+ "posthog_insightvariable"."created_at",+ "posthog_insightvariable"."updated_at",+ "posthog_insightvariable"."id",+ "posthog_insightvariable"."team_id",+ "posthog_insightvariable"."name",+ "posthog_insightvariable"."code_name",+ "posthog_insightvariable"."type",+ "posthog_insightvariable"."default_value",+ "posthog_insightvariable"."values"+ FROM "posthog_insightvariable"+ WHERE "posthog_insightvariable"."team_id" = 99999+ '''+# ---+# name: TestDashboard.test_retrieve_dashboard.17'''- SELECT "posthog_team"."id",+ SELECT "posthog_dashboardtile"."id",+ "posthog_dashboardtile"."dashboard_id",+ "posthog_dashboardtile"."insight_id",+ "posthog_dashboardtile"."text_id",+ "posthog_dashboardtile"."button_tile_id",+ "posthog_dashboardtile"."widget_id",+ "posthog_dashboardtile"."team_id",+ "posthog_dashboardtile"."layouts",+ "posthog_dashboardtile"."color",+ "posthog_dashboardtile"."filters_hash",+ "posthog_dashboardtile"."last_refresh",+ "posthog_dashboardtile"."refreshing",+ "posthog_dashboardtile"."refresh_attempt",+ "posthog_dashboardtile"."filters_overrides",+ "posthog_dashboardtile"."show_description",+ "posthog_dashboardtile"."transparent_background",+ "posthog_dashboardtile"."deleted",+ "posthog_dashboarditem"."id",+ "posthog_dashboarditem"."name",+ "posthog_dashboarditem"."derived_name",+ "posthog_dashboarditem"."description",+ "posthog_dashboarditem"."team_id",+ "posthog_dashboarditem"."filters",+ "posthog_dashboarditem"."filters_hash",+ "posthog_dashboarditem"."query",+ "posthog_dashboarditem"."query_metadata",+ "posthog_dashboarditem"."order",+ "posthog_dashboarditem"."deleted",+ "posthog_dashboarditem"."saved",+ "posthog_dashboarditem"."created_at",+ "posthog_dashboarditem"."refreshing",+ "posthog_dashboarditem"."created_by_id",+ "posthog_dashboarditem"."is_sample",+ "posthog_dashboarditem"."short_id",+ "posthog_dashboarditem"."favorited",+ "posthog_dashboarditem"."refresh_attempt",+ "posthog_dashboarditem"."last_modified_at",+ "posthog_dashboarditem"."last_modified_by_id",+ "posthog_dashboarditem"."dashboard_id",+ "posthog_dashboarditem"."last_refresh",+ "posthog_dashboarditem"."layouts",+ "posthog_dashboarditem"."color",+ "posthog_dashboarditem"."dive_dashboard_id",+ "posthog_dashboarditem"."updated_at",+ "posthog_dashboarditem"."deprecated_tags",+ "posthog_dashboarditem"."tags",+ "posthog_team"."id","posthog_team"."uuid","posthog_team"."organization_id","posthog_team"."parent_team_id",@@ -15550,82 +15669,230 @@"posthog_team"."modifiers","posthog_team"."correlation_config","posthog_team"."session_recording_retention_period_days",+ "posthog_team"."plugins_opt_in",+ "posthog_team"."opt_out_capture",+ "posthog_team"."event_names",+ "posthog_team"."event_names_with_usage",+ "posthog_team"."event_properties",+ "posthog_team"."event_properties_with_usage",+ "posthog_team"."event_properties_numerical","posthog_team"."external_data_workspace_id","posthog_team"."external_data_workspace_last_synced_at","posthog_team"."api_query_rate_limit",+ "posthog_team"."revenue_tracking_config","posthog_team"."drop_events_older_than","posthog_team"."base_currency","posthog_team"."experiment_recalculation_time","posthog_team"."default_experiment_confidence_level","posthog_team"."default_experiment_stats_method",- "posthog_team"."business_model"- FROM "posthog_team"- WHERE "posthog_team"."id" = 99999- LIMIT 21- '''-# ----# name: TestDashboard.test_retrieve_dashboard.15- '''- SELECT "posthog_filesystem"."team_id",- "posthog_filesystem"."id",- "posthog_filesystem"."path",- "posthog_filesystem"."depth",- "posthog_filesystem"."type",- "posthog_filesystem"."ref",- "posthog_filesystem"."href",- "posthog_filesystem"."shortcut",- "posthog_filesystem"."meta",- "posthog_filesystem"."created_at",- "posthog_filesystem"."created_by_id",- "posthog_filesystem"."surface",- "posthog_filesystem"."project_id"- FROM "posthog_filesystem"- WHERE (("posthog_filesystem"."surface" IS NULL- OR "posthog_filesystem"."surface" = 'web')- AND "posthog_filesystem"."ref" = '0001'- AND "posthog_filesystem"."team_id" = 99999- AND "posthog_filesystem"."type" = 'dashboard'- AND NOT ("posthog_filesystem"."shortcut"- AND "posthog_filesystem"."shortcut" IS NOT NULL))- '''-# ----# name: TestDashboard.test_retrieve_dashboard.16- '''- SELECT "posthog_filesystemshortcut"."id",- "posthog_filesystemshortcut"."team_id",- "posthog_filesystemshortcut"."user_id",- "posthog_filesystemshortcut"."path",- "posthog_filesystemshortcut"."type",- "posthog_filesystemshortcut"."ref",- "posthog_filesystemshortcut"."href",- "posthog_filesystemshortcut"."order",- "posthog_filesystemshortcut"."created_at",- "posthog_filesystemshortcut"."surface"- FROM "posthog_filesystemshortcut"- WHERE (("posthog_filesystemshortcut"."surface" IS NULL- OR "posthog_filesystemshortcut"."surface" = 'web')- AND "posthog_filesystemshortcut"."ref" = '0001'- AND "posthog_filesystemshortcut"."team_id" = 99999- AND "posthog_filesystemshortcut"."type" = 'dashboard'- AND NOT ("posthog_filesystemshortcut"."path" = 'private dashboard'- AND "posthog_filesystemshortcut"."href" = '__skipped__'- AND "posthog_filesystemshortcut"."href" IS NOT NULL))- '''-# ----# name: TestDashboard.test_retrieve_dashboard.17- '''- SELECT "posthog_insightvariable"."created_by_id",- "posthog_insightvariable"."created_at",- "posthog_insightvariable"."updated_at",- "posthog_insightvariable"."id",- "posthog_insightvariable"."team_id",- "posthog_insightvariable"."name",- "posthog_insightvariable"."code_name",- "posthog_insightvariable"."type",- "posthog_insightvariable"."default_value",- "posthog_insightvariable"."values"- FROM "posthog_insightvariable"- WHERE "posthog_insightvariable"."team_id" = 99999+ "posthog_team"."business_model",+ "posthog_user"."id",+ "posthog_user"."password",+ "posthog_user"."last_login",+ "posthog_user"."first_name",+ "posthog_user"."last_name",+ "posthog_user"."is_staff",+ "posthog_user"."date_joined",+ "posthog_user"."uuid",+ "posthog_user"."current_organization_id",+ "posthog_user"."current_team_id",+ "posthog_user"."email",+ "posthog_user"."pending_email",+ "posthog_user"."distinct_id",+ "posthog_user"."is_email_verified",+ "posthog_user"."credentials_reviewed_at",+ "posthog_user"."requested_password_reset_at",+ "posthog_user"."requested_2fa_reset_at",+ "posthog_user"."has_seen_product_intro_for",+ "posthog_user"."strapi_id",+ "posthog_user"."is_active",+ "posthog_user"."role_at_organization",+ "posthog_user"."theme_mode",+ "posthog_user"."partial_notification_settings",+ "posthog_user"."anonymize_data",+ "posthog_user"."allow_impersonation",+ "posthog_user"."toolbar_mode",+ "posthog_user"."hedgehog_config",+ "posthog_user"."allow_sidebar_suggestions",+ "posthog_user"."shortcut_position",+ "posthog_user"."passkeys_enabled_for_2fa",+ "posthog_user"."hide_mcp_hints",+ "posthog_user"."onboarding_skipped_at",+ "posthog_user"."onboarding_skipped_reason",+ "posthog_user"."onboarding_skipped_organization_id",+ "posthog_user"."onboarding_delegated_to_invite_id",+ "posthog_user"."onboarding_delegated_to_organization_id",+ "posthog_user"."onboarding_delegation_accepted_at",+ "posthog_user"."events_column_config",+ "posthog_user"."email_opt_in",+ T6."id",+ T6."password",+ T6."last_login",+ T6."first_name",+ T6."last_name",+ T6."is_staff",+ T6."date_joined",+ T6."uuid",+ T6."current_organization_id",+ T6."current_team_id",+ T6."email",+ T6."pending_email",+ T6."distinct_id",+ T6."is_email_verified",+ T6."credentials_reviewed_at",+ T6."requested_password_reset_at",+ T6."requested_2fa_reset_at",+ T6."has_seen_product_intro_for",+ T6."strapi_id",+ T6."is_active",+ T6."role_at_organization",+ T6."theme_mode",+ T6."partial_notification_settings",+ T6."anonymize_data",+ T6."allow_impersonation",+ T6."toolbar_mode",+ T6."hedgehog_config",+ T6."allow_sidebar_suggestions",+ T6."shortcut_position",+ T6."passkeys_enabled_for_2fa",+ T6."hide_mcp_hints",+ T6."onboarding_skipped_at",+ T6."onboarding_skipped_reason",+ T6."onboarding_skipped_organization_id",+ T6."onboarding_delegated_to_invite_id",+ T6."onboarding_delegated_to_organization_id",+ T6."onboarding_delegation_accepted_at",+ T6."events_column_config",+ T6."email_opt_in",+ "posthog_text"."id",+ "posthog_text"."body",+ "posthog_text"."created_by_id",+ "posthog_text"."last_modified_at",+ "posthog_text"."last_modified_by_id",+ "posthog_text"."team_id",+ "posthog_buttontile"."id",+ "posthog_buttontile"."url",+ "posthog_buttontile"."text",+ "posthog_buttontile"."placement",+ "posthog_buttontile"."style",+ "posthog_buttontile"."created_by_id",+ "posthog_buttontile"."last_modified_at",+ "posthog_buttontile"."last_modified_by_id",+ "posthog_buttontile"."team_id",+ "posthog_dashboardwidget"."id",+ "posthog_dashboardwidget"."widget_type",+ "posthog_dashboardwidget"."name",+ "posthog_dashboardwidget"."description",+ "posthog_dashboardwidget"."config",+ "posthog_dashboardwidget"."created_by_id",+ "posthog_dashboardwidget"."last_modified_at",+ "posthog_dashboardwidget"."last_modified_by_id",+ "posthog_dashboardwidget"."team_id",+ T10."id",+ T10."password",+ T10."last_login",+ T10."first_name",+ T10."last_name",+ T10."is_staff",+ T10."date_joined",+ T10."uuid",+ T10."current_organization_id",+ T10."current_team_id",+ T10."email",+ T10."pending_email",+ T10."distinct_id",+ T10."is_email_verified",+ T10."credentials_reviewed_at",+ T10."requested_password_reset_at",+ T10."requested_2fa_reset_at",+ T10."has_seen_product_intro_for",+ T10."strapi_id",+ T10."is_active",+ T10."role_at_organization",+ T10."theme_mode",+ T10."partial_notification_settings",+ T10."anonymize_data",+ T10."allow_impersonation",+ T10."toolbar_mode",+ T10."hedgehog_config",+ T10."allow_sidebar_suggestions",+ T10."shortcut_position",+ T10."passkeys_enabled_for_2fa",+ T10."hide_mcp_hints",+ T10."onboarding_skipped_at",+ T10."onboarding_skipped_reason",+ T10."onboarding_skipped_organization_id",+ T10."onboarding_delegated_to_invite_id",+ T10."onboarding_delegated_to_organization_id",+ T10."onboarding_delegation_accepted_at",+ T10."events_column_config",+ T10."email_opt_in",+ T11."id",+ T11."password",+ T11."last_login",+ T11."first_name",+ T11."last_name",+ T11."is_staff",+ T11."date_joined",+ T11."uuid",+ T11."current_organization_id",+ T11."current_team_id",+ T11."email",+ T11."pending_email",+ T11."distinct_id",+ T11."is_email_verified",+ T11."credentials_reviewed_at",+ T11."requested_password_reset_at",+ T11."requested_2fa_reset_at",+ T11."has_seen_product_intro_for",+ T11."strapi_id",+ T11."is_active",+ T11."role_at_organization",+ T11."theme_mode",+ T11."partial_notification_settings",+ T11."anonymize_data",+ T11."allow_impersonation",+ T11."toolbar_mode",+ T11."hedgehog_config",+ T11."allow_sidebar_suggestions",+ T11."shortcut_position",+ T11."passkeys_enabled_for_2fa",+ T11."hide_mcp_hints",+ T11."onboarding_skipped_at",+ T11."onboarding_skipped_reason",+ T11."onboarding_skipped_organization_id",+ T11."onboarding_delegated_to_invite_id",+ T11."onboarding_delegated_to_organization_id",+ T11."onboarding_delegation_accepted_at",+ T11."events_column_config",+ T11."email_opt_in"+ FROM "posthog_dashboardtile"+ INNER JOIN "posthog_dashboard" ON ("posthog_dashboardtile"."dashboard_id" = "posthog_dashboard"."id")+ LEFT OUTER JOIN "posthog_dashboarditem" ON ("posthog_dashboardtile"."insight_id" = "posthog_dashboarditem"."id")+ LEFT OUTER JOIN "posthog_team" ON ("posthog_dashboarditem"."team_id" = "posthog_team"."id")+ LEFT OUTER JOIN "posthog_user" ON ("posthog_dashboarditem"."created_by_id" = "posthog_user"."id")+ LEFT OUTER JOIN "posthog_user" T6 ON ("posthog_dashboarditem"."last_modified_by_id" = T6."id")+ LEFT OUTER JOIN "posthog_text" ON ("posthog_dashboardtile"."text_id" = "posthog_text"."id")+ LEFT OUTER JOIN "posthog_buttontile" ON ("posthog_dashboardtile"."button_tile_id" = "posthog_buttontile"."id")+ LEFT OUTER JOIN "posthog_dashboardwidget" ON ("posthog_dashboardtile"."widget_id" = "posthog_dashboardwidget"."id")+ LEFT OUTER JOIN "posthog_user" T10 ON ("posthog_dashboardwidget"."created_by_id" = T10."id")+ LEFT OUTER JOIN "posthog_user" T11 ON ("posthog_dashboardwidget"."last_modified_by_id" = T11."id")+ WHERE (NOT ("posthog_dashboardtile"."deleted"+ AND "posthog_dashboardtile"."deleted" IS NOT NULL)+ AND NOT ("posthog_dashboard"."deleted")+ AND NOT ("posthog_dashboard"."deleted"+ AND "posthog_dashboardtile"."deleted"+ AND "posthog_dashboardtile"."deleted" IS NOT NULL)+ AND (NOT "posthog_dashboarditem"."deleted"+ OR "posthog_dashboardtile"."insight_id" IS NULL)+ AND "posthog_dashboardtile"."dashboard_id" = 99999+ AND "posthog_dashboardtile"."dashboard_id" = 99999+ AND NOT ("posthog_dashboard"."deleted"+ AND "posthog_dashboardtile"."deleted"+ AND "posthog_dashboardtile"."deleted" IS NOT NULL)+ AND (NOT "posthog_dashboarditem"."deleted"+ OR "posthog_dashboardtile"."insight_id" IS NULL))+ ORDER BY "posthog_dashboarditem"."order" ASC'''# ---# name: TestDashboard.test_retrieve_dashboard.18@@ -15989,51 +16256,6 @@'''# ---# name: TestDashboard.test_retrieve_dashboard.2- '''- SELECT "posthog_user"."id",- "posthog_user"."password",- "posthog_user"."last_login",- "posthog_user"."first_name",- "posthog_user"."last_name",- "posthog_user"."is_staff",- "posthog_user"."date_joined",- "posthog_user"."uuid",- "posthog_user"."current_organization_id",- "posthog_user"."current_team_id",- "posthog_user"."email",- "posthog_user"."pending_email",- "posthog_user"."distinct_id",- "posthog_user"."is_email_verified",- "posthog_user"."credentials_reviewed_at",- "posthog_user"."requested_2fa_reset_at",- "posthog_user"."has_seen_product_intro_for",- "posthog_user"."strapi_id",- "posthog_user"."is_active",- "posthog_user"."role_at_organization",- "posthog_user"."theme_mode",- "posthog_user"."partial_notification_settings",- "posthog_user"."anonymize_data",- "posthog_user"."allow_impersonation",- "posthog_user"."toolbar_mode",- "posthog_user"."hedgehog_config",- "posthog_user"."allow_sidebar_suggestions",- "posthog_user"."shortcut_position",- "posthog_user"."passkeys_enabled_for_2fa",- "posthog_user"."hide_mcp_hints",- "posthog_user"."onboarding_skipped_at",- "posthog_user"."onboarding_skipped_reason",- "posthog_user"."onboarding_skipped_organization_id",- "posthog_user"."onboarding_delegated_to_invite_id",- "posthog_user"."onboarding_delegated_to_organization_id",- "posthog_user"."onboarding_delegation_accepted_at",- "posthog_user"."events_column_config",- "posthog_user"."email_opt_in"- FROM "posthog_user"- WHERE ("posthog_user"."is_active"- AND "posthog_user"."id" = 99999)- '''-# ----# name: TestDashboard.test_retrieve_dashboard.3'''SELECT "posthog_organization"."id","posthog_organization"."name",@@ -16075,7 +16297,7 @@LIMIT 21'''# ----# name: TestDashboard.test_retrieve_dashboard.4+# name: TestDashboard.test_retrieve_dashboard.3'''SELECT "posthog_team"."id","posthog_team"."uuid",@@ -16213,7 +16435,7 @@LIMIT 21'''# ----# name: TestDashboard.test_retrieve_dashboard.5+# name: TestDashboard.test_retrieve_dashboard.4'''SELECT "posthog_organizationmembership"."id","posthog_organizationmembership"."organization_id",@@ -16264,7 +16486,7 @@LIMIT 21'''# ----# name: TestDashboard.test_retrieve_dashboard.6+# name: TestDashboard.test_retrieve_dashboard.5'''SELECT "ee_accesscontrol"."id","ee_accesscontrol"."team_id",@@ -16288,7 +16510,7 @@AND "ee_accesscontrol"."team_id" = 99999))'''# ----# name: TestDashboard.test_retrieve_dashboard.7+# name: TestDashboard.test_retrieve_dashboard.6'''SELECT "posthog_organizationmembership"."id","posthog_organizationmembership"."organization_id",@@ -16337,7 +16559,7 @@WHERE "posthog_organizationmembership"."user_id" = 99999'''# ----# name: TestDashboard.test_retrieve_dashboard.8+# name: TestDashboard.test_retrieve_dashboard.7'''SELECT "ee_accesscontrol"."team_id" AS "team_id","ee_accesscontrol"."resource_id" AS "resource_id",@@ -16350,7 +16572,7 @@AND "posthog_team"."organization_id" IN ('00000000-0000-0000-0000-000000000000'::uuid))'''# ----# name: TestDashboard.test_retrieve_dashboard.9+# name: TestDashboard.test_retrieve_dashboard.8'''SELECT "ee_rolemembership"."organization_member_id" AS "organization_member_id","ee_rolemembership"."role_id" AS "role_id"@@ -16358,6 +16580,95 @@WHERE "ee_rolemembership"."user_id" = 99999'''# ---+# name: TestDashboard.test_retrieve_dashboard.9+ '''+ SELECT "posthog_dashboard"."id",+ "posthog_dashboard"."name",+ "posthog_dashboard"."description",+ "posthog_dashboard"."team_id",+ "posthog_dashboard"."pinned",+ "posthog_dashboard"."created_at",+ "posthog_dashboard"."created_by_id",+ "posthog_dashboard"."deleted",+ "posthog_dashboard"."last_accessed_at",+ "posthog_dashboard"."last_refresh",+ "posthog_dashboard"."filters",+ "posthog_dashboard"."variables",+ "posthog_dashboard"."breakdown_colors",+ "posthog_dashboard"."data_color_theme_id",+ "posthog_dashboard"."creation_mode",+ "posthog_dashboard"."restriction_level",+ "posthog_dashboard"."quick_filter_ids",+ "posthog_dashboard"."deprecated_tags",+ "posthog_dashboard"."tags",+ "posthog_dashboard"."share_token",+ "posthog_dashboard"."is_shared",+ recent_dashboard_views."viewed_at" AS "last_viewed_at",+ ("posthog_dashboard"."id")::varchar AS "_ref_id",++ (SELECT U0."path" AS "path"+ FROM "posthog_filesystem" U0+ WHERE ((U0."surface" IS NULL+ OR U0."surface" = 'web')+ AND U0."ref" = ("posthog_dashboard"."id")::varchar+ AND U0."team_id" = ("posthog_dashboard"."team_id")+ AND U0."type" = 'dashboard'+ AND NOT (U0."shortcut"+ AND U0."shortcut" IS NOT NULL))+ ORDER BY U0."id" ASC+ LIMIT 1) AS "_folder_path",+ T6."id",+ T6."password",+ T6."last_login",+ T6."first_name",+ T6."last_name",+ T6."is_staff",+ T6."date_joined",+ T6."uuid",+ T6."current_organization_id",+ T6."current_team_id",+ T6."email",+ T6."pending_email",+ T6."distinct_id",+ T6."is_email_verified",+ T6."credentials_reviewed_at",+ T6."requested_password_reset_at",+ T6."requested_2fa_reset_at",+ T6."has_seen_product_intro_for",+ T6."strapi_id",+ T6."is_active",+ T6."role_at_organization",+ T6."theme_mode",+ T6."partial_notification_settings",+ T6."anonymize_data",+ T6."allow_impersonation",+ T6."toolbar_mode",+ T6."hedgehog_config",+ T6."allow_sidebar_suggestions",+ T6."shortcut_position",+ T6."passkeys_enabled_for_2fa",+ T6."hide_mcp_hints",+ T6."onboarding_skipped_at",+ T6."onboarding_skipped_reason",+ T6."onboarding_skipped_organization_id",+ T6."onboarding_delegated_to_invite_id",+ T6."onboarding_delegated_to_organization_id",+ T6."onboarding_delegation_accepted_at",+ T6."events_column_config",+ T6."email_opt_in"+ FROM "posthog_dashboard"+ INNER JOIN "posthog_team" ON ("posthog_dashboard"."team_id" = "posthog_team"."id")+ LEFT OUTER JOIN "posthog_filesystemviewlog" recent_dashboard_views ON ("posthog_team"."id" = recent_dashboard_views."team_id"+ AND ((recent_dashboard_views."user_id" = 99999+ AND recent_dashboard_views."type" = 'dashboard'+ AND recent_dashboard_views."ref" = ("posthog_dashboard"."id")::varchar)))+ LEFT OUTER JOIN "posthog_user" T6 ON ("posthog_dashboard"."created_by_id" = T6."id")+ WHERE ("posthog_team"."project_id" = 99999+ AND NOT ("posthog_dashboard"."deleted")+ AND "posthog_dashboard"."id" = 99999)+ LIMIT 21+ '''+# ---# name: TestDashboard.test_retrieve_dashboard_list'''SELECT "posthog_user"."id",@@ -16471,17 +16782,6 @@'''# ---# name: TestDashboard.test_retrieve_dashboard_list.11- '''- SELECT "posthog_dashboardtile"."id" AS "pk"- 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)- '''-# ----# name: TestDashboard.test_retrieve_dashboard_list.12'''SELECT COUNT(*) AS "__count"FROM "posthog_dashboardtile"@@ -16493,7 +16793,7 @@AND NOT ("posthog_dashboardtile"."insight_id" IS NULL))'''# ----# name: TestDashboard.test_retrieve_dashboard_list.13+# name: TestDashboard.test_retrieve_dashboard_list.12'''SELECT "posthog_sharingconfiguration"."id","posthog_sharingconfiguration"."team_id",@@ -16512,14 +16812,14 @@WHERE "posthog_sharingconfiguration"."dashboard_id" = 99999'''# ----# name: TestDashboard.test_retrieve_dashboard_list.14+# name: TestDashboard.test_retrieve_dashboard_list.13'''SELECT COUNT(*) AS "__count"FROM "posthog_taggeditem"WHERE "posthog_taggeditem"."dashboard_id" = 99999'''# ----# name: TestDashboard.test_retrieve_dashboard_list.15+# name: TestDashboard.test_retrieve_dashboard_list.14'''SELECT "posthog_sharingconfiguration"."id","posthog_sharingconfiguration"."team_id",@@ -16538,7 +16838,7 @@WHERE "posthog_sharingconfiguration"."dashboard_id" = 99999'''# ----# name: TestDashboard.test_retrieve_dashboard_list.16+# name: TestDashboard.test_retrieve_dashboard_list.15'''SELECT "posthog_insightvariable"."created_by_id","posthog_insightvariable"."created_at",@@ -16554,7 +16854,7 @@WHERE "posthog_insightvariable"."team_id" = 99999'''# ----# name: TestDashboard.test_retrieve_dashboard_list.17+# name: TestDashboard.test_retrieve_dashboard_list.16'''SELECT "posthog_dashboardtile"."id","posthog_dashboardtile"."dashboard_id",@@ -16908,7 +17208,7 @@ORDER BY "posthog_dashboarditem"."order" ASC'''# ----# name: TestDashboard.test_retrieve_dashboard_list.18+# name: TestDashboard.test_retrieve_dashboard_list.17'''SELECT "posthog_tag"."name" AS "tag__name"FROM "posthog_taggeditem"@@ -16916,7 +17216,7 @@WHERE "posthog_taggeditem"."dashboard_id" = 99999'''# ----# name: TestDashboard.test_retrieve_dashboard_list.19+# name: TestDashboard.test_retrieve_dashboard_list.18'''SELECT "posthog_user"."id","posthog_user"."password",@@ -16961,6 +17261,48 @@AND "posthog_user"."id" = 99999)'''# ---+# name: TestDashboard.test_retrieve_dashboard_list.19+ '''+ SELECT "posthog_organization"."id",+ "posthog_organization"."name",+ "posthog_organization"."slug",+ "posthog_organization"."logo_media_id",+ "posthog_organization"."created_at",+ "posthog_organization"."updated_at",+ "posthog_organization"."is_active",+ "posthog_organization"."is_not_active_reason",+ "posthog_organization"."session_cookie_age",+ "posthog_organization"."is_member_join_email_enabled",+ "posthog_organization"."is_ai_data_processing_approved",+ "posthog_organization"."is_ai_training_opted_in",+ "posthog_organization"."is_ai_training_locked",+ "posthog_organization"."is_ai_training_cta_shown",+ "posthog_organization"."enforce_2fa",+ "posthog_organization"."members_can_invite",+ "posthog_organization"."members_can_create_projects",+ "posthog_organization"."members_can_use_personal_api_keys",+ "posthog_organization"."allow_publicly_shared_resources",+ "posthog_organization"."default_role_id",+ "posthog_organization"."plugins_access_level",+ "posthog_organization"."for_internal_metrics",+ "posthog_organization"."default_experiment_stats_method",+ "posthog_organization"."default_anonymize_ips",+ "posthog_organization"."is_hipaa",+ "posthog_organization"."is_pending_deletion",+ "posthog_organization"."customer_id",+ "posthog_organization"."available_product_features",+ "posthog_organization"."usage",+ "posthog_organization"."never_drop_data",+ "posthog_organization"."customer_trust_scores",+ "posthog_organization"."setup_section_2_completed",+ "posthog_organization"."personalization",+ "posthog_organization"."domain_whitelist",+ "posthog_organization"."is_platform"+ FROM "posthog_organization"+ WHERE "posthog_organization"."id" = '00000000-0000-0000-0000-000000000000'::uuid+ LIMIT 21+ '''+# ---# name: TestDashboard.test_retrieve_dashboard_list.2'''SELECT "posthog_team"."id",@@ -17100,48 +17442,6 @@'''# ---# name: TestDashboard.test_retrieve_dashboard_list.20- '''- SELECT "posthog_organization"."id",- "posthog_organization"."name",- "posthog_organization"."slug",- "posthog_organization"."logo_media_id",- "posthog_organization"."created_at",- "posthog_organization"."updated_at",- "posthog_organization"."is_active",- "posthog_organization"."is_not_active_reason",- "posthog_organization"."session_cookie_age",- "posthog_organization"."is_member_join_email_enabled",- "posthog_organization"."is_ai_data_processing_approved",- "posthog_organization"."is_ai_training_opted_in",- "posthog_organization"."is_ai_training_locked",- "posthog_organization"."is_ai_training_cta_shown",- "posthog_organization"."enforce_2fa",- "posthog_organization"."members_can_invite",- "posthog_organization"."members_can_create_projects",- "posthog_organization"."members_can_use_personal_api_keys",- "posthog_organization"."allow_publicly_shared_resources",- "posthog_organization"."default_role_id",- "posthog_organization"."plugins_access_level",- "posthog_organization"."for_internal_metrics",- "posthog_organization"."default_experiment_stats_method",- "posthog_organization"."default_anonymize_ips",- "posthog_organization"."is_hipaa",- "posthog_organization"."is_pending_deletion",- "posthog_organization"."customer_id",- "posthog_organization"."available_product_features",- "posthog_organization"."usage",- "posthog_organization"."never_drop_data",- "posthog_organization"."customer_trust_scores",- "posthog_organization"."setup_section_2_completed",- "posthog_organization"."personalization",- "posthog_organization"."domain_whitelist",- "posthog_organization"."is_platform"- FROM "posthog_organization"- WHERE "posthog_organization"."id" = '00000000-0000-0000-0000-000000000000'::uuid- LIMIT 21- '''-# ----# name: TestDashboard.test_retrieve_dashboard_list.21'''SELECT "posthog_team"."id","posthog_team"."uuid",@@ -17279,7 +17579,7 @@LIMIT 21'''# ----# name: TestDashboard.test_retrieve_dashboard_list.22+# name: TestDashboard.test_retrieve_dashboard_list.21'''SELECT "posthog_organizationmembership"."id","posthog_organizationmembership"."organization_id",@@ -17330,7 +17630,7 @@LIMIT 21'''# ----# name: TestDashboard.test_retrieve_dashboard_list.23+# name: TestDashboard.test_retrieve_dashboard_list.22'''SELECT "ee_accesscontrol"."id","ee_accesscontrol"."team_id",@@ -17354,7 +17654,7 @@AND "ee_accesscontrol"."team_id" = 99999))'''# ----# name: TestDashboard.test_retrieve_dashboard_list.24+# name: TestDashboard.test_retrieve_dashboard_list.23'''SELECT "posthog_organizationmembership"."id","posthog_organizationmembership"."organization_id",@@ -17403,7 +17703,7 @@WHERE "posthog_organizationmembership"."user_id" = 99999'''# ----# name: TestDashboard.test_retrieve_dashboard_list.25+# name: TestDashboard.test_retrieve_dashboard_list.24'''SELECT "ee_accesscontrol"."team_id" AS "team_id","ee_accesscontrol"."resource_id" AS "resource_id",@@ -17416,7 +17716,7 @@AND "posthog_team"."organization_id" IN ('00000000-0000-0000-0000-000000000000'::uuid))'''# ----# name: TestDashboard.test_retrieve_dashboard_list.26+# name: TestDashboard.test_retrieve_dashboard_list.25'''SELECT "ee_rolemembership"."organization_member_id" AS "organization_member_id","ee_rolemembership"."role_id" AS "role_id"@@ -17424,7 +17724,7 @@WHERE "ee_rolemembership"."user_id" = 99999'''# ----# name: TestDashboard.test_retrieve_dashboard_list.27+# name: TestDashboard.test_retrieve_dashboard_list.26'''SELECT COUNT(*) AS "__count"FROM "posthog_dashboard"@@ -17440,7 +17740,7 @@AND NOT "posthog_dashboard"."deleted")'''# ----# name: TestDashboard.test_retrieve_dashboard_list.28+# name: TestDashboard.test_retrieve_dashboard_list.27'''SELECT "posthog_team"."id","posthog_team"."uuid",@@ -17542,7 +17842,7 @@LIMIT 21'''# ----# name: TestDashboard.test_retrieve_dashboard_list.29+# name: TestDashboard.test_retrieve_dashboard_list.28'''SELECT "posthog_filesystem"."team_id","posthog_filesystem"."id",@@ -17567,6 +17867,18 @@AND "posthog_filesystem"."shortcut" IS NOT NULL))'''# ---+# name: TestDashboard.test_retrieve_dashboard_list.29+ '''+ 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_retrieve_dashboard_list.3'''SELECT "posthog_organizationmembership"."id",@@ -17619,29 +17931,6 @@'''# ---# name: TestDashboard.test_retrieve_dashboard_list.30- '''- SELECT "posthog_dashboardtile"."id" AS "pk"- 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)- '''-# ----# name: TestDashboard.test_retrieve_dashboard_list.31- '''- 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_retrieve_dashboard_list.32'''SELECT "posthog_sharingconfiguration"."id","posthog_sharingconfiguration"."team_id",@@ -17660,14 +17949,14 @@WHERE "posthog_sharingconfiguration"."dashboard_id" = 99999'''# ----# name: TestDashboard.test_retrieve_dashboard_list.33+# name: TestDashboard.test_retrieve_dashboard_list.31'''SELECT COUNT(*) AS "__count"FROM "posthog_taggeditem"WHERE "posthog_taggeditem"."dashboard_id" = 99999'''# ----# name: TestDashboard.test_retrieve_dashboard_list.34+# name: TestDashboard.test_retrieve_dashboard_list.32'''SELECT "posthog_sharingconfiguration"."id","posthog_sharingconfiguration"."team_id",@@ -17686,7 +17975,7 @@WHERE "posthog_sharingconfiguration"."dashboard_id" = 99999'''# ----# name: TestDashboard.test_retrieve_dashboard_list.35+# name: TestDashboard.test_retrieve_dashboard_list.33'''SELECT "posthog_insightvariable"."created_by_id","posthog_insightvariable"."created_at",@@ -17702,7 +17991,7 @@WHERE "posthog_insightvariable"."team_id" = 99999'''# ----# name: TestDashboard.test_retrieve_dashboard_list.36+# name: TestDashboard.test_retrieve_dashboard_list.34'''SELECT "posthog_dashboardtile"."id","posthog_dashboardtile"."dashboard_id",@@ -18056,7 +18345,7 @@ORDER BY "posthog_dashboarditem"."order" ASC'''# ----# name: TestDashboard.test_retrieve_dashboard_list.37+# name: TestDashboard.test_retrieve_dashboard_list.35'''SELECT "posthog_tag"."name" AS "tag__name"FROM "posthog_taggeditem"@@ -18064,7 +18353,7 @@WHERE "posthog_taggeditem"."dashboard_id" = 99999'''# ----# name: TestDashboard.test_retrieve_dashboard_list.38+# name: TestDashboard.test_retrieve_dashboard_list.36'''SELECT "posthog_user"."id","posthog_user"."password",@@ -18109,7 +18398,7 @@AND "posthog_user"."id" = 99999)'''# ----# name: TestDashboard.test_retrieve_dashboard_list.39+# name: TestDashboard.test_retrieve_dashboard_list.37'''SELECT "posthog_organization"."id","posthog_organization"."name",@@ -18151,31 +18440,7 @@LIMIT 21'''# ----# name: TestDashboard.test_retrieve_dashboard_list.4- '''- SELECT "ee_accesscontrol"."id",- "ee_accesscontrol"."team_id",- "ee_accesscontrol"."access_level",- "ee_accesscontrol"."resource",- "ee_accesscontrol"."resource_id",- "ee_accesscontrol"."organization_member_id",- "ee_accesscontrol"."role_id",- "ee_accesscontrol"."created_by_id",- "ee_accesscontrol"."created_at",- "ee_accesscontrol"."updated_at",- "posthog_team"."organization_id" AS "_team_organization_id"- FROM "ee_accesscontrol"- INNER JOIN "posthog_team" ON ("ee_accesscontrol"."team_id" = "posthog_team"."id")- LEFT OUTER JOIN "posthog_organizationmembership" ON ("ee_accesscontrol"."organization_member_id" = "posthog_organizationmembership"."id")- WHERE (("ee_accesscontrol"."organization_member_id" IS NULL- AND "ee_accesscontrol"."role_id" IS NULL- AND "ee_accesscontrol"."team_id" = 99999)- OR ("posthog_organizationmembership"."user_id" = 99999- AND "ee_accesscontrol"."role_id" IS NULL- AND "ee_accesscontrol"."team_id" = 99999))- '''-# ----# name: TestDashboard.test_retrieve_dashboard_list.40+# name: TestDashboard.test_retrieve_dashboard_list.38'''SELECT "posthog_team"."id","posthog_team"."uuid",@@ -18313,7 +18578,7 @@LIMIT 21'''# ----# name: TestDashboard.test_retrieve_dashboard_list.41+# name: TestDashboard.test_retrieve_dashboard_list.39'''SELECT "posthog_organizationmembership"."id","posthog_organizationmembership"."organization_id",@@ -18364,7 +18629,7 @@LIMIT 21'''# ----# name: TestDashboard.test_retrieve_dashboard_list.42+# name: TestDashboard.test_retrieve_dashboard_list.4'''SELECT "ee_accesscontrol"."id","ee_accesscontrol"."team_id",@@ -18388,7 +18653,31 @@AND "ee_accesscontrol"."team_id" = 99999))'''# ----# name: TestDashboard.test_retrieve_dashboard_list.43+# name: TestDashboard.test_retrieve_dashboard_list.40+ '''+ SELECT "ee_accesscontrol"."id",+ "ee_accesscontrol"."team_id",+ "ee_accesscontrol"."access_level",+ "ee_accesscontrol"."resource",+ "ee_accesscontrol"."resource_id",+ "ee_accesscontrol"."organization_member_id",+ "ee_accesscontrol"."role_id",+ "ee_accesscontrol"."created_by_id",+ "ee_accesscontrol"."created_at",+ "ee_accesscontrol"."updated_at",+ "posthog_team"."organization_id" AS "_team_organization_id"+ FROM "ee_accesscontrol"+ INNER JOIN "posthog_team" ON ("ee_accesscontrol"."team_id" = "posthog_team"."id")+ LEFT OUTER JOIN "posthog_organizationmembership" ON ("ee_accesscontrol"."organization_member_id" = "posthog_organizationmembership"."id")+ WHERE (("ee_accesscontrol"."organization_member_id" IS NULL+ AND "ee_accesscontrol"."role_id" IS NULL+ AND "ee_accesscontrol"."team_id" = 99999)+ OR ("posthog_organizationmembership"."user_id" = 99999+ AND "ee_accesscontrol"."role_id" IS NULL+ AND "ee_accesscontrol"."team_id" = 99999))+ '''+# ---+# name: TestDashboard.test_retrieve_dashboard_list.41'''SELECT "posthog_organizationmembership"."id","posthog_organizationmembership"."organization_id",@@ -18437,7 +18726,7 @@WHERE "posthog_organizationmembership"."user_id" = 99999'''# ----# name: TestDashboard.test_retrieve_dashboard_list.44+# name: TestDashboard.test_retrieve_dashboard_list.42'''SELECT "ee_accesscontrol"."team_id" AS "team_id","ee_accesscontrol"."resource_id" AS "resource_id",@@ -18450,7 +18739,7 @@AND "posthog_team"."organization_id" IN ('00000000-0000-0000-0000-000000000000'::uuid))'''# ----# name: TestDashboard.test_retrieve_dashboard_list.45+# name: TestDashboard.test_retrieve_dashboard_list.43'''SELECT "ee_rolemembership"."organization_member_id" AS "organization_member_id","ee_rolemembership"."role_id" AS "role_id"@@ -18458,7 +18747,7 @@WHERE "ee_rolemembership"."user_id" = 99999'''# ----# name: TestDashboard.test_retrieve_dashboard_list.46+# name: TestDashboard.test_retrieve_dashboard_list.44'''SELECT COUNT(*) AS "__count"FROM "posthog_dashboard"@@ -18472,7 +18761,7 @@AND NOT ("posthog_dashboard"."creation_mode" = 'unlisted'))'''# ----# name: TestDashboard.test_retrieve_dashboard_list.47+# name: TestDashboard.test_retrieve_dashboard_list.45'''SELECT "posthog_dashboard"."id","posthog_dashboard"."name",@@ -18563,6 +18852,55 @@LIMIT 100'''# ---+# name: TestDashboard.test_retrieve_dashboard_list.46+ '''+ SELECT "posthog_sharingconfiguration"."id",+ "posthog_sharingconfiguration"."team_id",+ "posthog_sharingconfiguration"."dashboard_id",+ "posthog_sharingconfiguration"."insight_id",+ "posthog_sharingconfiguration"."recording_id",+ "posthog_sharingconfiguration"."notebook_id",+ "posthog_sharingconfiguration"."interviewee_context_id",+ "posthog_sharingconfiguration"."created_at",+ "posthog_sharingconfiguration"."enabled",+ "posthog_sharingconfiguration"."access_token",+ "posthog_sharingconfiguration"."expires_at",+ "posthog_sharingconfiguration"."settings",+ "posthog_sharingconfiguration"."password_required"+ FROM "posthog_sharingconfiguration"+ WHERE "posthog_sharingconfiguration"."dashboard_id" IN (1,+ 2,+ 3,+ 4,+ 5 /* ... */)+ '''+# ---+# name: TestDashboard.test_retrieve_dashboard_list.47+ '''+ SELECT "posthog_taggeditem"."id",+ "posthog_taggeditem"."tag_id",+ "posthog_taggeditem"."dashboard_id",+ "posthog_taggeditem"."insight_id",+ "posthog_taggeditem"."event_definition_id",+ "posthog_taggeditem"."property_definition_id",+ "posthog_taggeditem"."action_id",+ "posthog_taggeditem"."feature_flag_id",+ "posthog_taggeditem"."experiment_saved_metric_id",+ "posthog_taggeditem"."ticket_id",+ "posthog_taggeditem"."account_id",+ "posthog_taggeditem"."endpoint_id",+ "posthog_tag"."id",+ "posthog_tag"."name",+ "posthog_tag"."team_id"+ FROM "posthog_taggeditem"+ INNER JOIN "posthog_tag" ON ("posthog_taggeditem"."tag_id" = "posthog_tag"."id")+ WHERE "posthog_taggeditem"."dashboard_id" IN (1,+ 2,+ 3,+ 4,+ 5 /* ... */)+ '''+# ---# name: TestDashboard.test_retrieve_dashboard_list.48'''SELECT "posthog_sharingconfiguration"."id",diff --git a/posthog/api/test/dashboards/test_dashboard.py b/posthog/api/test/dashboards/test_dashboard.pyindex 620e2f2ef184..6c98789fe0d2 100644--- a/posthog/api/test/dashboards/test_dashboard.py+++ b/posthog/api/test/dashboards/test_dashboard.py@@ -668,17 +668,17 @@ class TestDashboard(APIBaseTest, QueryMatchingTest):with self.assertNumQueries(baseline + 11):self.dashboard_api.get_dashboard(dashboard_id, query_params={"no_items_field": "true"})- # baseline + 11 + 11 once at least one insight materializes+ # baseline + 11 + 9 once at least one insight materializesself.dashboard_api.create_insight({"filters": filter_dict, "dashboards": [dashboard_id]})- with self.assertNumQueries(baseline + 11 + 11):+ with self.assertNumQueries(baseline + 11 + 9):self.dashboard_api.get_dashboard(dashboard_id, query_params={"no_items_field": "true"})self.dashboard_api.create_insight({"filters": filter_dict, "dashboards": [dashboard_id]})- with self.assertNumQueries(baseline + 11 + 11):+ with self.assertNumQueries(baseline + 11 + 9):self.dashboard_api.get_dashboard(dashboard_id, query_params={"no_items_field": "true"})self.dashboard_api.create_insight({"filters": filter_dict, "dashboards": [dashboard_id]})- with self.assertNumQueries(baseline + 11 + 11):+ with self.assertNumQueries(baseline + 11 + 9):self.dashboard_api.get_dashboard(dashboard_id, query_params={"no_items_field": "true"})@snapshot_postgres_queries@@ -826,25 +826,13 @@ class TestDashboard(APIBaseTest, QueryMatchingTest):self.assertIsNotNone(response_data["tiles"][0]["last_refresh"])self.assertEqual(response_data["tiles"][0]["insight"]["result"][0]["count"], 0)- item_default.refresh_from_db()- item_trends.refresh_from_db()-- self.assertEqual(- isoparse(response_data["tiles"][0]["last_refresh"]),- item_default.caching_state.last_refresh,- )- self.assertEqual(- isoparse(response_data["tiles"][1]["last_refresh"]),- item_default.caching_state.last_refresh,- )-self.assertAlmostEqual(- item_default.caching_state.last_refresh,+ isoparse(response_data["tiles"][0]["last_refresh"]),now(),delta=datetime.timedelta(seconds=5),)self.assertAlmostEqual(- item_trends.caching_state.last_refresh,+ isoparse(response_data["tiles"][1]["last_refresh"]),now(),delta=datetime.timedelta(seconds=5),)diff --git a/posthog/caching/calculate_results.py b/posthog/caching/calculate_results.pyindex e4171f4b1b02..cd14ddd6e381 100644--- a/posthog/caching/calculate_results.py+++ b/posthog/caching/calculate_results.py@@ -1,4 +1,3 @@-from datetime import datetimefrom typing import TYPE_CHECKING, Optional, Unionimport structlog@@ -63,7 +62,6 @@ def calculate_for_query_based_insight(analytics_props: Optional[AnalyticsProps] = None,) -> "InsightResult":from posthog.caching.fetch_from_cache import InsightResult, NothingInCacheResult- from posthog.caching.insight_cache import update_cached_statetag_queries(**get_team_query_tags(team), insight_id=insight.pk)if dashboard:@@ -111,13 +109,6 @@ def calculate_for_query_based_insight(cache_key = response.get("cache_key")last_refresh = response.get("last_refresh")- if isinstance(cache_key, str) and isinstance(last_refresh, datetime):- update_cached_state( # Updating the relevant InsightCachingState- team.id,- cache_key,- last_refresh,- result=None, # Not caching the result here, since in HogQL this is the query runner's responsibility- )return InsightResult(# Translating `QueryResponse` to legacy insights shapediff --git a/posthog/caching/insight_cache.py b/posthog/caching/insight_cache.pydeleted file mode 100644index e30143e3c59e..000000000000--- a/posthog/caching/insight_cache.py+++ /dev/null@@ -1,166 +0,0 @@-from datetime import datetime, timedelta-from typing import Any, Optional, cast-from uuid import UUID--from django.conf import settings-from django.utils.timezone import now--import structlog-from prometheus_client import Counter, Gauge--from posthog.api.services.query import process_query_dict-from posthog.clickhouse.query_tagging import get_team_query_tags, tag_queries-from posthog.event_usage import EventSource-from posthog.exceptions_capture import capture_exception-from posthog.hogql_queries.query_runner import ExecutionMode-from posthog.schema_migrations.upgrade_manager import upgrade_query-from posthog.tasks.tasks import update_cache_task--from products.dashboards.backend.models.dashboard import Dashboard-from products.product_analytics.backend.models.insight import Insight-from products.product_analytics.backend.models.insight_caching_state import InsightCachingState--logger = structlog.get_logger(__name__)--REQUEUE_DELAY = timedelta(hours=2)-MAX_ATTEMPTS = 3--INSIGHT_CACHE_WRITE_COUNTER = Counter("posthog_cloud_insight_cache_write", "A write to the redis insight cache")--CACHE_UPDATE_SKIPPED_COUNTER = Counter(- "insight_cache_state_update_skipped", "Insight caching state is within target cache age and was not refreshed"-)-CACHE_UPDATE_SUCCEEDED_COUNTER = Counter(- "insight_cache_state_update_succeeded", "Insight cache was successfully refreshed", labelnames=["is_dashboard"]-)-CACHE_UPDATE_FAILED_COUNTER = Counter(- "insight_cache_state_update_failed", "Insight cache refresh failed", labelnames=["is_dashboard"]-)-CACHE_UPDATE_SHARED_GAUGE = Gauge(- "insight_cache_state_update_rows_updated",- "Number of rows updated during insight cache refresh. A single cache key can be shared by more than one insight/tile.",- multiprocess_mode="livesum",-)---def update_cache(caching_state_id: UUID):- # nosemgrep: idor-lookup-without-team (Celery task, ID from internal scheduling)- caching_state = InsightCachingState.objects.select_related(- "insight__team__organization",- "dashboard_tile__insight__team__organization",- "dashboard_tile__dashboard",- ).get(pk=caching_state_id)-- if caching_state.target_cache_age_seconds is None or (- caching_state.last_refresh is not None- and now() - caching_state.last_refresh < timedelta(seconds=caching_state.target_cache_age_seconds)- ):- CACHE_UPDATE_SKIPPED_COUNTER.inc()- return-- insight, dashboard = _extract_insight_dashboard(caching_state)-- exception: Optional[Exception] = None- cache_key: Optional[str] = None- cache_type: Optional[str] = None- result: Any = None-- metadata = {- "team_id": insight.team_id,- "insight_id": insight.pk,- "dashboard_id": dashboard.pk if dashboard else None,- "last_refresh": caching_state.last_refresh,- "last_refresh_queued_at": caching_state.last_refresh_queued_at,- }-- tag_queries(**get_team_query_tags(insight.team), insight_id=insight.pk, trigger="warming")- if dashboard:- tag_queries(dashboard_id=dashboard.pk)-- with upgrade_query(insight):- try:- response = process_query_dict(- insight.team,- cast(dict[str, Any], insight.query),- dashboard_filters_json=dashboard.filters if dashboard is not None else None,- execution_mode=ExecutionMode.CALCULATE_BLOCKING_ALWAYS,- user=insight.created_by,- analytics_props={"source": EventSource.CACHE_WARMING},- )- # TRICKY: `result` is null, because `process_query` already set the cache. `cache_type` also irrelevant- cache_key, cache_type, result = getattr(response, "cache_key", None), None, None- except Exception as err:- capture_exception(err, metadata)- exception = err-- if exception is None:- assert cache_key is not None- timestamp = now()- rows_updated = update_cached_state(- caching_state.team_id,- cache_key,- timestamp,- {"result": result, "type": cache_type, "last_refresh": timestamp} if result is not None else None,- )- CACHE_UPDATE_SUCCEEDED_COUNTER.labels(is_dashboard=dashboard is not None).inc()- CACHE_UPDATE_SHARED_GAUGE.inc(rows_updated)- logger.warn(- "Re-calculated insight cache",- rows_updated=rows_updated,- **metadata,- )- else:- logger.warn(- "Failed to re-calculate insight cache",- exception=exception,- **metadata,- refresh_attempt=caching_state.refresh_attempt,- )- CACHE_UPDATE_FAILED_COUNTER.labels(is_dashboard=dashboard is not None).inc()-- if caching_state.refresh_attempt < MAX_ATTEMPTS:- update_cache_task.apply_async(args=[caching_state_id], countdown=timedelta(minutes=10).total_seconds())-- # nosemgrep: idor-lookup-without-team (Celery task, ID from internal scheduling)- InsightCachingState.objects.filter(pk=caching_state.pk).update(- refresh_attempt=caching_state.refresh_attempt + 1,- last_refresh_queued_at=now(),- )---def update_cached_state(- team_id: int,- cache_key: str,- timestamp: datetime | str,- result: Any,- ttl: Optional[int] = None,-):- if result is not None: # This is particularly the case for HogQL-based queries, which cache.set() on their own- from posthog.caching.query_cache_routing import get_query_cache-- query_cache = get_query_cache()- query_cache.set(cache_key, result, ttl if ttl is not None else settings.CACHED_RESULTS_TTL)- INSIGHT_CACHE_WRITE_COUNTER.inc()-- # :TRICKY: We update _all_ states with same cache_key to avoid needless re-calculations and- # handle race conditions around cache_key changing.- # We exclude rows already at these exact values so a warm dashboard read - where every tile is- # a cache hit and reports its already-stored last_refresh - doesn't issue one redundant- # UPDATE per tile. The end state is identical; only no-op writes are skipped.- return (- InsightCachingState.objects.filter(team_id=team_id, cache_key=cache_key)- .exclude(last_refresh=timestamp, refresh_attempt=0)- .update(last_refresh=timestamp, refresh_attempt=0)- )---def _extract_insight_dashboard(caching_state: InsightCachingState) -> tuple[Insight, Optional[Dashboard]]:- if caching_state.dashboard_tile is not None:- assert caching_state.dashboard_tile.insight is not None-- return (- caching_state.dashboard_tile.insight,- caching_state.dashboard_tile.dashboard,- )- else:- return caching_state.insight, Nonediff --git a/posthog/caching/insight_caching_state.py b/posthog/caching/insight_caching_state.pydeleted file mode 100644index a519186eee8a..000000000000--- a/posthog/caching/insight_caching_state.py+++ /dev/null@@ -1,301 +0,0 @@-from datetime import timedelta-from enum import Enum-from functools import cached_property-from typing import Any, Optional, Union, cast--from django.core.paginator import Paginator-from django.utils.timezone import now--import structlog-from prometheus_client import Counter--from posthog.caching.calculate_results import calculate_cache_key-from posthog.caching.utils import active_teams, is_team_active-from posthog.hogql_queries.query_runner import get_query_runner_or_none-from posthog.models.team import Team-from posthog.models.utils import UUIDT-from posthog.schema_migrations.upgrade_manager import upgrade_query--from products.dashboards.backend.models.dashboard_tile import DashboardTile-from products.product_analytics.backend.models.insight import Insight, InsightViewed-from products.product_analytics.backend.models.insight_caching_state import InsightCachingState--VERY_RECENTLY_VIEWED_THRESHOLD = timedelta(hours=48)-GENERALLY_VIEWED_THRESHOLD = timedelta(weeks=2)--logger = structlog.get_logger(__name__)--TARGET_CACHE_AGE_COUNTER = Counter(- "insight_cache_state_target_age_calculated",- "Count of target cache age calculated for insight caching state",- labelnames=["target_cache_age"],-)--INSIGHT_CACHING_STATES_UPSERTED_COUNT = Counter(- "insight_cache_state_upserted_count",- "Count of insight caching states upserted, this is the success signal",-)---# :TODO: Make these configurable-class TargetCacheAge(Enum):- NO_CACHING = None- LOW_PRIORITY = timedelta(days=7)- MID_PRIORITY = timedelta(hours=24)- HIGH_PRIORITY = timedelta(hours=12)---INSERT_INSIGHT_CACHING_STATES_QUERY = """-INSERT INTO posthog_insightcachingstate AS state (- id,- team_id,- insight_id,- dashboard_tile_id,- cache_key,- target_cache_age_seconds,- created_at,- updated_at,- refresh_attempt-)-VALUES {values}-ON CONFLICT (insight_id, coalesce(dashboard_tile_id, -1)) DO UPDATE SET- last_refresh = (SELECT CASE WHEN state.cache_key != EXCLUDED.cache_key THEN NULL ELSE state.last_refresh END AS new_last_refresh),- last_refresh_queued_at = (SELECT CASE WHEN state.cache_key != EXCLUDED.cache_key THEN NULL ELSE state.last_refresh_queued_at END AS new_last_refresh_queued_at),- refresh_attempt = (SELECT CASE WHEN state.cache_key != EXCLUDED.cache_key THEN 0 ELSE state.refresh_attempt END AS new_refresh_attempt),- cache_key = EXCLUDED.cache_key,- target_cache_age_seconds = EXCLUDED.target_cache_age_seconds,- updated_at = EXCLUDED.updated_at-"""---# Helps do large-scale re-calculations efficiently by loading some data only once-class LazyLoader:- def __init__(self) -> None:- # Per-instance memo. A plain dict is used instead of functools.lru_cache on a- # bound method because lru_cache retains self and prevents GC of the instance.- self._is_team_active_cache: dict[int, bool] = {}-- @cached_property- def active_teams(self):- return active_teams()-- @cached_property- def recently_viewed_insights(self):- recently_viewed_insights = InsightViewed.objects.filter(- last_viewed_at__gte=now() - VERY_RECENTLY_VIEWED_THRESHOLD- ).distinct("insight_id")- return set(recently_viewed_insights.values_list("insight_id", flat=True))-- def is_team_active(self, team_id: int) -> bool:- cached = self._is_team_active_cache.get(team_id)- if cached is not None:- return cached- result = is_team_active(team_id)- self._is_team_active_cache[team_id] = result- return result---def insight_can_be_cached(insight: Optional[Insight]) -> bool:- if insight is None:- return False-- if insight.filters:- return True-- if not insight.query:- return False-- if get_query_runner_or_none(insight.query, insight.team) is not None:- return True-- if source := insight.query.get("source"):- if get_query_runner_or_none(source, insight.team) is not None:- return True-- return False---def sync_insight_cache_states():- lazy_loader = LazyLoader()- insights = (- Insight.objects_including_soft_deleted.all().prefetch_related("team", "sharingconfiguration_set").order_by("pk")- )- for page_of_insights in _iterate_large_queryset(insights, 1000):- batch = [upsert(insight.team, insight, lazy_loader, execute=False) for insight in page_of_insights]- _execute_insert(batch)-- tiles = (- DashboardTile.objects_including_soft_deleted.all()- .filter(insight__isnull=False)- .prefetch_related(- "dashboard",- "dashboard__sharingconfiguration_set",- "insight",- "insight__team",- )- .order_by("pk")- )-- for page_of_tiles in _iterate_large_queryset(tiles, 1000):- batch = [upsert(tile.insight.team, tile, lazy_loader, execute=False) for tile in page_of_tiles]- _execute_insert(batch)---def upsert( # TODO: Rename to `upsert_insight_caching_state` for clarity- team: Team,- target: Union[DashboardTile, Insight],- lazy_loader: Optional[LazyLoader] = None,- execute=True,-) -> Optional[InsightCachingState]:- lazy_loader = lazy_loader or LazyLoader()- cache_key = calculate_cache_key(target)- if cache_key is None: # Non-cachable model- return None-- insight = target if isinstance(target, Insight) else target.insight- if insight is None:- return None-- with upgrade_query(insight):- target_age = calculate_target_age(team, target, lazy_loader)- target_cache_age_seconds = target_age.value.total_seconds() if target_age.value is not None else None-- TARGET_CACHE_AGE_COUNTER.labels(target_cache_age=target_age.name).inc()-- model = InsightCachingState(- team_id=team.pk,- insight=insight,- dashboard_tile=target if isinstance(target, DashboardTile) else None,- cache_key=cache_key,- target_cache_age_seconds=target_cache_age_seconds,- )- if execute:- _execute_insert([model])- return None- else:- return model---def sync_insight_caching_state(- team_id: int,- insight_id: Optional[int] = None,- dashboard_tile_id: Optional[int] = None,-):- try:- team = Team.objects.get(pk=team_id)- item: Optional[DashboardTile | Insight] = None- if dashboard_tile_id is not None:- item = DashboardTile.objects_including_soft_deleted.get(pk=dashboard_tile_id)- elif insight_id is not None:- item = Insight.objects_including_soft_deleted.get(pk=insight_id)- if not item:- raise ValueError("Either insight_id or dashboard_tile_id must be provided")- if not item.deleted:- upsert(team, item)- except Exception as err:- # This is a best-effort kind synchronization, safe to ignore errors- logger.warn(- "Failed to sync InsightCachingState, ignoring",- exception=str(err),- team_id=team_id,- insight_id=insight_id,- dashboard_tile_id=dashboard_tile_id,- )---def calculate_target_age(team: Team, target: Union[DashboardTile, Insight], lazy_loader: LazyLoader) -> TargetCacheAge:- if isinstance(target, Insight):- return calculate_target_age_insight(team, target, lazy_loader)- else:- return calculate_target_age_dashboard_tile(team, target, lazy_loader)---def calculate_target_age_insight(team: Team, insight: Insight, lazy_loader: LazyLoader) -> TargetCacheAge:- if not lazy_loader.is_team_active(team.pk):- return TargetCacheAge.NO_CACHING-- if insight.deleted or not insight_can_be_cached(insight):- return TargetCacheAge.NO_CACHING-- if insight.pk not in lazy_loader.recently_viewed_insights:- return TargetCacheAge.NO_CACHING-- if insight.is_sharing_enabled:- return TargetCacheAge.MID_PRIORITY-- return TargetCacheAge.NO_CACHING---def calculate_target_age_dashboard_tile(- team: Team, dashboard_tile: DashboardTile, lazy_loader: LazyLoader-) -> TargetCacheAge:- if not lazy_loader.is_team_active(team.pk):- return TargetCacheAge.NO_CACHING-- if dashboard_tile.deleted or dashboard_tile.dashboard.deleted:- return TargetCacheAge.NO_CACHING-- if (- not dashboard_tile.insight- or dashboard_tile.insight.deleted- or not insight_can_be_cached(dashboard_tile.insight)- ):- return TargetCacheAge.NO_CACHING-- if dashboard_tile.dashboard_id == team.primary_dashboard_id:- return TargetCacheAge.HIGH_PRIORITY-- since_last_viewed = (- now() - dashboard_tile.dashboard.last_accessed_at- if dashboard_tile.dashboard.last_accessed_at- else timedelta(days=9999)- )- if since_last_viewed < VERY_RECENTLY_VIEWED_THRESHOLD:- return TargetCacheAge.HIGH_PRIORITY-- if since_last_viewed < GENERALLY_VIEWED_THRESHOLD:- return TargetCacheAge.MID_PRIORITY-- if dashboard_tile.dashboard.is_sharing_enabled:- return TargetCacheAge.HIGH_PRIORITY-- return TargetCacheAge.NO_CACHING---def _iterate_large_queryset(queryset, page_size):- paginator = Paginator(queryset, page_size)- for page_number in paginator.page_range:- page = paginator.page(page_number)-- yield page.object_list---def _execute_insert(states: list[Optional[InsightCachingState]]):- from django.db import connection-- models: list[InsightCachingState] = list(filter(None, states))- if len(models) == 0:- return-- timestamp = now()- values = []- params = []- for state in models:- values.append("(%s, %s, %s, %s, %s, %s, %s, %s, 0)")- params.extend(- [- UUIDT(),- state.team_id,- state.insight_id,- state.dashboard_tile_id,- state.cache_key,- state.target_cache_age_seconds,- timestamp,- timestamp,- ]- )-- with connection.cursor() as cursor:- query = INSERT_INSIGHT_CACHING_STATES_QUERY.format(values=", ".join(values))- cursor.execute(query, params=cast(list[Any], params))- INSIGHT_CACHING_STATES_UPSERTED_COUNT.inc(cursor.rowcount)diff --git a/posthog/caching/test/test_caching_utils.py b/posthog/caching/test/test_caching_utils.pydeleted file mode 100644index 32dc3ab05a0c..000000000000--- a/posthog/caching/test/test_caching_utils.py+++ /dev/null@@ -1,118 +0,0 @@-import pytest-from unittest.mock import patch--from posthog.caching.utils import (- IN_A_DAY,- IN_AN_HOUR,- RECENTLY_ACCESSED_TEAMS_POPULATED_KEY,- RECENTLY_ACCESSED_TEAMS_REDIS_KEY,- active_teams,- is_team_active,-)-from posthog.redis import get_client--[email protected](autouse=True)-def clear_redis_keys():- redis = get_client()- redis.delete(RECENTLY_ACCESSED_TEAMS_REDIS_KEY)- redis.delete(RECENTLY_ACCESSED_TEAMS_POPULATED_KEY)- yield- redis.delete(RECENTLY_ACCESSED_TEAMS_REDIS_KEY)- redis.delete(RECENTLY_ACCESSED_TEAMS_POPULATED_KEY)--- "members,expected",- [- pytest.param({"42": 10.0}, True, id="hit"),- # score 0 is a valid membership — guards against an `if score:` truthiness bug- pytest.param({"42": 0}, True, id="hit_score_zero"),- pytest.param({"99": 10.0}, False, id="miss_when_key_exists"),- ],-)-def test_is_team_active_with_existing_key(members, expected):- redis = get_client()- redis.zadd(RECENTLY_ACCESSED_TEAMS_REDIS_KEY, members)- redis.set(RECENTLY_ACCESSED_TEAMS_POPULATED_KEY, "1")-- with patch("posthog.caching.utils.sync_execute") as mock_sync_execute:- assert is_team_active(42) is expected- mock_sync_execute.assert_not_called()---def test_is_team_active_populates_when_key_missing():- with patch("posthog.caching.utils.sync_execute") as mock_sync_execute:- mock_sync_execute.return_value = [(42, 10.0)]- assert is_team_active(42) is True- mock_sync_execute.assert_called_once()---def test_is_team_active_returns_false_when_clickhouse_empty():- with patch("posthog.caching.utils.sync_execute") as mock_sync_execute:- mock_sync_execute.return_value = []- assert is_team_active(42) is False- mock_sync_execute.assert_called_once()---def test_is_team_active_caches_empty_clickhouse_result():- redis = get_client()- with patch("posthog.caching.utils.sync_execute") as mock_sync_execute:- mock_sync_execute.return_value = []-- assert is_team_active(42) is False- assert is_team_active(43) is False- assert is_team_active(44) is False-- assert mock_sync_execute.call_count == 1- assert redis.exists(RECENTLY_ACCESSED_TEAMS_POPULATED_KEY)---def test_active_teams_caches_empty_clickhouse_result():- redis = get_client()- with patch("posthog.caching.utils.sync_execute") as mock_sync_execute:- mock_sync_execute.return_value = []-- assert active_teams() == set()- assert active_teams() == set()-- assert mock_sync_execute.call_count == 1- assert redis.exists(RECENTLY_ACCESSED_TEAMS_POPULATED_KEY)---def test_populate_sets_24h_ttl_on_both_keys():- redis = get_client()- with patch("posthog.caching.utils.sync_execute") as mock_sync_execute:- mock_sync_execute.return_value = [(42, 10.0), (43, 20.0)]- is_team_active(42)-- for key in (RECENTLY_ACCESSED_TEAMS_REDIS_KEY, RECENTLY_ACCESSED_TEAMS_POPULATED_KEY):- ttl = redis.ttl(key)- # TTL is approximate due to the brief gap between EXPIRE and TTL calls- assert 0 < ttl <= IN_A_DAY, f"{key} ttl={ttl}"- assert ttl >= IN_A_DAY - 5, f"{key} ttl={ttl}"---def test_populate_clears_stale_zset_when_clickhouse_empty():- redis = get_client()- redis.zadd(RECENTLY_ACCESSED_TEAMS_REDIS_KEY, {"42": 10.0})-- with patch("posthog.caching.utils.sync_execute") as mock_sync_execute:- mock_sync_execute.return_value = []- assert is_team_active(99) is False-- assert not redis.exists(RECENTLY_ACCESSED_TEAMS_REDIS_KEY)- with patch("posthog.caching.utils.sync_execute") as mock_sync_execute:- assert is_team_active(42) is False- mock_sync_execute.assert_not_called()---def test_populate_sets_short_ttl_on_marker_when_clickhouse_empty():- redis = get_client()- with patch("posthog.caching.utils.sync_execute") as mock_sync_execute:- mock_sync_execute.return_value = []- is_team_active(42)-- ttl = redis.ttl(RECENTLY_ACCESSED_TEAMS_POPULATED_KEY)- assert 0 < ttl <= IN_AN_HOUR- assert ttl >= IN_AN_HOUR - 5diff --git a/posthog/caching/test/test_insight_cache.py b/posthog/caching/test/test_insight_cache.pydeleted file mode 100644index fe296292ff37..000000000000--- a/posthog/caching/test/test_insight_cache.py+++ /dev/null@@ -1,144 +0,0 @@-from datetime import timedelta-from typing import Optional--import pytest-from freezegun import freeze_time-from unittest.mock import patch--from django.utils.timezone import now--import orjson as json--from posthog.caching.insight_cache import update_cache, update_cached_state-from posthog.caching.insight_caching_state import upsert-from posthog.caching.test.test_insight_caching_state import create_insight, filter_dict-from posthog.models import Team, User-from posthog.models.signals import mute_selected_signals-from posthog.utils import get_safe_cache--from products.product_analytics.backend.models.insight_caching_state import InsightCachingState---def create_insight_caching_state(- team: Team,- user: User,- last_refresh: Optional[timedelta] = timedelta(days=14), # noqa- last_refresh_queued_at: Optional[timedelta] = None, # noqa- target_cache_age: Optional[timedelta] = timedelta(days=1), # noqa- refresh_attempt: int = 0,- filters=filter_dict,- **kw,-):- with mute_selected_signals():- insight = create_insight(team, user, filters=filters)-- upsert(team, insight)-- model = insight.caching_state- model.last_refresh = now() - last_refresh if last_refresh is not None else None- model.last_refresh_queued_at = now() - last_refresh_queued_at if last_refresh_queued_at is not None else None- model.target_cache_age_seconds = target_cache_age.total_seconds() if target_cache_age is not None else None- model.refresh_attempt = refresh_attempt- model.save()- return model---# Reaching into the internals of LocMemCache-def cache_keys(cache):- # Filter to only insight cache keys (prefixed with "cache_") to avoid- # picking up unrelated cache entries (e.g. group_types_for_project_*)- return {key.split(":", 2)[-1] for key in cache._cache.keys() if key.split(":", 2)[-1].startswith("cache_")}---@freeze_time("2020-01-04T13:01:01Z")-def test_update_cache(team: Team, user: User, cache):- caching_state = create_insight_caching_state(team, user, refresh_attempt=1)-- update_cache(caching_state.pk)-- assert cache_keys(cache) == {caching_state.cache_key}- cached_result = json.loads(get_safe_cache(caching_state.cache_key))- assert cached_result["results"] is not None- assert cached_result["last_refresh"] == "2020-01-04T13:01:01Z"-- updated_caching_state = InsightCachingState.objects.get(team=team)- assert updated_caching_state.last_refresh == now()- assert updated_caching_state.refresh_attempt == 0---@freeze_time("2020-01-04T13:01:01Z")-def test_update_cache_updates_identical_cache_keys(team: Team, user: User, cache):- caching_state1 = create_insight_caching_state(team, user, refresh_attempt=1)- caching_state2 = create_insight_caching_state(team, user, refresh_attempt=2)-- assert caching_state1.cache_key == caching_state2.cache_key-- update_cache(caching_state1.pk)-- assert cache_keys(cache) == {caching_state1.cache_key}-- updated_caching_states = InsightCachingState.objects.filter(team=team)- assert all(state.cache_key == caching_state1.cache_key for state in updated_caching_states)- assert all(state.last_refresh == now() for state in updated_caching_states)- assert all(state.refresh_attempt == 0 for state in updated_caching_states)---@freeze_time("2020-01-04T13:01:01Z")-@patch("posthog.caching.insight_cache.update_cache_task")-@patch("posthog.caching.insight_cache.process_query_dict", side_effect=Exception()) # HogQL branch-def test_update_cache_when_calculation_fails(- spy_process_query_dict,- spy_update_cache_task,- team: Team,- user: User,- cache,-):- caching_state = create_insight_caching_state(team, user, refresh_attempt=1)-- update_cache(caching_state.pk)-- assert cache_keys(cache) == set()-- updated_caching_state = InsightCachingState.objects.get(team=team)- assert updated_caching_state.last_refresh == caching_state.last_refresh- assert updated_caching_state.refresh_attempt == 2- assert updated_caching_state.last_refresh_queued_at == now()-- assert spy_update_cache_task.apply_async.call_count == 1---@freeze_time("2020-01-04T13:01:01Z")-def test_update_cache_when_recently_refreshed(team: Team, user: User):- caching_state = create_insight_caching_state(- team, user, last_refresh=timedelta(hours=1), target_cache_age=timedelta(days=1)- )-- update_cache(caching_state.pk)-- updated_caching_state = InsightCachingState.objects.get(team=team)-- assert updated_caching_state.last_refresh == caching_state.last_refresh---@freeze_time("2020-01-04T13:01:01Z")-def test_update_cached_state_skips_redundant_write(team: Team, user: User):- # A warm dashboard read calls update_cached_state once per tile, each reporting the- # already-stored last_refresh. A row already at the target values must not be re-written,- # otherwise every tile issues a redundant per-request UPDATE.- caching_state = create_insight_caching_state(team, user, last_refresh=timedelta(days=14), refresh_attempt=3)- fresh = now()-- # A genuine change writes the row and resets refresh_attempt.- assert update_cached_state(team.pk, caching_state.cache_key, fresh, result=None) == 1-- # Repeating with the same timestamp is a no-op - the redundant write is skipped.- assert update_cached_state(team.pk, caching_state.cache_key, fresh, result=None) == 0-- updated_caching_state = InsightCachingState.objects.get(pk=caching_state.pk)- assert updated_caching_state.last_refresh == fresh- assert updated_caching_state.refresh_attempt == 0diff --git a/posthog/caching/test/test_insight_caching_state.py b/posthog/caching/test/test_insight_caching_state.pydeleted file mode 100644index 6606f98a6136..000000000000--- a/posthog/caching/test/test_insight_caching_state.py+++ /dev/null@@ -1,570 +0,0 @@-from datetime import timedelta-from typing import Any, Optional, Union, cast--import pytest-from freezegun import freeze_time-from posthog.test.base import BaseTest-from unittest.mock import patch--from django.utils.timezone import now--from posthog.caching.insight_caching_state import (- LazyLoader,- TargetCacheAge,- calculate_target_age,- sync_insight_cache_states,- upsert,-)-from posthog.models import SharingConfiguration, Team, User-from posthog.models.signals import mute_selected_signals--from products.dashboards.backend.models.dashboard import Dashboard-from products.dashboards.backend.models.dashboard_tile import DashboardTile, Text-from products.product_analytics.backend.models.insight import Insight, InsightViewed-from products.product_analytics.backend.models.insight_caching_state import InsightCachingState--filter_dict = {- "events": [{"id": "$pageview"}],- "properties": [{"key": "$browser", "value": "Mac OS X"}],-}---def create_insight(- team: Team,- user: User,- mock_active_teams: Any = None,- mock_is_team_active: Any = None,- team_should_be_active=True,- viewed_at_delta: Optional[timedelta] = timedelta(hours=1), # noqa- is_shared=True,- filters=filter_dict,- deleted=False,- query: Optional[dict] = None,-) -> Insight:- if mock_active_teams:- mock_active_teams.return_value = {team.pk} if team_should_be_active else set()- if mock_is_team_active:- mock_is_team_active.return_value = team_should_be_active-- if query is not None:- filters = {}-- insight = Insight.objects.create(team=team, filters=filters, deleted=deleted, query=query)- if viewed_at_delta is not None:- InsightViewed.objects.create(- insight=insight,- last_viewed_at=now() - viewed_at_delta,- user=user,- team=team,- )- if is_shared:- SharingConfiguration.objects.create(team=team, insight=insight, enabled=True)-- return insight---def create_tile(- team: Team,- user: User,- mock_active_teams: Any = None,- mock_is_team_active: Any = None,- on_home_dashboard=False,- team_should_be_active=True,- viewed_at_delta: Optional[timedelta] = None,- insight_filters=filter_dict,- insight_deleted=False,- dashboard_deleted=False,- dashboard_tile_deleted=False,- is_dashboard_shared=True,- text_tile=False,- query: Optional[dict] = None,-) -> DashboardTile:- if mock_active_teams:- mock_active_teams.return_value = {team.pk} if team_should_be_active else set()- if mock_is_team_active:- mock_is_team_active.return_value = team_should_be_active-- dashboard = Dashboard.objects.create(- team=team,- last_accessed_at=now() - viewed_at_delta if viewed_at_delta else None,- deleted=dashboard_deleted,- )-- if on_home_dashboard:- team.primary_dashboard_id = dashboard.pk- team.save()-- if is_dashboard_shared:- SharingConfiguration.objects.create(team=team, dashboard=dashboard, enabled=True)-- insight = text = None- if text_tile:- text = Text.objects.create(team=team, body="Some text")- else:- if query is not None:- insight_filters = {}- insight = Insight.objects.create(team=team, filters=insight_filters, deleted=insight_deleted, query=query)-- return DashboardTile.objects.create(- dashboard=dashboard,- insight=insight,- text=text,- deleted=dashboard_tile_deleted,- )--- "create_item,create_item_kw,expected_target_age",- [- # Insight test cases- pytest.param(create_insight, {}, TargetCacheAge.MID_PRIORITY, id="shared insight (base)"),- pytest.param(- create_insight,- {"is_shared": False},- TargetCacheAge.NO_CACHING,- id="not shared insight",- ),- pytest.param(- create_insight,- {"team_should_be_active": False},- TargetCacheAge.NO_CACHING,- id="insight with inactive team",- ),- pytest.param(- create_insight,- {"viewed_at_delta": None},- TargetCacheAge.NO_CACHING,- id="insight never viewed",- ),- pytest.param(- create_insight,- {"viewed_at_delta": timedelta(weeks=100)},- TargetCacheAge.NO_CACHING,- id="insight viewed long time ago",- ),- pytest.param(- create_insight,- {"filters": {}},- TargetCacheAge.NO_CACHING,- id="insight with no filters",- ),- pytest.param(- create_insight,- {"deleted": True},- TargetCacheAge.NO_CACHING,- id="deleted insight",- ),- # Dashboard tile test cases- pytest.param(create_tile, {}, TargetCacheAge.HIGH_PRIORITY, id="shared tile (base)"),- pytest.param(- create_tile,- {"is_dashboard_shared": False},- TargetCacheAge.NO_CACHING,- id="not shared tile",- ),- pytest.param(- create_tile,- {"team_should_be_active": False},- TargetCacheAge.NO_CACHING,- id="tile with inactive team",- ),- pytest.param(- create_tile,- {"dashboard_tile_deleted": True},- TargetCacheAge.NO_CACHING,- id="deleted tile",- ),- pytest.param(- create_tile,- {"dashboard_deleted": True},- TargetCacheAge.NO_CACHING,- id="tile with deleted dashboard",- ),- pytest.param(- create_tile,- {"insight_deleted": True},- TargetCacheAge.NO_CACHING,- id="tile with deleted insight",- ),- pytest.param(- create_tile,- {"insight_filters": {}},- TargetCacheAge.NO_CACHING,- id="tile with insight with no filters",- ),- pytest.param(- create_tile,- {"text_tile": True},- TargetCacheAge.NO_CACHING,- id="tile with text",- ),- pytest.param(- create_tile,- {"on_home_dashboard": True},- TargetCacheAge.HIGH_PRIORITY,- id="tile on home dashboard",- ),- pytest.param(- create_tile,- {"viewed_at_delta": timedelta(hours=12)},- TargetCacheAge.HIGH_PRIORITY,- id="very recently viewed tile (1)",- ),- pytest.param(- create_tile,- {"viewed_at_delta": timedelta(hours=37)},- TargetCacheAge.HIGH_PRIORITY,- id="very recently viewed tile (2)",- ),- pytest.param(- create_tile,- {"viewed_at_delta": timedelta(hours=50)},- TargetCacheAge.MID_PRIORITY,- id="recently viewed tile (1)",- ),- pytest.param(- create_tile,- {"viewed_at_delta": timedelta(days=10)},- TargetCacheAge.MID_PRIORITY,- id="recently viewed tile (2)",- ),- pytest.param(- create_tile,- {"viewed_at_delta": timedelta(days=20), "is_dashboard_shared": True},- TargetCacheAge.HIGH_PRIORITY,- id="shared tile viewed ages ago",- ),- pytest.param(- create_tile,- {"viewed_at_delta": timedelta(days=20), "is_dashboard_shared": False},- TargetCacheAge.NO_CACHING,- id="tile viewed ages ago",- ),- # cacheable types of query- pytest.param(- create_insight,- {"query": {"kind": "EventsQuery", "select": []}, "viewed_at_delta": timedelta(days=1)},- TargetCacheAge.MID_PRIORITY,- id="insight with EventsQuery query viewed recently",- ),- pytest.param(- create_insight,- {"query": {"kind": "HogQLQuery", "query": ""}, "viewed_at_delta": timedelta(days=1)},- TargetCacheAge.MID_PRIORITY,- id="insight with HogQLQuery query viewed recently",- ),- # other types of query aren't cacheable- pytest.param(- create_insight,- {- "query": {"kind": "TimeToSeeDataSessionsQuery"},- "viewed_at_delta": timedelta(days=1),- },- TargetCacheAge.NO_CACHING,- id="insight with TimeToSeeDataSessionsQuery query viewed recently",- ),- pytest.param(- create_insight,- {- "query": {"kind": "TimeToSeeDataQuery"},- "viewed_at_delta": timedelta(days=1),- },- TargetCacheAge.NO_CACHING,- id="insight with TimeToSeeDataQuery query viewed recently",- ),- pytest.param(- create_insight,- {"query": {"kind": "something else"}, "viewed_at_delta": timedelta(days=1)},- TargetCacheAge.NO_CACHING,- id="insight with query viewed recently but not a cacheable type of query",- ),- # unless they have cacheable source- pytest.param(- create_insight,- {- "query": {"kind": "something else", "source": {"kind": "EventsQuery", "select": []}},- "viewed_at_delta": timedelta(days=1),- },- TargetCacheAge.MID_PRIORITY,- id="insight with query viewed recently, not a cacheable type of query, but with a cacheable source",- ),- pytest.param(- create_tile,- {- "query": {"kind": "EventsQuery", "select": []},- "viewed_at_delta": timedelta(days=20),- "is_dashboard_shared": False,- },- TargetCacheAge.NO_CACHING,- id="tile with query viewed ages ago",- ),- pytest.param(- create_tile,- {- "query": {"kind": "EventsQuery", "select": []},- "viewed_at_delta": timedelta(days=20),- "is_dashboard_shared": True,- },- TargetCacheAge.HIGH_PRIORITY,- id="shared tile with query viewed ages ago",- ),- ],-)-@patch("posthog.caching.insight_caching_state.is_team_active")-@patch("posthog.caching.insight_caching_state.active_teams")-def test_calculate_target_age(- mock_active_teams,- mock_is_team_active,- team: Team,- user: User,- create_item,- create_item_kw: dict,- expected_target_age: TargetCacheAge,-):- item = cast(- Union[Insight, DashboardTile],- create_item(- team=team,- user=user,- mock_active_teams=mock_active_teams,- mock_is_team_active=mock_is_team_active,- **create_item_kw,- ),- )- target_age = calculate_target_age(team, item, LazyLoader())- assert target_age == expected_target_age---@patch("posthog.caching.insight_caching_state.is_team_active")-@patch("posthog.caching.insight_caching_state.active_teams")-def test_upsert_new_insight(mock_active_teams, mock_is_team_active, team: Team, user: User):- with mute_selected_signals():- insight = create_insight(- team=team,- user=user,- mock_active_teams=mock_active_teams,- mock_is_team_active=mock_is_team_active,- )- upsert(team, insight)-- assert InsightCachingState.objects.filter(team=team).count() == 1- caching_state = InsightCachingState.objects.get(team=team)-- assert caching_state is not None- assert caching_state.team_id == team.pk- assert caching_state.insight == insight- assert caching_state.dashboard_tile is None- assert isinstance(caching_state.cache_key, str)- assert caching_state.target_cache_age_seconds == TargetCacheAge.MID_PRIORITY.value.total_seconds()- assert caching_state.last_refresh is None- assert caching_state.last_refresh_queued_at is None- assert caching_state.refresh_attempt == 0---@patch("posthog.caching.insight_caching_state.is_team_active")-@patch("posthog.caching.insight_caching_state.active_teams")-def test_upsert_update_insight(mock_active_teams, mock_is_team_active, team: Team, user: User):- with mute_selected_signals():- insight = create_insight(- team=team,- user=user,- mock_active_teams=mock_active_teams,- mock_is_team_active=mock_is_team_active,- )- upsert(team, insight)-- caching_state = InsightCachingState.objects.get(team=team)- caching_state.last_refresh = now()- caching_state.last_refresh_queued_at = now()- caching_state.refresh_attempt = 1- caching_state.save()-- with mute_selected_signals():- insight.deleted = True- insight.save()-- upsert(team, insight)- updated_caching_state = InsightCachingState.objects.get(team=team)-- assert InsightCachingState.objects.filter(team=team).count() == 1- assert updated_caching_state is not None- assert updated_caching_state.cache_key == caching_state.cache_key- assert updated_caching_state.target_cache_age_seconds is None- assert updated_caching_state.last_refresh == caching_state.last_refresh- assert updated_caching_state.last_refresh_queued_at == caching_state.last_refresh_queued_at- assert updated_caching_state.refresh_attempt == 1---@patch("posthog.caching.insight_caching_state.is_team_active")-@patch("posthog.caching.insight_caching_state.active_teams")-def test_upsert_update_insight_with_filter_change(mock_active_teams, mock_is_team_active, team: Team, user: User):- with mute_selected_signals():- insight = create_insight(- team=team,- user=user,- mock_active_teams=mock_active_teams,- mock_is_team_active=mock_is_team_active,- )-- upsert(team, insight)-- caching_state = InsightCachingState.objects.get(team=team)- caching_state.last_refresh = now()- caching_state.refresh_attempt = 1- caching_state.save()-- with mute_selected_signals():- insight.filters = {- **filter_dict,- "events": [{"id": "$pageleave"}],- }- insight.save()-- upsert(team, insight)- updated_caching_state = InsightCachingState.objects.get(team=team)-- assert InsightCachingState.objects.filter(team=team).count() == 1- assert updated_caching_state is not None- assert updated_caching_state.cache_key != caching_state.cache_key- assert updated_caching_state.target_cache_age_seconds is not None- assert updated_caching_state.last_refresh is None- assert updated_caching_state.last_refresh_queued_at is None- assert updated_caching_state.refresh_attempt == 0---@patch("posthog.caching.insight_caching_state.is_team_active")-@patch("posthog.caching.insight_caching_state.active_teams")-def test_upsert_new_tile(mock_active_teams, mock_is_team_active, team: Team, user: User):- with mute_selected_signals():- tile = create_tile(- team=team,- user=user,- mock_active_teams=mock_active_teams,- mock_is_team_active=mock_is_team_active,- )- upsert(team, tile)-- assert InsightCachingState.objects.filter(team=team).count() == 1-- caching_state = InsightCachingState.objects.get(team=team)- assert caching_state is not None- assert caching_state.team_id == team.pk- assert caching_state.insight == tile.insight- assert caching_state.dashboard_tile == tile- assert isinstance(caching_state.cache_key, str)- assert caching_state.target_cache_age_seconds == TargetCacheAge.HIGH_PRIORITY.value.total_seconds()- assert caching_state.last_refresh is None- assert caching_state.last_refresh_queued_at is None- assert caching_state.refresh_attempt == 0---@patch("posthog.caching.insight_caching_state.is_team_active")-@patch("posthog.caching.insight_caching_state.active_teams")-def test_upsert_text_tile_does_not_create_record(mock_active_teams, mock_is_team_active, team: Team, user: User):- tile = create_tile(- team=team,- user=user,- mock_active_teams=mock_active_teams,- mock_is_team_active=mock_is_team_active,- text_tile=True,- )- upsert(team, tile)-- assert InsightCachingState.objects.filter(team=team).count() == 0---@freeze_time("2020-01-04T13:01:01Z")-def test_sync_insight_cache_states(team: Team, user: User):- with mute_selected_signals():- create_insight(team=team, user=user)- create_tile(team=team, user=user)-- sync_insight_cache_states()-- assert InsightCachingState.objects.filter(team=team).count() == 3---@freeze_time("2020-01-04T13:01:01Z")-def test_insight_cache_states_when_deleted_insight(team: Team, user: User):- with mute_selected_signals():- insight = create_insight(team=team, user=user)-- assert InsightCachingState.objects.filter(team=team, insight_id=insight.id).count() == 0-- # after sync we have a record for the insight- sync_insight_cache_states()- assert InsightCachingState.objects.filter(team=team, insight_id=insight.id).count() == 1-- # soft-deleting the insight *does not* cascade to the caching state- insight.deleted = True- insight.save()-- assert InsightCachingState.objects.filter(team=team, insight_id=insight.id).count() == 1-- # periodic sync sets to no caching- sync_insight_cache_states()- single_match = InsightCachingState.objects.filter(team=team, insight_id=insight.id).first()- assert single_match is not None- assert single_match.target_cache_age_seconds is None---class TestLazyLoader(BaseTest):- @patch("posthog.caching.insight_caching_state.is_team_active")- def test_lazy_loader_is_team_active_memoizes(self, mock_is_team_active):- mock_is_team_active.return_value = True- loader = LazyLoader()-- self.assertTrue(loader.is_team_active(42))- self.assertTrue(loader.is_team_active(42))-- mock_is_team_active.assert_called_once_with(42)-- @patch("posthog.caching.insight_caching_state.active_teams")- def test_lazy_loader_active_teams_still_works(self, mock_active_teams):- mock_active_teams.return_value = {1, 2, 3}- loader = LazyLoader()-- self.assertEqual(loader.active_teams, {1, 2, 3})- # cached_property — only called once even across repeated access- _ = loader.active_teams- mock_active_teams.assert_called_once()-- @freeze_time("2021-08-25T22:09:14.252Z")- def test_recently_viewed_insights(self):- insights = [Insight.objects.create(team=self.team) for _ in range(3)]- user2 = User.objects.create(email="[email protected]")-- InsightViewed.objects.create(- insight=insights[0],- last_viewed_at=now() - timedelta(hours=50),- user=self.user,- team=self.team,- )- InsightViewed.objects.create(- insight=insights[1],- last_viewed_at=now() - timedelta(hours=50),- user=self.user,- team=self.team,- )- InsightViewed.objects.create(- insight=insights[1],- last_viewed_at=now() - timedelta(hours=35),- user=user2,- team=self.team,- )- InsightViewed.objects.create(- insight=insights[2],- last_viewed_at=now() - timedelta(hours=2),- user=self.user,- team=self.team,- )-- self.assertEqual(LazyLoader().recently_viewed_insights, {insights[1].pk, insights[2].pk})diff --git a/posthog/caching/utils.py b/posthog/caching/utils.pyindex fc2f3464b40c..3e81efafbdb3 100644--- a/posthog/caching/utils.py+++ b/posthog/caching/utils.py@@ -11,14 +11,6 @@ from posthog.models.filters.path_filter import PathFilterfrom posthog.models.filters.retention_filter import RetentionFilterfrom posthog.models.filters.stickiness_filter import StickinessFilterfrom posthog.models.team.team import Team-from posthog.redis import get_client--RECENTLY_ACCESSED_TEAMS_REDIS_KEY = "INSIGHT_CACHE_UPDATE_RECENTLY_ACCESSED_TEAMS"-# Separate from the zset so an empty result has somewhere to land without a sentinel team.-RECENTLY_ACCESSED_TEAMS_POPULATED_KEY = "INSIGHT_CACHE_UPDATE_RECENTLY_ACCESSED_TEAMS_POPULATED"--IN_AN_HOUR = 3_600-IN_A_DAY = 86_400def ensure_is_date(candidate: Optional[Union[str, datetime]]) -> Optional[datetime]:@@ -44,73 +36,6 @@ def largest_teams(limit: int) -> set[int]:return {int(team_id) for team_id, _ in teams_by_event_count}-def _populate_active_teams(redis) -> dict[int, float]:- # NOTE: the ClickHouse `now()` function used here does not cooperate with freezegun.- teams_by_recency = sync_execute(- """- SELECT team_id, date_diff('second', max(timestamp), now()) AS age- FROM events- WHERE timestamp > date_sub(DAY, 3, now()) AND timestamp < now()- GROUP BY team_id- ORDER BY age;- """- )- teams = dict(teams_by_recency)- # Marker is set even on empty results, so callers don't re-query for every inactive team.- # Empty results get a shorter TTL so a newly-active team gets picked up within an hour.- marker_ttl = IN_A_DAY if teams else IN_AN_HOUR- pipe = redis.pipeline()- if teams:- pipe.zadd(RECENTLY_ACCESSED_TEAMS_REDIS_KEY, teams)- pipe.expire(RECENTLY_ACCESSED_TEAMS_REDIS_KEY, IN_A_DAY)- else:- pipe.delete(RECENTLY_ACCESSED_TEAMS_REDIS_KEY)- pipe.set(RECENTLY_ACCESSED_TEAMS_POPULATED_KEY, "1", ex=marker_ttl)- pipe.execute()- return teams---def is_team_active(team_id: int) -> bool:- """- O(log n) membership test on the recently-accessed-teams zset. Hot-path callers- (signal-fired `sync_insight_caching_state` Celery tasks) should use this instead- of `active_teams()` — one ZSCORE instead of a full ZRANGE of the set.- """- redis = get_client()- score = redis.zscore(RECENTLY_ACCESSED_TEAMS_REDIS_KEY, team_id)- if score is not None:- return True- # ZSCORE None: either the team isn't recently active, or we haven't populated yet.- if redis.exists(RECENTLY_ACCESSED_TEAMS_POPULATED_KEY):- return False- populated = _populate_active_teams(redis)- return team_id in populated---def active_teams() -> set[int]:- """- Teams are stored in a sorted set. [{team_id: score}, {team_id: score}].- Their "score" is the number of seconds since last event.- Lower is better.- This lets us exclude teams not in the set as they don't have recent events.- That is, if a team has not ingested events in the last three days, why refresh its insights?- And could let us process the teams in order of how recently they ingested events.- This assumes that the list of active teams is small enough to reasonably load in one go.-- Retained for the batch path `sync_insight_cache_states()`, which genuinely iterates over- every insight/tile and benefits from loading the set once. Do NOT use this on the- signal-fired hot path — use `is_team_active()` instead.- """- redis = get_client()- all_teams: list[tuple[bytes, float]] = redis.zrange(RECENTLY_ACCESSED_TEAMS_REDIS_KEY, 0, -1, withscores=True)- if all_teams:- return {int(team_id) for team_id, _ in all_teams}- if redis.exists(RECENTLY_ACCESSED_TEAMS_POPULATED_KEY):- return set()- teams = _populate_active_teams(redis)- return set(teams.keys())--def last_refresh_from_cached_result(cached_result: dict | object) -> Optional[datetime]:last_refresh: str | datetime | Noneif isinstance(cached_result, dict):diff --git a/posthog/decorators.py b/posthog/decorators.pyindex dec1b221be71..548ed289aa23 100644--- a/posthog/decorators.py+++ b/posthog/decorators.py@@ -3,10 +3,12 @@ from enum import StrEnumfrom functools import wrapsfrom typing import Any, TypeVar, Union, cast+from django.conf import settingsfrom django.urls import resolvefrom django.utils.timezone import nowfrom loginas.utils import is_impersonated_session+from prometheus_client import Counterfrom rest_framework.request import Requestfrom rest_framework.response import Responsefrom statshog.defaults.django import statsd@@ -20,6 +22,8 @@ from posthog.utils import refresh_requested_by_clientfrom .utils import generate_cache_key, get_safe_cache+INSIGHT_CACHE_WRITE_COUNTER = Counter("posthog_cloud_insight_cache_write", "A write to the redis insight cache")+class CacheType(StrEnum):TRENDS = "Trends"@@ -46,7 +50,7 @@ def cached_by_filters(f: Callable[[U, Request], T]) -> Callable[[U, Request], T]@wraps(f)def wrapper(self: U, request: Request) -> T:- from posthog.caching.insight_cache import update_cached_state+ from posthog.caching.query_cache_routing import get_query_cache# prepare caching paramsteam = self.team@@ -100,7 +104,8 @@ def cached_by_filters(f: Callable[[U, Request], T]) -> Callable[[U, Request], T]fresh_result_package["last_refresh"] = timestamp # ty: ignore[invalid-assignment]fresh_result_package["is_cached"] = False # ty: ignore[invalid-assignment]fresh_result_package["query_method"] = query_method # ty: ignore[invalid-assignment]- update_cached_state(team.pk, cache_key, timestamp, fresh_result_package)+ get_query_cache().set(cache_key, fresh_result_package, settings.CACHED_RESULTS_TTL)+ INSIGHT_CACHE_WRITE_COUNTER.inc()return fresh_result_packagediff --git a/posthog/hogql_queries/insights/trends/test/__snapshots__/test_trends.ambr b/posthog/hogql_queries/insights/trends/test/__snapshots__/test_trends.ambrindex dddbde829fd2..6c8e9fd20953 100644--- a/posthog/hogql_queries/insights/trends/test/__snapshots__/test_trends.ambr+++ b/posthog/hogql_queries/insights/trends/test/__snapshots__/test_trends.ambr@@ -738,18 +738,6 @@'''# ---# name: TestTrends.test_dau_with_breakdown_filtering_with_sampling- '''- /* celery:posthog.tasks.tasks.sync_insight_caching_state */- SELECT team_id,- date_diff('second', max(timestamp), now()) AS age- FROM events- WHERE timestamp > date_sub(DAY, 3, now())- AND timestamp < now()- GROUP BY team_id- ORDER BY age;- '''-# ----# name: TestTrends.test_dau_with_breakdown_filtering_with_sampling.1'''SELECT groupArray(1)(date)[1] AS date,arrayFold((acc, x) -> arrayMap(i -> plus(acc[i], x[i]), range(1, plus(length(date), 1))), groupArray(ifNull(total, 0)), arrayWithConstant(length(date), reinterpretAsFloat64(0))) AS total,@@ -802,7 +790,7 @@use_hive_partitioning=0'''# ----# name: TestTrends.test_dau_with_breakdown_filtering_with_sampling.2+# name: TestTrends.test_dau_with_breakdown_filtering_with_sampling.1'''SELECT groupArray(1)(date)[1] AS date,arrayFold((acc, x) -> arrayMap(i -> plus(acc[i], x[i]), range(1, plus(length(date), 1))), groupArray(ifNull(total, 0)), arrayWithConstant(length(date), reinterpretAsFloat64(0))) AS total,@@ -855,6 +843,59 @@use_hive_partitioning=0'''# ---+# name: TestTrends.test_dau_with_breakdown_filtering_with_sampling.2+ '''+ SELECT groupArray(1)(date)[1] AS date,+ arrayFold((acc, x) -> arrayMap(i -> plus(acc[i], x[i]), range(1, plus(length(date), 1))), groupArray(ifNull(total, 0)), arrayWithConstant(length(date), reinterpretAsFloat64(0))) AS total,+ arrayMap(i -> if(ifNull(greaterOrEquals(row_number, 25), 0), '$$_posthog_breakdown_other_$$', i), breakdown_value) AS breakdown_value+ FROM+ (SELECT arrayMap(number -> plus(toStartOfInterval(assumeNotNull(toDateTime('2019-12-28 00:00:00', 'UTC')), toIntervalDay(1)), toIntervalDay(number)), range(0, plus(coalesce(dateDiff('day', toStartOfInterval(assumeNotNull(toDateTime('2019-12-28 00:00:00', 'UTC')), toIntervalDay(1)), toStartOfInterval(assumeNotNull(toDateTime('2020-01-04 23:59:59', 'UTC')), toIntervalDay(1)))), 1))) AS date,+ arrayMap(_match_date -> arraySum(arraySlice(groupArray(ifNull(count, 0)), indexOf(groupArray(day_start) AS _days_for_count, _match_date) AS _index, plus(minus(arrayLastIndex(x -> ifNull(equals(x, _match_date), isNull(x)+ and isNull(_match_date)), _days_for_count), _index), 1))), date) AS total,+ breakdown_value AS breakdown_value,+ rowNumberInAllBlocks() AS row_number+ FROM+ (SELECT sum(total) AS count,+ day_start AS day_start,+ [ifNull(toString(breakdown_value_1), '$$_posthog_breakdown_null_$$')] AS breakdown_value+ FROM+ (SELECT count(DISTINCT if(not(empty(e__override.distinct_id)), e__override.person_id, e.person_id)) AS total,+ toStartOfDay(toTimeZone(e.timestamp, 'UTC')) AS day_start,+ ifNull(nullIf(leftUTF8(toString(replaceRegexpAll(nullIf(nullIf(JSONExtractRaw(e.properties, '$some_property'), ''), 'null'), '^"|"$', '')), 400), ''), '$$_posthog_breakdown_null_$$') AS breakdown_value_1+ FROM events AS e+ LEFT OUTER JOIN+ (SELECT argMax(person_distinct_id_overrides.person_id, person_distinct_id_overrides.version) AS person_id,+ person_distinct_id_overrides.distinct_id AS distinct_id+ FROM person_distinct_id_overrides+ WHERE equals(person_distinct_id_overrides.team_id, 99999)+ GROUP BY person_distinct_id_overrides.distinct_id+ HAVING equals(argMax(person_distinct_id_overrides.is_deleted, person_distinct_id_overrides.version), 0) SETTINGS optimize_aggregation_in_order=1) AS e__override ON equals(e.distinct_id, e__override.distinct_id)+ WHERE and(equals(e.team_id, 99999), greaterOrEquals(e.timestamp, toStartOfInterval(assumeNotNull(toDateTime('2019-12-28 00:00:00', 'UTC')), toIntervalDay(1))), lessOrEquals(e.timestamp, assumeNotNull(toDateTime('2020-01-04 23:59:59', 'UTC'))), equals(e.event, 'sign up'))+ GROUP BY day_start,+ breakdown_value_1)+ GROUP BY day_start,+ breakdown_value_1+ ORDER BY day_start ASC,+ breakdown_value ASC)+ GROUP BY breakdown_value+ ORDER BY if(has(breakdown_value, '$$_posthog_breakdown_other_$$'), 2, if(has(breakdown_value, '$$_posthog_breakdown_null_$$'), 1, 0)) ASC, arraySum(total) DESC, breakdown_value ASC)+ WHERE arrayExists(x -> isNotNull(x), breakdown_value)+ GROUP BY breakdown_value+ ORDER BY if(has(breakdown_value, '$$_posthog_breakdown_other_$$'), 2, if(has(breakdown_value, '$$_posthog_breakdown_null_$$'), 1, 0)) ASC, arraySum(total) DESC, breakdown_value ASC+ LIMIT 50000 SETTINGS readonly=2,+ max_execution_time=60,+ allow_experimental_object_type=1,+ max_ast_elements=4000000,+ max_expanded_ast_elements=4000000,+ max_bytes_before_external_group_by=0,+ transform_null_in=1,+ optimize_min_equality_disjunction_chain_length=4294967295,+ optimize_rewrite_aggregate_function_with_if=0,+ optimize_min_inequality_conjunction_chain_length=4294967295,+ allow_experimental_join_condition=1,+ use_hive_partitioning=0+ '''+# ---# name: TestTrends.test_dau_with_breakdown_filtering_with_sampling.3'''SELECT groupArray(1)(date)[1] AS date,@@ -1414,18 +1455,6 @@# ---# name: TestTrends.test_person_filtering_in_cohort_in_action'''- /* celery:posthog.tasks.tasks.sync_insight_caching_state */- SELECT team_id,- date_diff('second', max(timestamp), now()) AS age- FROM events- WHERE timestamp > date_sub(DAY, 3, now())- AND timestamp < now()- GROUP BY team_id- ORDER BY age;- '''-# ----# name: TestTrends.test_person_filtering_in_cohort_in_action.1- '''SELECT count(DISTINCT person_id)FROM cohortpeople@@ -1434,6 +1463,62 @@AND version = 0'''# ---+# name: TestTrends.test_person_filtering_in_cohort_in_action.1+ '''+ SELECT groupArray(1)(date)[1] AS date,+ arrayFold((acc, x) -> arrayMap(i -> plus(acc[i], x[i]), range(1, plus(length(date), 1))), groupArray(ifNull(total, 0)), arrayWithConstant(length(date), reinterpretAsFloat64(0))) AS total,+ if(ifNull(greaterOrEquals(row_number, 25), 0), '$$_posthog_breakdown_other_$$', breakdown_value) AS breakdown_value+ FROM+ (SELECT arrayMap(number -> plus(toStartOfInterval(assumeNotNull(toDateTime('2019-12-28 00:00:00', 'UTC')), toIntervalDay(1)), toIntervalDay(number)), range(0, plus(coalesce(dateDiff('day', toStartOfInterval(assumeNotNull(toDateTime('2019-12-28 00:00:00', 'UTC')), toIntervalDay(1)), toStartOfInterval(assumeNotNull(toDateTime('2020-01-04 23:59:59', 'UTC')), toIntervalDay(1)))), 1))) AS date,+ arrayMap(_match_date -> arraySum(arraySlice(groupArray(ifNull(count, 0)), indexOf(groupArray(day_start) AS _days_for_count, _match_date) AS _index, plus(minus(arrayLastIndex(x -> ifNull(equals(x, _match_date), isNull(x)+ and isNull(_match_date)), _days_for_count), _index), 1))), date) AS total,+ breakdown_value AS breakdown_value,+ rowNumberInAllBlocks() AS row_number+ FROM+ (SELECT sum(total) AS count,+ day_start AS day_start,+ breakdown_value AS breakdown_value+ FROM+ (SELECT count() AS total,+ toStartOfDay(toTimeZone(e.timestamp, 'UTC')) AS day_start,+ ifNull(nullIf(leftUTF8(toString(replaceRegexpAll(nullIf(nullIf(JSONExtractRaw(e.properties, '$some_property'), ''), 'null'), '^"|"$', '')), 400), ''), '$$_posthog_breakdown_null_$$') AS breakdown_value+ FROM events AS e+ LEFT OUTER JOIN+ (SELECT argMax(person_distinct_id_overrides.person_id, person_distinct_id_overrides.version) AS person_id,+ person_distinct_id_overrides.distinct_id AS distinct_id+ FROM person_distinct_id_overrides+ WHERE equals(person_distinct_id_overrides.team_id, 99999)+ GROUP BY person_distinct_id_overrides.distinct_id+ HAVING equals(argMax(person_distinct_id_overrides.is_deleted, person_distinct_id_overrides.version), 0) SETTINGS optimize_aggregation_in_order=1) AS e__override ON equals(e.distinct_id, e__override.distinct_id)+ WHERE and(equals(e.team_id, 99999), greaterOrEquals(e.timestamp, toStartOfInterval(assumeNotNull(toDateTime('2019-12-28 00:00:00', 'UTC')), toIntervalDay(1))), lessOrEquals(e.timestamp, assumeNotNull(toDateTime('2020-01-04 23:59:59', 'UTC'))), and(equals(e.event, 'sign up'), in(if(not(empty(e__override.distinct_id)), e__override.person_id, e.person_id),+ (SELECT cohortpeople.person_id AS person_id+ FROM cohortpeople+ WHERE and(equals(cohortpeople.team_id, 99999), equals(cohortpeople.cohort_id, 99999), equals(cohortpeople.version, 0))))))+ GROUP BY day_start,+ breakdown_value)+ GROUP BY day_start,+ breakdown_value+ ORDER BY day_start ASC,+ breakdown_value ASC)+ GROUP BY breakdown_value+ ORDER BY if(ifNull(equals(breakdown_value, '$$_posthog_breakdown_other_$$'), 0), 2, if(ifNull(equals(breakdown_value, '$$_posthog_breakdown_null_$$'), 0), 1, 0)) ASC, arraySum(total) DESC, breakdown_value ASC)+ WHERE isNotNull(breakdown_value)+ GROUP BY breakdown_value+ ORDER BY if(ifNull(equals(breakdown_value, '$$_posthog_breakdown_other_$$'), 0), 2, if(ifNull(equals(breakdown_value, '$$_posthog_breakdown_null_$$'), 0), 1, 0)) ASC, arraySum(total) DESC, breakdown_value ASC+ LIMIT 50000 SETTINGS readonly=2,+ max_execution_time=60,+ allow_experimental_object_type=1,+ max_ast_elements=4000000,+ max_expanded_ast_elements=4000000,+ max_bytes_before_external_group_by=0,+ transform_null_in=1,+ optimize_min_equality_disjunction_chain_length=4294967295,+ optimize_rewrite_aggregate_function_with_if=0,+ optimize_min_inequality_conjunction_chain_length=4294967295,+ allow_experimental_join_condition=1,+ use_hive_partitioning=0+ '''+# ---# name: TestTrends.test_person_filtering_in_cohort_in_action.2'''SELECT groupArray(1)(date)[1] AS date,@@ -2642,14 +2727,33 @@# ---# name: TestTrends.test_trends_any_event_total_count'''- /* celery:posthog.tasks.tasks.sync_insight_caching_state */- SELECT team_id,- date_diff('second', max(timestamp), now()) AS age- FROM events- WHERE timestamp > date_sub(DAY, 3, now())- AND timestamp < now()- GROUP BY team_id- ORDER BY age;+ SELECT arrayMap(number -> plus(toStartOfInterval(assumeNotNull(toDateTime('2019-12-28 00:00:00', 'UTC')), toIntervalDay(1)), toIntervalDay(number)), range(0, plus(coalesce(dateDiff('day', toStartOfInterval(assumeNotNull(toDateTime('2019-12-28 00:00:00', 'UTC')), toIntervalDay(1)), toStartOfInterval(assumeNotNull(toDateTime('2020-01-04 23:59:59', 'UTC')), toIntervalDay(1)))), 1))) AS date,+ arrayMap(_match_date -> arraySum(arraySlice(groupArray(ifNull(count, 0)), indexOf(groupArray(day_start) AS _days_for_count, _match_date) AS _index, plus(minus(arrayLastIndex(x -> ifNull(equals(x, _match_date), isNull(x)+ and isNull(_match_date)), _days_for_count), _index), 1))), date) AS total+ FROM+ (SELECT sum(total) AS count,+ day_start AS day_start+ FROM+ (SELECT count() AS total,+ toStartOfDay(toTimeZone(e.timestamp, 'UTC')) AS day_start+ FROM events AS e+ WHERE and(equals(e.team_id, 99999), greaterOrEquals(e.timestamp, toStartOfInterval(assumeNotNull(toDateTime('2019-12-28 00:00:00', 'UTC')), toIntervalDay(1))), lessOrEquals(e.timestamp, assumeNotNull(toDateTime('2020-01-04 23:59:59', 'UTC'))))+ GROUP BY day_start)+ GROUP BY day_start+ ORDER BY day_start ASC)+ ORDER BY arraySum(total) DESC+ LIMIT 50000 SETTINGS readonly=2,+ max_execution_time=60,+ allow_experimental_object_type=1,+ max_ast_elements=4000000,+ max_expanded_ast_elements=4000000,+ max_bytes_before_external_group_by=0,+ transform_null_in=1,+ optimize_min_equality_disjunction_chain_length=4294967295,+ optimize_rewrite_aggregate_function_with_if=0,+ optimize_min_inequality_conjunction_chain_length=4294967295,+ allow_experimental_join_condition=1,+ use_hive_partitioning=0'''# ---# name: TestTrends.test_trends_any_event_total_count.1@@ -2664,7 +2768,7 @@(SELECT count() AS total,toStartOfDay(toTimeZone(e.timestamp, 'UTC')) AS day_startFROM events AS e- WHERE and(equals(e.team_id, 99999), greaterOrEquals(e.timestamp, toStartOfInterval(assumeNotNull(toDateTime('2019-12-28 00:00:00', 'UTC')), toIntervalDay(1))), lessOrEquals(e.timestamp, assumeNotNull(toDateTime('2020-01-04 23:59:59', 'UTC'))))+ WHERE and(equals(e.team_id, 99999), greaterOrEquals(e.timestamp, toStartOfInterval(assumeNotNull(toDateTime('2019-12-28 00:00:00', 'UTC')), toIntervalDay(1))), lessOrEquals(e.timestamp, assumeNotNull(toDateTime('2020-01-04 23:59:59', 'UTC'))), equals(e.event, 'sign up'))GROUP BY day_start)GROUP BY day_startORDER BY day_start ASC)@@ -2716,14 +2820,61 @@# ---# name: TestTrends.test_trends_breakdown_cumulative'''- /* celery:posthog.tasks.tasks.sync_insight_caching_state */- SELECT team_id,- date_diff('second', max(timestamp), now()) AS age- FROM events- WHERE timestamp > date_sub(DAY, 3, now())- AND timestamp < now()- GROUP BY team_id- ORDER BY age;+ SELECT groupArray(1)(date)[1] AS date,+ arrayFold((acc, x) -> arrayMap(i -> plus(acc[i], x[i]), range(1, plus(length(date), 1))), groupArray(ifNull(total, 0)), arrayWithConstant(length(date), reinterpretAsFloat64(0))) AS total,+ if(ifNull(greaterOrEquals(row_number, 25), 0), '$$_posthog_breakdown_other_$$', breakdown_value) AS breakdown_value+ FROM+ (SELECT arrayMap(number -> plus(toStartOfInterval(assumeNotNull(toDateTime('2019-12-28 00:00:00', 'UTC')), toIntervalDay(1)), toIntervalDay(number)), range(0, plus(coalesce(dateDiff('day', toStartOfInterval(assumeNotNull(toDateTime('2019-12-28 00:00:00', 'UTC')), toIntervalDay(1)), toStartOfInterval(assumeNotNull(toDateTime('2020-01-04 23:59:59', 'UTC')), toIntervalDay(1)))), 1))) AS date,+ arrayFill(x -> ifNull(greater(x, 0), 0), arrayMap(_match_date -> arraySum(arraySlice(groupArray(ifNull(count, 0)), indexOf(groupArray(day_start) AS _days_for_count, _match_date) AS _index, plus(minus(arrayLastIndex(x -> ifNull(equals(x, _match_date), isNull(x)+ and isNull(_match_date)), _days_for_count), _index), 1))), date)) AS total,+ breakdown_value AS breakdown_value,+ rowNumberInAllBlocks() AS row_number+ FROM+ (SELECT day_start AS day_start,+ sum(count) OVER (PARTITION BY breakdown_value+ ORDER BY day_start ASC) AS count,+ breakdown_value AS breakdown_value+ FROM+ (SELECT sum(total) AS count,+ day_start AS day_start,+ breakdown_value AS breakdown_value+ FROM+ (SELECT count(DISTINCT if(not(empty(e__override.distinct_id)), e__override.person_id, e.person_id)) AS total,+ min(toStartOfDay(toTimeZone(e.timestamp, 'UTC'))) AS day_start,+ ifNull(nullIf(leftUTF8(toString(replaceRegexpAll(nullIf(nullIf(JSONExtractRaw(e.properties, '$some_property'), ''), 'null'), '^"|"$', '')), 400), ''), '$$_posthog_breakdown_null_$$') AS breakdown_value+ FROM events AS e+ LEFT OUTER JOIN+ (SELECT argMax(person_distinct_id_overrides.person_id, person_distinct_id_overrides.version) AS person_id,+ person_distinct_id_overrides.distinct_id AS distinct_id+ FROM person_distinct_id_overrides+ WHERE equals(person_distinct_id_overrides.team_id, 99999)+ GROUP BY person_distinct_id_overrides.distinct_id+ HAVING equals(argMax(person_distinct_id_overrides.is_deleted, person_distinct_id_overrides.version), 0) SETTINGS optimize_aggregation_in_order=1) AS e__override ON equals(e.distinct_id, e__override.distinct_id)+ WHERE and(equals(e.team_id, 99999), greaterOrEquals(e.timestamp, toStartOfInterval(assumeNotNull(toDateTime('2019-12-28 00:00:00', 'UTC')), toIntervalDay(1))), lessOrEquals(e.timestamp, assumeNotNull(toDateTime('2020-01-04 23:59:59', 'UTC'))), equals(e.event, 'sign up'))+ GROUP BY if(not(empty(e__override.distinct_id)), e__override.person_id, e.person_id),+ breakdown_value)+ GROUP BY day_start,+ breakdown_value+ ORDER BY day_start ASC,+ breakdown_value ASC)+ ORDER BY day_start ASC)+ GROUP BY breakdown_value+ ORDER BY if(ifNull(equals(breakdown_value, '$$_posthog_breakdown_other_$$'), 0), 2, if(ifNull(equals(breakdown_value, '$$_posthog_breakdown_null_$$'), 0), 1, 0)) ASC, arraySum(total) DESC, breakdown_value ASC)+ WHERE isNotNull(breakdown_value)+ GROUP BY breakdown_value+ ORDER BY if(ifNull(equals(breakdown_value, '$$_posthog_breakdown_other_$$'), 0), 2, if(ifNull(equals(breakdown_value, '$$_posthog_breakdown_null_$$'), 0), 1, 0)) ASC, arraySum(total) DESC, breakdown_value ASC+ LIMIT 50000 SETTINGS readonly=2,+ max_execution_time=60,+ allow_experimental_object_type=1,+ max_ast_elements=4000000,+ max_expanded_ast_elements=4000000,+ max_bytes_before_external_group_by=0,+ transform_null_in=1,+ optimize_min_equality_disjunction_chain_length=4294967295,+ optimize_rewrite_aggregate_function_with_if=0,+ optimize_min_inequality_conjunction_chain_length=4294967295,+ allow_experimental_join_condition=1,+ use_hive_partitioning=0'''# ---# name: TestTrends.test_trends_breakdown_cumulative.1@@ -3052,19 +3203,38 @@# ---# name: TestTrends.test_trends_compare_day_interval_relative_range'''- /* celery:posthog.tasks.tasks.sync_insight_caching_state */- SELECT team_id,- date_diff('second', max(timestamp), now()) AS age- FROM events- WHERE timestamp > date_sub(DAY, 3, now())- AND timestamp < now()- GROUP BY team_id- ORDER BY age;+ SELECT arrayMap(number -> plus(toStartOfInterval(assumeNotNull(toDateTime('2019-12-28 00:00:00', 'UTC')), toIntervalDay(1)), toIntervalDay(number)), range(0, plus(coalesce(dateDiff('day', toStartOfInterval(assumeNotNull(toDateTime('2019-12-28 00:00:00', 'UTC')), toIntervalDay(1)), toStartOfInterval(assumeNotNull(toDateTime('2020-01-04 23:59:59', 'UTC')), toIntervalDay(1)))), 1))) AS date,+ arrayMap(_match_date -> arraySum(arraySlice(groupArray(ifNull(count, 0)), indexOf(groupArray(day_start) AS _days_for_count, _match_date) AS _index, plus(minus(arrayLastIndex(x -> ifNull(equals(x, _match_date), isNull(x)+ and isNull(_match_date)), _days_for_count), _index), 1))), date) AS total+ FROM+ (SELECT sum(total) AS count,+ day_start AS day_start+ FROM+ (SELECT count() AS total,+ toStartOfDay(toTimeZone(e.timestamp, 'UTC')) AS day_start+ FROM events AS e+ WHERE and(equals(e.team_id, 99999), greaterOrEquals(e.timestamp, toStartOfInterval(assumeNotNull(toDateTime('2019-12-28 00:00:00', 'UTC')), toIntervalDay(1))), lessOrEquals(e.timestamp, assumeNotNull(toDateTime('2020-01-04 23:59:59', 'UTC'))), equals(e.event, 'sign up'))+ GROUP BY day_start)+ GROUP BY day_start+ ORDER BY day_start ASC)+ ORDER BY arraySum(total) DESC+ LIMIT 50000 SETTINGS readonly=2,+ max_execution_time=60,+ allow_experimental_object_type=1,+ max_ast_elements=4000000,+ max_expanded_ast_elements=4000000,+ max_bytes_before_external_group_by=0,+ transform_null_in=1,+ optimize_min_equality_disjunction_chain_length=4294967295,+ optimize_rewrite_aggregate_function_with_if=0,+ optimize_min_inequality_conjunction_chain_length=4294967295,+ allow_experimental_join_condition=1,+ use_hive_partitioning=0'''# ---# name: TestTrends.test_trends_compare_day_interval_relative_range.1'''- SELECT arrayMap(number -> plus(toStartOfInterval(assumeNotNull(toDateTime('2019-12-28 00:00:00', 'UTC')), toIntervalDay(1)), toIntervalDay(number)), range(0, plus(coalesce(dateDiff('day', toStartOfInterval(assumeNotNull(toDateTime('2019-12-28 00:00:00', 'UTC')), toIntervalDay(1)), toStartOfInterval(assumeNotNull(toDateTime('2020-01-04 23:59:59', 'UTC')), toIntervalDay(1)))), 1))) AS date,+ SELECT arrayMap(number -> plus(toStartOfInterval(assumeNotNull(toDateTime('2019-12-21 00:00:00', 'UTC')), toIntervalDay(1)), toIntervalDay(number)), range(0, plus(coalesce(dateDiff('day', toStartOfInterval(assumeNotNull(toDateTime('2019-12-21 00:00:00', 'UTC')), toIntervalDay(1)), toStartOfInterval(assumeNotNull(toDateTime('2019-12-28 23:59:59', 'UTC')), toIntervalDay(1)))), 1))) AS date,arrayMap(_match_date -> arraySum(arraySlice(groupArray(ifNull(count, 0)), indexOf(groupArray(day_start) AS _days_for_count, _match_date) AS _index, plus(minus(arrayLastIndex(x -> ifNull(equals(x, _match_date), isNull(x)and isNull(_match_date)), _days_for_count), _index), 1))), date) AS totalFROM@@ -3074,7 +3244,7 @@(SELECT count() AS total,toStartOfDay(toTimeZone(e.timestamp, 'UTC')) AS day_startFROM events AS e- WHERE and(equals(e.team_id, 99999), greaterOrEquals(e.timestamp, toStartOfInterval(assumeNotNull(toDateTime('2019-12-28 00:00:00', 'UTC')), toIntervalDay(1))), lessOrEquals(e.timestamp, assumeNotNull(toDateTime('2020-01-04 23:59:59', 'UTC'))), equals(e.event, 'sign up'))+ WHERE and(equals(e.team_id, 99999), greaterOrEquals(e.timestamp, toStartOfInterval(assumeNotNull(toDateTime('2019-12-21 00:00:00', 'UTC')), toIntervalDay(1))), lessOrEquals(e.timestamp, assumeNotNull(toDateTime('2019-12-28 23:59:59', 'UTC'))), equals(e.event, 'sign up'))GROUP BY day_start)GROUP BY day_startORDER BY day_start ASC)@@ -3095,7 +3265,7 @@# ---# name: TestTrends.test_trends_compare_day_interval_relative_range.2'''- SELECT arrayMap(number -> plus(toStartOfInterval(assumeNotNull(toDateTime('2019-12-21 00:00:00', 'UTC')), toIntervalDay(1)), toIntervalDay(number)), range(0, plus(coalesce(dateDiff('day', toStartOfInterval(assumeNotNull(toDateTime('2019-12-21 00:00:00', 'UTC')), toIntervalDay(1)), toStartOfInterval(assumeNotNull(toDateTime('2019-12-28 23:59:59', 'UTC')), toIntervalDay(1)))), 1))) AS date,+ SELECT arrayMap(number -> plus(toStartOfInterval(assumeNotNull(toDateTime('2019-12-28 00:00:00', 'UTC')), toIntervalDay(1)), toIntervalDay(number)), range(0, plus(coalesce(dateDiff('day', toStartOfInterval(assumeNotNull(toDateTime('2019-12-28 00:00:00', 'UTC')), toIntervalDay(1)), toStartOfInterval(assumeNotNull(toDateTime('2020-01-04 23:59:59', 'UTC')), toIntervalDay(1)))), 1))) AS date,arrayMap(_match_date -> arraySum(arraySlice(groupArray(ifNull(count, 0)), indexOf(groupArray(day_start) AS _days_for_count, _match_date) AS _index, plus(minus(arrayLastIndex(x -> ifNull(equals(x, _match_date), isNull(x)and isNull(_match_date)), _days_for_count), _index), 1))), date) AS totalFROM@@ -3105,7 +3275,7 @@(SELECT count() AS total,toStartOfDay(toTimeZone(e.timestamp, 'UTC')) AS day_startFROM events AS e- WHERE and(equals(e.team_id, 99999), greaterOrEquals(e.timestamp, toStartOfInterval(assumeNotNull(toDateTime('2019-12-21 00:00:00', 'UTC')), toIntervalDay(1))), lessOrEquals(e.timestamp, assumeNotNull(toDateTime('2019-12-28 23:59:59', 'UTC'))), equals(e.event, 'sign up'))+ WHERE and(equals(e.team_id, 99999), greaterOrEquals(e.timestamp, toStartOfInterval(assumeNotNull(toDateTime('2019-12-28 00:00:00', 'UTC')), toIntervalDay(1))), lessOrEquals(e.timestamp, assumeNotNull(toDateTime('2020-01-04 23:59:59', 'UTC'))), equals(e.event, 'sign up'))GROUP BY day_start)GROUP BY day_startORDER BY day_start ASC)@@ -3356,14 +3526,38 @@# ---# name: TestTrends.test_trends_per_day_cumulative'''- /* celery:posthog.tasks.tasks.sync_insight_caching_state */- SELECT team_id,- date_diff('second', max(timestamp), now()) AS age- FROM events- WHERE timestamp > date_sub(DAY, 3, now())- AND timestamp < now()- GROUP BY team_id- ORDER BY age;+ SELECT arrayMap(number -> plus(toStartOfInterval(assumeNotNull(toDateTime('2019-12-28 00:00:00', 'UTC')), toIntervalDay(1)), toIntervalDay(number)), range(0, plus(coalesce(dateDiff('day', toStartOfInterval(assumeNotNull(toDateTime('2019-12-28 00:00:00', 'UTC')), toIntervalDay(1)), toStartOfInterval(assumeNotNull(toDateTime('2020-01-04 23:59:59', 'UTC')), toIntervalDay(1)))), 1))) AS date,+ arrayFill(x -> ifNull(greater(x, 0), 0), arrayMap(_match_date -> arraySum(arraySlice(groupArray(ifNull(count, 0)), indexOf(groupArray(day_start) AS _days_for_count, _match_date) AS _index, plus(minus(arrayLastIndex(x -> ifNull(equals(x, _match_date), isNull(x)+ and isNull(_match_date)), _days_for_count), _index), 1))), date)) AS total+ FROM+ (SELECT day_start AS day_start,+ sum(count) OVER (+ ORDER BY day_start ASC) AS count+ FROM+ (SELECT sum(total) AS count,+ day_start AS day_start+ FROM+ (SELECT count() AS total,+ toStartOfDay(toTimeZone(e.timestamp, 'UTC')) AS day_start+ FROM events AS e+ WHERE and(equals(e.team_id, 99999), greaterOrEquals(e.timestamp, toStartOfInterval(assumeNotNull(toDateTime('2019-12-28 00:00:00', 'UTC')), toIntervalDay(1))), lessOrEquals(e.timestamp, assumeNotNull(toDateTime('2020-01-04 23:59:59', 'UTC'))), equals(e.event, 'sign up'))+ GROUP BY day_start)+ GROUP BY day_start+ ORDER BY day_start ASC)+ ORDER BY day_start ASC)+ ORDER BY arraySum(total) DESC+ LIMIT 50000 SETTINGS readonly=2,+ max_execution_time=60,+ allow_experimental_object_type=1,+ max_ast_elements=4000000,+ max_expanded_ast_elements=4000000,+ max_bytes_before_external_group_by=0,+ transform_null_in=1,+ optimize_min_equality_disjunction_chain_length=4294967295,+ optimize_rewrite_aggregate_function_with_if=0,+ optimize_min_inequality_conjunction_chain_length=4294967295,+ allow_experimental_join_condition=1,+ use_hive_partitioning=0'''# ---# name: TestTrends.test_trends_per_day_cumulative.1@@ -3404,14 +3598,45 @@# ---# name: TestTrends.test_trends_per_day_dau_cumulative'''- /* celery:posthog.tasks.tasks.sync_insight_caching_state */- SELECT team_id,- date_diff('second', max(timestamp), now()) AS age- FROM events- WHERE timestamp > date_sub(DAY, 3, now())- AND timestamp < now()- GROUP BY team_id- ORDER BY age;+ SELECT arrayMap(number -> plus(toStartOfInterval(assumeNotNull(toDateTime('2019-12-28 00:00:00', 'UTC')), toIntervalDay(1)), toIntervalDay(number)), range(0, plus(coalesce(dateDiff('day', toStartOfInterval(assumeNotNull(toDateTime('2019-12-28 00:00:00', 'UTC')), toIntervalDay(1)), toStartOfInterval(assumeNotNull(toDateTime('2020-01-04 23:59:59', 'UTC')), toIntervalDay(1)))), 1))) AS date,+ arrayFill(x -> ifNull(greater(x, 0), 0), arrayMap(_match_date -> arraySum(arraySlice(groupArray(ifNull(count, 0)), indexOf(groupArray(day_start) AS _days_for_count, _match_date) AS _index, plus(minus(arrayLastIndex(x -> ifNull(equals(x, _match_date), isNull(x)+ and isNull(_match_date)), _days_for_count), _index), 1))), date)) AS total+ FROM+ (SELECT day_start AS day_start,+ sum(count) OVER (+ ORDER BY day_start ASC) AS count+ FROM+ (SELECT sum(total) AS count,+ day_start AS day_start+ FROM+ (SELECT count(DISTINCT if(not(empty(e__override.distinct_id)), e__override.person_id, e.person_id)) AS total,+ min(toStartOfDay(toTimeZone(e.timestamp, 'UTC'))) AS day_start+ FROM events AS e+ LEFT OUTER JOIN+ (SELECT argMax(person_distinct_id_overrides.person_id, person_distinct_id_overrides.version) AS person_id,+ person_distinct_id_overrides.distinct_id AS distinct_id+ FROM person_distinct_id_overrides+ WHERE equals(person_distinct_id_overrides.team_id, 99999)+ GROUP BY person_distinct_id_overrides.distinct_id+ HAVING equals(argMax(person_distinct_id_overrides.is_deleted, person_distinct_id_overrides.version), 0) SETTINGS optimize_aggregation_in_order=1) AS e__override ON equals(e.distinct_id, e__override.distinct_id)+ WHERE and(equals(e.team_id, 99999), greaterOrEquals(e.timestamp, toStartOfInterval(assumeNotNull(toDateTime('2019-12-28 00:00:00', 'UTC')), toIntervalDay(1))), lessOrEquals(e.timestamp, assumeNotNull(toDateTime('2020-01-04 23:59:59', 'UTC'))), equals(e.event, 'sign up'))+ GROUP BY if(not(empty(e__override.distinct_id)), e__override.person_id, e.person_id))+ GROUP BY day_start+ ORDER BY day_start ASC)+ ORDER BY day_start ASC)+ ORDER BY arraySum(total) DESC+ LIMIT 50000 SETTINGS readonly=2,+ max_execution_time=60,+ allow_experimental_object_type=1,+ max_ast_elements=4000000,+ max_expanded_ast_elements=4000000,+ max_bytes_before_external_group_by=0,+ transform_null_in=1,+ optimize_min_equality_disjunction_chain_length=4294967295,+ optimize_rewrite_aggregate_function_with_if=0,+ optimize_min_inequality_conjunction_chain_length=4294967295,+ allow_experimental_join_condition=1,+ use_hive_partitioning=0'''# ---# name: TestTrends.test_trends_per_day_dau_cumulative.1diff --git a/posthog/models/activity_logging/activity_log.py b/posthog/models/activity_logging/activity_log.pyindex 851748e50a09..d5c2297cb652 100644--- a/posthog/models/activity_logging/activity_log.py+++ b/posthog/models/activity_logging/activity_log.py@@ -508,7 +508,6 @@ field_exclusions: dict[AuditableScope, list[str]] = {"short_id","insightviewed","dashboardtile",- "caching_states",],"EventDefinition": ["eventdefinition_ptr_id",diff --git a/posthog/models/resource_transfer/test/__snapshots__/test_visitor_field_snapshots.ambr b/posthog/models/resource_transfer/test/__snapshots__/test_visitor_field_snapshots.ambrindex f0a5187e827d..c8bffbc288b2 100644--- a/posthog/models/resource_transfer/test/__snapshots__/test_visitor_field_snapshots.ambr+++ b/posthog/models/resource_transfer/test/__snapshots__/test_visitor_field_snapshots.ambr@@ -594,8 +594,6 @@'__static_attributes__','_meta','button_tile_id',- 'caching_state',- 'caching_states','clean','copy_to_dashboard','dashboard_id',@@ -866,8 +864,6 @@'alertable_query_kind','alertconfiguration_set','annotation_set',- 'caching_state',- 'caching_states','created_by_id','customerjourney_set','dashboard',diff --git a/posthog/models/sharing_configuration.py b/posthog/models/sharing_configuration.pyindex b3e4154d3300..b441a49d379e 100644--- a/posthog/models/sharing_configuration.py+++ b/posthog/models/sharing_configuration.py@@ -149,9 +149,7 @@ class SharingConfiguration(models.Model):def _lock_resource_for_rotation(self) -> None:# Resolve each parent model from its own FK instead of importing it. This keeps the module# free of product imports (``user_interviews`` only exposes its webhooks via tach's- # ``[[interfaces]]``) and avoids cycling through ``posthog.models.team`` during ``Team``- # initialization, since this module is loaded mid-init via product_analytics'- # insight_caching_state.+ # ``[[interfaces]]``).for field_name in ("dashboard", "insight", "notebook", "recording", "interviewee_context"):fk_value = getattr(self, f"{field_name}_id")if not fk_value:diff --git a/posthog/models/team/util.py b/posthog/models/team/util.pyindex 18744373deb7..288ee03d541c 100644--- a/posthog/models/team/util.py+++ b/posthog/models/team/util.py@@ -59,7 +59,6 @@ def _delete_misc_small_tables_for_teams(team_ids: list[int]) -> None:from products.data_modeling.backend.facade.models import Edge, Nodefrom products.early_access_features.backend.models import EarlyAccessFeature- from products.product_analytics.backend.models.insight_caching_state import InsightCachingStateerror_tracking_fingerprint = apps.get_model("error_tracking", "ErrorTrackingIssueFingerprintV2")@@ -72,7 +71,6 @@ def _delete_misc_small_tables_for_teams(team_ids: list[int]) -> None:_raw_delete_batch(error_tracking_fingerprint.objects.filter(team_id__in=team_ids))# FeatureFlagHashKeyOverride references Person, so it must go before persons are deleted._delete_hash_key_overrides_for_teams(team_ids)- _raw_delete_batch(InsightCachingState.objects.filter(team_id__in=team_ids))_delete_llm_evaluations_for_teams(team_ids)diff --git a/posthog/tasks/tasks.py b/posthog/tasks/tasks.pyindex eb71fbdd9c95..16bdd6658bd7 100644--- a/posthog/tasks/tasks.py+++ b/posthog/tasks/tasks.py@@ -922,39 +922,6 @@ def process_scheduled_changes() -> None:process_scheduled_changes()-@shared_task(ignore_result=True)-def sync_insight_cache_states_task() -> None:- from posthog.caching.insight_caching_state import sync_insight_cache_states-- sync_insight_cache_states()---@shared_task(- ignore_result=True,- autoretry_for=(CHQueryErrorTooManySimultaneousQueries,),- retry_backoff=10,- retry_backoff_max=30,- max_retries=3,- retry_jitter=True,- queue=CeleryQueue.LONG_RUNNING.value,-)-def update_cache_task(caching_state_id: UUID) -> None:- from posthog.caching.insight_cache import update_cache-- update_cache(caching_state_id)---@shared_task(ignore_result=True)-def sync_insight_caching_state(- team_id: int,- insight_id: Optional[int] = None,- dashboard_tile_id: Optional[int] = None,-) -> None:- from posthog.caching.insight_caching_state import sync_insight_caching_state-- sync_insight_caching_state(team_id, insight_id, dashboard_tile_id)--@shared_task(ignore_result=True)def calculate_decide_usage() -> None:from products.feature_flags.backend.flag_analytics import (diff --git a/posthog/tasks/test/__snapshots__/test_task_registration.ambr b/posthog/tasks/test/__snapshots__/test_task_registration.ambrindex 94403a32bb1f..b793899fc320 100644--- a/posthog/tasks/test/__snapshots__/test_task_registration.ambr+++ b/posthog/tasks/test/__snapshots__/test_task_registration.ambr@@ -126,10 +126,7 @@'posthog.tasks.tasks.stop_surveys_reached_target','posthog.tasks.tasks.sync_all_organization_available_product_features','posthog.tasks.tasks.sync_feature_flag_last_called',- 'posthog.tasks.tasks.sync_insight_cache_states_task',- 'posthog.tasks.tasks.sync_insight_caching_state','posthog.tasks.tasks.sync_user_product_lists_for_new_team',- 'posthog.tasks.tasks.update_cache_task','posthog.tasks.tasks.update_event_partitions','posthog.tasks.tasks.update_survey_adaptive_sampling','posthog.tasks.tasks.update_survey_iteration',diff --git a/posthog/test/base.py b/posthog/test/base.pyindex 470ddefeba2e..9b8c242d74ab 100644--- a/posthog/test/base.py+++ b/posthog/test/base.py@@ -454,13 +454,6 @@ def clean_varying_query_parts(query, replace_all_numbers):query,)- # insight cache key varies with team id- query = re.sub(- r"WHERE \(\"posthog_insightcachingstate\".\"cache_key\" = 'cache_\w{32}'",- """WHERE ("posthog_insightcachingstate"."cache_key" = 'cache_THE_CACHE_KEY'""",- query,- )-# replace Savepoint numbersquery = re.sub(r"SAVEPOINT \".+\"", "SAVEPOINT _snapshot_", query)diff --git a/posthog/test/setup_receivers_baseline.txt b/posthog/test/setup_receivers_baseline.txtindex 7f39c8077d73..f59486641e12 100644--- a/posthog/test/setup_receivers_baseline.txt+++ b/posthog/test/setup_receivers_baseline.txt@@ -171,10 +171,6 @@ post_save:products.feature_flags.backend.local_evaluation.evaluation_context_nampost_save:products.feature_flags.backend.local_evaluation.experiment_changedpost_save:products.feature_flags.backend.local_evaluation.feature_flag_changedpost_save:products.feature_flags.backend.models.feature_flag.refresh_flag_cache_on_updates-post_save:products.product_analytics.backend.models.insight_caching_state.sync_dashboard_tile-post_save:products.product_analytics.backend.models.insight_caching_state.sync_dashboard_updated-post_save:products.product_analytics.backend.models.insight_caching_state.sync_insight-post_save:products.product_analytics.backend.models.insight_caching_state.sync_sharing_configurationpost_save:products.review_hog.backend.receivers.handle_task_run_savedpost_save:products.signals.backend.receivers.close_pr_when_report_dismissedpost_save:products.slack_app.backend.signals.invalidate_repo_list_on_user_github_changediff --git a/products/dashboards/backend/api/dashboard.py b/products/dashboards/backend/api/dashboard.pyindex f0def36237fd..5aed2cff1716 100644--- a/products/dashboards/backend/api/dashboard.py+++ b/products/dashboards/backend/api/dashboard.py@@ -1731,7 +1731,7 @@ class DashboardSerializer(DashboardMetadataSerializer):setattr(existing, attr, val)# update_fields scopes the UPDATE to only the columns we changed, so concurrent writes# to other columns aren't clobbered by our stale read. save() (vs queryset.update())- # keeps the post_save signal that sync_dashboard_tile listens to for cache invalidation.+ # keeps DashboardTile.save() side effects like filters_hash upkeep.existing.save(update_fields=list(tile_defaults.keys()))return existing, became_deleted@@ -1989,9 +1989,6 @@ class DashboardSerializer(DashboardMetadataSerializer):serialized_tiles: list[ReturnDict] = []tiles = DashboardTile.dashboard_queryset(dashboard.tiles.all()).prefetch_related(- # Used by the shared-insight force_blocking gate in `posthog/api/insight.py` to avoid an- # N+1 lookup of last_refresh per tile on shared dashboard renders.- "caching_states",Prefetch("insight__tagged_items",queryset=TaggedItem.objects.select_related("tag"),@@ -2223,7 +2220,6 @@ class DashboardsViewSet(if self.action != "list":tiles_prefetch_queryset = DashboardTile.dashboard_queryset(DashboardTile.objects.prefetch_related(- "caching_states",Prefetch("insight__dashboards",# nosemgrep: idor-lookup-without-team (scoped via prefetch on team-scoped queryset)diff --git a/products/dashboards/backend/models/dashboard_tile.py b/products/dashboards/backend/models/dashboard_tile.pyindex 3e2abc4b6896..dda5352f64ff 100644--- a/products/dashboards/backend/models/dashboard_tile.py+++ b/products/dashboards/backend/models/dashboard_tile.py@@ -170,13 +170,6 @@ class DashboardTile(models.Model):super().save(*args, **kwargs)- @property- def caching_state(self):- # uses .all and not .first so that prefetching can be used- for state in self.caching_states.all():- return state- return None-def clean(self):super().clean()diff --git a/products/feature_flags/backend/api/test/__snapshots__/test_organization_feature_flag.ambr b/products/feature_flags/backend/api/test/__snapshots__/test_organization_feature_flag.ambrindex ad00073df22a..c4a71f48daed 100644--- a/products/feature_flags/backend/api/test/__snapshots__/test_organization_feature_flag.ambr+++ b/products/feature_flags/backend/api/test/__snapshots__/test_organization_feature_flag.ambr@@ -697,17 +697,6 @@'''# ---# name: TestOrganizationFeatureFlagCopy.test_copy_feature_flag_create_new.23- '''- SELECT "posthog_dashboardtile"."id" AS "pk"- 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)- '''-# ----# name: TestOrganizationFeatureFlagCopy.test_copy_feature_flag_create_new.24'''SELECT "posthog_tag"."id","posthog_tag"."name",@@ -725,7 +714,7 @@LIMIT 21'''# ----# name: TestOrganizationFeatureFlagCopy.test_copy_feature_flag_create_new.25+# name: TestOrganizationFeatureFlagCopy.test_copy_feature_flag_create_new.24'''SELECT "posthog_team"."id","posthog_team"."uuid",@@ -827,7 +816,7 @@LIMIT 21'''# ----# name: TestOrganizationFeatureFlagCopy.test_copy_feature_flag_create_new.26+# name: TestOrganizationFeatureFlagCopy.test_copy_feature_flag_create_new.25'''SELECT 1 AS "a"FROM "posthog_tag"@@ -835,7 +824,7 @@LIMIT 1'''# ----# name: TestOrganizationFeatureFlagCopy.test_copy_feature_flag_create_new.27+# name: TestOrganizationFeatureFlagCopy.test_copy_feature_flag_create_new.26'''SELECT 1 AS "a"FROM "posthog_dashboard"@@ -843,7 +832,7 @@LIMIT 1'''# ----# name: TestOrganizationFeatureFlagCopy.test_copy_feature_flag_create_new.28+# name: TestOrganizationFeatureFlagCopy.test_copy_feature_flag_create_new.27'''SELECT 1 AS "a"FROM "posthog_taggeditem"@@ -851,7 +840,7 @@LIMIT 1'''# ----# name: TestOrganizationFeatureFlagCopy.test_copy_feature_flag_create_new.29+# name: TestOrganizationFeatureFlagCopy.test_copy_feature_flag_create_new.28'''SELECT 1 AS "_check"WHERE COALESCE((EXISTS@@ -863,6 +852,12 @@LIMIT 1)), true)'''# ---+# name: TestOrganizationFeatureFlagCopy.test_copy_feature_flag_create_new.29+ '''+ SELECT 1 AS "_check"+ WHERE COALESCE(true, true)+ '''+# ---# name: TestOrganizationFeatureFlagCopy.test_copy_feature_flag_create_new.3'''SELECT 1 AS "a"@@ -873,12 +868,6 @@'''# ---# name: TestOrganizationFeatureFlagCopy.test_copy_feature_flag_create_new.30- '''- SELECT 1 AS "_check"- WHERE COALESCE(true, true)- '''-# ----# name: TestOrganizationFeatureFlagCopy.test_copy_feature_flag_create_new.31'''SELECT "posthog_tag"."id","posthog_tag"."name",@@ -888,7 +877,7 @@LIMIT 21'''# ----# name: TestOrganizationFeatureFlagCopy.test_copy_feature_flag_create_new.32+# name: TestOrganizationFeatureFlagCopy.test_copy_feature_flag_create_new.31'''SELECT "posthog_team"."id","posthog_team"."uuid",@@ -990,7 +979,7 @@LIMIT 21'''# ----# name: TestOrganizationFeatureFlagCopy.test_copy_feature_flag_create_new.33+# name: TestOrganizationFeatureFlagCopy.test_copy_feature_flag_create_new.32'''SELECT "posthog_dashboard"."id","posthog_dashboard"."name",@@ -1020,7 +1009,7 @@LIMIT 1'''# ----# name: TestOrganizationFeatureFlagCopy.test_copy_feature_flag_create_new.34+# name: TestOrganizationFeatureFlagCopy.test_copy_feature_flag_create_new.33'''SELECT "posthog_filesystem"."team_id","posthog_filesystem"."id",@@ -1043,18 +1032,7 @@AND "posthog_filesystem"."type" = 'dashboard')'''# ----# name: TestOrganizationFeatureFlagCopy.test_copy_feature_flag_create_new.35- '''- SELECT "posthog_dashboardtile"."id" AS "pk"- 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)- '''-# ----# name: TestOrganizationFeatureFlagCopy.test_copy_feature_flag_create_new.36+# name: TestOrganizationFeatureFlagCopy.test_copy_feature_flag_create_new.34'''SELECT "posthog_team"."id","posthog_team"."uuid",@@ -1155,7 +1133,7 @@WHERE "posthog_team"."primary_dashboard_id" = 99999'''# ----# name: TestOrganizationFeatureFlagCopy.test_copy_feature_flag_create_new.37+# name: TestOrganizationFeatureFlagCopy.test_copy_feature_flag_create_new.35'''SELECT "posthog_team"."id","posthog_team"."uuid",@@ -1256,6 +1234,34 @@WHERE "posthog_team"."primary_dashboard_id" = 99999'''# ---+# name: TestOrganizationFeatureFlagCopy.test_copy_feature_flag_create_new.36+ '''+ SELECT "posthog_taggeditem"."id",+ "posthog_taggeditem"."tag_id",+ "posthog_taggeditem"."dashboard_id",+ "posthog_taggeditem"."insight_id",+ "posthog_taggeditem"."event_definition_id",+ "posthog_taggeditem"."property_definition_id",+ "posthog_taggeditem"."action_id",+ "posthog_taggeditem"."feature_flag_id",+ "posthog_taggeditem"."experiment_saved_metric_id",+ "posthog_taggeditem"."ticket_id",+ "posthog_taggeditem"."account_id",+ "posthog_taggeditem"."endpoint_id"+ FROM "posthog_taggeditem"+ WHERE "posthog_taggeditem"."dashboard_id" = 99999+ '''+# ---+# name: TestOrganizationFeatureFlagCopy.test_copy_feature_flag_create_new.37+ '''+ SELECT "posthog_tag"."id",+ "posthog_tag"."name",+ "posthog_tag"."team_id"+ FROM "posthog_tag"+ WHERE "posthog_tag"."id" = '00000000000000000000000000000000'::uuid+ LIMIT 21+ '''+# ---# name: TestOrganizationFeatureFlagCopy.test_copy_feature_flag_create_new.38'''SELECT "posthog_taggeditem"."id",@@ -1319,34 +1325,6 @@'''# ---# name: TestOrganizationFeatureFlagCopy.test_copy_feature_flag_create_new.40- '''- SELECT "posthog_taggeditem"."id",- "posthog_taggeditem"."tag_id",- "posthog_taggeditem"."dashboard_id",- "posthog_taggeditem"."insight_id",- "posthog_taggeditem"."event_definition_id",- "posthog_taggeditem"."property_definition_id",- "posthog_taggeditem"."action_id",- "posthog_taggeditem"."feature_flag_id",- "posthog_taggeditem"."experiment_saved_metric_id",- "posthog_taggeditem"."ticket_id",- "posthog_taggeditem"."account_id",- "posthog_taggeditem"."endpoint_id"- FROM "posthog_taggeditem"- WHERE "posthog_taggeditem"."dashboard_id" = 99999- '''-# ----# name: TestOrganizationFeatureFlagCopy.test_copy_feature_flag_create_new.41- '''- SELECT "posthog_tag"."id",- "posthog_tag"."name",- "posthog_tag"."team_id"- FROM "posthog_tag"- WHERE "posthog_tag"."id" = '00000000000000000000000000000000'::uuid- LIMIT 21- '''-# ----# name: TestOrganizationFeatureFlagCopy.test_copy_feature_flag_create_new.42'''SELECT "posthog_dashboardtile"."id","posthog_dashboardtile"."dashboard_id",@@ -1373,7 +1351,7 @@AND "posthog_dashboardtile"."dashboard_id" = 99999)'''# ----# name: TestOrganizationFeatureFlagCopy.test_copy_feature_flag_create_new.43+# name: TestOrganizationFeatureFlagCopy.test_copy_feature_flag_create_new.41'''SELECT "posthog_dashboardtile"."id","posthog_dashboardtile"."dashboard_id",@@ -1400,7 +1378,7 @@AND "posthog_dashboardtile"."dashboard_id" = 99999)'''# ----# name: TestOrganizationFeatureFlagCopy.test_copy_feature_flag_create_new.44+# name: TestOrganizationFeatureFlagCopy.test_copy_feature_flag_create_new.42'''SELECT "posthog_dashboarditem"."id","posthog_dashboarditem"."name",@@ -1436,7 +1414,7 @@AND "posthog_dashboarditem"."dashboard_id" = 99999)'''# ----# name: TestOrganizationFeatureFlagCopy.test_copy_feature_flag_create_new.45+# name: TestOrganizationFeatureFlagCopy.test_copy_feature_flag_create_new.43'''SELECT "posthog_dashboarditem"."id","posthog_dashboarditem"."name",@@ -1472,7 +1450,7 @@AND "posthog_dashboarditem"."dashboard_id" = 99999)'''# ----# name: TestOrganizationFeatureFlagCopy.test_copy_feature_flag_create_new.46+# name: TestOrganizationFeatureFlagCopy.test_copy_feature_flag_create_new.44'''SELECT "posthog_dashboarditem"."id","posthog_dashboarditem"."name",@@ -1509,7 +1487,7 @@AND "posthog_dashboardtile"."dashboard_id" = 99999)'''# ----# name: TestOrganizationFeatureFlagCopy.test_copy_feature_flag_create_new.47+# name: TestOrganizationFeatureFlagCopy.test_copy_feature_flag_create_new.45'''SELECT "posthog_dashboarditem"."id","posthog_dashboarditem"."name",@@ -1546,7 +1524,32 @@AND "posthog_dashboardtile"."dashboard_id" = 99999)'''# ----# name: TestOrganizationFeatureFlagCopy.test_copy_feature_flag_create_new.48+# name: TestOrganizationFeatureFlagCopy.test_copy_feature_flag_create_new.46+ '''+ 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: TestOrganizationFeatureFlagCopy.test_copy_feature_flag_create_new.47'''SELECT "posthog_filesystem"."team_id","posthog_filesystem"."id",@@ -1571,7 +1574,64 @@AND "posthog_filesystem"."shortcut" IS NOT NULL))'''# ---+# name: TestOrganizationFeatureFlagCopy.test_copy_feature_flag_create_new.48+ '''+ SELECT "posthog_featureflag"."id",+ "posthog_featureflag"."key",+ "posthog_featureflag"."name",+ "posthog_featureflag"."filters",+ "posthog_featureflag"."team_id",+ "posthog_featureflag"."created_by_id",+ "posthog_featureflag"."created_at",+ "posthog_featureflag"."updated_at",+ "posthog_featureflag"."deleted",+ "posthog_featureflag"."active",+ "posthog_featureflag"."archived",+ "posthog_featureflag"."version",+ "posthog_featureflag"."last_modified_by_id",+ "posthog_featureflag"."rollback_conditions",+ "posthog_featureflag"."performed_rollback",+ "posthog_featureflag"."ensure_experience_continuity",+ "posthog_featureflag"."usage_dashboard_id",+ "posthog_featureflag"."has_enriched_analytics",+ "posthog_featureflag"."is_remote_configuration",+ "posthog_featureflag"."has_encrypted_payloads",+ "posthog_featureflag"."evaluation_runtime",+ "posthog_featureflag"."bucketing_identifier",+ "posthog_featureflag"."last_called_at"+ FROM "posthog_featureflag"+ WHERE (NOT ("posthog_featureflag"."deleted")+ AND "posthog_featureflag"."id" = 99999)+ ORDER BY "posthog_featureflag"."id" ASC+ LIMIT 1+ '''+# ---# name: TestOrganizationFeatureFlagCopy.test_copy_feature_flag_create_new.49+ '''+ 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" = 'feature_flag'+ AND NOT ("posthog_filesystem"."shortcut"+ AND "posthog_filesystem"."shortcut" IS NOT NULL))+ '''+# ---+# name: TestOrganizationFeatureFlagCopy.test_copy_feature_flag_create_new.5'''SELECT "posthog_team"."id","posthog_team"."uuid",@@ -1673,1664 +1733,7 @@LIMIT 21'''# ----# name: TestOrganizationFeatureFlagCopy.test_copy_feature_flag_create_new.5- '''- SELECT "posthog_team"."id",- "posthog_team"."uuid",- "posthog_team"."organization_id",- "posthog_team"."parent_team_id",- "posthog_team"."project_id",- "posthog_team"."api_token",- "posthog_team"."app_urls",- "posthog_team"."name",- "posthog_team"."slack_incoming_webhook",- "posthog_team"."created_at",- "posthog_team"."updated_at",- "posthog_team"."anonymize_ips",- "posthog_team"."completed_snippet_onboarding",- "posthog_team"."has_completed_onboarding_for",- "posthog_team"."onboarding_tasks",- "posthog_team"."ingested_event",- "posthog_team"."ingested_production_event",- "posthog_team"."ingested_production_event_last_checked_at",- "posthog_team"."person_processing_opt_out",- "posthog_team"."secret_api_token",- "posthog_team"."secret_api_token_backup",- "posthog_team"."session_recording_opt_in",- "posthog_team"."session_recording_sample_rate",- "posthog_team"."session_recording_minimum_duration_milliseconds",- "posthog_team"."session_recording_linked_flag",- "posthog_team"."session_recording_network_payload_capture_config",- "posthog_team"."session_recording_masking_config",- "posthog_team"."session_recording_url_trigger_config",- "posthog_team"."session_recording_url_blocklist_config",- "posthog_team"."session_recording_event_trigger_config",- "posthog_team"."session_recording_trigger_match_type_config",- "posthog_team"."session_recording_trigger_groups",- "posthog_team"."session_replay_config",- "posthog_team"."session_recording_retention_period",- "posthog_team"."event_retention_months",- "posthog_team"."conversations_enabled",- "posthog_team"."conversations_settings",- "posthog_team"."proactive_tasks_enabled",- "posthog_team"."survey_config",- "posthog_team"."surveys_opt_in",- "posthog_team"."product_tours_opt_in",- "posthog_team"."capture_console_log_opt_in",- "posthog_team"."capture_performance_opt_in",- "posthog_team"."capture_dead_clicks",- "posthog_team"."autocapture_opt_out",- "posthog_team"."autocapture_web_vitals_opt_in",- "posthog_team"."autocapture_web_vitals_allowed_metrics",- "posthog_team"."autocapture_exceptions_opt_in",- "posthog_team"."autocapture_exceptions_errors_to_ignore",- "posthog_team"."logs_settings",- "posthog_team"."llm_gateway_enabled_at",- "posthog_team"."llm_gateway_revoked_at",- "posthog_team"."llm_gateway_overspend_allowance_usd",- "posthog_team"."heatmaps_opt_in",- "posthog_team"."receive_org_level_activity_logs",- "posthog_team"."web_analytics_pre_aggregated_tables_enabled",- "posthog_team"."web_analytics_pre_aggregated_tables_version",- "posthog_team"."flags_persistence_default",- "posthog_team"."feature_flag_confirmation_enabled",- "posthog_team"."feature_flag_confirmation_message",- "posthog_team"."default_evaluation_environments_enabled",- "posthog_team"."require_evaluation_environment_tags",- "posthog_team"."default_evaluation_contexts_enabled",- "posthog_team"."require_evaluation_contexts",- "posthog_team"."session_recording_version",- "posthog_team"."signup_token",- "posthog_team"."is_demo",- "posthog_team"."access_control",- "posthog_team"."week_start_day",- "posthog_team"."inject_web_apps",- "posthog_team"."test_account_filters",- "posthog_team"."test_account_filters_default_checked",- "posthog_team"."path_cleaning_filters",- "posthog_team"."timezone",- "posthog_team"."data_attributes",- "posthog_team"."person_display_name_properties",- "posthog_team"."live_events_columns",- "posthog_team"."recording_domains",- "posthog_team"."human_friendly_comparison_periods",- "posthog_team"."cookieless_server_hash_mode",- "posthog_team"."primary_dashboard_id",- "posthog_team"."default_data_theme",- "posthog_team"."extra_settings",- "posthog_team"."modifiers",- "posthog_team"."correlation_config",- "posthog_team"."session_recording_retention_period_days",- "posthog_team"."external_data_workspace_id",- "posthog_team"."external_data_workspace_last_synced_at",- "posthog_team"."api_query_rate_limit",- "posthog_team"."drop_events_older_than",- "posthog_team"."base_currency",- "posthog_team"."experiment_recalculation_time",- "posthog_team"."default_experiment_confidence_level",- "posthog_team"."default_experiment_stats_method",- "posthog_team"."business_model"- FROM "posthog_team"- WHERE "posthog_team"."id" = 99999- LIMIT 21- '''-# ----# name: TestOrganizationFeatureFlagCopy.test_copy_feature_flag_create_new.50- '''- SELECT "posthog_dashboarditem"."id",- "posthog_dashboarditem"."name",- "posthog_dashboarditem"."derived_name",- "posthog_dashboarditem"."description",- "posthog_dashboarditem"."team_id",- "posthog_dashboarditem"."filters",- "posthog_dashboarditem"."filters_hash",- "posthog_dashboarditem"."query",- "posthog_dashboarditem"."query_metadata",- "posthog_dashboarditem"."order",- "posthog_dashboarditem"."deleted",- "posthog_dashboarditem"."saved",- "posthog_dashboarditem"."created_at",- "posthog_dashboarditem"."refreshing",- "posthog_dashboarditem"."created_by_id",- "posthog_dashboarditem"."is_sample",- "posthog_dashboarditem"."short_id",- "posthog_dashboarditem"."favorited",- "posthog_dashboarditem"."refresh_attempt",- "posthog_dashboarditem"."last_modified_at",- "posthog_dashboarditem"."last_modified_by_id",- "posthog_dashboarditem"."dashboard_id",- "posthog_dashboarditem"."last_refresh",- "posthog_dashboarditem"."layouts",- "posthog_dashboarditem"."color",- "posthog_dashboarditem"."dive_dashboard_id",- "posthog_dashboarditem"."updated_at",- "posthog_dashboarditem"."deprecated_tags",- "posthog_dashboarditem"."tags"- FROM "posthog_dashboarditem"- WHERE "posthog_dashboarditem"."id" = 99999- LIMIT 21- '''-# ----# name: TestOrganizationFeatureFlagCopy.test_copy_feature_flag_create_new.51- '''- SELECT "posthog_team"."id",- "posthog_team"."uuid",- "posthog_team"."organization_id",- "posthog_team"."parent_team_id",- "posthog_team"."project_id",- "posthog_team"."api_token",- "posthog_team"."app_urls",- "posthog_team"."name",- "posthog_team"."slack_incoming_webhook",- "posthog_team"."created_at",- "posthog_team"."updated_at",- "posthog_team"."anonymize_ips",- "posthog_team"."completed_snippet_onboarding",- "posthog_team"."has_completed_onboarding_for",- "posthog_team"."onboarding_tasks",- "posthog_team"."ingested_event",- "posthog_team"."ingested_production_event",- "posthog_team"."ingested_production_event_last_checked_at",- "posthog_team"."person_processing_opt_out",- "posthog_team"."secret_api_token",- "posthog_team"."secret_api_token_backup",- "posthog_team"."session_recording_opt_in",- "posthog_team"."session_recording_sample_rate",- "posthog_team"."session_recording_minimum_duration_milliseconds",- "posthog_team"."session_recording_linked_flag",- "posthog_team"."session_recording_network_payload_capture_config",- "posthog_team"."session_recording_masking_config",- "posthog_team"."session_recording_url_trigger_config",- "posthog_team"."session_recording_url_blocklist_config",- "posthog_team"."session_recording_event_trigger_config",- "posthog_team"."session_recording_trigger_match_type_config",- "posthog_team"."session_recording_trigger_groups",- "posthog_team"."session_replay_config",- "posthog_team"."session_recording_retention_period",- "posthog_team"."event_retention_months",- "posthog_team"."conversations_enabled",- "posthog_team"."conversations_settings",- "posthog_team"."proactive_tasks_enabled",- "posthog_team"."survey_config",- "posthog_team"."surveys_opt_in",- "posthog_team"."product_tours_opt_in",- "posthog_team"."capture_console_log_opt_in",- "posthog_team"."capture_performance_opt_in",- "posthog_team"."capture_dead_clicks",- "posthog_team"."autocapture_opt_out",- "posthog_team"."autocapture_web_vitals_opt_in",- "posthog_team"."autocapture_web_vitals_allowed_metrics",- "posthog_team"."autocapture_exceptions_opt_in",- "posthog_team"."autocapture_exceptions_errors_to_ignore",- "posthog_team"."logs_settings",- "posthog_team"."llm_gateway_enabled_at",- "posthog_team"."llm_gateway_revoked_at",- "posthog_team"."llm_gateway_overspend_allowance_usd",- "posthog_team"."heatmaps_opt_in",- "posthog_team"."receive_org_level_activity_logs",- "posthog_team"."web_analytics_pre_aggregated_tables_enabled",- "posthog_team"."web_analytics_pre_aggregated_tables_version",- "posthog_team"."flags_persistence_default",- "posthog_team"."feature_flag_confirmation_enabled",- "posthog_team"."feature_flag_confirmation_message",- "posthog_team"."default_evaluation_environments_enabled",- "posthog_team"."require_evaluation_environment_tags",- "posthog_team"."default_evaluation_contexts_enabled",- "posthog_team"."require_evaluation_contexts",- "posthog_team"."session_recording_version",- "posthog_team"."signup_token",- "posthog_team"."is_demo",- "posthog_team"."access_control",- "posthog_team"."week_start_day",- "posthog_team"."inject_web_apps",- "posthog_team"."test_account_filters",- "posthog_team"."test_account_filters_default_checked",- "posthog_team"."path_cleaning_filters",- "posthog_team"."timezone",- "posthog_team"."data_attributes",- "posthog_team"."person_display_name_properties",- "posthog_team"."live_events_columns",- "posthog_team"."recording_domains",- "posthog_team"."human_friendly_comparison_periods",- "posthog_team"."cookieless_server_hash_mode",- "posthog_team"."primary_dashboard_id",- "posthog_team"."default_data_theme",- "posthog_team"."extra_settings",- "posthog_team"."modifiers",- "posthog_team"."correlation_config",- "posthog_team"."session_recording_retention_period_days",- "posthog_team"."external_data_workspace_id",- "posthog_team"."external_data_workspace_last_synced_at",- "posthog_team"."api_query_rate_limit",- "posthog_team"."drop_events_older_than",- "posthog_team"."base_currency",- "posthog_team"."experiment_recalculation_time",- "posthog_team"."default_experiment_confidence_level",- "posthog_team"."default_experiment_stats_method",- "posthog_team"."business_model"- FROM "posthog_team"- WHERE "posthog_team"."id" = 99999- LIMIT 21- '''-# ----# name: TestOrganizationFeatureFlagCopy.test_copy_feature_flag_create_new.52- '''- SELECT "posthog_teamrevenueanalyticsconfig"."team_id",- "posthog_teamrevenueanalyticsconfig"."filter_test_accounts",- "posthog_teamrevenueanalyticsconfig"."notified_first_sync",- "posthog_teamrevenueanalyticsconfig"."events",- "posthog_teamrevenueanalyticsconfig"."goals",- "posthog_teamrevenueanalyticsconfig"."base_currency"- FROM "posthog_teamrevenueanalyticsconfig"- WHERE "posthog_teamrevenueanalyticsconfig"."team_id" = 99999- LIMIT 21- '''-# ----# name: TestOrganizationFeatureFlagCopy.test_copy_feature_flag_create_new.53- '''- SELECT "posthog_team"."id",- "posthog_team"."uuid",- "posthog_team"."organization_id",- "posthog_team"."parent_team_id",- "posthog_team"."project_id",- "posthog_team"."api_token",- "posthog_team"."app_urls",- "posthog_team"."name",- "posthog_team"."slack_incoming_webhook",- "posthog_team"."created_at",- "posthog_team"."updated_at",- "posthog_team"."anonymize_ips",- "posthog_team"."completed_snippet_onboarding",- "posthog_team"."has_completed_onboarding_for",- "posthog_team"."onboarding_tasks",- "posthog_team"."ingested_event",- "posthog_team"."ingested_production_event",- "posthog_team"."ingested_production_event_last_checked_at",- "posthog_team"."person_processing_opt_out",- "posthog_team"."secret_api_token",- "posthog_team"."secret_api_token_backup",- "posthog_team"."session_recording_opt_in",- "posthog_team"."session_recording_sample_rate",- "posthog_team"."session_recording_minimum_duration_milliseconds",- "posthog_team"."session_recording_linked_flag",- "posthog_team"."session_recording_network_payload_capture_config",- "posthog_team"."session_recording_masking_config",- "posthog_team"."session_recording_url_trigger_config",- "posthog_team"."session_recording_url_blocklist_config",- "posthog_team"."session_recording_event_trigger_config",- "posthog_team"."session_recording_trigger_match_type_config",- "posthog_team"."session_recording_trigger_groups",- "posthog_team"."session_replay_config",- "posthog_team"."session_recording_retention_period",- "posthog_team"."event_retention_months",- "posthog_team"."conversations_enabled",- "posthog_team"."conversations_settings",- "posthog_team"."proactive_tasks_enabled",- "posthog_team"."survey_config",- "posthog_team"."surveys_opt_in",- "posthog_team"."product_tours_opt_in",- "posthog_team"."capture_console_log_opt_in",- "posthog_team"."capture_performance_opt_in",- "posthog_team"."capture_dead_clicks",- "posthog_team"."autocapture_opt_out",- "posthog_team"."autocapture_web_vitals_opt_in",- "posthog_team"."autocapture_web_vitals_allowed_metrics",- "posthog_team"."autocapture_exceptions_opt_in",- "posthog_team"."autocapture_exceptions_errors_to_ignore",- "posthog_team"."logs_settings",- "posthog_team"."llm_gateway_enabled_at",- "posthog_team"."llm_gateway_revoked_at",- "posthog_team"."llm_gateway_overspend_allowance_usd",- "posthog_team"."heatmaps_opt_in",- "posthog_team"."receive_org_level_activity_logs",- "posthog_team"."web_analytics_pre_aggregated_tables_enabled",- "posthog_team"."web_analytics_pre_aggregated_tables_version",- "posthog_team"."flags_persistence_default",- "posthog_team"."feature_flag_confirmation_enabled",- "posthog_team"."feature_flag_confirmation_message",- "posthog_team"."default_evaluation_environments_enabled",- "posthog_team"."require_evaluation_environment_tags",- "posthog_team"."default_evaluation_contexts_enabled",- "posthog_team"."require_evaluation_contexts",- "posthog_team"."session_recording_version",- "posthog_team"."signup_token",- "posthog_team"."is_demo",- "posthog_team"."access_control",- "posthog_team"."week_start_day",- "posthog_team"."inject_web_apps",- "posthog_team"."test_account_filters",- "posthog_team"."test_account_filters_default_checked",- "posthog_team"."path_cleaning_filters",- "posthog_team"."timezone",- "posthog_team"."data_attributes",- "posthog_team"."person_display_name_properties",- "posthog_team"."live_events_columns",- "posthog_team"."recording_domains",- "posthog_team"."human_friendly_comparison_periods",- "posthog_team"."cookieless_server_hash_mode",- "posthog_team"."primary_dashboard_id",- "posthog_team"."default_data_theme",- "posthog_team"."extra_settings",- "posthog_team"."modifiers",- "posthog_team"."correlation_config",- "posthog_team"."session_recording_retention_period_days",- "posthog_team"."external_data_workspace_id",- "posthog_team"."external_data_workspace_last_synced_at",- "posthog_team"."api_query_rate_limit",- "posthog_team"."drop_events_older_than",- "posthog_team"."base_currency",- "posthog_team"."experiment_recalculation_time",- "posthog_team"."default_experiment_confidence_level",- "posthog_team"."default_experiment_stats_method",- "posthog_team"."business_model"- FROM "posthog_team"- WHERE "posthog_team"."id" = 99999- LIMIT 21- '''-# ----# name: TestOrganizationFeatureFlagCopy.test_copy_feature_flag_create_new.54- '''- SELECT "posthog_teammarketinganalyticsconfig"."team_id",- "posthog_teammarketinganalyticsconfig"."attribution_window_days",- "posthog_teammarketinganalyticsconfig"."attribution_mode",- "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: TestOrganizationFeatureFlagCopy.test_copy_feature_flag_create_new.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"."experiment_recalculation_time",- "posthog_team"."default_experiment_confidence_level",- "posthog_team"."default_experiment_stats_method",- "posthog_team"."business_model"- FROM "posthog_team"- WHERE "posthog_team"."id" = 99999- LIMIT 21- '''-# ----# name: TestOrganizationFeatureFlagCopy.test_copy_feature_flag_create_new.56- '''- 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"- FROM "customer_analytics_teamcustomeranalyticsconfig"- WHERE "customer_analytics_teamcustomeranalyticsconfig"."team_id" = 99999- LIMIT 21- '''-# ----# name: TestOrganizationFeatureFlagCopy.test_copy_feature_flag_create_new.57- '''- SELECT "posthog_organization"."id",- "posthog_organization"."name",- "posthog_organization"."slug",- "posthog_organization"."logo_media_id",- "posthog_organization"."created_at",- "posthog_organization"."updated_at",- "posthog_organization"."is_active",- "posthog_organization"."is_not_active_reason",- "posthog_organization"."session_cookie_age",- "posthog_organization"."is_member_join_email_enabled",- "posthog_organization"."is_ai_data_processing_approved",- "posthog_organization"."is_ai_training_opted_in",- "posthog_organization"."is_ai_training_locked",- "posthog_organization"."is_ai_training_cta_shown",- "posthog_organization"."enforce_2fa",- "posthog_organization"."members_can_invite",- "posthog_organization"."members_can_create_projects",- "posthog_organization"."members_can_use_personal_api_keys",- "posthog_organization"."allow_publicly_shared_resources",- "posthog_organization"."default_role_id",- "posthog_organization"."plugins_access_level",- "posthog_organization"."for_internal_metrics",- "posthog_organization"."default_experiment_stats_method",- "posthog_organization"."default_anonymize_ips",- "posthog_organization"."is_hipaa",- "posthog_organization"."is_pending_deletion",- "posthog_organization"."customer_id",- "posthog_organization"."available_product_features",- "posthog_organization"."usage",- "posthog_organization"."never_drop_data",- "posthog_organization"."customer_trust_scores",- "posthog_organization"."setup_section_2_completed",- "posthog_organization"."personalization",- "posthog_organization"."domain_whitelist",- "posthog_organization"."is_platform"- FROM "posthog_organization"- WHERE "posthog_organization"."id" = '00000000-0000-0000-0000-000000000000'::uuid- LIMIT 21- '''-# ----# name: TestOrganizationFeatureFlagCopy.test_copy_feature_flag_create_new.58- '''- SELECT "posthog_team"."id",- "posthog_team"."uuid",- "posthog_team"."organization_id",- "posthog_team"."parent_team_id",- "posthog_team"."project_id",- "posthog_team"."api_token",- "posthog_team"."app_urls",- "posthog_team"."name",- "posthog_team"."slack_incoming_webhook",- "posthog_team"."created_at",- "posthog_team"."updated_at",- "posthog_team"."anonymize_ips",- "posthog_team"."completed_snippet_onboarding",- "posthog_team"."has_completed_onboarding_for",- "posthog_team"."onboarding_tasks",- "posthog_team"."ingested_event",- "posthog_team"."ingested_production_event",- "posthog_team"."ingested_production_event_last_checked_at",- "posthog_team"."person_processing_opt_out",- "posthog_team"."secret_api_token",- "posthog_team"."secret_api_token_backup",- "posthog_team"."session_recording_opt_in",- "posthog_team"."session_recording_sample_rate",- "posthog_team"."session_recording_minimum_duration_milliseconds",- "posthog_team"."session_recording_linked_flag",- "posthog_team"."session_recording_network_payload_capture_config",- "posthog_team"."session_recording_masking_config",- "posthog_team"."session_recording_url_trigger_config",- "posthog_team"."session_recording_url_blocklist_config",- "posthog_team"."session_recording_event_trigger_config",- "posthog_team"."session_recording_trigger_match_type_config",- "posthog_team"."session_recording_trigger_groups",- "posthog_team"."session_replay_config",- "posthog_team"."session_recording_retention_period",- "posthog_team"."event_retention_months",- "posthog_team"."conversations_enabled",- "posthog_team"."conversations_settings",- "posthog_team"."proactive_tasks_enabled",- "posthog_team"."survey_config",- "posthog_team"."surveys_opt_in",- "posthog_team"."product_tours_opt_in",- "posthog_team"."capture_console_log_opt_in",- "posthog_team"."capture_performance_opt_in",- "posthog_team"."capture_dead_clicks",- "posthog_team"."autocapture_opt_out",- "posthog_team"."autocapture_web_vitals_opt_in",- "posthog_team"."autocapture_web_vitals_allowed_metrics",- "posthog_team"."autocapture_exceptions_opt_in",- "posthog_team"."autocapture_exceptions_errors_to_ignore",- "posthog_team"."logs_settings",- "posthog_team"."llm_gateway_enabled_at",- "posthog_team"."llm_gateway_revoked_at",- "posthog_team"."llm_gateway_overspend_allowance_usd",- "posthog_team"."heatmaps_opt_in",- "posthog_team"."receive_org_level_activity_logs",- "posthog_team"."web_analytics_pre_aggregated_tables_enabled",- "posthog_team"."web_analytics_pre_aggregated_tables_version",- "posthog_team"."flags_persistence_default",- "posthog_team"."feature_flag_confirmation_enabled",- "posthog_team"."feature_flag_confirmation_message",- "posthog_team"."default_evaluation_environments_enabled",- "posthog_team"."require_evaluation_environment_tags",- "posthog_team"."default_evaluation_contexts_enabled",- "posthog_team"."require_evaluation_contexts",- "posthog_team"."session_recording_version",- "posthog_team"."signup_token",- "posthog_team"."is_demo",- "posthog_team"."access_control",- "posthog_team"."week_start_day",- "posthog_team"."inject_web_apps",- "posthog_team"."test_account_filters",- "posthog_team"."test_account_filters_default_checked",- "posthog_team"."path_cleaning_filters",- "posthog_team"."timezone",- "posthog_team"."data_attributes",- "posthog_team"."person_display_name_properties",- "posthog_team"."live_events_columns",- "posthog_team"."recording_domains",- "posthog_team"."human_friendly_comparison_periods",- "posthog_team"."cookieless_server_hash_mode",- "posthog_team"."primary_dashboard_id",- "posthog_team"."default_data_theme",- "posthog_team"."extra_settings",- "posthog_team"."modifiers",- "posthog_team"."correlation_config",- "posthog_team"."session_recording_retention_period_days",- "posthog_team"."external_data_workspace_id",- "posthog_team"."external_data_workspace_last_synced_at",- "posthog_team"."api_query_rate_limit",- "posthog_team"."drop_events_older_than",- "posthog_team"."base_currency",- "posthog_team"."experiment_recalculation_time",- "posthog_team"."default_experiment_confidence_level",- "posthog_team"."default_experiment_stats_method",- "posthog_team"."business_model"- FROM "posthog_team"- WHERE "posthog_team"."id" = 99999- LIMIT 21- '''-# ----# name: TestOrganizationFeatureFlagCopy.test_copy_feature_flag_create_new.59- '''- SELECT "posthog_dashboardtile"."id",- "posthog_dashboardtile"."dashboard_id",- "posthog_dashboardtile"."insight_id",- "posthog_dashboardtile"."text_id",- "posthog_dashboardtile"."button_tile_id",- "posthog_dashboardtile"."widget_id",- "posthog_dashboardtile"."team_id",- "posthog_dashboardtile"."layouts",- "posthog_dashboardtile"."color",- "posthog_dashboardtile"."filters_hash",- "posthog_dashboardtile"."last_refresh",- "posthog_dashboardtile"."refreshing",- "posthog_dashboardtile"."refresh_attempt",- "posthog_dashboardtile"."filters_overrides",- "posthog_dashboardtile"."show_description",- "posthog_dashboardtile"."transparent_background",- "posthog_dashboardtile"."deleted"- FROM "posthog_dashboardtile"- WHERE "posthog_dashboardtile"."id" = 99999- LIMIT 21- '''-# ----# name: TestOrganizationFeatureFlagCopy.test_copy_feature_flag_create_new.6- '''- 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_password_reset_at",- "posthog_user"."requested_2fa_reset_at",- "posthog_user"."has_seen_product_intro_for",- "posthog_user"."strapi_id",- "posthog_user"."is_active",- "posthog_user"."role_at_organization",- "posthog_user"."theme_mode",- "posthog_user"."partial_notification_settings",- "posthog_user"."anonymize_data",- "posthog_user"."allow_impersonation",- "posthog_user"."toolbar_mode",- "posthog_user"."hedgehog_config",- "posthog_user"."allow_sidebar_suggestions",- "posthog_user"."shortcut_position",- "posthog_user"."passkeys_enabled_for_2fa",- "posthog_user"."hide_mcp_hints",- "posthog_user"."onboarding_skipped_at",- "posthog_user"."onboarding_skipped_reason",- "posthog_user"."onboarding_skipped_organization_id",- "posthog_user"."onboarding_delegated_to_invite_id",- "posthog_user"."onboarding_delegated_to_organization_id",- "posthog_user"."onboarding_delegation_accepted_at",- "posthog_user"."events_column_config",- "posthog_user"."email_opt_in"- FROM "posthog_user"- WHERE "posthog_user"."id" = 99999- LIMIT 21- '''-# ----# name: TestOrganizationFeatureFlagCopy.test_copy_feature_flag_create_new.60- '''- SELECT "posthog_dashboarditem"."id",- "posthog_dashboarditem"."name",- "posthog_dashboarditem"."derived_name",- "posthog_dashboarditem"."description",- "posthog_dashboarditem"."team_id",- "posthog_dashboarditem"."filters",- "posthog_dashboarditem"."filters_hash",- "posthog_dashboarditem"."query",- "posthog_dashboarditem"."query_metadata",- "posthog_dashboarditem"."order",- "posthog_dashboarditem"."deleted",- "posthog_dashboarditem"."saved",- "posthog_dashboarditem"."created_at",- "posthog_dashboarditem"."refreshing",- "posthog_dashboarditem"."created_by_id",- "posthog_dashboarditem"."is_sample",- "posthog_dashboarditem"."short_id",- "posthog_dashboarditem"."favorited",- "posthog_dashboarditem"."refresh_attempt",- "posthog_dashboarditem"."last_modified_at",- "posthog_dashboarditem"."last_modified_by_id",- "posthog_dashboarditem"."dashboard_id",- "posthog_dashboarditem"."last_refresh",- "posthog_dashboarditem"."layouts",- "posthog_dashboarditem"."color",- "posthog_dashboarditem"."dive_dashboard_id",- "posthog_dashboarditem"."updated_at",- "posthog_dashboarditem"."deprecated_tags",- "posthog_dashboarditem"."tags"- FROM "posthog_dashboarditem"- WHERE "posthog_dashboarditem"."id" = 99999- LIMIT 21- '''-# ----# name: TestOrganizationFeatureFlagCopy.test_copy_feature_flag_create_new.61- '''- SELECT "posthog_dashboard"."id",- "posthog_dashboard"."name",- "posthog_dashboard"."description",- "posthog_dashboard"."team_id",- "posthog_dashboard"."pinned",- "posthog_dashboard"."created_at",- "posthog_dashboard"."created_by_id",- "posthog_dashboard"."deleted",- "posthog_dashboard"."last_accessed_at",- "posthog_dashboard"."last_refresh",- "posthog_dashboard"."filters",- "posthog_dashboard"."variables",- "posthog_dashboard"."breakdown_colors",- "posthog_dashboard"."data_color_theme_id",- "posthog_dashboard"."creation_mode",- "posthog_dashboard"."restriction_level",- "posthog_dashboard"."quick_filter_ids",- "posthog_dashboard"."deprecated_tags",- "posthog_dashboard"."tags",- "posthog_dashboard"."share_token",- "posthog_dashboard"."is_shared"- FROM "posthog_dashboard"- WHERE "posthog_dashboard"."id" = 99999- LIMIT 21- '''-# ----# name: TestOrganizationFeatureFlagCopy.test_copy_feature_flag_create_new.62- '''- SELECT "posthog_team"."id",- "posthog_team"."uuid",- "posthog_team"."organization_id",- "posthog_team"."parent_team_id",- "posthog_team"."project_id",- "posthog_team"."api_token",- "posthog_team"."app_urls",- "posthog_team"."name",- "posthog_team"."slack_incoming_webhook",- "posthog_team"."created_at",- "posthog_team"."updated_at",- "posthog_team"."anonymize_ips",- "posthog_team"."completed_snippet_onboarding",- "posthog_team"."has_completed_onboarding_for",- "posthog_team"."onboarding_tasks",- "posthog_team"."ingested_event",- "posthog_team"."ingested_production_event",- "posthog_team"."ingested_production_event_last_checked_at",- "posthog_team"."person_processing_opt_out",- "posthog_team"."secret_api_token",- "posthog_team"."secret_api_token_backup",- "posthog_team"."session_recording_opt_in",- "posthog_team"."session_recording_sample_rate",- "posthog_team"."session_recording_minimum_duration_milliseconds",- "posthog_team"."session_recording_linked_flag",- "posthog_team"."session_recording_network_payload_capture_config",- "posthog_team"."session_recording_masking_config",- "posthog_team"."session_recording_url_trigger_config",- "posthog_team"."session_recording_url_blocklist_config",- "posthog_team"."session_recording_event_trigger_config",- "posthog_team"."session_recording_trigger_match_type_config",- "posthog_team"."session_recording_trigger_groups",- "posthog_team"."session_replay_config",- "posthog_team"."session_recording_retention_period",- "posthog_team"."event_retention_months",- "posthog_team"."conversations_enabled",- "posthog_team"."conversations_settings",- "posthog_team"."proactive_tasks_enabled",- "posthog_team"."survey_config",- "posthog_team"."surveys_opt_in",- "posthog_team"."product_tours_opt_in",- "posthog_team"."capture_console_log_opt_in",- "posthog_team"."capture_performance_opt_in",- "posthog_team"."capture_dead_clicks",- "posthog_team"."autocapture_opt_out",- "posthog_team"."autocapture_web_vitals_opt_in",- "posthog_team"."autocapture_web_vitals_allowed_metrics",- "posthog_team"."autocapture_exceptions_opt_in",- "posthog_team"."autocapture_exceptions_errors_to_ignore",- "posthog_team"."logs_settings",- "posthog_team"."llm_gateway_enabled_at",- "posthog_team"."llm_gateway_revoked_at",- "posthog_team"."llm_gateway_overspend_allowance_usd",- "posthog_team"."heatmaps_opt_in",- "posthog_team"."receive_org_level_activity_logs",- "posthog_team"."web_analytics_pre_aggregated_tables_enabled",- "posthog_team"."web_analytics_pre_aggregated_tables_version",- "posthog_team"."flags_persistence_default",- "posthog_team"."feature_flag_confirmation_enabled",- "posthog_team"."feature_flag_confirmation_message",- "posthog_team"."default_evaluation_environments_enabled",- "posthog_team"."require_evaluation_environment_tags",- "posthog_team"."default_evaluation_contexts_enabled",- "posthog_team"."require_evaluation_contexts",- "posthog_team"."session_recording_version",- "posthog_team"."signup_token",- "posthog_team"."is_demo",- "posthog_team"."access_control",- "posthog_team"."week_start_day",- "posthog_team"."inject_web_apps",- "posthog_team"."test_account_filters",- "posthog_team"."test_account_filters_default_checked",- "posthog_team"."path_cleaning_filters",- "posthog_team"."timezone",- "posthog_team"."data_attributes",- "posthog_team"."person_display_name_properties",- "posthog_team"."live_events_columns",- "posthog_team"."recording_domains",- "posthog_team"."human_friendly_comparison_periods",- "posthog_team"."cookieless_server_hash_mode",- "posthog_team"."primary_dashboard_id",- "posthog_team"."default_data_theme",- "posthog_team"."extra_settings",- "posthog_team"."modifiers",- "posthog_team"."correlation_config",- "posthog_team"."session_recording_retention_period_days",- "posthog_team"."external_data_workspace_id",- "posthog_team"."external_data_workspace_last_synced_at",- "posthog_team"."api_query_rate_limit",- "posthog_team"."drop_events_older_than",- "posthog_team"."base_currency",- "posthog_team"."experiment_recalculation_time",- "posthog_team"."default_experiment_confidence_level",- "posthog_team"."default_experiment_stats_method",- "posthog_team"."business_model"- FROM "posthog_team"- WHERE "posthog_team"."id" = 99999- LIMIT 21- '''-# ----# name: TestOrganizationFeatureFlagCopy.test_copy_feature_flag_create_new.63- '''- SELECT "posthog_organization"."id",- "posthog_organization"."name",- "posthog_organization"."slug",- "posthog_organization"."logo_media_id",- "posthog_organization"."created_at",- "posthog_organization"."updated_at",- "posthog_organization"."is_active",- "posthog_organization"."is_not_active_reason",- "posthog_organization"."session_cookie_age",- "posthog_organization"."is_member_join_email_enabled",- "posthog_organization"."is_ai_data_processing_approved",- "posthog_organization"."is_ai_training_opted_in",- "posthog_organization"."is_ai_training_locked",- "posthog_organization"."is_ai_training_cta_shown",- "posthog_organization"."enforce_2fa",- "posthog_organization"."members_can_invite",- "posthog_organization"."members_can_create_projects",- "posthog_organization"."members_can_use_personal_api_keys",- "posthog_organization"."allow_publicly_shared_resources",- "posthog_organization"."default_role_id",- "posthog_organization"."plugins_access_level",- "posthog_organization"."for_internal_metrics",- "posthog_organization"."default_experiment_stats_method",- "posthog_organization"."default_anonymize_ips",- "posthog_organization"."is_hipaa",- "posthog_organization"."is_pending_deletion",- "posthog_organization"."customer_id",- "posthog_organization"."available_product_features",- "posthog_organization"."usage",- "posthog_organization"."never_drop_data",- "posthog_organization"."customer_trust_scores",- "posthog_organization"."setup_section_2_completed",- "posthog_organization"."personalization",- "posthog_organization"."domain_whitelist",- "posthog_organization"."is_platform"- FROM "posthog_organization"- WHERE "posthog_organization"."id" = '00000000-0000-0000-0000-000000000000'::uuid- LIMIT 21- '''-# ----# name: TestOrganizationFeatureFlagCopy.test_copy_feature_flag_create_new.64- '''- 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: TestOrganizationFeatureFlagCopy.test_copy_feature_flag_create_new.65- '''- SELECT "posthog_team"."id",- "posthog_team"."uuid",- "posthog_team"."organization_id",- "posthog_team"."parent_team_id",- "posthog_team"."project_id",- "posthog_team"."api_token",- "posthog_team"."app_urls",- "posthog_team"."name",- "posthog_team"."slack_incoming_webhook",- "posthog_team"."created_at",- "posthog_team"."updated_at",- "posthog_team"."anonymize_ips",- "posthog_team"."completed_snippet_onboarding",- "posthog_team"."has_completed_onboarding_for",- "posthog_team"."onboarding_tasks",- "posthog_team"."ingested_event",- "posthog_team"."ingested_production_event",- "posthog_team"."ingested_production_event_last_checked_at",- "posthog_team"."person_processing_opt_out",- "posthog_team"."secret_api_token",- "posthog_team"."secret_api_token_backup",- "posthog_team"."session_recording_opt_in",- "posthog_team"."session_recording_sample_rate",- "posthog_team"."session_recording_minimum_duration_milliseconds",- "posthog_team"."session_recording_linked_flag",- "posthog_team"."session_recording_network_payload_capture_config",- "posthog_team"."session_recording_masking_config",- "posthog_team"."session_recording_url_trigger_config",- "posthog_team"."session_recording_url_blocklist_config",- "posthog_team"."session_recording_event_trigger_config",- "posthog_team"."session_recording_trigger_match_type_config",- "posthog_team"."session_recording_trigger_groups",- "posthog_team"."session_replay_config",- "posthog_team"."session_recording_retention_period",- "posthog_team"."event_retention_months",- "posthog_team"."conversations_enabled",- "posthog_team"."conversations_settings",- "posthog_team"."proactive_tasks_enabled",- "posthog_team"."survey_config",- "posthog_team"."surveys_opt_in",- "posthog_team"."product_tours_opt_in",- "posthog_team"."capture_console_log_opt_in",- "posthog_team"."capture_performance_opt_in",- "posthog_team"."capture_dead_clicks",- "posthog_team"."autocapture_opt_out",- "posthog_team"."autocapture_web_vitals_opt_in",- "posthog_team"."autocapture_web_vitals_allowed_metrics",- "posthog_team"."autocapture_exceptions_opt_in",- "posthog_team"."autocapture_exceptions_errors_to_ignore",- "posthog_team"."logs_settings",- "posthog_team"."llm_gateway_enabled_at",- "posthog_team"."llm_gateway_revoked_at",- "posthog_team"."llm_gateway_overspend_allowance_usd",- "posthog_team"."heatmaps_opt_in",- "posthog_team"."receive_org_level_activity_logs",- "posthog_team"."web_analytics_pre_aggregated_tables_enabled",- "posthog_team"."web_analytics_pre_aggregated_tables_version",- "posthog_team"."flags_persistence_default",- "posthog_team"."feature_flag_confirmation_enabled",- "posthog_team"."feature_flag_confirmation_message",- "posthog_team"."default_evaluation_environments_enabled",- "posthog_team"."require_evaluation_environment_tags",- "posthog_team"."default_evaluation_contexts_enabled",- "posthog_team"."require_evaluation_contexts",- "posthog_team"."session_recording_version",- "posthog_team"."signup_token",- "posthog_team"."is_demo",- "posthog_team"."access_control",- "posthog_team"."week_start_day",- "posthog_team"."inject_web_apps",- "posthog_team"."test_account_filters",- "posthog_team"."test_account_filters_default_checked",- "posthog_team"."path_cleaning_filters",- "posthog_team"."timezone",- "posthog_team"."data_attributes",- "posthog_team"."person_display_name_properties",- "posthog_team"."live_events_columns",- "posthog_team"."recording_domains",- "posthog_team"."human_friendly_comparison_periods",- "posthog_team"."cookieless_server_hash_mode",- "posthog_team"."primary_dashboard_id",- "posthog_team"."default_data_theme",- "posthog_team"."extra_settings",- "posthog_team"."modifiers",- "posthog_team"."correlation_config",- "posthog_team"."session_recording_retention_period_days",- "posthog_team"."external_data_workspace_id",- "posthog_team"."external_data_workspace_last_synced_at",- "posthog_team"."api_query_rate_limit",- "posthog_team"."drop_events_older_than",- "posthog_team"."base_currency",- "posthog_team"."experiment_recalculation_time",- "posthog_team"."default_experiment_confidence_level",- "posthog_team"."default_experiment_stats_method",- "posthog_team"."business_model"- FROM "posthog_team"- WHERE "posthog_team"."id" = 99999- LIMIT 21- '''-# ----# name: TestOrganizationFeatureFlagCopy.test_copy_feature_flag_create_new.66- '''- SELECT "posthog_dashboarditem"."id",- "posthog_dashboarditem"."name",- "posthog_dashboarditem"."derived_name",- "posthog_dashboarditem"."description",- "posthog_dashboarditem"."team_id",- "posthog_dashboarditem"."filters",- "posthog_dashboarditem"."filters_hash",- "posthog_dashboarditem"."query",- "posthog_dashboarditem"."query_metadata",- "posthog_dashboarditem"."order",- "posthog_dashboarditem"."deleted",- "posthog_dashboarditem"."saved",- "posthog_dashboarditem"."created_at",- "posthog_dashboarditem"."refreshing",- "posthog_dashboarditem"."created_by_id",- "posthog_dashboarditem"."is_sample",- "posthog_dashboarditem"."short_id",- "posthog_dashboarditem"."favorited",- "posthog_dashboarditem"."refresh_attempt",- "posthog_dashboarditem"."last_modified_at",- "posthog_dashboarditem"."last_modified_by_id",- "posthog_dashboarditem"."dashboard_id",- "posthog_dashboarditem"."last_refresh",- "posthog_dashboarditem"."layouts",- "posthog_dashboarditem"."color",- "posthog_dashboarditem"."dive_dashboard_id",- "posthog_dashboarditem"."updated_at",- "posthog_dashboarditem"."deprecated_tags",- "posthog_dashboarditem"."tags"- FROM "posthog_dashboarditem"- WHERE "posthog_dashboarditem"."id" = 99999- LIMIT 21- '''-# ----# name: TestOrganizationFeatureFlagCopy.test_copy_feature_flag_create_new.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"."experiment_recalculation_time",- "posthog_team"."default_experiment_confidence_level",- "posthog_team"."default_experiment_stats_method",- "posthog_team"."business_model"- FROM "posthog_team"- WHERE "posthog_team"."id" = 99999- LIMIT 21- '''-# ----# name: TestOrganizationFeatureFlagCopy.test_copy_feature_flag_create_new.68- '''- SELECT "posthog_organization"."id",- "posthog_organization"."name",- "posthog_organization"."slug",- "posthog_organization"."logo_media_id",- "posthog_organization"."created_at",- "posthog_organization"."updated_at",- "posthog_organization"."is_active",- "posthog_organization"."is_not_active_reason",- "posthog_organization"."session_cookie_age",- "posthog_organization"."is_member_join_email_enabled",- "posthog_organization"."is_ai_data_processing_approved",- "posthog_organization"."is_ai_training_opted_in",- "posthog_organization"."is_ai_training_locked",- "posthog_organization"."is_ai_training_cta_shown",- "posthog_organization"."enforce_2fa",- "posthog_organization"."members_can_invite",- "posthog_organization"."members_can_create_projects",- "posthog_organization"."members_can_use_personal_api_keys",- "posthog_organization"."allow_publicly_shared_resources",- "posthog_organization"."default_role_id",- "posthog_organization"."plugins_access_level",- "posthog_organization"."for_internal_metrics",- "posthog_organization"."default_experiment_stats_method",- "posthog_organization"."default_anonymize_ips",- "posthog_organization"."is_hipaa",- "posthog_organization"."is_pending_deletion",- "posthog_organization"."customer_id",- "posthog_organization"."available_product_features",- "posthog_organization"."usage",- "posthog_organization"."never_drop_data",- "posthog_organization"."customer_trust_scores",- "posthog_organization"."setup_section_2_completed",- "posthog_organization"."personalization",- "posthog_organization"."domain_whitelist",- "posthog_organization"."is_platform"- FROM "posthog_organization"- WHERE "posthog_organization"."id" = '00000000-0000-0000-0000-000000000000'::uuid- LIMIT 21- '''-# ----# name: TestOrganizationFeatureFlagCopy.test_copy_feature_flag_create_new.69- '''- SELECT "posthog_team"."id",- "posthog_team"."uuid",- "posthog_team"."organization_id",- "posthog_team"."parent_team_id",- "posthog_team"."project_id",- "posthog_team"."api_token",- "posthog_team"."app_urls",- "posthog_team"."name",- "posthog_team"."slack_incoming_webhook",- "posthog_team"."created_at",- "posthog_team"."updated_at",- "posthog_team"."anonymize_ips",- "posthog_team"."completed_snippet_onboarding",- "posthog_team"."has_completed_onboarding_for",- "posthog_team"."onboarding_tasks",- "posthog_team"."ingested_event",- "posthog_team"."ingested_production_event",- "posthog_team"."ingested_production_event_last_checked_at",- "posthog_team"."person_processing_opt_out",- "posthog_team"."secret_api_token",- "posthog_team"."secret_api_token_backup",- "posthog_team"."session_recording_opt_in",- "posthog_team"."session_recording_sample_rate",- "posthog_team"."session_recording_minimum_duration_milliseconds",- "posthog_team"."session_recording_linked_flag",- "posthog_team"."session_recording_network_payload_capture_config",- "posthog_team"."session_recording_masking_config",- "posthog_team"."session_recording_url_trigger_config",- "posthog_team"."session_recording_url_blocklist_config",- "posthog_team"."session_recording_event_trigger_config",- "posthog_team"."session_recording_trigger_match_type_config",- "posthog_team"."session_recording_trigger_groups",- "posthog_team"."session_replay_config",- "posthog_team"."session_recording_retention_period",- "posthog_team"."event_retention_months",- "posthog_team"."conversations_enabled",- "posthog_team"."conversations_settings",- "posthog_team"."proactive_tasks_enabled",- "posthog_team"."survey_config",- "posthog_team"."surveys_opt_in",- "posthog_team"."product_tours_opt_in",- "posthog_team"."capture_console_log_opt_in",- "posthog_team"."capture_performance_opt_in",- "posthog_team"."capture_dead_clicks",- "posthog_team"."autocapture_opt_out",- "posthog_team"."autocapture_web_vitals_opt_in",- "posthog_team"."autocapture_web_vitals_allowed_metrics",- "posthog_team"."autocapture_exceptions_opt_in",- "posthog_team"."autocapture_exceptions_errors_to_ignore",- "posthog_team"."logs_settings",- "posthog_team"."llm_gateway_enabled_at",- "posthog_team"."llm_gateway_revoked_at",- "posthog_team"."llm_gateway_overspend_allowance_usd",- "posthog_team"."heatmaps_opt_in",- "posthog_team"."receive_org_level_activity_logs",- "posthog_team"."web_analytics_pre_aggregated_tables_enabled",- "posthog_team"."web_analytics_pre_aggregated_tables_version",- "posthog_team"."flags_persistence_default",- "posthog_team"."feature_flag_confirmation_enabled",- "posthog_team"."feature_flag_confirmation_message",- "posthog_team"."default_evaluation_environments_enabled",- "posthog_team"."require_evaluation_environment_tags",- "posthog_team"."default_evaluation_contexts_enabled",- "posthog_team"."require_evaluation_contexts",- "posthog_team"."session_recording_version",- "posthog_team"."signup_token",- "posthog_team"."is_demo",- "posthog_team"."access_control",- "posthog_team"."week_start_day",- "posthog_team"."inject_web_apps",- "posthog_team"."test_account_filters",- "posthog_team"."test_account_filters_default_checked",- "posthog_team"."path_cleaning_filters",- "posthog_team"."timezone",- "posthog_team"."data_attributes",- "posthog_team"."person_display_name_properties",- "posthog_team"."live_events_columns",- "posthog_team"."recording_domains",- "posthog_team"."human_friendly_comparison_periods",- "posthog_team"."cookieless_server_hash_mode",- "posthog_team"."primary_dashboard_id",- "posthog_team"."default_data_theme",- "posthog_team"."extra_settings",- "posthog_team"."modifiers",- "posthog_team"."correlation_config",- "posthog_team"."session_recording_retention_period_days",- "posthog_team"."external_data_workspace_id",- "posthog_team"."external_data_workspace_last_synced_at",- "posthog_team"."api_query_rate_limit",- "posthog_team"."drop_events_older_than",- "posthog_team"."base_currency",- "posthog_team"."experiment_recalculation_time",- "posthog_team"."default_experiment_confidence_level",- "posthog_team"."default_experiment_stats_method",- "posthog_team"."business_model"- FROM "posthog_team"- WHERE "posthog_team"."id" = 99999- LIMIT 21- '''-# ----# name: TestOrganizationFeatureFlagCopy.test_copy_feature_flag_create_new.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"."members_can_invite",- "posthog_organization"."members_can_create_projects",- "posthog_organization"."members_can_use_personal_api_keys",- "posthog_organization"."allow_publicly_shared_resources",- "posthog_organization"."default_role_id",- "posthog_organization"."plugins_access_level",- "posthog_organization"."for_internal_metrics",- "posthog_organization"."default_experiment_stats_method",- "posthog_organization"."default_anonymize_ips",- "posthog_organization"."is_hipaa",- "posthog_organization"."is_pending_deletion",- "posthog_organization"."customer_id",- "posthog_organization"."available_product_features",- "posthog_organization"."usage",- "posthog_organization"."never_drop_data",- "posthog_organization"."customer_trust_scores",- "posthog_organization"."setup_section_2_completed",- "posthog_organization"."personalization",- "posthog_organization"."domain_whitelist",- "posthog_organization"."is_platform"- FROM "posthog_organizationmembership"- INNER JOIN "posthog_organization" ON ("posthog_organizationmembership"."organization_id" = "posthog_organization"."id")- WHERE ("posthog_organizationmembership"."organization_id" = '00000000-0000-0000-0000-000000000000'::uuid- AND "posthog_organizationmembership"."user_id" = 99999)- LIMIT 21- '''-# ----# name: TestOrganizationFeatureFlagCopy.test_copy_feature_flag_create_new.70- '''- SELECT "posthog_dashboardtile"."id",- "posthog_dashboardtile"."dashboard_id",- "posthog_dashboardtile"."insight_id",- "posthog_dashboardtile"."text_id",- "posthog_dashboardtile"."button_tile_id",- "posthog_dashboardtile"."widget_id",- "posthog_dashboardtile"."team_id",- "posthog_dashboardtile"."layouts",- "posthog_dashboardtile"."color",- "posthog_dashboardtile"."filters_hash",- "posthog_dashboardtile"."last_refresh",- "posthog_dashboardtile"."refreshing",- "posthog_dashboardtile"."refresh_attempt",- "posthog_dashboardtile"."filters_overrides",- "posthog_dashboardtile"."show_description",- "posthog_dashboardtile"."transparent_background",- "posthog_dashboardtile"."deleted"- FROM "posthog_dashboardtile"- WHERE "posthog_dashboardtile"."id" = 99999- LIMIT 21- '''-# ----# name: TestOrganizationFeatureFlagCopy.test_copy_feature_flag_create_new.71- '''- SELECT "posthog_dashboarditem"."id",- "posthog_dashboarditem"."name",- "posthog_dashboarditem"."derived_name",- "posthog_dashboarditem"."description",- "posthog_dashboarditem"."team_id",- "posthog_dashboarditem"."filters",- "posthog_dashboarditem"."filters_hash",- "posthog_dashboarditem"."query",- "posthog_dashboarditem"."query_metadata",- "posthog_dashboarditem"."order",- "posthog_dashboarditem"."deleted",- "posthog_dashboarditem"."saved",- "posthog_dashboarditem"."created_at",- "posthog_dashboarditem"."refreshing",- "posthog_dashboarditem"."created_by_id",- "posthog_dashboarditem"."is_sample",- "posthog_dashboarditem"."short_id",- "posthog_dashboarditem"."favorited",- "posthog_dashboarditem"."refresh_attempt",- "posthog_dashboarditem"."last_modified_at",- "posthog_dashboarditem"."last_modified_by_id",- "posthog_dashboarditem"."dashboard_id",- "posthog_dashboarditem"."last_refresh",- "posthog_dashboarditem"."layouts",- "posthog_dashboarditem"."color",- "posthog_dashboarditem"."dive_dashboard_id",- "posthog_dashboarditem"."updated_at",- "posthog_dashboarditem"."deprecated_tags",- "posthog_dashboarditem"."tags"- FROM "posthog_dashboarditem"- WHERE "posthog_dashboarditem"."id" = 99999- LIMIT 21- '''-# ----# name: TestOrganizationFeatureFlagCopy.test_copy_feature_flag_create_new.72- '''- SELECT "posthog_dashboard"."id",- "posthog_dashboard"."name",- "posthog_dashboard"."description",- "posthog_dashboard"."team_id",- "posthog_dashboard"."pinned",- "posthog_dashboard"."created_at",- "posthog_dashboard"."created_by_id",- "posthog_dashboard"."deleted",- "posthog_dashboard"."last_accessed_at",- "posthog_dashboard"."last_refresh",- "posthog_dashboard"."filters",- "posthog_dashboard"."variables",- "posthog_dashboard"."breakdown_colors",- "posthog_dashboard"."data_color_theme_id",- "posthog_dashboard"."creation_mode",- "posthog_dashboard"."restriction_level",- "posthog_dashboard"."quick_filter_ids",- "posthog_dashboard"."deprecated_tags",- "posthog_dashboard"."tags",- "posthog_dashboard"."share_token",- "posthog_dashboard"."is_shared"- FROM "posthog_dashboard"- WHERE "posthog_dashboard"."id" = 99999- LIMIT 21- '''-# ----# name: TestOrganizationFeatureFlagCopy.test_copy_feature_flag_create_new.73- '''- SELECT "posthog_team"."id",- "posthog_team"."uuid",- "posthog_team"."organization_id",- "posthog_team"."parent_team_id",- "posthog_team"."project_id",- "posthog_team"."api_token",- "posthog_team"."app_urls",- "posthog_team"."name",- "posthog_team"."slack_incoming_webhook",- "posthog_team"."created_at",- "posthog_team"."updated_at",- "posthog_team"."anonymize_ips",- "posthog_team"."completed_snippet_onboarding",- "posthog_team"."has_completed_onboarding_for",- "posthog_team"."onboarding_tasks",- "posthog_team"."ingested_event",- "posthog_team"."ingested_production_event",- "posthog_team"."ingested_production_event_last_checked_at",- "posthog_team"."person_processing_opt_out",- "posthog_team"."secret_api_token",- "posthog_team"."secret_api_token_backup",- "posthog_team"."session_recording_opt_in",- "posthog_team"."session_recording_sample_rate",- "posthog_team"."session_recording_minimum_duration_milliseconds",- "posthog_team"."session_recording_linked_flag",- "posthog_team"."session_recording_network_payload_capture_config",- "posthog_team"."session_recording_masking_config",- "posthog_team"."session_recording_url_trigger_config",- "posthog_team"."session_recording_url_blocklist_config",- "posthog_team"."session_recording_event_trigger_config",- "posthog_team"."session_recording_trigger_match_type_config",- "posthog_team"."session_recording_trigger_groups",- "posthog_team"."session_replay_config",- "posthog_team"."session_recording_retention_period",- "posthog_team"."event_retention_months",- "posthog_team"."conversations_enabled",- "posthog_team"."conversations_settings",- "posthog_team"."proactive_tasks_enabled",- "posthog_team"."survey_config",- "posthog_team"."surveys_opt_in",- "posthog_team"."product_tours_opt_in",- "posthog_team"."capture_console_log_opt_in",- "posthog_team"."capture_performance_opt_in",- "posthog_team"."capture_dead_clicks",- "posthog_team"."autocapture_opt_out",- "posthog_team"."autocapture_web_vitals_opt_in",- "posthog_team"."autocapture_web_vitals_allowed_metrics",- "posthog_team"."autocapture_exceptions_opt_in",- "posthog_team"."autocapture_exceptions_errors_to_ignore",- "posthog_team"."logs_settings",- "posthog_team"."llm_gateway_enabled_at",- "posthog_team"."llm_gateway_revoked_at",- "posthog_team"."llm_gateway_overspend_allowance_usd",- "posthog_team"."heatmaps_opt_in",- "posthog_team"."receive_org_level_activity_logs",- "posthog_team"."web_analytics_pre_aggregated_tables_enabled",- "posthog_team"."web_analytics_pre_aggregated_tables_version",- "posthog_team"."flags_persistence_default",- "posthog_team"."feature_flag_confirmation_enabled",- "posthog_team"."feature_flag_confirmation_message",- "posthog_team"."default_evaluation_environments_enabled",- "posthog_team"."require_evaluation_environment_tags",- "posthog_team"."default_evaluation_contexts_enabled",- "posthog_team"."require_evaluation_contexts",- "posthog_team"."session_recording_version",- "posthog_team"."signup_token",- "posthog_team"."is_demo",- "posthog_team"."access_control",- "posthog_team"."week_start_day",- "posthog_team"."inject_web_apps",- "posthog_team"."test_account_filters",- "posthog_team"."test_account_filters_default_checked",- "posthog_team"."path_cleaning_filters",- "posthog_team"."timezone",- "posthog_team"."data_attributes",- "posthog_team"."person_display_name_properties",- "posthog_team"."live_events_columns",- "posthog_team"."recording_domains",- "posthog_team"."human_friendly_comparison_periods",- "posthog_team"."cookieless_server_hash_mode",- "posthog_team"."primary_dashboard_id",- "posthog_team"."default_data_theme",- "posthog_team"."extra_settings",- "posthog_team"."modifiers",- "posthog_team"."correlation_config",- "posthog_team"."session_recording_retention_period_days",- "posthog_team"."external_data_workspace_id",- "posthog_team"."external_data_workspace_last_synced_at",- "posthog_team"."api_query_rate_limit",- "posthog_team"."drop_events_older_than",- "posthog_team"."base_currency",- "posthog_team"."experiment_recalculation_time",- "posthog_team"."default_experiment_confidence_level",- "posthog_team"."default_experiment_stats_method",- "posthog_team"."business_model"- FROM "posthog_team"- WHERE "posthog_team"."id" = 99999- LIMIT 21- '''-# ----# name: TestOrganizationFeatureFlagCopy.test_copy_feature_flag_create_new.74- '''- SELECT "posthog_organization"."id",- "posthog_organization"."name",- "posthog_organization"."slug",- "posthog_organization"."logo_media_id",- "posthog_organization"."created_at",- "posthog_organization"."updated_at",- "posthog_organization"."is_active",- "posthog_organization"."is_not_active_reason",- "posthog_organization"."session_cookie_age",- "posthog_organization"."is_member_join_email_enabled",- "posthog_organization"."is_ai_data_processing_approved",- "posthog_organization"."is_ai_training_opted_in",- "posthog_organization"."is_ai_training_locked",- "posthog_organization"."is_ai_training_cta_shown",- "posthog_organization"."enforce_2fa",- "posthog_organization"."members_can_invite",- "posthog_organization"."members_can_create_projects",- "posthog_organization"."members_can_use_personal_api_keys",- "posthog_organization"."allow_publicly_shared_resources",- "posthog_organization"."default_role_id",- "posthog_organization"."plugins_access_level",- "posthog_organization"."for_internal_metrics",- "posthog_organization"."default_experiment_stats_method",- "posthog_organization"."default_anonymize_ips",- "posthog_organization"."is_hipaa",- "posthog_organization"."is_pending_deletion",- "posthog_organization"."customer_id",- "posthog_organization"."available_product_features",- "posthog_organization"."usage",- "posthog_organization"."never_drop_data",- "posthog_organization"."customer_trust_scores",- "posthog_organization"."setup_section_2_completed",- "posthog_organization"."personalization",- "posthog_organization"."domain_whitelist",- "posthog_organization"."is_platform"- FROM "posthog_organization"- WHERE "posthog_organization"."id" = '00000000-0000-0000-0000-000000000000'::uuid- LIMIT 21- '''-# ----# name: TestOrganizationFeatureFlagCopy.test_copy_feature_flag_create_new.75- '''- SELECT "posthog_featureflag"."id",- "posthog_featureflag"."key",- "posthog_featureflag"."name",- "posthog_featureflag"."filters",- "posthog_featureflag"."team_id",- "posthog_featureflag"."created_by_id",- "posthog_featureflag"."created_at",- "posthog_featureflag"."updated_at",- "posthog_featureflag"."deleted",- "posthog_featureflag"."active",- "posthog_featureflag"."archived",- "posthog_featureflag"."version",- "posthog_featureflag"."last_modified_by_id",- "posthog_featureflag"."rollback_conditions",- "posthog_featureflag"."performed_rollback",- "posthog_featureflag"."ensure_experience_continuity",- "posthog_featureflag"."usage_dashboard_id",- "posthog_featureflag"."has_enriched_analytics",- "posthog_featureflag"."is_remote_configuration",- "posthog_featureflag"."has_encrypted_payloads",- "posthog_featureflag"."evaluation_runtime",- "posthog_featureflag"."bucketing_identifier",- "posthog_featureflag"."last_called_at"- FROM "posthog_featureflag"- WHERE (NOT ("posthog_featureflag"."deleted")- AND "posthog_featureflag"."id" = 99999)- ORDER BY "posthog_featureflag"."id" ASC- LIMIT 1- '''-# ----# name: TestOrganizationFeatureFlagCopy.test_copy_feature_flag_create_new.76- '''- 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" = 'feature_flag'- AND NOT ("posthog_filesystem"."shortcut"- AND "posthog_filesystem"."shortcut" IS NOT NULL))- '''-# ----# name: TestOrganizationFeatureFlagCopy.test_copy_feature_flag_create_new.77+# name: TestOrganizationFeatureFlagCopy.test_copy_feature_flag_create_new.50'''SELECT "posthog_filesystemshortcut"."id","posthog_filesystemshortcut"."team_id",@@ -3353,7 +1756,7 @@AND "posthog_filesystemshortcut"."href" IS NOT NULL))'''# ----# name: TestOrganizationFeatureFlagCopy.test_copy_feature_flag_create_new.78+# name: TestOrganizationFeatureFlagCopy.test_copy_feature_flag_create_new.51'''SELECT "posthog_integration"."id","posthog_integration"."team_id",@@ -3372,7 +1775,7 @@LIMIT 21'''# ----# name: TestOrganizationFeatureFlagCopy.test_copy_feature_flag_create_new.79+# name: TestOrganizationFeatureFlagCopy.test_copy_feature_flag_create_new.52'''SELECT "posthog_organizationintegration"."id","posthog_organizationintegration"."organization_id",@@ -3389,56 +1792,7 @@LIMIT 21'''# ----# name: TestOrganizationFeatureFlagCopy.test_copy_feature_flag_create_new.8- '''- SELECT "posthog_organizationmembership"."id",- "posthog_organizationmembership"."organization_id",- "posthog_organizationmembership"."user_id",- "posthog_organizationmembership"."level",- "posthog_organizationmembership"."joined_at",- "posthog_organizationmembership"."updated_at",- "posthog_organizationmembership"."invited_by_id",- "posthog_organization"."id",- "posthog_organization"."name",- "posthog_organization"."slug",- "posthog_organization"."logo_media_id",- "posthog_organization"."created_at",- "posthog_organization"."updated_at",- "posthog_organization"."is_active",- "posthog_organization"."is_not_active_reason",- "posthog_organization"."session_cookie_age",- "posthog_organization"."is_member_join_email_enabled",- "posthog_organization"."is_ai_data_processing_approved",- "posthog_organization"."is_ai_training_opted_in",- "posthog_organization"."is_ai_training_locked",- "posthog_organization"."is_ai_training_cta_shown",- "posthog_organization"."enforce_2fa",- "posthog_organization"."members_can_invite",- "posthog_organization"."members_can_create_projects",- "posthog_organization"."members_can_use_personal_api_keys",- "posthog_organization"."allow_publicly_shared_resources",- "posthog_organization"."default_role_id",- "posthog_organization"."plugins_access_level",- "posthog_organization"."for_internal_metrics",- "posthog_organization"."default_experiment_stats_method",- "posthog_organization"."default_anonymize_ips",- "posthog_organization"."is_hipaa",- "posthog_organization"."is_pending_deletion",- "posthog_organization"."customer_id",- "posthog_organization"."available_product_features",- "posthog_organization"."usage",- "posthog_organization"."never_drop_data",- "posthog_organization"."customer_trust_scores",- "posthog_organization"."setup_section_2_completed",- "posthog_organization"."personalization",- "posthog_organization"."domain_whitelist",- "posthog_organization"."is_platform"- FROM "posthog_organizationmembership"- INNER JOIN "posthog_organization" ON ("posthog_organizationmembership"."organization_id" = "posthog_organization"."id")- WHERE "posthog_organizationmembership"."user_id" = 99999- '''-# ----# name: TestOrganizationFeatureFlagCopy.test_copy_feature_flag_create_new.80+# name: TestOrganizationFeatureFlagCopy.test_copy_feature_flag_create_new.53'''SELECT "posthog_taggeditem"."id","posthog_taggeditem"."tag_id",@@ -3456,7 +1810,7 @@WHERE "posthog_taggeditem"."feature_flag_id" = 99999'''# ----# name: TestOrganizationFeatureFlagCopy.test_copy_feature_flag_create_new.81+# name: TestOrganizationFeatureFlagCopy.test_copy_feature_flag_create_new.54'''SELECT "posthog_taggeditem"."id","posthog_taggeditem"."tag_id",@@ -3474,7 +1828,7 @@WHERE "posthog_taggeditem"."feature_flag_id" = 99999'''# ----# name: TestOrganizationFeatureFlagCopy.test_copy_feature_flag_create_new.82+# name: TestOrganizationFeatureFlagCopy.test_copy_feature_flag_create_new.55'''SELECT "posthog_survey"."id","posthog_survey"."team_id",@@ -3519,7 +1873,7 @@WHERE "posthog_survey"."internal_response_sampling_flag_id" = 99999'''# ----# name: TestOrganizationFeatureFlagCopy.test_copy_feature_flag_create_new.83+# name: TestOrganizationFeatureFlagCopy.test_copy_feature_flag_create_new.56'''SELECT "posthog_survey"."id","posthog_survey"."team_id",@@ -3564,7 +1918,7 @@WHERE "posthog_survey"."internal_response_sampling_flag_id" = 99999'''# ----# name: TestOrganizationFeatureFlagCopy.test_copy_feature_flag_create_new.84+# name: TestOrganizationFeatureFlagCopy.test_copy_feature_flag_create_new.57'''SELECT "ee_featureflagroleaccess"."id","ee_featureflagroleaccess"."feature_flag_id",@@ -3575,7 +1929,7 @@WHERE "ee_featureflagroleaccess"."feature_flag_id" = 99999'''# ----# name: TestOrganizationFeatureFlagCopy.test_copy_feature_flag_create_new.85+# name: TestOrganizationFeatureFlagCopy.test_copy_feature_flag_create_new.58'''SELECT "ee_featureflagroleaccess"."id","ee_featureflagroleaccess"."feature_flag_id",@@ -3586,7 +1940,7 @@WHERE "ee_featureflagroleaccess"."feature_flag_id" = 99999'''# ----# name: TestOrganizationFeatureFlagCopy.test_copy_feature_flag_create_new.86+# name: TestOrganizationFeatureFlagCopy.test_copy_feature_flag_create_new.59'''SELECT "posthog_experiment"."id","posthog_experiment"."name",@@ -3626,7 +1980,53 @@AND NOT "posthog_experiment"."deleted")'''# ----# name: TestOrganizationFeatureFlagCopy.test_copy_feature_flag_create_new.87+# name: TestOrganizationFeatureFlagCopy.test_copy_feature_flag_create_new.6+ '''+ 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_password_reset_at",+ "posthog_user"."requested_2fa_reset_at",+ "posthog_user"."has_seen_product_intro_for",+ "posthog_user"."strapi_id",+ "posthog_user"."is_active",+ "posthog_user"."role_at_organization",+ "posthog_user"."theme_mode",+ "posthog_user"."partial_notification_settings",+ "posthog_user"."anonymize_data",+ "posthog_user"."allow_impersonation",+ "posthog_user"."toolbar_mode",+ "posthog_user"."hedgehog_config",+ "posthog_user"."allow_sidebar_suggestions",+ "posthog_user"."shortcut_position",+ "posthog_user"."passkeys_enabled_for_2fa",+ "posthog_user"."hide_mcp_hints",+ "posthog_user"."onboarding_skipped_at",+ "posthog_user"."onboarding_skipped_reason",+ "posthog_user"."onboarding_skipped_organization_id",+ "posthog_user"."onboarding_delegated_to_invite_id",+ "posthog_user"."onboarding_delegated_to_organization_id",+ "posthog_user"."onboarding_delegation_accepted_at",+ "posthog_user"."events_column_config",+ "posthog_user"."email_opt_in"+ FROM "posthog_user"+ WHERE "posthog_user"."id" = 99999+ LIMIT 21+ '''+# ---+# name: TestOrganizationFeatureFlagCopy.test_copy_feature_flag_create_new.60'''SELECT "posthog_experiment"."id","posthog_experiment"."name",@@ -3666,7 +2066,7 @@AND NOT "posthog_experiment"."deleted")'''# ----# name: TestOrganizationFeatureFlagCopy.test_copy_feature_flag_create_new.88+# name: TestOrganizationFeatureFlagCopy.test_copy_feature_flag_create_new.61'''SELECT "posthog_survey"."id","posthog_survey"."team_id",@@ -3711,7 +2111,7 @@WHERE "posthog_survey"."linked_flag_id" = 99999'''# ----# name: TestOrganizationFeatureFlagCopy.test_copy_feature_flag_create_new.89+# name: TestOrganizationFeatureFlagCopy.test_copy_feature_flag_create_new.62'''SELECT "posthog_earlyaccessfeature"."id","posthog_earlyaccessfeature"."team_id",@@ -3726,15 +2126,7 @@WHERE "posthog_earlyaccessfeature"."feature_flag_id" = 99999'''# ----# name: TestOrganizationFeatureFlagCopy.test_copy_feature_flag_create_new.9- '''- SELECT "posthog_team"."id",- "posthog_team"."organization_id"- FROM "posthog_team"- WHERE "posthog_team"."organization_id" IN ('00000000-0000-0000-0000-000000000000'::uuid)- '''-# ----# name: TestOrganizationFeatureFlagCopy.test_copy_feature_flag_create_new.90+# name: TestOrganizationFeatureFlagCopy.test_copy_feature_flag_create_new.63'''SELECT "posthog_organizationmembership"."id","posthog_organizationmembership"."organization_id",@@ -3785,7 +2177,7 @@LIMIT 21'''# ----# name: TestOrganizationFeatureFlagCopy.test_copy_feature_flag_create_new.91+# name: TestOrganizationFeatureFlagCopy.test_copy_feature_flag_create_new.64'''SELECT "posthog_dashboard"."id","posthog_dashboard"."name",@@ -3814,7 +2206,7 @@AND "posthog_featureflagdashboards"."feature_flag_id" = 99999)'''# ----# name: TestOrganizationFeatureFlagCopy.test_copy_feature_flag_create_new.92+# name: TestOrganizationFeatureFlagCopy.test_copy_feature_flag_create_new.65'''SELECT "posthog_organizationmembership"."id","posthog_organizationmembership"."organization_id",@@ -3865,7 +2257,7 @@LIMIT 21'''# ----# name: TestOrganizationFeatureFlagCopy.test_copy_feature_flag_create_new.93+# name: TestOrganizationFeatureFlagCopy.test_copy_feature_flag_create_new.66'''SELECT 1 AS "a"FROM "posthog_team"@@ -3874,7 +2266,7 @@LIMIT 1'''# ----# name: TestOrganizationFeatureFlagCopy.test_copy_feature_flag_create_new.94+# name: TestOrganizationFeatureFlagCopy.test_copy_feature_flag_create_new.67'''SELECT "posthog_featureflagevaluationcontext"."id","posthog_featureflagevaluationcontext"."feature_flag_id",@@ -3890,7 +2282,7 @@WHERE "posthog_featureflagevaluationcontext"."feature_flag_id" = 99999'''# ----# name: TestOrganizationFeatureFlagCopy.test_copy_feature_flag_create_new.95+# name: TestOrganizationFeatureFlagCopy.test_copy_feature_flag_create_new.68'''SELECT "posthog_tag"."name" AS "tag__name"FROM "posthog_taggeditem"@@ -3898,6 +2290,114 @@WHERE "posthog_taggeditem"."feature_flag_id" = 99999'''# ---+# name: TestOrganizationFeatureFlagCopy.test_copy_feature_flag_create_new.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"."members_can_invite",+ "posthog_organization"."members_can_create_projects",+ "posthog_organization"."members_can_use_personal_api_keys",+ "posthog_organization"."allow_publicly_shared_resources",+ "posthog_organization"."default_role_id",+ "posthog_organization"."plugins_access_level",+ "posthog_organization"."for_internal_metrics",+ "posthog_organization"."default_experiment_stats_method",+ "posthog_organization"."default_anonymize_ips",+ "posthog_organization"."is_hipaa",+ "posthog_organization"."is_pending_deletion",+ "posthog_organization"."customer_id",+ "posthog_organization"."available_product_features",+ "posthog_organization"."usage",+ "posthog_organization"."never_drop_data",+ "posthog_organization"."customer_trust_scores",+ "posthog_organization"."setup_section_2_completed",+ "posthog_organization"."personalization",+ "posthog_organization"."domain_whitelist",+ "posthog_organization"."is_platform"+ FROM "posthog_organizationmembership"+ INNER JOIN "posthog_organization" ON ("posthog_organizationmembership"."organization_id" = "posthog_organization"."id")+ WHERE ("posthog_organizationmembership"."organization_id" = '00000000-0000-0000-0000-000000000000'::uuid+ AND "posthog_organizationmembership"."user_id" = 99999)+ LIMIT 21+ '''+# ---+# name: TestOrganizationFeatureFlagCopy.test_copy_feature_flag_create_new.8+ '''+ SELECT "posthog_organizationmembership"."id",+ "posthog_organizationmembership"."organization_id",+ "posthog_organizationmembership"."user_id",+ "posthog_organizationmembership"."level",+ "posthog_organizationmembership"."joined_at",+ "posthog_organizationmembership"."updated_at",+ "posthog_organizationmembership"."invited_by_id",+ "posthog_organization"."id",+ "posthog_organization"."name",+ "posthog_organization"."slug",+ "posthog_organization"."logo_media_id",+ "posthog_organization"."created_at",+ "posthog_organization"."updated_at",+ "posthog_organization"."is_active",+ "posthog_organization"."is_not_active_reason",+ "posthog_organization"."session_cookie_age",+ "posthog_organization"."is_member_join_email_enabled",+ "posthog_organization"."is_ai_data_processing_approved",+ "posthog_organization"."is_ai_training_opted_in",+ "posthog_organization"."is_ai_training_locked",+ "posthog_organization"."is_ai_training_cta_shown",+ "posthog_organization"."enforce_2fa",+ "posthog_organization"."members_can_invite",+ "posthog_organization"."members_can_create_projects",+ "posthog_organization"."members_can_use_personal_api_keys",+ "posthog_organization"."allow_publicly_shared_resources",+ "posthog_organization"."default_role_id",+ "posthog_organization"."plugins_access_level",+ "posthog_organization"."for_internal_metrics",+ "posthog_organization"."default_experiment_stats_method",+ "posthog_organization"."default_anonymize_ips",+ "posthog_organization"."is_hipaa",+ "posthog_organization"."is_pending_deletion",+ "posthog_organization"."customer_id",+ "posthog_organization"."available_product_features",+ "posthog_organization"."usage",+ "posthog_organization"."never_drop_data",+ "posthog_organization"."customer_trust_scores",+ "posthog_organization"."setup_section_2_completed",+ "posthog_organization"."personalization",+ "posthog_organization"."domain_whitelist",+ "posthog_organization"."is_platform"+ FROM "posthog_organizationmembership"+ INNER JOIN "posthog_organization" ON ("posthog_organizationmembership"."organization_id" = "posthog_organization"."id")+ WHERE "posthog_organizationmembership"."user_id" = 99999+ '''+# ---+# name: TestOrganizationFeatureFlagCopy.test_copy_feature_flag_create_new.9+ '''+ SELECT "posthog_team"."id",+ "posthog_team"."organization_id"+ FROM "posthog_team"+ WHERE "posthog_team"."organization_id" IN ('00000000-0000-0000-0000-000000000000'::uuid)+ '''+# ---# name: TestOrganizationFeatureFlagGet.test_get_feature_flag_success'''SELECT "posthog_user"."id",diff --git a/products/product_analytics/backend/api/test/__snapshots__/test_insight.ambr b/products/product_analytics/backend/api/test/__snapshots__/test_insight.ambrindex 459d7c827e8a..0a9b9b37e15b 100644--- a/products/product_analytics/backend/api/test/__snapshots__/test_insight.ambr+++ b/products/product_analytics/backend/api/test/__snapshots__/test_insight.ambr@@ -522,760 +522,6 @@'''# ---# name: TestInsight.test_listing_insights_does_not_nplus1.11- '''- SELECT "posthog_team"."id",- "posthog_team"."uuid",- "posthog_team"."organization_id",- "posthog_team"."parent_team_id",- "posthog_team"."project_id",- "posthog_team"."api_token",- "posthog_team"."app_urls",- "posthog_team"."name",- "posthog_team"."slack_incoming_webhook",- "posthog_team"."created_at",- "posthog_team"."updated_at",- "posthog_team"."anonymize_ips",- "posthog_team"."completed_snippet_onboarding",- "posthog_team"."has_completed_onboarding_for",- "posthog_team"."onboarding_tasks",- "posthog_team"."ingested_event",- "posthog_team"."ingested_production_event",- "posthog_team"."ingested_production_event_last_checked_at",- "posthog_team"."person_processing_opt_out",- "posthog_team"."secret_api_token",- "posthog_team"."secret_api_token_backup",- "posthog_team"."session_recording_opt_in",- "posthog_team"."session_recording_sample_rate",- "posthog_team"."session_recording_minimum_duration_milliseconds",- "posthog_team"."session_recording_linked_flag",- "posthog_team"."session_recording_network_payload_capture_config",- "posthog_team"."session_recording_masking_config",- "posthog_team"."session_recording_url_trigger_config",- "posthog_team"."session_recording_url_blocklist_config",- "posthog_team"."session_recording_event_trigger_config",- "posthog_team"."session_recording_trigger_match_type_config",- "posthog_team"."session_recording_trigger_groups",- "posthog_team"."session_replay_config",- "posthog_team"."session_recording_retention_period",- "posthog_team"."event_retention_months",- "posthog_team"."conversations_enabled",- "posthog_team"."conversations_settings",- "posthog_team"."proactive_tasks_enabled",- "posthog_team"."survey_config",- "posthog_team"."surveys_opt_in",- "posthog_team"."product_tours_opt_in",- "posthog_team"."capture_console_log_opt_in",- "posthog_team"."capture_performance_opt_in",- "posthog_team"."capture_dead_clicks",- "posthog_team"."autocapture_opt_out",- "posthog_team"."autocapture_web_vitals_opt_in",- "posthog_team"."autocapture_web_vitals_allowed_metrics",- "posthog_team"."autocapture_exceptions_opt_in",- "posthog_team"."autocapture_exceptions_errors_to_ignore",- "posthog_team"."logs_settings",- "posthog_team"."llm_gateway_enabled_at",- "posthog_team"."llm_gateway_revoked_at",- "posthog_team"."llm_gateway_overspend_allowance_usd",- "posthog_team"."heatmaps_opt_in",- "posthog_team"."receive_org_level_activity_logs",- "posthog_team"."web_analytics_pre_aggregated_tables_enabled",- "posthog_team"."web_analytics_pre_aggregated_tables_version",- "posthog_team"."flags_persistence_default",- "posthog_team"."feature_flag_confirmation_enabled",- "posthog_team"."feature_flag_confirmation_message",- "posthog_team"."default_evaluation_environments_enabled",- "posthog_team"."require_evaluation_environment_tags",- "posthog_team"."default_evaluation_contexts_enabled",- "posthog_team"."require_evaluation_contexts",- "posthog_team"."session_recording_version",- "posthog_team"."signup_token",- "posthog_team"."is_demo",- "posthog_team"."access_control",- "posthog_team"."week_start_day",- "posthog_team"."inject_web_apps",- "posthog_team"."test_account_filters",- "posthog_team"."test_account_filters_default_checked",- "posthog_team"."path_cleaning_filters",- "posthog_team"."timezone",- "posthog_team"."data_attributes",- "posthog_team"."person_display_name_properties",- "posthog_team"."live_events_columns",- "posthog_team"."recording_domains",- "posthog_team"."human_friendly_comparison_periods",- "posthog_team"."cookieless_server_hash_mode",- "posthog_team"."primary_dashboard_id",- "posthog_team"."default_data_theme",- "posthog_team"."extra_settings",- "posthog_team"."modifiers",- "posthog_team"."correlation_config",- "posthog_team"."session_recording_retention_period_days",- "posthog_team"."external_data_workspace_id",- "posthog_team"."external_data_workspace_last_synced_at",- "posthog_team"."api_query_rate_limit",- "posthog_team"."drop_events_older_than",- "posthog_team"."base_currency",- "posthog_team"."experiment_recalculation_time",- "posthog_team"."default_experiment_confidence_level",- "posthog_team"."default_experiment_stats_method",- "posthog_team"."business_model"- FROM "posthog_team"- WHERE "posthog_team"."id" = 99999- LIMIT 21- '''-# ----# name: TestInsight.test_listing_insights_does_not_nplus1.12- '''- SELECT "posthog_dashboarditem"."id",- "posthog_dashboarditem"."name",- "posthog_dashboarditem"."derived_name",- "posthog_dashboarditem"."description",- "posthog_dashboarditem"."team_id",- "posthog_dashboarditem"."filters",- "posthog_dashboarditem"."filters_hash",- "posthog_dashboarditem"."query",- "posthog_dashboarditem"."query_metadata",- "posthog_dashboarditem"."order",- "posthog_dashboarditem"."deleted",- "posthog_dashboarditem"."saved",- "posthog_dashboarditem"."created_at",- "posthog_dashboarditem"."refreshing",- "posthog_dashboarditem"."created_by_id",- "posthog_dashboarditem"."is_sample",- "posthog_dashboarditem"."short_id",- "posthog_dashboarditem"."favorited",- "posthog_dashboarditem"."refresh_attempt",- "posthog_dashboarditem"."last_modified_at",- "posthog_dashboarditem"."last_modified_by_id",- "posthog_dashboarditem"."dashboard_id",- "posthog_dashboarditem"."last_refresh",- "posthog_dashboarditem"."layouts",- "posthog_dashboarditem"."color",- "posthog_dashboarditem"."dive_dashboard_id",- "posthog_dashboarditem"."updated_at",- "posthog_dashboarditem"."deprecated_tags",- "posthog_dashboarditem"."tags"- FROM "posthog_dashboarditem"- WHERE "posthog_dashboarditem"."id" = 99999- LIMIT 21- '''-# ----# name: TestInsight.test_listing_insights_does_not_nplus1.13- '''- SELECT "posthog_team"."id",- "posthog_team"."uuid",- "posthog_team"."organization_id",- "posthog_team"."parent_team_id",- "posthog_team"."project_id",- "posthog_team"."api_token",- "posthog_team"."app_urls",- "posthog_team"."name",- "posthog_team"."slack_incoming_webhook",- "posthog_team"."created_at",- "posthog_team"."updated_at",- "posthog_team"."anonymize_ips",- "posthog_team"."completed_snippet_onboarding",- "posthog_team"."has_completed_onboarding_for",- "posthog_team"."onboarding_tasks",- "posthog_team"."ingested_event",- "posthog_team"."ingested_production_event",- "posthog_team"."ingested_production_event_last_checked_at",- "posthog_team"."person_processing_opt_out",- "posthog_team"."secret_api_token",- "posthog_team"."secret_api_token_backup",- "posthog_team"."session_recording_opt_in",- "posthog_team"."session_recording_sample_rate",- "posthog_team"."session_recording_minimum_duration_milliseconds",- "posthog_team"."session_recording_linked_flag",- "posthog_team"."session_recording_network_payload_capture_config",- "posthog_team"."session_recording_masking_config",- "posthog_team"."session_recording_url_trigger_config",- "posthog_team"."session_recording_url_blocklist_config",- "posthog_team"."session_recording_event_trigger_config",- "posthog_team"."session_recording_trigger_match_type_config",- "posthog_team"."session_recording_trigger_groups",- "posthog_team"."session_replay_config",- "posthog_team"."session_recording_retention_period",- "posthog_team"."event_retention_months",- "posthog_team"."conversations_enabled",- "posthog_team"."conversations_settings",- "posthog_team"."proactive_tasks_enabled",- "posthog_team"."survey_config",- "posthog_team"."surveys_opt_in",- "posthog_team"."product_tours_opt_in",- "posthog_team"."capture_console_log_opt_in",- "posthog_team"."capture_performance_opt_in",- "posthog_team"."capture_dead_clicks",- "posthog_team"."autocapture_opt_out",- "posthog_team"."autocapture_web_vitals_opt_in",- "posthog_team"."autocapture_web_vitals_allowed_metrics",- "posthog_team"."autocapture_exceptions_opt_in",- "posthog_team"."autocapture_exceptions_errors_to_ignore",- "posthog_team"."logs_settings",- "posthog_team"."llm_gateway_enabled_at",- "posthog_team"."llm_gateway_revoked_at",- "posthog_team"."llm_gateway_overspend_allowance_usd",- "posthog_team"."heatmaps_opt_in",- "posthog_team"."receive_org_level_activity_logs",- "posthog_team"."web_analytics_pre_aggregated_tables_enabled",- "posthog_team"."web_analytics_pre_aggregated_tables_version",- "posthog_team"."flags_persistence_default",- "posthog_team"."feature_flag_confirmation_enabled",- "posthog_team"."feature_flag_confirmation_message",- "posthog_team"."default_evaluation_environments_enabled",- "posthog_team"."require_evaluation_environment_tags",- "posthog_team"."default_evaluation_contexts_enabled",- "posthog_team"."require_evaluation_contexts",- "posthog_team"."session_recording_version",- "posthog_team"."signup_token",- "posthog_team"."is_demo",- "posthog_team"."access_control",- "posthog_team"."week_start_day",- "posthog_team"."inject_web_apps",- "posthog_team"."test_account_filters",- "posthog_team"."test_account_filters_default_checked",- "posthog_team"."path_cleaning_filters",- "posthog_team"."timezone",- "posthog_team"."data_attributes",- "posthog_team"."person_display_name_properties",- "posthog_team"."live_events_columns",- "posthog_team"."recording_domains",- "posthog_team"."human_friendly_comparison_periods",- "posthog_team"."cookieless_server_hash_mode",- "posthog_team"."primary_dashboard_id",- "posthog_team"."default_data_theme",- "posthog_team"."extra_settings",- "posthog_team"."modifiers",- "posthog_team"."correlation_config",- "posthog_team"."session_recording_retention_period_days",- "posthog_team"."external_data_workspace_id",- "posthog_team"."external_data_workspace_last_synced_at",- "posthog_team"."api_query_rate_limit",- "posthog_team"."drop_events_older_than",- "posthog_team"."base_currency",- "posthog_team"."experiment_recalculation_time",- "posthog_team"."default_experiment_confidence_level",- "posthog_team"."default_experiment_stats_method",- "posthog_team"."business_model"- FROM "posthog_team"- WHERE "posthog_team"."id" = 99999- LIMIT 21- '''-# ----# name: TestInsight.test_listing_insights_does_not_nplus1.14- '''- SELECT "posthog_organization"."id",- "posthog_organization"."name",- "posthog_organization"."slug",- "posthog_organization"."logo_media_id",- "posthog_organization"."created_at",- "posthog_organization"."updated_at",- "posthog_organization"."is_active",- "posthog_organization"."is_not_active_reason",- "posthog_organization"."session_cookie_age",- "posthog_organization"."is_member_join_email_enabled",- "posthog_organization"."is_ai_data_processing_approved",- "posthog_organization"."is_ai_training_opted_in",- "posthog_organization"."is_ai_training_locked",- "posthog_organization"."is_ai_training_cta_shown",- "posthog_organization"."enforce_2fa",- "posthog_organization"."members_can_invite",- "posthog_organization"."members_can_create_projects",- "posthog_organization"."members_can_use_personal_api_keys",- "posthog_organization"."allow_publicly_shared_resources",- "posthog_organization"."default_role_id",- "posthog_organization"."plugins_access_level",- "posthog_organization"."for_internal_metrics",- "posthog_organization"."default_experiment_stats_method",- "posthog_organization"."default_anonymize_ips",- "posthog_organization"."is_hipaa",- "posthog_organization"."is_pending_deletion",- "posthog_organization"."customer_id",- "posthog_organization"."available_product_features",- "posthog_organization"."usage",- "posthog_organization"."never_drop_data",- "posthog_organization"."customer_trust_scores",- "posthog_organization"."setup_section_2_completed",- "posthog_organization"."personalization",- "posthog_organization"."domain_whitelist",- "posthog_organization"."is_platform"- FROM "posthog_organization"- WHERE "posthog_organization"."id" = '00000000-0000-0000-0000-000000000000'::uuid- LIMIT 21- '''-# ----# name: TestInsight.test_listing_insights_does_not_nplus1.15- '''- SELECT "posthog_team"."id",- "posthog_team"."uuid",- "posthog_team"."organization_id",- "posthog_team"."parent_team_id",- "posthog_team"."project_id",- "posthog_team"."api_token",- "posthog_team"."app_urls",- "posthog_team"."name",- "posthog_team"."slack_incoming_webhook",- "posthog_team"."created_at",- "posthog_team"."updated_at",- "posthog_team"."anonymize_ips",- "posthog_team"."completed_snippet_onboarding",- "posthog_team"."has_completed_onboarding_for",- "posthog_team"."onboarding_tasks",- "posthog_team"."ingested_event",- "posthog_team"."ingested_production_event",- "posthog_team"."ingested_production_event_last_checked_at",- "posthog_team"."person_processing_opt_out",- "posthog_team"."secret_api_token",- "posthog_team"."secret_api_token_backup",- "posthog_team"."session_recording_opt_in",- "posthog_team"."session_recording_sample_rate",- "posthog_team"."session_recording_minimum_duration_milliseconds",- "posthog_team"."session_recording_linked_flag",- "posthog_team"."session_recording_network_payload_capture_config",- "posthog_team"."session_recording_masking_config",- "posthog_team"."session_recording_url_trigger_config",- "posthog_team"."session_recording_url_blocklist_config",- "posthog_team"."session_recording_event_trigger_config",- "posthog_team"."session_recording_trigger_match_type_config",- "posthog_team"."session_recording_trigger_groups",- "posthog_team"."session_replay_config",- "posthog_team"."session_recording_retention_period",- "posthog_team"."event_retention_months",- "posthog_team"."conversations_enabled",- "posthog_team"."conversations_settings",- "posthog_team"."proactive_tasks_enabled",- "posthog_team"."survey_config",- "posthog_team"."surveys_opt_in",- "posthog_team"."product_tours_opt_in",- "posthog_team"."capture_console_log_opt_in",- "posthog_team"."capture_performance_opt_in",- "posthog_team"."capture_dead_clicks",- "posthog_team"."autocapture_opt_out",- "posthog_team"."autocapture_web_vitals_opt_in",- "posthog_team"."autocapture_web_vitals_allowed_metrics",- "posthog_team"."autocapture_exceptions_opt_in",- "posthog_team"."autocapture_exceptions_errors_to_ignore",- "posthog_team"."logs_settings",- "posthog_team"."llm_gateway_enabled_at",- "posthog_team"."llm_gateway_revoked_at",- "posthog_team"."llm_gateway_overspend_allowance_usd",- "posthog_team"."heatmaps_opt_in",- "posthog_team"."receive_org_level_activity_logs",- "posthog_team"."web_analytics_pre_aggregated_tables_enabled",- "posthog_team"."web_analytics_pre_aggregated_tables_version",- "posthog_team"."flags_persistence_default",- "posthog_team"."feature_flag_confirmation_enabled",- "posthog_team"."feature_flag_confirmation_message",- "posthog_team"."default_evaluation_environments_enabled",- "posthog_team"."require_evaluation_environment_tags",- "posthog_team"."default_evaluation_contexts_enabled",- "posthog_team"."require_evaluation_contexts",- "posthog_team"."session_recording_version",- "posthog_team"."signup_token",- "posthog_team"."is_demo",- "posthog_team"."access_control",- "posthog_team"."week_start_day",- "posthog_team"."inject_web_apps",- "posthog_team"."test_account_filters",- "posthog_team"."test_account_filters_default_checked",- "posthog_team"."path_cleaning_filters",- "posthog_team"."timezone",- "posthog_team"."data_attributes",- "posthog_team"."person_display_name_properties",- "posthog_team"."live_events_columns",- "posthog_team"."recording_domains",- "posthog_team"."human_friendly_comparison_periods",- "posthog_team"."cookieless_server_hash_mode",- "posthog_team"."primary_dashboard_id",- "posthog_team"."default_data_theme",- "posthog_team"."extra_settings",- "posthog_team"."modifiers",- "posthog_team"."correlation_config",- "posthog_team"."session_recording_retention_period_days",- "posthog_team"."external_data_workspace_id",- "posthog_team"."external_data_workspace_last_synced_at",- "posthog_team"."api_query_rate_limit",- "posthog_team"."drop_events_older_than",- "posthog_team"."base_currency",- "posthog_team"."experiment_recalculation_time",- "posthog_team"."default_experiment_confidence_level",- "posthog_team"."default_experiment_stats_method",- "posthog_team"."business_model"- FROM "posthog_team"- WHERE "posthog_team"."id" = 99999- LIMIT 21- '''-# ----# name: TestInsight.test_listing_insights_does_not_nplus1.16- '''- SELECT "posthog_dashboardtile"."id",- "posthog_dashboardtile"."dashboard_id",- "posthog_dashboardtile"."insight_id",- "posthog_dashboardtile"."text_id",- "posthog_dashboardtile"."button_tile_id",- "posthog_dashboardtile"."widget_id",- "posthog_dashboardtile"."team_id",- "posthog_dashboardtile"."layouts",- "posthog_dashboardtile"."color",- "posthog_dashboardtile"."filters_hash",- "posthog_dashboardtile"."last_refresh",- "posthog_dashboardtile"."refreshing",- "posthog_dashboardtile"."refresh_attempt",- "posthog_dashboardtile"."filters_overrides",- "posthog_dashboardtile"."show_description",- "posthog_dashboardtile"."transparent_background",- "posthog_dashboardtile"."deleted"- FROM "posthog_dashboardtile"- WHERE "posthog_dashboardtile"."id" = 99999- LIMIT 21- '''-# ----# name: TestInsight.test_listing_insights_does_not_nplus1.17- '''- SELECT "posthog_dashboarditem"."id",- "posthog_dashboarditem"."name",- "posthog_dashboarditem"."derived_name",- "posthog_dashboarditem"."description",- "posthog_dashboarditem"."team_id",- "posthog_dashboarditem"."filters",- "posthog_dashboarditem"."filters_hash",- "posthog_dashboarditem"."query",- "posthog_dashboarditem"."query_metadata",- "posthog_dashboarditem"."order",- "posthog_dashboarditem"."deleted",- "posthog_dashboarditem"."saved",- "posthog_dashboarditem"."created_at",- "posthog_dashboarditem"."refreshing",- "posthog_dashboarditem"."created_by_id",- "posthog_dashboarditem"."is_sample",- "posthog_dashboarditem"."short_id",- "posthog_dashboarditem"."favorited",- "posthog_dashboarditem"."refresh_attempt",- "posthog_dashboarditem"."last_modified_at",- "posthog_dashboarditem"."last_modified_by_id",- "posthog_dashboarditem"."dashboard_id",- "posthog_dashboarditem"."last_refresh",- "posthog_dashboarditem"."layouts",- "posthog_dashboarditem"."color",- "posthog_dashboarditem"."dive_dashboard_id",- "posthog_dashboarditem"."updated_at",- "posthog_dashboarditem"."deprecated_tags",- "posthog_dashboarditem"."tags"- FROM "posthog_dashboarditem"- WHERE "posthog_dashboarditem"."id" = 99999- LIMIT 21- '''-# ----# name: TestInsight.test_listing_insights_does_not_nplus1.18- '''- SELECT "posthog_dashboard"."id",- "posthog_dashboard"."name",- "posthog_dashboard"."description",- "posthog_dashboard"."team_id",- "posthog_dashboard"."pinned",- "posthog_dashboard"."created_at",- "posthog_dashboard"."created_by_id",- "posthog_dashboard"."deleted",- "posthog_dashboard"."last_accessed_at",- "posthog_dashboard"."last_refresh",- "posthog_dashboard"."filters",- "posthog_dashboard"."variables",- "posthog_dashboard"."breakdown_colors",- "posthog_dashboard"."data_color_theme_id",- "posthog_dashboard"."creation_mode",- "posthog_dashboard"."restriction_level",- "posthog_dashboard"."quick_filter_ids",- "posthog_dashboard"."deprecated_tags",- "posthog_dashboard"."tags",- "posthog_dashboard"."share_token",- "posthog_dashboard"."is_shared"- FROM "posthog_dashboard"- WHERE "posthog_dashboard"."id" = 99999- LIMIT 21- '''-# ----# name: TestInsight.test_listing_insights_does_not_nplus1.19- '''- SELECT "posthog_team"."id",- "posthog_team"."uuid",- "posthog_team"."organization_id",- "posthog_team"."parent_team_id",- "posthog_team"."project_id",- "posthog_team"."api_token",- "posthog_team"."app_urls",- "posthog_team"."name",- "posthog_team"."slack_incoming_webhook",- "posthog_team"."created_at",- "posthog_team"."updated_at",- "posthog_team"."anonymize_ips",- "posthog_team"."completed_snippet_onboarding",- "posthog_team"."has_completed_onboarding_for",- "posthog_team"."onboarding_tasks",- "posthog_team"."ingested_event",- "posthog_team"."ingested_production_event",- "posthog_team"."ingested_production_event_last_checked_at",- "posthog_team"."person_processing_opt_out",- "posthog_team"."secret_api_token",- "posthog_team"."secret_api_token_backup",- "posthog_team"."session_recording_opt_in",- "posthog_team"."session_recording_sample_rate",- "posthog_team"."session_recording_minimum_duration_milliseconds",- "posthog_team"."session_recording_linked_flag",- "posthog_team"."session_recording_network_payload_capture_config",- "posthog_team"."session_recording_masking_config",- "posthog_team"."session_recording_url_trigger_config",- "posthog_team"."session_recording_url_blocklist_config",- "posthog_team"."session_recording_event_trigger_config",- "posthog_team"."session_recording_trigger_match_type_config",- "posthog_team"."session_recording_trigger_groups",- "posthog_team"."session_replay_config",- "posthog_team"."session_recording_retention_period",- "posthog_team"."event_retention_months",- "posthog_team"."conversations_enabled",- "posthog_team"."conversations_settings",- "posthog_team"."proactive_tasks_enabled",- "posthog_team"."survey_config",- "posthog_team"."surveys_opt_in",- "posthog_team"."product_tours_opt_in",- "posthog_team"."capture_console_log_opt_in",- "posthog_team"."capture_performance_opt_in",- "posthog_team"."capture_dead_clicks",- "posthog_team"."autocapture_opt_out",- "posthog_team"."autocapture_web_vitals_opt_in",- "posthog_team"."autocapture_web_vitals_allowed_metrics",- "posthog_team"."autocapture_exceptions_opt_in",- "posthog_team"."autocapture_exceptions_errors_to_ignore",- "posthog_team"."logs_settings",- "posthog_team"."llm_gateway_enabled_at",- "posthog_team"."llm_gateway_revoked_at",- "posthog_team"."llm_gateway_overspend_allowance_usd",- "posthog_team"."heatmaps_opt_in",- "posthog_team"."receive_org_level_activity_logs",- "posthog_team"."web_analytics_pre_aggregated_tables_enabled",- "posthog_team"."web_analytics_pre_aggregated_tables_version",- "posthog_team"."flags_persistence_default",- "posthog_team"."feature_flag_confirmation_enabled",- "posthog_team"."feature_flag_confirmation_message",- "posthog_team"."default_evaluation_environments_enabled",- "posthog_team"."require_evaluation_environment_tags",- "posthog_team"."default_evaluation_contexts_enabled",- "posthog_team"."require_evaluation_contexts",- "posthog_team"."session_recording_version",- "posthog_team"."signup_token",- "posthog_team"."is_demo",- "posthog_team"."access_control",- "posthog_team"."week_start_day",- "posthog_team"."inject_web_apps",- "posthog_team"."test_account_filters",- "posthog_team"."test_account_filters_default_checked",- "posthog_team"."path_cleaning_filters",- "posthog_team"."timezone",- "posthog_team"."data_attributes",- "posthog_team"."person_display_name_properties",- "posthog_team"."live_events_columns",- "posthog_team"."recording_domains",- "posthog_team"."human_friendly_comparison_periods",- "posthog_team"."cookieless_server_hash_mode",- "posthog_team"."primary_dashboard_id",- "posthog_team"."default_data_theme",- "posthog_team"."extra_settings",- "posthog_team"."modifiers",- "posthog_team"."correlation_config",- "posthog_team"."session_recording_retention_period_days",- "posthog_team"."external_data_workspace_id",- "posthog_team"."external_data_workspace_last_synced_at",- "posthog_team"."api_query_rate_limit",- "posthog_team"."drop_events_older_than",- "posthog_team"."base_currency",- "posthog_team"."experiment_recalculation_time",- "posthog_team"."default_experiment_confidence_level",- "posthog_team"."default_experiment_stats_method",- "posthog_team"."business_model"- FROM "posthog_team"- WHERE "posthog_team"."id" = 99999- LIMIT 21- '''-# ----# name: TestInsight.test_listing_insights_does_not_nplus1.2- '''- SELECT "posthog_team"."id",- "posthog_team"."uuid",- "posthog_team"."organization_id",- "posthog_team"."parent_team_id",- "posthog_team"."project_id",- "posthog_team"."api_token",- "posthog_team"."app_urls",- "posthog_team"."name",- "posthog_team"."slack_incoming_webhook",- "posthog_team"."created_at",- "posthog_team"."updated_at",- "posthog_team"."anonymize_ips",- "posthog_team"."completed_snippet_onboarding",- "posthog_team"."has_completed_onboarding_for",- "posthog_team"."onboarding_tasks",- "posthog_team"."ingested_event",- "posthog_team"."ingested_production_event",- "posthog_team"."ingested_production_event_last_checked_at",- "posthog_team"."person_processing_opt_out",- "posthog_team"."secret_api_token",- "posthog_team"."secret_api_token_backup",- "posthog_team"."session_recording_opt_in",- "posthog_team"."session_recording_sample_rate",- "posthog_team"."session_recording_minimum_duration_milliseconds",- "posthog_team"."session_recording_linked_flag",- "posthog_team"."session_recording_network_payload_capture_config",- "posthog_team"."session_recording_masking_config",- "posthog_team"."session_recording_url_trigger_config",- "posthog_team"."session_recording_url_blocklist_config",- "posthog_team"."session_recording_event_trigger_config",- "posthog_team"."session_recording_trigger_match_type_config",- "posthog_team"."session_recording_trigger_groups",- "posthog_team"."session_replay_config",- "posthog_team"."session_recording_retention_period",- "posthog_team"."event_retention_months",- "posthog_team"."conversations_enabled",- "posthog_team"."conversations_settings",- "posthog_team"."proactive_tasks_enabled",- "posthog_team"."survey_config",- "posthog_team"."surveys_opt_in",- "posthog_team"."product_tours_opt_in",- "posthog_team"."capture_console_log_opt_in",- "posthog_team"."capture_performance_opt_in",- "posthog_team"."capture_dead_clicks",- "posthog_team"."autocapture_opt_out",- "posthog_team"."autocapture_web_vitals_opt_in",- "posthog_team"."autocapture_web_vitals_allowed_metrics",- "posthog_team"."autocapture_exceptions_opt_in",- "posthog_team"."autocapture_exceptions_errors_to_ignore",- "posthog_team"."logs_settings",- "posthog_team"."llm_gateway_enabled_at",- "posthog_team"."llm_gateway_revoked_at",- "posthog_team"."llm_gateway_overspend_allowance_usd",- "posthog_team"."heatmaps_opt_in",- "posthog_team"."receive_org_level_activity_logs",- "posthog_team"."web_analytics_pre_aggregated_tables_enabled",- "posthog_team"."web_analytics_pre_aggregated_tables_version",- "posthog_team"."flags_persistence_default",- "posthog_team"."feature_flag_confirmation_enabled",- "posthog_team"."feature_flag_confirmation_message",- "posthog_team"."default_evaluation_environments_enabled",- "posthog_team"."require_evaluation_environment_tags",- "posthog_team"."default_evaluation_contexts_enabled",- "posthog_team"."require_evaluation_contexts",- "posthog_team"."session_recording_version",- "posthog_team"."signup_token",- "posthog_team"."is_demo",- "posthog_team"."access_control",- "posthog_team"."week_start_day",- "posthog_team"."inject_web_apps",- "posthog_team"."test_account_filters",- "posthog_team"."test_account_filters_default_checked",- "posthog_team"."path_cleaning_filters",- "posthog_team"."timezone",- "posthog_team"."data_attributes",- "posthog_team"."person_display_name_properties",- "posthog_team"."live_events_columns",- "posthog_team"."recording_domains",- "posthog_team"."human_friendly_comparison_periods",- "posthog_team"."cookieless_server_hash_mode",- "posthog_team"."primary_dashboard_id",- "posthog_team"."default_data_theme",- "posthog_team"."extra_settings",- "posthog_team"."modifiers",- "posthog_team"."correlation_config",- "posthog_team"."session_recording_retention_period_days",- "posthog_team"."external_data_workspace_id",- "posthog_team"."external_data_workspace_last_synced_at",- "posthog_team"."api_query_rate_limit",- "posthog_team"."drop_events_older_than",- "posthog_team"."base_currency",- "posthog_team"."experiment_recalculation_time",- "posthog_team"."default_experiment_confidence_level",- "posthog_team"."default_experiment_stats_method",- "posthog_team"."business_model",- "posthog_organization"."id",- "posthog_organization"."name",- "posthog_organization"."slug",- "posthog_organization"."logo_media_id",- "posthog_organization"."created_at",- "posthog_organization"."updated_at",- "posthog_organization"."is_active",- "posthog_organization"."is_not_active_reason",- "posthog_organization"."session_cookie_age",- "posthog_organization"."is_member_join_email_enabled",- "posthog_organization"."is_ai_data_processing_approved",- "posthog_organization"."is_ai_training_opted_in",- "posthog_organization"."is_ai_training_locked",- "posthog_organization"."is_ai_training_cta_shown",- "posthog_organization"."enforce_2fa",- "posthog_organization"."members_can_invite",- "posthog_organization"."members_can_create_projects",- "posthog_organization"."members_can_use_personal_api_keys",- "posthog_organization"."allow_publicly_shared_resources",- "posthog_organization"."default_role_id",- "posthog_organization"."plugins_access_level",- "posthog_organization"."for_internal_metrics",- "posthog_organization"."default_experiment_stats_method",- "posthog_organization"."default_anonymize_ips",- "posthog_organization"."is_hipaa",- "posthog_organization"."is_pending_deletion",- "posthog_organization"."customer_id",- "posthog_organization"."available_product_features",- "posthog_organization"."usage",- "posthog_organization"."never_drop_data",- "posthog_organization"."customer_trust_scores",- "posthog_organization"."setup_section_2_completed",- "posthog_organization"."personalization",- "posthog_organization"."domain_whitelist",- "posthog_organization"."is_platform"- FROM "posthog_team"- INNER JOIN "posthog_organization" ON ("posthog_team"."organization_id" = "posthog_organization"."id")- WHERE "posthog_team"."id" = 99999- LIMIT 21- '''-# ----# name: TestInsight.test_listing_insights_does_not_nplus1.20- '''- SELECT "posthog_organization"."id",- "posthog_organization"."name",- "posthog_organization"."slug",- "posthog_organization"."logo_media_id",- "posthog_organization"."created_at",- "posthog_organization"."updated_at",- "posthog_organization"."is_active",- "posthog_organization"."is_not_active_reason",- "posthog_organization"."session_cookie_age",- "posthog_organization"."is_member_join_email_enabled",- "posthog_organization"."is_ai_data_processing_approved",- "posthog_organization"."is_ai_training_opted_in",- "posthog_organization"."is_ai_training_locked",- "posthog_organization"."is_ai_training_cta_shown",- "posthog_organization"."enforce_2fa",- "posthog_organization"."members_can_invite",- "posthog_organization"."members_can_create_projects",- "posthog_organization"."members_can_use_personal_api_keys",- "posthog_organization"."allow_publicly_shared_resources",- "posthog_organization"."default_role_id",- "posthog_organization"."plugins_access_level",- "posthog_organization"."for_internal_metrics",- "posthog_organization"."default_experiment_stats_method",- "posthog_organization"."default_anonymize_ips",- "posthog_organization"."is_hipaa",- "posthog_organization"."is_pending_deletion",- "posthog_organization"."customer_id",- "posthog_organization"."available_product_features",- "posthog_organization"."usage",- "posthog_organization"."never_drop_data",- "posthog_organization"."customer_trust_scores",- "posthog_organization"."setup_section_2_completed",- "posthog_organization"."personalization",- "posthog_organization"."domain_whitelist",- "posthog_organization"."is_platform"- FROM "posthog_organization"- WHERE "posthog_organization"."id" = '00000000-0000-0000-0000-000000000000'::uuid- LIMIT 21- '''-# ----# name: TestInsight.test_listing_insights_does_not_nplus1.21'''SELECT "posthog_dashboardtile"."id","posthog_dashboardtile"."dashboard_id",@@ -1302,7 +548,7 @@AND "posthog_dashboardtile"."insight_id" = 99999)'''# ----# name: TestInsight.test_listing_insights_does_not_nplus1.22+# name: TestInsight.test_listing_insights_does_not_nplus1.12'''SELECT "posthog_dashboardtile"."id","posthog_dashboardtile"."dashboard_id",@@ -1329,7 +575,7 @@AND "posthog_dashboardtile"."insight_id" = 99999)'''# ----# name: TestInsight.test_listing_insights_does_not_nplus1.23+# name: TestInsight.test_listing_insights_does_not_nplus1.13'''SELECT "posthog_insightvariable"."created_by_id","posthog_insightvariable"."created_at",@@ -1345,7 +591,7 @@WHERE "posthog_insightvariable"."team_id" = 99999'''# ----# name: TestInsight.test_listing_insights_does_not_nplus1.24+# name: TestInsight.test_listing_insights_does_not_nplus1.14'''SELECT "posthog_dashboardtile"."dashboard_id" AS "dashboard_id"FROM "posthog_dashboardtile"@@ -1356,7 +602,7 @@AND "posthog_dashboardtile"."insight_id" = 99999)'''# ----# name: TestInsight.test_listing_insights_does_not_nplus1.25+# name: TestInsight.test_listing_insights_does_not_nplus1.15'''SELECT "posthog_dashboard"."id","posthog_dashboard"."name",@@ -1388,7 +634,7 @@5 /* ... */))'''# ----# name: TestInsight.test_listing_insights_does_not_nplus1.26+# name: TestInsight.test_listing_insights_does_not_nplus1.16'''SELECT "posthog_tag"."name" AS "tag__name"FROM "posthog_taggeditem"@@ -1396,14 +642,14 @@WHERE "posthog_taggeditem"."insight_id" = 99999'''# ----# name: TestInsight.test_listing_insights_does_not_nplus1.27+# name: TestInsight.test_listing_insights_does_not_nplus1.17'''SELECT COUNT(*) AS "__count"FROM "posthog_dashboarditem"WHERE NOT ("posthog_dashboarditem"."deleted")'''# ----# name: TestInsight.test_listing_insights_does_not_nplus1.28+# name: TestInsight.test_listing_insights_does_not_nplus1.18'''SELECT "posthog_user"."id","posthog_user"."password",@@ -1448,7 +694,7 @@AND "posthog_user"."id" = 99999)'''# ----# name: TestInsight.test_listing_insights_does_not_nplus1.29+# name: TestInsight.test_listing_insights_does_not_nplus1.19'''SELECT "posthog_organization"."id","posthog_organization"."name",@@ -1490,15 +736,103 @@LIMIT 21'''# ----# name: TestInsight.test_listing_insights_does_not_nplus1.3+# name: TestInsight.test_listing_insights_does_not_nplus1.2'''- SELECT "posthog_organizationmembership"."id",- "posthog_organizationmembership"."organization_id",- "posthog_organizationmembership"."user_id",- "posthog_organizationmembership"."level",- "posthog_organizationmembership"."joined_at",- "posthog_organizationmembership"."updated_at",- "posthog_organizationmembership"."invited_by_id",+ SELECT "posthog_team"."id",+ "posthog_team"."uuid",+ "posthog_team"."organization_id",+ "posthog_team"."parent_team_id",+ "posthog_team"."project_id",+ "posthog_team"."api_token",+ "posthog_team"."app_urls",+ "posthog_team"."name",+ "posthog_team"."slack_incoming_webhook",+ "posthog_team"."created_at",+ "posthog_team"."updated_at",+ "posthog_team"."anonymize_ips",+ "posthog_team"."completed_snippet_onboarding",+ "posthog_team"."has_completed_onboarding_for",+ "posthog_team"."onboarding_tasks",+ "posthog_team"."ingested_event",+ "posthog_team"."ingested_production_event",+ "posthog_team"."ingested_production_event_last_checked_at",+ "posthog_team"."person_processing_opt_out",+ "posthog_team"."secret_api_token",+ "posthog_team"."secret_api_token_backup",+ "posthog_team"."session_recording_opt_in",+ "posthog_team"."session_recording_sample_rate",+ "posthog_team"."session_recording_minimum_duration_milliseconds",+ "posthog_team"."session_recording_linked_flag",+ "posthog_team"."session_recording_network_payload_capture_config",+ "posthog_team"."session_recording_masking_config",+ "posthog_team"."session_recording_url_trigger_config",+ "posthog_team"."session_recording_url_blocklist_config",+ "posthog_team"."session_recording_event_trigger_config",+ "posthog_team"."session_recording_trigger_match_type_config",+ "posthog_team"."session_recording_trigger_groups",+ "posthog_team"."session_replay_config",+ "posthog_team"."session_recording_retention_period",+ "posthog_team"."event_retention_months",+ "posthog_team"."conversations_enabled",+ "posthog_team"."conversations_settings",+ "posthog_team"."proactive_tasks_enabled",+ "posthog_team"."survey_config",+ "posthog_team"."surveys_opt_in",+ "posthog_team"."product_tours_opt_in",+ "posthog_team"."capture_console_log_opt_in",+ "posthog_team"."capture_performance_opt_in",+ "posthog_team"."capture_dead_clicks",+ "posthog_team"."autocapture_opt_out",+ "posthog_team"."autocapture_web_vitals_opt_in",+ "posthog_team"."autocapture_web_vitals_allowed_metrics",+ "posthog_team"."autocapture_exceptions_opt_in",+ "posthog_team"."autocapture_exceptions_errors_to_ignore",+ "posthog_team"."logs_settings",+ "posthog_team"."llm_gateway_enabled_at",+ "posthog_team"."llm_gateway_revoked_at",+ "posthog_team"."llm_gateway_overspend_allowance_usd",+ "posthog_team"."heatmaps_opt_in",+ "posthog_team"."receive_org_level_activity_logs",+ "posthog_team"."web_analytics_pre_aggregated_tables_enabled",+ "posthog_team"."web_analytics_pre_aggregated_tables_version",+ "posthog_team"."flags_persistence_default",+ "posthog_team"."feature_flag_confirmation_enabled",+ "posthog_team"."feature_flag_confirmation_message",+ "posthog_team"."default_evaluation_environments_enabled",+ "posthog_team"."require_evaluation_environment_tags",+ "posthog_team"."default_evaluation_contexts_enabled",+ "posthog_team"."require_evaluation_contexts",+ "posthog_team"."session_recording_version",+ "posthog_team"."signup_token",+ "posthog_team"."is_demo",+ "posthog_team"."access_control",+ "posthog_team"."week_start_day",+ "posthog_team"."inject_web_apps",+ "posthog_team"."test_account_filters",+ "posthog_team"."test_account_filters_default_checked",+ "posthog_team"."path_cleaning_filters",+ "posthog_team"."timezone",+ "posthog_team"."data_attributes",+ "posthog_team"."person_display_name_properties",+ "posthog_team"."live_events_columns",+ "posthog_team"."recording_domains",+ "posthog_team"."human_friendly_comparison_periods",+ "posthog_team"."cookieless_server_hash_mode",+ "posthog_team"."primary_dashboard_id",+ "posthog_team"."default_data_theme",+ "posthog_team"."extra_settings",+ "posthog_team"."modifiers",+ "posthog_team"."correlation_config",+ "posthog_team"."session_recording_retention_period_days",+ "posthog_team"."external_data_workspace_id",+ "posthog_team"."external_data_workspace_last_synced_at",+ "posthog_team"."api_query_rate_limit",+ "posthog_team"."drop_events_older_than",+ "posthog_team"."base_currency",+ "posthog_team"."experiment_recalculation_time",+ "posthog_team"."default_experiment_confidence_level",+ "posthog_team"."default_experiment_stats_method",+ "posthog_team"."business_model","posthog_organization"."id","posthog_organization"."name","posthog_organization"."slug",@@ -1534,14 +868,13 @@"posthog_organization"."personalization","posthog_organization"."domain_whitelist","posthog_organization"."is_platform"- FROM "posthog_organizationmembership"- INNER JOIN "posthog_organization" ON ("posthog_organizationmembership"."organization_id" = "posthog_organization"."id")- WHERE ("posthog_organizationmembership"."organization_id" = '00000000-0000-0000-0000-000000000000'::uuid- AND "posthog_organizationmembership"."user_id" = 99999)+ FROM "posthog_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.30+# name: TestInsight.test_listing_insights_does_not_nplus1.20'''SELECT "posthog_team"."id","posthog_team"."uuid",@@ -1679,7 +1012,7 @@LIMIT 21'''# ----# name: TestInsight.test_listing_insights_does_not_nplus1.31+# name: TestInsight.test_listing_insights_does_not_nplus1.21'''SELECT "posthog_organizationmembership"."id","posthog_organizationmembership"."organization_id",@@ -1730,7 +1063,7 @@LIMIT 21'''# ----# name: TestInsight.test_listing_insights_does_not_nplus1.32+# name: TestInsight.test_listing_insights_does_not_nplus1.22'''SELECT "ee_accesscontrol"."id","ee_accesscontrol"."team_id",@@ -1754,7 +1087,7 @@AND "ee_accesscontrol"."team_id" = 99999))'''# ----# name: TestInsight.test_listing_insights_does_not_nplus1.33+# name: TestInsight.test_listing_insights_does_not_nplus1.23'''SELECT "posthog_organizationmembership"."id","posthog_organizationmembership"."organization_id",@@ -1803,7 +1136,7 @@WHERE "posthog_organizationmembership"."user_id" = 99999'''# ----# name: TestInsight.test_listing_insights_does_not_nplus1.34+# name: TestInsight.test_listing_insights_does_not_nplus1.24'''SELECT COUNT(*) AS "__count"FROM "posthog_dashboarditem"@@ -1812,7 +1145,7 @@AND NOT ("posthog_dashboarditem"."deleted"))'''# ----# name: TestInsight.test_listing_insights_does_not_nplus1.35+# name: TestInsight.test_listing_insights_does_not_nplus1.25'''SELECT "posthog_dashboarditem"."id","posthog_dashboarditem"."name",@@ -2000,7 +1333,7 @@LIMIT 100'''# ----# name: TestInsight.test_listing_insights_does_not_nplus1.36+# name: TestInsight.test_listing_insights_does_not_nplus1.26'''SELECT "posthog_dashboardtile"."id","posthog_dashboardtile"."dashboard_id",@@ -2018,7 +1351,7 @@5 /* ... */))'''# ----# name: TestInsight.test_listing_insights_does_not_nplus1.37+# name: TestInsight.test_listing_insights_does_not_nplus1.27'''SELECT "posthog_taggeditem"."id","posthog_taggeditem"."tag_id",@@ -2040,7 +1373,7 @@5 /* ... */)'''# ----# name: TestInsight.test_listing_insights_does_not_nplus1.38+# name: TestInsight.test_listing_insights_does_not_nplus1.28'''SELECT "posthog_taggeditem"."id","posthog_taggeditem"."tag_id",@@ -2066,6 +1399,57 @@5 /* ... */)'''# ---+# name: TestInsight.test_listing_insights_does_not_nplus1.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"."members_can_invite",+ "posthog_organization"."members_can_create_projects",+ "posthog_organization"."members_can_use_personal_api_keys",+ "posthog_organization"."allow_publicly_shared_resources",+ "posthog_organization"."default_role_id",+ "posthog_organization"."plugins_access_level",+ "posthog_organization"."for_internal_metrics",+ "posthog_organization"."default_experiment_stats_method",+ "posthog_organization"."default_anonymize_ips",+ "posthog_organization"."is_hipaa",+ "posthog_organization"."is_pending_deletion",+ "posthog_organization"."customer_id",+ "posthog_organization"."available_product_features",+ "posthog_organization"."usage",+ "posthog_organization"."never_drop_data",+ "posthog_organization"."customer_trust_scores",+ "posthog_organization"."setup_section_2_completed",+ "posthog_organization"."personalization",+ "posthog_organization"."domain_whitelist",+ "posthog_organization"."is_platform"+ FROM "posthog_organizationmembership"+ INNER JOIN "posthog_organization" ON ("posthog_organizationmembership"."organization_id" = "posthog_organization"."id")+ WHERE ("posthog_organizationmembership"."organization_id" = '00000000-0000-0000-0000-000000000000'::uuid+ AND "posthog_organizationmembership"."user_id" = 99999)+ LIMIT 21+ '''+# ---# name: TestInsight.test_listing_insights_does_not_nplus1.4'''SELECT "ee_accesscontrol"."id",diff --git a/products/product_analytics/backend/api/test/test_insight.py b/products/product_analytics/backend/api/test/test_insight.pyindex 6741e80e5500..874f68040464 100644--- a/products/product_analytics/backend/api/test/test_insight.py+++ b/products/product_analytics/backend/api/test/test_insight.py@@ -47,8 +47,6 @@ from posthog.hogql.query import execute_hogql_queryfrom posthog import settingsfrom posthog.api.test.dashboards import DashboardAPI-from posthog.caching.insight_cache import update_cache-from posthog.caching.insight_caching_state import TargetCacheAgefrom posthog.constants import AvailableFeaturefrom posthog.hogql_queries.query_runner import SHARED_FORCE_BLOCKING_STALENESS_WINDOW, ExecutionModefrom posthog.models import Filter, OrganizationMembership, SharingConfiguration, Team, User@@ -61,7 +59,6 @@ from products.cohorts.backend.models.cohort import Cohortfrom products.dashboards.backend.models.dashboard import Dashboardfrom products.dashboards.backend.models.dashboard_tile import DashboardTile, Textfrom products.product_analytics.backend.models.insight import Insight, InsightViewed-from products.product_analytics.backend.models.insight_caching_state import InsightCachingStatefrom products.product_analytics.backend.models.insight_variable import InsightVariablefrom ee.models.rbac.access_control import AccessControl@@ -2132,159 +2129,6 @@ class TestInsight(ClickhouseTestMixin, APIBaseTest, QueryMatchingTest):],)- @patch(- "posthog.caching.insight_caching_state.calculate_target_age_insight",- # The tested insight normally wouldn't satisfy the criteria for being refreshed in the background,- # this patch means it will be treated as if it did satisfy them- return_value=TargetCacheAge.MID_PRIORITY,- )- def test_insight_refreshing_legacy_with_background_update(self, spy_calculate_target_age_insight) -> None:- with freeze_time("2012-01-14T03:21:34.000Z"):- _create_event(- team=self.team,- event="$pageview",- distinct_id="1",- properties={"prop": "val"},- )- _create_event(- team=self.team,- event="$pageview",- distinct_id="2",- properties={"prop": "another_val"},- )- _create_event(- team=self.team,- event="$pageview",- distinct_id="2",- properties={"prop": "val", "another": "never_return_this"},- )- flush_persons_and_events()-- with freeze_time("2012-01-15T04:01:34.000Z"):- response = self.client.post(- f"/api/projects/{self.team.id}/insights",- data={- "filters": {- "events": [{"id": "$pageview"}],- "properties": [- {- "key": "another",- "value": "never_return_this",- "operator": "is_not",- }- ],- },- },- ).json()- self.assertNotIn("code", response) # Watching out for an error code- self.assertEqual(response["last_refresh"], None)- insight_id = response["id"]-- response = self.client.get(f"/api/projects/{self.team.id}/insights/{insight_id}/?refresh=true").json()- self.assertNotIn("code", response)- self.assertEqual(response["result"][0]["data"], [0, 0, 0, 0, 0, 0, 2, 0])- self.assertEqual(response["last_refresh"], "2012-01-15T04:01:34Z")- self.assertEqual(response["last_modified_at"], "2012-01-15T04:01:34Z")- self.assertFalse(response["is_cached"])-- with freeze_time("2012-01-17T05:01:34.000Z"):- update_cache(InsightCachingState.objects.get(insight_id=insight_id).id)-- with freeze_time("2012-01-17T06:01:34.000Z"):- response = self.client.get(f"/api/projects/{self.team.id}/insights/{insight_id}/?refresh=false").json()- self.assertNotIn("code", response)- self.assertEqual(response["result"][0]["data"], [0, 0, 0, 0, 2, 0, 0, 0])- self.assertEqual(response["last_refresh"], "2012-01-17T05:01:34Z") # Got refreshed with `update_cache`!- self.assertEqual(response["last_modified_at"], "2012-01-15T04:01:34Z")- self.assertTrue(response["is_cached"])-- @parameterized.expand(- [- [ # Property group filter, which is what's actually used these days- PropertyGroupFilter(- type=FilterLogicalOperator.AND_,- values=[- PropertyGroupFilterValue(- type=FilterLogicalOperator.OR_,- values=[EventPropertyFilter(key="another", value="never_return_this", operator="is_not")],- )- ],- )- ],- [ # Classic list of filters- [EventPropertyFilter(key="another", value="never_return_this", operator="is_not")]- ],- ]- )- @patch("posthog.hogql_queries.insights.trends.trends_query_runner.execute_hogql_query", wraps=execute_hogql_query)- @patch(- "posthog.caching.insight_caching_state.calculate_target_age_insight",- # The tested insight normally wouldn't satisfy the criteria for being refreshed in the background,- # this patch means it will be treated as if it did satisfy them- return_value=TargetCacheAge.MID_PRIORITY,- )- def test_insight_refreshing_query_with_background_update(- self, properties_filter, spy_execute_hogql_query, spy_calculate_target_age_insight- ) -> None:- with freeze_time("2012-01-14T03:21:34.000Z"):- _create_event(- team=self.team,- event="$pageview",- distinct_id="1",- properties={"prop": "val"},- )- _create_event(- team=self.team,- event="$pageview",- distinct_id="2",- properties={"prop": "another_val"},- )- _create_event(- team=self.team,- event="$pageview",- distinct_id="2",- properties={"prop": "val", "another": "never_return_this"},- )- flush_persons_and_events()-- query_dict = TrendsQuery(- series=[- EventsNode(- event="$pageview",- )- ],- properties=properties_filter,- ).model_dump()-- with freeze_time("2012-01-15T04:01:34.000Z"):- response = self.client.post(f"/api/projects/{self.team.id}/insights", data={"query": query_dict}).json()- self.assertNotIn("code", response) # Watching out for an error code- self.assertEqual(response["last_refresh"], None)- insight_id = response["id"]-- response = self.client.get(f"/api/projects/{self.team.id}/insights/{insight_id}/?refresh=true").json()- self.assertNotIn("code", response)-- self.assertEqual(spy_execute_hogql_query.call_count, 1)-- self.assertEqual(response["result"][0]["data"], [0, 0, 0, 0, 0, 0, 2, 0])- self.assertEqual(response["last_refresh"], "2012-01-15T04:01:34Z")- self.assertEqual(response["last_modified_at"], "2012-01-15T04:01:34Z")- self.assertFalse(response["is_cached"])-- with freeze_time("2012-01-17T05:01:34.000Z"):- update_cache(InsightCachingState.objects.get(insight_id=insight_id).id)-- with freeze_time("2012-01-17T06:01:34.000Z"):- call_count_before = spy_execute_hogql_query.call_count- response = self.client.get(f"/api/projects/{self.team.id}/insights/{insight_id}/?refresh=false").json()- self.assertNotIn("code", response)- self.assertEqual(spy_execute_hogql_query.call_count, call_count_before)- self.assertEqual(response["result"][0]["data"], [0, 0, 0, 0, 2, 0, 0, 0])- self.assertEqual(response["last_refresh"], "2012-01-17T05:01:34Z") # Got refreshed with `update_cache`!- self.assertEqual(response["last_modified_at"], "2012-01-15T04:01:34Z")- self.assertTrue(response["is_cached"])-@parameterized.expand([[ # Property group filter, which is what's actually used these daysdiff --git a/products/product_analytics/backend/migrations/0002_delete_insightcachingstate.py b/products/product_analytics/backend/migrations/0002_delete_insightcachingstate.pynew file mode 100644index 000000000000..9afc1dce4f3b--- /dev/null+++ b/products/product_analytics/backend/migrations/0002_delete_insightcachingstate.py@@ -0,0 +1,23 @@+# State-only removal of InsightCachingState. The posthog_insightcachingstate table is+# intentionally kept so code still running during the rolling deploy can write to it;+# it gets dropped in a follow-up migration after a full deploy cycle+# (see safe-django-migrations.md, "Dropping Tables").++from django.db import migrations+++class Migration(migrations.Migration):+ dependencies = [+ ("product_analytics", "0001_migrate_product_analytics_models"),+ ]++ operations = [+ migrations.SeparateDatabaseAndState(+ state_operations=[+ migrations.DeleteModel(+ name="InsightCachingState",+ ),+ ],+ database_operations=[],+ ),+ ]diff --git a/products/product_analytics/backend/migrations/max_migration.txt b/products/product_analytics/backend/migrations/max_migration.txtindex f8937f2a44c5..58643ce65672 100644--- a/products/product_analytics/backend/migrations/max_migration.txt+++ b/products/product_analytics/backend/migrations/max_migration.txt@@ -1 +1 @@-0001_migrate_product_analytics_models+0002_delete_insightcachingstatediff --git a/products/product_analytics/backend/models/__init__.py b/products/product_analytics/backend/models/__init__.pyindex fa2373e3e73c..c44cb5191832 100644--- a/products/product_analytics/backend/models/__init__.py+++ b/products/product_analytics/backend/models/__init__.py@@ -1,10 +1,8 @@from .insight import Insight, InsightViewed-from .insight_caching_state import InsightCachingStatefrom .insight_variable import InsightVariable__all__ = ["Insight",- "InsightCachingState","InsightVariable","InsightViewed",]diff --git a/products/product_analytics/backend/models/insight.py b/products/product_analytics/backend/models/insight.pyindex 63a4627f8267..d205ab0e268d 100644--- a/products/product_analytics/backend/models/insight.py+++ b/products/product_analytics/backend/models/insight.py@@ -268,14 +268,6 @@ class Insight(RootTeamMixin, FileSystemSyncMixin, models.Model):sharing_configurations = self.sharingconfiguration_set.all()return sharing_configurations[0].enabled if sharing_configurations and sharing_configurations[0] else False- @property- def caching_state(self):- # uses .all and not .first so that prefetching can be used- for state in self.caching_states.all():- if state.dashboard_tile_id is None:- return state- return None-@cached_propertydef query_from_filters(self):from posthog.hogql_queries.legacy_compatibility.filter_to_query import filter_to_querydiff --git a/products/product_analytics/backend/models/insight_caching_state.py b/products/product_analytics/backend/models/insight_caching_state.pydeleted file mode 100644index 5b800ba1f31d..000000000000--- a/products/product_analytics/backend/models/insight_caching_state.py+++ /dev/null@@ -1,91 +0,0 @@-from django.db import models-from django.db.models.signals import post_save--from posthog.models.sharing_configuration import SharingConfiguration-from posthog.models.signals import mutable_receiver-from posthog.models.utils import UniqueConstraintByExpression, UUIDTModel--from products.dashboards.backend.models.dashboard import Dashboard-from products.dashboards.backend.models.dashboard_tile import DashboardTile-from products.product_analytics.backend.models.insight import Insight---class InsightCachingState(UUIDTModel):- class Meta:- indexes = [models.Index(fields=["cache_key"], name="filter_by_cache_key_idx")]- constraints = [- UniqueConstraintByExpression(- name="unique_insight_tile_idx",- expression="(insight_id, coalesce(dashboard_tile_id, -1))",- )- ]- db_table = "posthog_insightcachingstate"-- team = models.ForeignKey("posthog.Team", on_delete=models.CASCADE)-- insight = models.ForeignKey(- "product_analytics.Insight",- on_delete=models.CASCADE,- related_name="caching_states",- null=False,- )- dashboard_tile = models.ForeignKey(- "dashboards.DashboardTile",- on_delete=models.CASCADE,- related_name="caching_states",- null=True,- )- cache_key = models.CharField(max_length=400, null=False, blank=False)-- target_cache_age_seconds = models.IntegerField(null=True)-- last_refresh = models.DateTimeField(blank=True, null=True)- last_refresh_queued_at = models.DateTimeField(blank=True, null=True)- refresh_attempt = models.IntegerField(null=False, default=0)-- created_at = models.DateTimeField(auto_now_add=True)- updated_at = models.DateTimeField(auto_now=True)---def _queue_sync_insight_caching_state(team_id: int, **kwargs: int | None) -> None:- # posthog.tasks.__init__ eagerly imports every task module (celery autoimport), so a- # module-level import here would pull the whole task graph into django.setup() via models.- from posthog.tasks.tasks import sync_insight_caching_state # noqa: PLC0415-- sync_insight_caching_state.delay(team_id, **kwargs)---@mutable_receiver(post_save, sender=SharingConfiguration)-def sync_sharing_configuration(sender, instance: SharingConfiguration, **kwargs):- if instance.insight is not None and not instance.insight.deleted:- _queue_sync_insight_caching_state(instance.team_id, insight_id=instance.insight_id)- elif instance.dashboard is not None and not instance.dashboard.deleted:- for tile in instance.dashboard.tiles.all():- _queue_sync_insight_caching_state(instance.team_id, dashboard_tile_id=tile.pk)---@mutable_receiver(post_save, sender=Insight)-def sync_insight(sender, instance: Insight, **kwargs):- _queue_sync_insight_caching_state(instance.team_id, insight_id=instance.pk)---@mutable_receiver(post_save, sender=DashboardTile)-def sync_dashboard_tile(sender, instance: DashboardTile, **kwargs):- # Use the denormalized team_id (always populated in DashboardTile.save() before this- # signal fires) rather than instance.dashboard.team_id, which triggers a DB fetch of the- # dashboard row on every tile save.- _queue_sync_insight_caching_state(instance.team_id, dashboard_tile_id=instance.pk)---@mutable_receiver(post_save, sender=Dashboard)-def sync_dashboard_updated(sender, instance: Dashboard, **kwargs):- update_fields = kwargs.get("update_fields")- if update_fields in [- frozenset({"filters_hash"}),- frozenset({"last_refresh"}),- frozenset({"last_accessed_at"}),- ]:- return-- for tile_id in DashboardTile.objects.filter(dashboard=instance).values_list("pk", flat=True):- _queue_sync_insight_caching_state(instance.team_id, dashboard_tile_id=tile_id)diff --git a/products/product_analytics/backend/models/test/test_insight_caching_state.py b/products/product_analytics/backend/models/test/test_insight_caching_state.pydeleted file mode 100644index 3d7dd988dc78..000000000000--- a/products/product_analytics/backend/models/test/test_insight_caching_state.py+++ /dev/null@@ -1,144 +0,0 @@-from typing import Optional, cast--from posthog.test.base import BaseTest-from unittest.mock import patch--from django.db import connection-from django.test.utils import CaptureQueriesContext-from django.utils.timezone import now--from posthog.models import SharingConfiguration-from posthog.models.signals import mute_selected_signals--from products.dashboards.backend.models.dashboard import Dashboard-from products.dashboards.backend.models.dashboard_tile import DashboardTile-from products.product_analytics.backend.models.insight import Insight-from products.product_analytics.backend.models.insight_caching_state import InsightCachingState--filters = {- "events": [{"id": "$pageview"}],- "properties": [{"key": "$browser", "value": "Mac OS X"}],-}--filters2 = {- **filters,- "events": [{"id": "$pageleave"}],-}---class TestInsightCachingState(BaseTest):- def test_insight_creation_updating_deletion(self):- insight = Insight.objects.create(team=self.team, filters=filters)-- initial_caching_state = self.get_caching_state()- assert initial_caching_state is not None- assert initial_caching_state.insight.pk == insight.pk- assert initial_caching_state.dashboard_tile is None- assert isinstance(initial_caching_state.cache_key, str)-- insight.filters = filters2- insight.save()-- updated_caching_state = self.get_caching_state()- assert updated_caching_state is not None- assert updated_caching_state.pk == initial_caching_state.pk- assert updated_caching_state.cache_key != initial_caching_state.cache_key- assert updated_caching_state.updated_at != initial_caching_state.updated_at-- insight.delete()-- assert self.get_caching_state() is None-- def test_dashboard_tile_creation_updating_deletion(self):- with mute_selected_signals():- dashboard = Dashboard.objects.create(team=self.team)- insight = Insight.objects.create(team=self.team, filters=filters)-- dashboard_tile = DashboardTile.objects.create(dashboard=dashboard, insight=insight)-- initial_caching_state = self.get_caching_state()- assert initial_caching_state is not None- assert initial_caching_state.insight.pk == insight.pk- assert cast(DashboardTile, initial_caching_state.dashboard_tile).pk == dashboard_tile.pk- assert isinstance(initial_caching_state.cache_key, str)-- with mute_selected_signals():- insight.filters = filters2- insight.save()-- dashboard_tile.color = "red"- dashboard_tile.save()-- updated_caching_state = self.get_caching_state()- assert updated_caching_state is not None- assert updated_caching_state.pk == initial_caching_state.pk- assert updated_caching_state.cache_key != initial_caching_state.cache_key- assert updated_caching_state.updated_at != initial_caching_state.updated_at-- dashboard_tile.delete()-- assert self.get_caching_state() is None-- def test_dashboard_tile_save_signal_does_not_query_dashboard_table(self):- with mute_selected_signals():- dashboard = Dashboard.objects.create(team=self.team)- insight = Insight.objects.create(team=self.team, filters=filters)- tile = DashboardTile.objects.create(dashboard=dashboard, insight=insight)-- # Re-fetch so the dashboard relation is not already cached on the instance; the- # post_save signal must read the denormalized team_id rather than dereferencing- # instance.dashboard, which would issue an extra SELECT on the dashboard table.- tile = DashboardTile.objects.get(pk=tile.pk)- tile.color = "red"-- # Stub the downstream sync task so the only work captured is save() + the signal- # itself (the task legitimately reads dashboard.deleted, which is out of scope here).- with patch(- "products.product_analytics.backend.models.insight_caching_state._queue_sync_insight_caching_state"- ) as queue_mock:- with CaptureQueriesContext(connection) as ctx:- tile.save(update_fields=["color"])-- queue_mock.assert_called_once_with(self.team.pk, dashboard_tile_id=tile.pk)- # Quoted to distinguish the dashboard table from posthog_dashboardtile.- assert not any('"posthog_dashboard"' in query["sql"] for query in ctx.captured_queries)-- def test_sharing_configuration_insight(self):- with mute_selected_signals():- insight = Insight.objects.create(team=self.team, filters=filters)-- SharingConfiguration.objects.create(team=self.team, insight=insight, enabled=True)-- assert self.get_caching_state() is not None-- def test_dashboard(self):- dashboard = Dashboard.objects.create(team=self.team)- insight = Insight.objects.create(team=self.team, filters=filters)- dashboard_tile = DashboardTile.objects.create(dashboard=dashboard, insight=insight)-- initial_caching_state = dashboard_tile.caching_state- assert initial_caching_state is not None-- dashboard.filters = {"date_from": "-24h"}- dashboard.save()-- new_caching_state = InsightCachingState.objects.get(dashboard_tile=dashboard_tile)- assert new_caching_state.pk == initial_caching_state.pk- assert new_caching_state.cache_key != initial_caching_state.cache_key- assert new_caching_state.updated_at != initial_caching_state.updated_at-- def test_dashboard_updating_last_accessed_at_does_not_sync(self):- with mute_selected_signals():- dashboard = Dashboard.objects.create(team=self.team)- insight = Insight.objects.create(team=self.team, filters=filters)- DashboardTile.objects.create(dashboard=dashboard, insight=insight)-- dashboard.last_accessed_at = now()- dashboard.save(update_fields=["last_accessed_at"])-- assert self.get_caching_state() is None-- def get_caching_state(self) -> Optional[InsightCachingState]:- query_set = InsightCachingState.objects.filter(team_id=self.team.pk)- assert len(query_set) in (0, 1)- return query_set.first()