: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(frontend): let products register their own global modals (#126868)
Paul D'Ambrab7b184b82c08
diff --git a/frontend/bin/layer-baseline.txt b/frontend/bin/layer-baseline.txtindex 4f549564e7a3..a160e3155f26 100644--- a/frontend/bin/layer-baseline.txt+++ b/frontend/bin/layer-baseline.txt@@ -5,15 +5,6 @@# Fixed one? Run `hogli lint:frontend-layers --prune-baseline` to drop it.frontend/src/layout/ErrorProjectUnavailable.tsx -> frontend/src/scenes/organization/CreateOrganizationModal.tsxfrontend/src/layout/GlobalModals.tsx -> frontend/src/scenes/authentication/two-factor-setup/TwoFactorSetupModal.tsx-frontend/src/layout/GlobalModals.tsx -> frontend/src/scenes/billing/PaymentEntryModal.tsx-frontend/src/layout/GlobalModals.tsx -> frontend/src/scenes/organization/CreateOrganizationModal.tsx-frontend/src/layout/GlobalModals.tsx -> frontend/src/scenes/project/CreateProjectModal.tsx-frontend/src/layout/GlobalModals.tsx -> frontend/src/scenes/session-recordings/player/modal/sessionPlayerModalLogic.ts-frontend/src/layout/GlobalModals.tsx -> frontend/src/scenes/settings/organization/InviteModal.tsx-frontend/src/layout/GlobalModals.tsx -> frontend/src/scenes/themes/PreviewingCustomCssModal.tsx-frontend/src/layout/GlobalModals.tsx -> frontend/src/scenes/welcome/WelcomeDialog.tsx-frontend/src/layout/GlobalModals.tsx -> products/conversations/frontend/components/ComposeTicket/composeTicketLogic.ts-frontend/src/layout/GlobalModals.tsx -> products/logs/frontend/components/LogsViewer/LogsViewerModal/logsViewerModalLogic.tsfrontend/src/layout/InternalFeedback/InternalFeedbackWidget.tsx -> frontend/src/toolbar/shared/product-tours/ElementHighlight.tsxfrontend/src/layout/InternalFeedback/internalFeedbackLogic.ts -> frontend/src/toolbar/shared/utils.tsfrontend/src/layout/navigation-3000/sidepanel/panels/activity/quill/QuillActivitySubscribeMenu.tsx -> frontend/src/scenes/hog-functions/sub-templates/sub-templates.tsdiff --git a/frontend/build-products.mjs b/frontend/build-products.mjsindex 2bc49dbd7811..f91ba3c5ad2f 100644--- a/frontend/build-products.mjs+++ b/frontend/build-products.mjs@@ -9,6 +9,23 @@ import { fileURLToPath } from 'url'export const __dirname = path.dirname(fileURLToPath(import.meta.url))+// Manifest fields of lazy loaders, each generated into its own module so the shell reaches products by dynamic import.+const LAZY_REGISTRIES = [+ {+ field: 'activityDescribers',+ file: 'productActivityDescribers.tsx',+ imports:+ "import type { Describer } from 'lib/components/ActivityLog/humanizeActivity'\n\nimport { ActivityScope } from '~/types'",+ declaration: 'productActivityDescribers: Partial<Record<ActivityScope, () => Promise<Describer>>>',+ },+ {+ field: 'globalModals',+ file: 'productGlobalModals.tsx',+ imports: "import type { ComponentType } from 'react'",+ declaration: 'productGlobalModals: Record<string, () => Promise<ComponentType>>',+ },+]+// Run directlybuildProductManifests()@@ -27,7 +44,6 @@ function buildProductManifests() {const outputTsx = path.join(__dirname, 'src/products.tsx')const outputScenesTsx = path.join(__dirname, 'src/productScenes.tsx')- const outputActivityDescribersTsx = path.join(__dirname, 'src/productActivityDescribers.tsx')const outputJson = path.join(__dirname, 'src/products.json')const cacheDir = path.join(__dirname, '.cache')const cacheFile = path.join(cacheDir, 'products.hash')@@ -51,7 +67,7 @@ function buildProductManifests() {fse.readFileSync(cacheFile, 'utf8') === digest &&fse.existsSync(outputTsx) &&fse.existsSync(outputScenesTsx) &&- fse.existsSync(outputActivityDescribersTsx) &&+ LAZY_REGISTRIES.every(({ file }) => fse.existsSync(path.join(__dirname, 'src', file))) &&fse.existsSync(outputJson)) {return@@ -76,7 +92,7 @@ function buildProductManifests() {const redirects = []const fileSystemTypes = []const setupProbes = []- const activityDescribers = new Map()+ const lazyRegistryEntries = Object.fromEntries(LAZY_REGISTRIES.map(({ field }) => [field, new Map()]))const treeItemsNew = {}const treeItemsGames = {}const treeItemsMetadata = {}@@ -111,13 +127,14 @@ function buildProductManifests() {sceneConfigs.push(cfg)}})- } else if (name === 'activityDescribers') {+ } else if (name in lazyRegistryEntries) {+ const entries = lazyRegistryEntries[name]node.initializer.properties.forEach((prop) => {- const scope = prop.name.getText(sourceFile)- if (activityDescribers.has(scope)) {- throw new Error(`Activity scope ${scope} has a describer in more than one manifest`)+ const key = prop.name.getText(sourceFile)+ if (entries.has(key)) {+ throw new Error(`${name} key ${key} appears in more than one manifest`)}- activityDescribers.set(scope, withImportPathsFromSrc(cloneNode(prop), sourceFile.fileName))+ entries.set(key, withImportPathsFromSrc(cloneNode(prop), sourceFile.fileName))})} else if (name === 'setupProbe') {// One object per manifest, aggregated into the `productSetupProbes` array.@@ -343,9 +360,6 @@ function buildProductManifests() {ts.factory.createArrayLiteralExpression(setupProbes),ts.createSourceFile('', '', ts.ScriptTarget.ESNext))- const serializedActivityDescribers = makeObjExpr(- [...activityDescribers.keys()].sort().map((scope) => activityDescribers.get(scope))- )const serializedTreeItemsNew = makeArrExpr(treeItemsNew)const serializedTreeItemsProducts = makeArrExpr(treeItemsProducts)// A literal union of product tree paths, so code that hardcodes a path (e.g. sidebar companion@@ -416,18 +430,6 @@ function buildProductManifests() {export const productScenes: Record<string, () => Promise<any>> = ${serializedProductScenes}`- const activityDescribersTsx = `- /* eslint @typescript-eslint/explicit-module-boundary-types: 0 */- // Generated by build-products.mjs – DO NOT EDIT BY HAND.-- import type { Describer } from 'lib/components/ActivityLog/humanizeActivity'-- import { ActivityScope } from '~/types'-- ${autogenDisclaimer}- export const productActivityDescribers: Partial<Record<ActivityScope, () => Promise<Describer>>> = ${serializedActivityDescribers}- `-const tsxTmpDir = path.join(__dirname, 'tmp')fse.mkdirSync(tsxTmpDir, { recursive: true })const tsxTmpFile = path.join(tsxTmpDir, 'products.tsx')@@ -440,10 +442,25 @@ function buildProductManifests() {ps.execFileSync('oxfmt', [scenesTmpFile])fse.renameSync(scenesTmpFile, outputScenesTsx)- const activityDescribersTmpFile = path.join(tsxTmpDir, 'productActivityDescribers.tsx')- fse.writeFileSync(activityDescribersTmpFile, activityDescribersTsx)- ps.execFileSync('oxfmt', [activityDescribersTmpFile])- fse.renameSync(activityDescribersTmpFile, outputActivityDescribersTsx)+ for (const { field, file, imports, declaration } of LAZY_REGISTRIES) {+ const entries = lazyRegistryEntries[field]+ const serialized = makeObjExpr([...entries.keys()].sort().map((key) => entries.get(key)))+ const registryTmpFile = path.join(tsxTmpDir, file)+ fse.writeFileSync(+ registryTmpFile,+ `+ /* eslint @typescript-eslint/explicit-module-boundary-types: 0 */+ // Generated by build-products.mjs – DO NOT EDIT BY HAND.++ ${imports}++ ${autogenDisclaimer}+ export const ${declaration} = ${serialized}+ `+ )+ ps.execFileSync('oxfmt', [registryTmpFile])+ fse.renameSync(registryTmpFile, path.join(__dirname, 'src', file))+ }// 8. Assemble `products.json`, write, format, move to src/// A much simplified version of `products.tsx` to simplify consumption from Pythondiff --git a/frontend/src/layout/GlobalModals.tsx b/frontend/src/layout/GlobalModals.tsxindex f74511968495..8a5f11b056e2 100644--- a/frontend/src/layout/GlobalModals.tsx+++ b/frontend/src/layout/GlobalModals.tsx@@ -15,33 +15,35 @@ import { traceDialogOpenLogic } from 'lib/components/ViewTraceButton/traceDialogimport { useKeepMountedWhileOpen } from 'lib/hooks/useKeepMountedWhileOpen'import { inviteLogic } from 'lib/logic/inviteLogic'import { lazyWithRetry } from 'lib/utils/retryImport'+// Static on purpose: apiStatusLogic opens this modal through twoFactorLogic, which must be mounted before any API call.import { TwoFactorSetupModal } from 'scenes/authentication/two-factor-setup/TwoFactorSetupModal'-import { PaymentEntryModal } from 'scenes/billing/PaymentEntryModal'-import { CreateOrganizationModal } from 'scenes/organization/CreateOrganizationModal'-import { CreateProjectModal } from 'scenes/project/CreateProjectModal'-import { sessionPlayerModalLogic } from 'scenes/session-recordings/player/modal/sessionPlayerModalLogic'-import { InviteModal } from 'scenes/settings/organization/InviteModal'-import { PreviewingCustomCssModal } from 'scenes/themes/PreviewingCustomCssModal'-import { MaybeWelcomeDialog } from 'scenes/welcome/WelcomeDialog'-import { composeTicketLogic } from 'products/conversations/frontend/components/ComposeTicket/composeTicketLogic'-import { logsViewerModalLogic } from 'products/logs/frontend/components/LogsViewer/LogsViewerModal/logsViewerModalLogic'+import { productGlobalModals } from '~/productGlobalModals'import { globalModalsLogic } from './globalModalsLogic'-// The session player modal anchors the entire replay player graph; loading it only when a-// recording is opened keeps that graph out of the chunk every logged-in page downloads.-const SessionPlayerModal = lazyWithRetry(() =>- import('scenes/session-recordings/player/modal/SessionPlayerModal').then((m) => ({- default: m.SessionPlayerModal,- }))+// Modals that no product owns. A product adds its modal through `globalModals` in its manifest.+const InviteModal = lazyWithRetry(() =>+ import('scenes/settings/organization/InviteModal').then((m) => ({ default: m.InviteModal }))+)+const CreateOrganizationModal = lazyWithRetry(() =>+ import('scenes/organization/CreateOrganizationModal').then((m) => ({ default: m.CreateOrganizationModal }))+)+const CreateProjectModal = lazyWithRetry(() =>+ import('scenes/project/CreateProjectModal').then((m) => ({ default: m.CreateProjectModal }))+)+const PreviewingCustomCssModal = lazyWithRetry(() =>+ import('scenes/themes/PreviewingCustomCssModal').then((m) => ({ default: m.PreviewingCustomCssModal }))+)+const PaymentEntryModal = lazyWithRetry(() =>+ import('scenes/billing/PaymentEntryModal').then((m) => ({ default: m.PaymentEntryModal }))+)+const MaybeWelcomeDialog = lazyWithRetry(() =>+ import('scenes/welcome/WelcomeDialog').then((m) => ({ default: m.MaybeWelcomeDialog })))-// Same trick for the logs viewer, whose sparkline anchors chart.js.-const LogsViewerModal = lazyWithRetry(() =>- import('products/logs/frontend/components/LogsViewer/LogsViewerModal').then((m) => ({- default: m.LogsViewerModal,- }))+const productModals = Object.entries(productGlobalModals).map(+ ([key, load]) => [key, lazyWithRetry(() => load().then((component) => ({ default: component })))] as const)const TraceDialog = lazyWithRetry(() =>@@ -50,13 +52,6 @@ const TraceDialog = lazyWithRetry(() =>})))-// The compose ticket modal anchors the support rich text editor (tiptap and prosemirror).-const ComposeTicketModal = lazyWithRetry(() =>- import('products/conversations/frontend/components/ComposeTicket/ComposeTicketModal').then((m) => ({- default: m.ComposeTicketModal,- }))-)-const MaybePhaiOnboarding = lazyWithRetry(() =>import('scenes/max/components/MaybePhaiOnboarding').then((m) => ({default: m.MaybePhaiOnboarding,@@ -66,60 +61,59 @@ const MaybePhaiOnboarding = lazyWithRetry(() =>export function GlobalModals(): JSX.Element {const { isCreateOrganizationModalShown, isCreateProjectModalShown } = useValues(globalModalsLogic)const { hideCreateOrganizationModal, hideCreateProjectModal } = useActions(globalModalsLogic)- const { activeSessionRecording } = useValues(sessionPlayerModalLogic)- const { isOpen: isLogsViewerModalOpen } = useValues(logsViewerModalLogic)- // Grace-extended so the modals' exit animations finish before the lazy subtree unmounts.- const shouldRenderSessionPlayerModal = useKeepMountedWhileOpen(!!activeSessionRecording)- const shouldRenderLogsViewerModal = useKeepMountedWhileOpen(isLogsViewerModalOpen)const { isOpen: isTraceDialogOpen } = useValues(traceDialogOpenLogic)+ // Grace-extended so the dialog's exit animation finishes before the lazy subtree unmounts.const shouldRenderTraceDialog = useKeepMountedWhileOpen(isTraceDialogOpen)- const { isOpen: isComposeTicketModalOpen } = useValues(composeTicketLogic)- const shouldRenderComposeTicketModal = useKeepMountedWhileOpen(isComposeTicketModalOpen)const { isInviteModalShown } = useValues(inviteLogic)const { hideInviteModal } = useActions(inviteLogic)const { superpowersEnabled } = useValues(superpowersLogic)return (<>- <InviteModal isOpen={isInviteModalShown} onClose={hideInviteModal} />- <CreateOrganizationModal isVisible={isCreateOrganizationModalShown} onClose={hideCreateOrganizationModal} />- <CreateProjectModal isVisible={isCreateProjectModalShown} onClose={hideCreateProjectModal} />+ <Suspense fallback={null}>+ <InviteModal isOpen={isInviteModalShown} onClose={hideInviteModal} />+ </Suspense>+ <Suspense fallback={null}>+ <CreateOrganizationModal+ isVisible={isCreateOrganizationModalShown}+ onClose={hideCreateOrganizationModal}+ />+ </Suspense>+ <Suspense fallback={null}>+ <CreateProjectModal isVisible={isCreateProjectModalShown} onClose={hideCreateProjectModal} />+ </Suspense>+ <Suspense fallback={null}>+ <PreviewingCustomCssModal />+ </Suspense>+ <TwoFactorSetupModal />+ <Suspense fallback={null}>+ <PaymentEntryModal />+ </Suspense>+ <Suspense fallback={null}>+ <MaybeWelcomeDialog />+ </Suspense>+ {productModals.map(([key, ProductModal]) => (+ <Suspense key={key} fallback={null}>+ <ProductModal />+ </Suspense>+ ))}<UpgradeModal /><TimeSensitiveAuthenticationModal />- {shouldRenderSessionPlayerModal ? (- <Suspense fallback={null}>- <SessionPlayerModal />- </Suspense>- ) : null}- {shouldRenderLogsViewerModal ? (- <Suspense fallback={null}>- <LogsViewerModal />- </Suspense>- ) : null}{shouldRenderTraceDialog ? (<Suspense fallback={null}><TraceDialog /></Suspense>) : null}- <PreviewingCustomCssModal />- <TwoFactorSetupModal /><HedgehogMode />- <PaymentEntryModal /><GlobalCustomUnitModal /><MoveToModal /><LinkToModal /><ItemSelectModal />{superpowersEnabled && <SuperpowersModal />}- <MaybeWelcomeDialog /><MaybeProductPushWelcome /><Suspense fallback={null}><MaybePhaiOnboarding /></Suspense>- {shouldRenderComposeTicketModal ? (- <Suspense fallback={null}>- <ComposeTicketModal />- </Suspense>- ) : null}</>)}diff --git a/frontend/src/productGlobalModals.tsx b/frontend/src/productGlobalModals.tsxnew file mode 100644index 000000000000..8f4a65c005fc--- /dev/null+++ b/frontend/src/productGlobalModals.tsx@@ -0,0 +1,20 @@+/* eslint @typescript-eslint/explicit-module-boundary-types: 0 */+// Generated by build-products.mjs – DO NOT EDIT BY HAND.++import type { ComponentType } from 'react'++/** This const is auto-generated, as is the whole file */+export const productGlobalModals: Record<string, () => Promise<ComponentType>> = {+ ComposeTicketModal: () =>+ import('../../products/conversations/frontend/components/ComposeTicket/ComposeTicketModalHost').then(+ (module) => module.ComposeTicketModalHost+ ),+ LogsViewerModal: () =>+ import('../../products/logs/frontend/components/LogsViewer/LogsViewerModal/LogsViewerModalHost').then(+ (module) => module.LogsViewerModalHost+ ),+ SessionPlayerModal: () =>+ import('scenes/session-recordings/player/modal/SessionPlayerModalHost').then(+ (module) => module.SessionPlayerModalHost+ ),+}diff --git a/frontend/src/scenes/session-recordings/player/modal/SessionPlayerModalHost.tsx b/frontend/src/scenes/session-recordings/player/modal/SessionPlayerModalHost.tsxnew file mode 100644index 000000000000..71a412ac6b45--- /dev/null+++ b/frontend/src/scenes/session-recordings/player/modal/SessionPlayerModalHost.tsx@@ -0,0 +1,22 @@+import { useValues } from 'kea'+import { Suspense } from 'react'++import { useKeepMountedWhileOpen } from 'lib/hooks/useKeepMountedWhileOpen'+import { lazyWithRetry } from 'lib/utils/retryImport'++import { sessionPlayerModalLogic } from './sessionPlayerModalLogic'++// The modal anchors the entire replay player graph, so it loads only when a recording opens.+const SessionPlayerModal = lazyWithRetry(() =>+ import('./SessionPlayerModal').then((m) => ({ default: m.SessionPlayerModal }))+)++export function SessionPlayerModalHost(): JSX.Element | null {+ const { activeSessionRecording } = useValues(sessionPlayerModalLogic)+ const shouldRender = useKeepMountedWhileOpen(!!activeSessionRecording)+ return shouldRender ? (+ <Suspense fallback={null}>+ <SessionPlayerModal />+ </Suspense>+ ) : null+}diff --git a/frontend/src/types.ts b/frontend/src/types.tsindex f6d8a503f36b..467d6a8857b2 100644--- a/frontend/src/types.ts+++ b/frontend/src/types.ts@@ -2,7 +2,7 @@ import { LogicWrapper } from 'kea'import type { PostHog, PropertyMatchType, SupportedWebVitalsMetrics } from 'posthog-js'import { LogLevel } from 'posthog-js/rrweb-plugin-console-record'import { eventWithTime } from 'posthog-js/rrweb-types'-import { ReactNode } from 'react'+import { ComponentType, ReactNode } from 'react'import { LayoutItem } from 'react-grid-layout'import { LemonTableColumns } from '@posthog/lemon-ui'@@ -7969,6 +7969,8 @@ export interface ProductManifest {setupProbe?: ProductSetupProbe/** Aggregated into `productActivityDescribers`, which loads each one on demand. */activityDescribers?: Partial<Record<ActivityScope, () => Promise<Describer>>>+ /** Aggregated into `productGlobalModals`. Each one renders on every logged-in page and owns its open state. */+ globalModals?: Record<string, () => Promise<ComponentType>>}export interface ProjectTreeRef {diff --git a/posthog/api/test/dashboards/__snapshots__/test_dashboard.ambr b/posthog/api/test/dashboards/__snapshots__/test_dashboard.ambrindex 79a1931161c1..f9e72bd6e1b6 100644--- a/posthog/api/test/dashboards/__snapshots__/test_dashboard.ambr+++ b/posthog/api/test/dashboards/__snapshots__/test_dashboard.ambr@@ -3868,7 +3868,7 @@LIMIT 21'''# ----# name: TestDashboard.test_adding_insights_is_not_nplus1_for_gets.175+# name: TestDashboard.test_adding_insights_is_not_nplus1_for_gets.18'''SELECT "posthog_insightvariable"."id","posthog_insightvariable"."name",@@ -3888,7 +3888,7 @@ORDER BY "posthog_insightvariable"."name" ASC'''# ----# name: TestDashboard.test_adding_insights_is_not_nplus1_for_gets.176+# name: TestDashboard.test_adding_insights_is_not_nplus1_for_gets.19'''SELECT "posthog_dashboardtile"."id","posthog_dashboardtile"."dashboard_id",@@ -4245,74 +4245,73 @@ORDER BY "posthog_dashboarditem"."order" ASC'''# ----# name: TestDashboard.test_adding_insights_is_not_nplus1_for_gets.177+# name: TestDashboard.test_adding_insights_is_not_nplus1_for_gets.2'''- SELECT "posthog_dashboardtile"."id",- "posthog_dashboardtile"."dashboard_id",- "posthog_dashboardtile"."insight_id",- "posthog_dashboardtile"."deleted"- FROM "posthog_dashboardtile"- INNER JOIN "posthog_dashboard" ON ("posthog_dashboardtile"."dashboard_id" = "posthog_dashboard"."id")- WHERE (NOT ("posthog_dashboardtile"."deleted"- AND "posthog_dashboardtile"."deleted" IS NOT NULL)- AND NOT ("posthog_dashboard"."deleted")- AND "posthog_dashboardtile"."insight_id" IN (1,- 2,- 3,- 4,- 5 /* ... */))+ SELECT "posthog_organizationmembership"."id",+ "posthog_organizationmembership"."organization_id",+ "posthog_organizationmembership"."user_id",+ "posthog_organizationmembership"."level",+ "posthog_organizationmembership"."joined_at",+ "posthog_organizationmembership"."updated_at",+ "posthog_organizationmembership"."invited_by_id",+ "posthog_organization"."id",+ "posthog_organization"."name",+ "posthog_organization"."slug",+ "posthog_organization"."logo_media_id",+ "posthog_organization"."created_at",+ "posthog_organization"."updated_at",+ "posthog_organization"."is_active",+ "posthog_organization"."is_not_active_reason",+ "posthog_organization"."session_cookie_age",+ "posthog_organization"."is_member_join_email_enabled",+ "posthog_organization"."is_ai_data_processing_approved",+ "posthog_organization"."is_ai_training_opted_in",+ "posthog_organization"."is_ai_training_locked",+ "posthog_organization"."is_ai_training_cta_shown",+ "posthog_organization"."enforce_2fa",+ "posthog_organization"."enforce_verified_domains",+ "posthog_organization"."members_can_invite",+ "posthog_organization"."members_can_create_projects",+ "posthog_organization"."members_can_use_personal_api_keys",+ "posthog_organization"."members_can_see_org_members",+ "posthog_organization"."uses_most_specific_access_resolution",+ "posthog_organization"."allow_publicly_shared_resources",+ "posthog_organization"."member_notice",+ "posthog_organization"."read_only_mcp_access",+ "posthog_organization"."default_role_id",+ "posthog_organization"."plugins_access_level",+ "posthog_organization"."for_internal_metrics",+ "posthog_organization"."default_anonymize_ips",+ "posthog_organization"."is_pending_deletion",+ "posthog_organization"."customer_id",+ "posthog_organization"."available_product_features",+ "posthog_organization"."usage",+ "posthog_organization"."never_drop_data",+ "posthog_organization"."customer_trust_scores",+ "posthog_organization"."has_active_subscription",+ "posthog_organization"."setup_section_2_completed",+ "posthog_organization"."personalization",+ "posthog_organization"."domain_whitelist",+ "posthog_organization"."is_platform"+ FROM "posthog_organizationmembership"+ INNER JOIN "posthog_organization" ON ("posthog_organizationmembership"."organization_id" = "posthog_organization"."id")+ WHERE ("posthog_organizationmembership"."organization_id" = '00000000-0000-0000-0000-000000000000'::uuid+ AND "posthog_organizationmembership"."user_id" = 99999)+ LIMIT 21'''# ----# name: TestDashboard.test_adding_insights_is_not_nplus1_for_gets.178+# name: TestDashboard.test_adding_insights_is_not_nplus1_for_gets.20'''- SELECT "posthog_taggeditem"."id",- "posthog_taggeditem"."tag_id",- "posthog_taggeditem"."content_type_id",- "posthog_taggeditem"."object_id",- "posthog_taggeditem"."object_uuid",- "posthog_taggeditem"."team_id",- "posthog_tag"."id",- "posthog_tag"."name",- "posthog_tag"."team_id"+ SELECT "posthog_tag"."name" AS "tag__name"FROM "posthog_taggeditem"INNER JOIN "posthog_tag" ON ("posthog_taggeditem"."tag_id" = "posthog_tag"."id")WHERE ("posthog_taggeditem"."content_type_id" = 99999- AND "posthog_taggeditem"."object_id" IN (1,- 2,- 3,- 4,- 5 /* ... */))+ AND "posthog_taggeditem"."object_id" = 99999)'''# ----# name: TestDashboard.test_adding_insights_is_not_nplus1_for_gets.179+# name: TestDashboard.test_adding_insights_is_not_nplus1_for_gets.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"."evaluation_delay_intervals",- "posthog_alertconfiguration"."calculation_interval",- "posthog_alertconfiguration"."threshold_id",- "posthog_alertconfiguration"."condition",- "posthog_alertconfiguration"."detector_config",- "posthog_alertconfiguration"."state",- "posthog_alertconfiguration"."enabled",- "posthog_alertconfiguration"."last_notified_at",- "posthog_alertconfiguration"."last_checked_at",- "posthog_alertconfiguration"."next_check_at",- "posthog_alertconfiguration"."snoozed_until",- "posthog_alertconfiguration"."skip_weekend",- "posthog_alertconfiguration"."schedule_restriction",- "posthog_alertconfiguration"."schedule_start_time",- "posthog_alertconfiguration"."investigation_agent_enabled",- "posthog_alertconfiguration"."investigation_gates_notifications",- "posthog_alertconfiguration"."investigation_inconclusive_action",- "posthog_alertconfiguration"."owner",- "posthog_alertconfiguration"."owner_changed_at",- "posthog_user"."id",+ SELECT "posthog_user"."id","posthog_user"."password","posthog_user"."last_login","posthog_user"."first_name",@@ -4327,7 +4326,6 @@"posthog_user"."distinct_id","posthog_user"."is_email_verified","posthog_user"."credentials_reviewed_at",- "posthog_user"."requested_password_reset_at","posthog_user"."requested_2fa_reset_at","posthog_user"."has_seen_product_intro_for","posthog_user"."strapi_id",@@ -4352,600 +4350,54 @@"posthog_user"."onboarding_delegation_accepted_at","posthog_user"."events_column_config","posthog_user"."email_opt_in",- "posthog_threshold"."created_by_id",- "posthog_threshold"."created_at",- "posthog_threshold"."id",- "posthog_threshold"."team_id",- "posthog_threshold"."insight_id",- "posthog_threshold"."name",- "posthog_threshold"."configuration"- FROM "posthog_alertconfiguration"- LEFT OUTER JOIN "posthog_user" ON ("posthog_alertconfiguration"."created_by_id" = "posthog_user"."id")- LEFT OUTER JOIN "posthog_threshold" ON ("posthog_alertconfiguration"."threshold_id" = "posthog_threshold"."id")- WHERE "posthog_alertconfiguration"."insight_id" IN (1,- 2,- 3,- 4,- 5 /* ... */)- '''-# ----# name: TestDashboard.test_adding_insights_is_not_nplus1_for_gets.18- '''- SELECT "posthog_insightvariable"."id",- "posthog_insightvariable"."name",- "posthog_insightvariable"."code_name",- "posthog_insightvariable"."type",- "posthog_insightvariable"."default_value",- "posthog_insightvariable"."is_multi"- FROM "posthog_insightvariable"- INNER JOIN "posthog_team" ON ("posthog_insightvariable"."team_id" = "posthog_team"."id")- WHERE ("posthog_insightvariable"."team_id" =- (SELECT "U0"."parent_team_id" AS "parent_team_id"- FROM "posthog_team" "U0"- WHERE "U0"."id" = 99999- LIMIT 1)- OR ("posthog_team"."parent_team_id" IS NULL- AND "posthog_insightvariable"."team_id" = 99999))- ORDER BY "posthog_insightvariable"."name" ASC- '''-# ----# name: TestDashboard.test_adding_insights_is_not_nplus1_for_gets.180- '''- SELECT "posthog_teamrevenueanalyticsconfig"."team_id",- "posthog_teamrevenueanalyticsconfig"."filter_test_accounts",- "posthog_teamrevenueanalyticsconfig"."notified_first_sync",- "posthog_teamrevenueanalyticsconfig"."events",- "posthog_teamrevenueanalyticsconfig"."goals",- "posthog_teamrevenueanalyticsconfig"."base_currency"- FROM "posthog_teamrevenueanalyticsconfig"- WHERE "posthog_teamrevenueanalyticsconfig"."team_id" = 99999- LIMIT 21- '''-# ----# name: TestDashboard.test_adding_insights_is_not_nplus1_for_gets.181- '''- SELECT "posthog_teammarketinganalyticsconfig"."team_id",- "posthog_teammarketinganalyticsconfig"."attribution_window_days",- "posthog_teammarketinganalyticsconfig"."attribution_mode",- "posthog_teammarketinganalyticsconfig"."filter_test_accounts",- "posthog_teammarketinganalyticsconfig"."sources_map",- "posthog_teammarketinganalyticsconfig"."conversion_goals",- "posthog_teammarketinganalyticsconfig"."campaign_name_mappings",- "posthog_teammarketinganalyticsconfig"."custom_source_mappings",- "posthog_teammarketinganalyticsconfig"."campaign_field_preferences"- FROM "posthog_teammarketinganalyticsconfig"- WHERE "posthog_teammarketinganalyticsconfig"."team_id" = 99999- LIMIT 21- '''-# ----# name: TestDashboard.test_adding_insights_is_not_nplus1_for_gets.182- '''- SELECT "customer_analytics_teamcustomeranalyticsconfig"."team_id",- "customer_analytics_teamcustomeranalyticsconfig"."activity_event",- "customer_analytics_teamcustomeranalyticsconfig"."signup_pageview_event",- "customer_analytics_teamcustomeranalyticsconfig"."signup_event",- "customer_analytics_teamcustomeranalyticsconfig"."subscription_event",- "customer_analytics_teamcustomeranalyticsconfig"."payment_event",- "customer_analytics_teamcustomeranalyticsconfig"."account_group_type_index",- "customer_analytics_teamcustomeranalyticsconfig"."default_pinned_properties",- "customer_analytics_teamcustomeranalyticsconfig"."account_track_rules",- "customer_analytics_teamcustomeranalyticsconfig"."account_track_rules_enabled_at",- "customer_analytics_teamcustomeranalyticsconfig"."properties"- FROM "customer_analytics_teamcustomeranalyticsconfig"- WHERE "customer_analytics_teamcustomeranalyticsconfig"."team_id" = 99999- LIMIT 21+ "posthog_organization"."id",+ "posthog_organization"."name",+ "posthog_organization"."slug",+ "posthog_organization"."logo_media_id",+ "posthog_organization"."created_at",+ "posthog_organization"."updated_at",+ "posthog_organization"."is_active",+ "posthog_organization"."is_not_active_reason",+ "posthog_organization"."session_cookie_age",+ "posthog_organization"."is_member_join_email_enabled",+ "posthog_organization"."is_ai_data_processing_approved",+ "posthog_organization"."is_ai_training_opted_in",+ "posthog_organization"."is_ai_training_locked",+ "posthog_organization"."is_ai_training_cta_shown",+ "posthog_organization"."enforce_2fa",+ "posthog_organization"."enforce_verified_domains",+ "posthog_organization"."members_can_invite",+ "posthog_organization"."members_can_create_projects",+ "posthog_organization"."members_can_use_personal_api_keys",+ "posthog_organization"."members_can_see_org_members",+ "posthog_organization"."uses_most_specific_access_resolution",+ "posthog_organization"."allow_publicly_shared_resources",+ "posthog_organization"."member_notice",+ "posthog_organization"."read_only_mcp_access",+ "posthog_organization"."default_role_id",+ "posthog_organization"."plugins_access_level",+ "posthog_organization"."for_internal_metrics",+ "posthog_organization"."default_anonymize_ips",+ "posthog_organization"."is_pending_deletion",+ "posthog_organization"."customer_id",+ "posthog_organization"."available_product_features",+ "posthog_organization"."usage",+ "posthog_organization"."never_drop_data",+ "posthog_organization"."customer_trust_scores",+ "posthog_organization"."has_active_subscription",+ "posthog_organization"."setup_section_2_completed",+ "posthog_organization"."personalization",+ "posthog_organization"."domain_whitelist",+ "posthog_organization"."is_platform"+ FROM "posthog_user"+ LEFT OUTER JOIN "posthog_organization" ON ("posthog_user"."current_organization_id" = "posthog_organization"."id")+ WHERE ("posthog_user"."is_active"+ AND "posthog_user"."id" = 99999)'''# ----# name: TestDashboard.test_adding_insights_is_not_nplus1_for_gets.19+# name: TestDashboard.test_adding_insights_is_not_nplus1_for_gets.22'''- SELECT "posthog_dashboardtile"."id",- "posthog_dashboardtile"."dashboard_id",- "posthog_dashboardtile"."insight_id",- "posthog_dashboardtile"."text_id",- "posthog_dashboardtile"."button_tile_id",- "posthog_dashboardtile"."widget_id",- "posthog_dashboardtile"."team_id",- "posthog_dashboardtile"."layouts",- "posthog_dashboardtile"."color",- "posthog_dashboardtile"."filters_hash",- "posthog_dashboardtile"."last_refresh",- "posthog_dashboardtile"."refreshing",- "posthog_dashboardtile"."refresh_attempt",- "posthog_dashboardtile"."filters_overrides",- "posthog_dashboardtile"."show_description",- "posthog_dashboardtile"."transparent_background",- "posthog_dashboardtile"."group_key",- "posthog_dashboardtile"."badge",- "posthog_dashboardtile"."deleted",- "posthog_dashboarditem"."id",- "posthog_dashboarditem"."name",- "posthog_dashboarditem"."derived_name",- "posthog_dashboarditem"."description",- "posthog_dashboarditem"."team_id",- "posthog_dashboarditem"."filters",- "posthog_dashboarditem"."filters_hash",- "posthog_dashboarditem"."query",- "posthog_dashboarditem"."query_metadata",- "posthog_dashboarditem"."order",- "posthog_dashboarditem"."deleted",- "posthog_dashboarditem"."saved",- "posthog_dashboarditem"."created_at",- "posthog_dashboarditem"."refreshing",- "posthog_dashboarditem"."created_by_id",- "posthog_dashboarditem"."is_sample",- "posthog_dashboarditem"."short_id",- "posthog_dashboarditem"."favorited",- "posthog_dashboarditem"."refresh_attempt",- "posthog_dashboarditem"."last_modified_at",- "posthog_dashboarditem"."last_modified_by_id",- "posthog_dashboarditem"."dashboard_id",- "posthog_dashboarditem"."last_refresh",- "posthog_dashboarditem"."layouts",- "posthog_dashboarditem"."color",- "posthog_dashboarditem"."dive_dashboard_id",- "posthog_dashboarditem"."updated_at",- "posthog_dashboarditem"."deprecated_tags",- "posthog_dashboarditem"."tags",- "posthog_team"."id",- "posthog_team"."uuid",- "posthog_team"."organization_id",- "posthog_team"."parent_team_id",- "posthog_team"."project_id",- "posthog_team"."api_token",- "posthog_team"."app_urls",- "posthog_team"."name",- "posthog_team"."slack_incoming_webhook",- "posthog_team"."created_at",- "posthog_team"."updated_at",- "posthog_team"."anonymize_ips",- "posthog_team"."completed_snippet_onboarding",- "posthog_team"."has_completed_onboarding_for",- "posthog_team"."onboarding_tasks",- "posthog_team"."ingested_event",- "posthog_team"."ingested_production_event",- "posthog_team"."ingested_production_event_last_checked_at",- "posthog_team"."person_processing_opt_out",- "posthog_team"."secret_api_token",- "posthog_team"."secret_api_token_backup",- "posthog_team"."session_recording_opt_in",- "posthog_team"."session_recording_sample_rate",- "posthog_team"."session_recording_minimum_duration_milliseconds",- "posthog_team"."session_recording_linked_flag",- "posthog_team"."session_recording_network_payload_capture_config",- "posthog_team"."session_recording_masking_config",- "posthog_team"."session_recording_url_trigger_config",- "posthog_team"."session_recording_url_blocklist_config",- "posthog_team"."session_recording_event_trigger_config",- "posthog_team"."session_recording_trigger_match_type_config",- "posthog_team"."session_recording_trigger_groups",- "posthog_team"."session_replay_config",- "posthog_team"."session_recording_retention_period",- "posthog_team"."event_retention_months",- "posthog_team"."conversations_enabled",- "posthog_team"."conversations_settings",- "posthog_team"."proactive_tasks_enabled",- "posthog_team"."survey_config",- "posthog_team"."surveys_opt_in",- "posthog_team"."product_tours_opt_in",- "posthog_team"."capture_console_log_opt_in",- "posthog_team"."capture_performance_opt_in",- "posthog_team"."capture_dead_clicks",- "posthog_team"."autocapture_opt_out",- "posthog_team"."autocapture_web_vitals_opt_in",- "posthog_team"."autocapture_web_vitals_allowed_metrics",- "posthog_team"."autocapture_exceptions_opt_in",- "posthog_team"."autocapture_exceptions_errors_to_ignore",- "posthog_team"."logs_settings",- "posthog_team"."llm_gateway_enabled_at",- "posthog_team"."llm_gateway_revoked_at",- "posthog_team"."llm_gateway_overspend_allowance_usd",- "posthog_team"."heatmaps_opt_in",- "posthog_team"."receive_org_level_activity_logs",- "posthog_team"."web_analytics_pre_aggregated_tables_enabled",- "posthog_team"."web_analytics_pre_aggregated_tables_version",- "posthog_team"."flags_persistence_default",- "posthog_team"."feature_flag_confirmation_enabled",- "posthog_team"."feature_flag_confirmation_message",- "posthog_team"."default_evaluation_environments_enabled",- "posthog_team"."require_evaluation_environment_tags",- "posthog_team"."default_evaluation_contexts_enabled",- "posthog_team"."require_evaluation_contexts",- "posthog_team"."session_recording_version",- "posthog_team"."signup_token",- "posthog_team"."is_demo",- "posthog_team"."access_control",- "posthog_team"."week_start_day",- "posthog_team"."inject_web_apps",- "posthog_team"."test_account_filters",- "posthog_team"."test_account_filters_default_checked",- "posthog_team"."path_cleaning_filters",- "posthog_team"."timezone",- "posthog_team"."data_attributes",- "posthog_team"."person_display_name_properties",- "posthog_team"."live_events_columns",- "posthog_team"."recording_domains",- "posthog_team"."human_friendly_comparison_periods",- "posthog_team"."cookieless_server_hash_mode",- "posthog_team"."primary_dashboard_id",- "posthog_team"."default_data_theme",- "posthog_team"."extra_settings",- "posthog_team"."modifiers",- "posthog_team"."session_recording_retention_period_days",- "posthog_team"."plugins_opt_in",- "posthog_team"."opt_out_capture",- "posthog_team"."event_names",- "posthog_team"."event_names_with_usage",- "posthog_team"."event_properties",- "posthog_team"."event_properties_with_usage",- "posthog_team"."event_properties_numerical",- "posthog_team"."external_data_workspace_id",- "posthog_team"."external_data_workspace_last_synced_at",- "posthog_team"."api_query_rate_limit",- "posthog_team"."revenue_tracking_config",- "posthog_team"."drop_events_older_than",- "posthog_team"."base_currency",- "posthog_team"."business_model",- "posthog_user"."id",- "posthog_user"."password",- "posthog_user"."last_login",- "posthog_user"."first_name",- "posthog_user"."last_name",- "posthog_user"."is_staff",- "posthog_user"."date_joined",- "posthog_user"."uuid",- "posthog_user"."current_organization_id",- "posthog_user"."current_team_id",- "posthog_user"."email",- "posthog_user"."pending_email",- "posthog_user"."distinct_id",- "posthog_user"."is_email_verified",- "posthog_user"."credentials_reviewed_at",- "posthog_user"."requested_password_reset_at",- "posthog_user"."requested_2fa_reset_at",- "posthog_user"."has_seen_product_intro_for",- "posthog_user"."strapi_id",- "posthog_user"."is_active",- "posthog_user"."role_at_organization",- "posthog_user"."theme_mode",- "posthog_user"."partial_notification_settings",- "posthog_user"."anonymize_data",- "posthog_user"."allow_impersonation",- "posthog_user"."toolbar_mode",- "posthog_user"."hedgehog_config",- "posthog_user"."allow_sidebar_suggestions",- "posthog_user"."shortcut_position",- "posthog_user"."passkeys_enabled_for_2fa",- "posthog_user"."hide_mcp_hints",- "posthog_user"."ui_configuration",- "posthog_user"."onboarding_skipped_at",- "posthog_user"."onboarding_skipped_reason",- "posthog_user"."onboarding_skipped_organization_id",- "posthog_user"."onboarding_delegated_to_invite_id",- "posthog_user"."onboarding_delegated_to_organization_id",- "posthog_user"."onboarding_delegation_accepted_at",- "posthog_user"."events_column_config",- "posthog_user"."email_opt_in",- "T6"."id",- "T6"."password",- "T6"."last_login",- "T6"."first_name",- "T6"."last_name",- "T6"."is_staff",- "T6"."date_joined",- "T6"."uuid",- "T6"."current_organization_id",- "T6"."current_team_id",- "T6"."email",- "T6"."pending_email",- "T6"."distinct_id",- "T6"."is_email_verified",- "T6"."credentials_reviewed_at",- "T6"."requested_password_reset_at",- "T6"."requested_2fa_reset_at",- "T6"."has_seen_product_intro_for",- "T6"."strapi_id",- "T6"."is_active",- "T6"."role_at_organization",- "T6"."theme_mode",- "T6"."partial_notification_settings",- "T6"."anonymize_data",- "T6"."allow_impersonation",- "T6"."toolbar_mode",- "T6"."hedgehog_config",- "T6"."allow_sidebar_suggestions",- "T6"."shortcut_position",- "T6"."passkeys_enabled_for_2fa",- "T6"."hide_mcp_hints",- "T6"."ui_configuration",- "T6"."onboarding_skipped_at",- "T6"."onboarding_skipped_reason",- "T6"."onboarding_skipped_organization_id",- "T6"."onboarding_delegated_to_invite_id",- "T6"."onboarding_delegated_to_organization_id",- "T6"."onboarding_delegation_accepted_at",- "T6"."events_column_config",- "T6"."email_opt_in",- "posthog_text"."id",- "posthog_text"."body",- "posthog_text"."agent_context",- "posthog_text"."created_by_id",- "posthog_text"."last_modified_at",- "posthog_text"."last_modified_by_id",- "posthog_text"."team_id",- "posthog_buttontile"."id",- "posthog_buttontile"."url",- "posthog_buttontile"."text",- "posthog_buttontile"."placement",- "posthog_buttontile"."style",- "posthog_buttontile"."created_by_id",- "posthog_buttontile"."last_modified_at",- "posthog_buttontile"."last_modified_by_id",- "posthog_buttontile"."team_id",- "posthog_dashboardwidget"."id",- "posthog_dashboardwidget"."widget_type",- "posthog_dashboardwidget"."name",- "posthog_dashboardwidget"."description",- "posthog_dashboardwidget"."config",- "posthog_dashboardwidget"."created_by_id",- "posthog_dashboardwidget"."last_modified_at",- "posthog_dashboardwidget"."last_modified_by_id",- "posthog_dashboardwidget"."team_id",- "T10"."id",- "T10"."password",- "T10"."last_login",- "T10"."first_name",- "T10"."last_name",- "T10"."is_staff",- "T10"."date_joined",- "T10"."uuid",- "T10"."current_organization_id",- "T10"."current_team_id",- "T10"."email",- "T10"."pending_email",- "T10"."distinct_id",- "T10"."is_email_verified",- "T10"."credentials_reviewed_at",- "T10"."requested_password_reset_at",- "T10"."requested_2fa_reset_at",- "T10"."has_seen_product_intro_for",- "T10"."strapi_id",- "T10"."is_active",- "T10"."role_at_organization",- "T10"."theme_mode",- "T10"."partial_notification_settings",- "T10"."anonymize_data",- "T10"."allow_impersonation",- "T10"."toolbar_mode",- "T10"."hedgehog_config",- "T10"."allow_sidebar_suggestions",- "T10"."shortcut_position",- "T10"."passkeys_enabled_for_2fa",- "T10"."hide_mcp_hints",- "T10"."ui_configuration",- "T10"."onboarding_skipped_at",- "T10"."onboarding_skipped_reason",- "T10"."onboarding_skipped_organization_id",- "T10"."onboarding_delegated_to_invite_id",- "T10"."onboarding_delegated_to_organization_id",- "T10"."onboarding_delegation_accepted_at",- "T10"."events_column_config",- "T10"."email_opt_in",- "T11"."id",- "T11"."password",- "T11"."last_login",- "T11"."first_name",- "T11"."last_name",- "T11"."is_staff",- "T11"."date_joined",- "T11"."uuid",- "T11"."current_organization_id",- "T11"."current_team_id",- "T11"."email",- "T11"."pending_email",- "T11"."distinct_id",- "T11"."is_email_verified",- "T11"."credentials_reviewed_at",- "T11"."requested_password_reset_at",- "T11"."requested_2fa_reset_at",- "T11"."has_seen_product_intro_for",- "T11"."strapi_id",- "T11"."is_active",- "T11"."role_at_organization",- "T11"."theme_mode",- "T11"."partial_notification_settings",- "T11"."anonymize_data",- "T11"."allow_impersonation",- "T11"."toolbar_mode",- "T11"."hedgehog_config",- "T11"."allow_sidebar_suggestions",- "T11"."shortcut_position",- "T11"."passkeys_enabled_for_2fa",- "T11"."hide_mcp_hints",- "T11"."ui_configuration",- "T11"."onboarding_skipped_at",- "T11"."onboarding_skipped_reason",- "T11"."onboarding_skipped_organization_id",- "T11"."onboarding_delegated_to_invite_id",- "T11"."onboarding_delegated_to_organization_id",- "T11"."onboarding_delegation_accepted_at",- "T11"."events_column_config",- "T11"."email_opt_in"- FROM "posthog_dashboardtile"- INNER JOIN "posthog_dashboard" ON ("posthog_dashboardtile"."dashboard_id" = "posthog_dashboard"."id")- LEFT OUTER JOIN "posthog_dashboarditem" ON ("posthog_dashboardtile"."insight_id" = "posthog_dashboarditem"."id")- LEFT OUTER JOIN "posthog_team" ON ("posthog_dashboarditem"."team_id" = "posthog_team"."id")- LEFT OUTER JOIN "posthog_user" ON ("posthog_dashboarditem"."created_by_id" = "posthog_user"."id")- LEFT OUTER JOIN "posthog_user" "T6" ON ("posthog_dashboarditem"."last_modified_by_id" = "T6"."id")- LEFT OUTER JOIN "posthog_text" ON ("posthog_dashboardtile"."text_id" = "posthog_text"."id")- LEFT OUTER JOIN "posthog_buttontile" ON ("posthog_dashboardtile"."button_tile_id" = "posthog_buttontile"."id")- LEFT OUTER JOIN "posthog_dashboardwidget" ON ("posthog_dashboardtile"."widget_id" = "posthog_dashboardwidget"."id")- LEFT OUTER JOIN "posthog_user" "T10" ON ("posthog_dashboardwidget"."created_by_id" = "T10"."id")- LEFT OUTER JOIN "posthog_user" "T11" ON ("posthog_dashboardwidget"."last_modified_by_id" = "T11"."id")- WHERE (NOT ("posthog_dashboardtile"."deleted"- AND "posthog_dashboardtile"."deleted" IS NOT NULL)- AND NOT ("posthog_dashboard"."deleted")- AND "posthog_dashboardtile"."dashboard_id" = 99999- AND NOT ("posthog_dashboard"."deleted"- AND "posthog_dashboardtile"."deleted"- AND "posthog_dashboardtile"."deleted" IS NOT NULL)- AND (NOT "posthog_dashboarditem"."deleted"- OR "posthog_dashboardtile"."insight_id" IS NULL))- ORDER BY "posthog_dashboarditem"."order" ASC- '''-# ----# name: TestDashboard.test_adding_insights_is_not_nplus1_for_gets.2- '''- SELECT "posthog_organizationmembership"."id",- "posthog_organizationmembership"."organization_id",- "posthog_organizationmembership"."user_id",- "posthog_organizationmembership"."level",- "posthog_organizationmembership"."joined_at",- "posthog_organizationmembership"."updated_at",- "posthog_organizationmembership"."invited_by_id",- "posthog_organization"."id",- "posthog_organization"."name",- "posthog_organization"."slug",- "posthog_organization"."logo_media_id",- "posthog_organization"."created_at",- "posthog_organization"."updated_at",- "posthog_organization"."is_active",- "posthog_organization"."is_not_active_reason",- "posthog_organization"."session_cookie_age",- "posthog_organization"."is_member_join_email_enabled",- "posthog_organization"."is_ai_data_processing_approved",- "posthog_organization"."is_ai_training_opted_in",- "posthog_organization"."is_ai_training_locked",- "posthog_organization"."is_ai_training_cta_shown",- "posthog_organization"."enforce_2fa",- "posthog_organization"."enforce_verified_domains",- "posthog_organization"."members_can_invite",- "posthog_organization"."members_can_create_projects",- "posthog_organization"."members_can_use_personal_api_keys",- "posthog_organization"."members_can_see_org_members",- "posthog_organization"."uses_most_specific_access_resolution",- "posthog_organization"."allow_publicly_shared_resources",- "posthog_organization"."member_notice",- "posthog_organization"."read_only_mcp_access",- "posthog_organization"."default_role_id",- "posthog_organization"."plugins_access_level",- "posthog_organization"."for_internal_metrics",- "posthog_organization"."default_anonymize_ips",- "posthog_organization"."is_pending_deletion",- "posthog_organization"."customer_id",- "posthog_organization"."available_product_features",- "posthog_organization"."usage",- "posthog_organization"."never_drop_data",- "posthog_organization"."customer_trust_scores",- "posthog_organization"."has_active_subscription",- "posthog_organization"."setup_section_2_completed",- "posthog_organization"."personalization",- "posthog_organization"."domain_whitelist",- "posthog_organization"."is_platform"- FROM "posthog_organizationmembership"- INNER JOIN "posthog_organization" ON ("posthog_organizationmembership"."organization_id" = "posthog_organization"."id")- WHERE ("posthog_organizationmembership"."organization_id" = '00000000-0000-0000-0000-000000000000'::uuid- AND "posthog_organizationmembership"."user_id" = 99999)- LIMIT 21- '''-# ----# name: TestDashboard.test_adding_insights_is_not_nplus1_for_gets.20- '''- SELECT "posthog_tag"."name" AS "tag__name"- FROM "posthog_taggeditem"- INNER JOIN "posthog_tag" ON ("posthog_taggeditem"."tag_id" = "posthog_tag"."id")- WHERE ("posthog_taggeditem"."content_type_id" = 99999- AND "posthog_taggeditem"."object_id" = 99999)- '''-# ----# name: TestDashboard.test_adding_insights_is_not_nplus1_for_gets.21- '''- SELECT "posthog_user"."id",- "posthog_user"."password",- "posthog_user"."last_login",- "posthog_user"."first_name",- "posthog_user"."last_name",- "posthog_user"."is_staff",- "posthog_user"."date_joined",- "posthog_user"."uuid",- "posthog_user"."current_organization_id",- "posthog_user"."current_team_id",- "posthog_user"."email",- "posthog_user"."pending_email",- "posthog_user"."distinct_id",- "posthog_user"."is_email_verified",- "posthog_user"."credentials_reviewed_at",- "posthog_user"."requested_2fa_reset_at",- "posthog_user"."has_seen_product_intro_for",- "posthog_user"."strapi_id",- "posthog_user"."is_active",- "posthog_user"."role_at_organization",- "posthog_user"."theme_mode",- "posthog_user"."partial_notification_settings",- "posthog_user"."anonymize_data",- "posthog_user"."allow_impersonation",- "posthog_user"."toolbar_mode",- "posthog_user"."hedgehog_config",- "posthog_user"."allow_sidebar_suggestions",- "posthog_user"."shortcut_position",- "posthog_user"."passkeys_enabled_for_2fa",- "posthog_user"."hide_mcp_hints",- "posthog_user"."ui_configuration",- "posthog_user"."onboarding_skipped_at",- "posthog_user"."onboarding_skipped_reason",- "posthog_user"."onboarding_skipped_organization_id",- "posthog_user"."onboarding_delegated_to_invite_id",- "posthog_user"."onboarding_delegated_to_organization_id",- "posthog_user"."onboarding_delegation_accepted_at",- "posthog_user"."events_column_config",- "posthog_user"."email_opt_in",- "posthog_organization"."id",- "posthog_organization"."name",- "posthog_organization"."slug",- "posthog_organization"."logo_media_id",- "posthog_organization"."created_at",- "posthog_organization"."updated_at",- "posthog_organization"."is_active",- "posthog_organization"."is_not_active_reason",- "posthog_organization"."session_cookie_age",- "posthog_organization"."is_member_join_email_enabled",- "posthog_organization"."is_ai_data_processing_approved",- "posthog_organization"."is_ai_training_opted_in",- "posthog_organization"."is_ai_training_locked",- "posthog_organization"."is_ai_training_cta_shown",- "posthog_organization"."enforce_2fa",- "posthog_organization"."enforce_verified_domains",- "posthog_organization"."members_can_invite",- "posthog_organization"."members_can_create_projects",- "posthog_organization"."members_can_use_personal_api_keys",- "posthog_organization"."members_can_see_org_members",- "posthog_organization"."uses_most_specific_access_resolution",- "posthog_organization"."allow_publicly_shared_resources",- "posthog_organization"."member_notice",- "posthog_organization"."read_only_mcp_access",- "posthog_organization"."default_role_id",- "posthog_organization"."plugins_access_level",- "posthog_organization"."for_internal_metrics",- "posthog_organization"."default_anonymize_ips",- "posthog_organization"."is_pending_deletion",- "posthog_organization"."customer_id",- "posthog_organization"."available_product_features",- "posthog_organization"."usage",- "posthog_organization"."never_drop_data",- "posthog_organization"."customer_trust_scores",- "posthog_organization"."has_active_subscription",- "posthog_organization"."setup_section_2_completed",- "posthog_organization"."personalization",- "posthog_organization"."domain_whitelist",- "posthog_organization"."is_platform"- FROM "posthog_user"- LEFT OUTER JOIN "posthog_organization" ON ("posthog_user"."current_organization_id" = "posthog_organization"."id")- WHERE ("posthog_user"."is_active"- AND "posthog_user"."id" = 99999)- '''-# ----# name: TestDashboard.test_adding_insights_is_not_nplus1_for_gets.22- '''- SELECT "posthog_team"."id",+ SELECT "posthog_team"."id","posthog_team"."uuid","posthog_team"."organization_id","posthog_team"."parent_team_id",@@ -27235,1079 +26687,7 @@WHERE "posthog_organizationmembership"."user_id" = 99999'''# ----# name: TestDashboard.test_listing_dashboards_is_not_nplus1.463- '''- SELECT "posthog_dashboard"."id" AS "id"- FROM "posthog_dashboard"- INNER JOIN "posthog_team" ON ("posthog_dashboard"."team_id" = "posthog_team"."id")- WHERE (NOT ("posthog_dashboard"."deleted")- AND ("posthog_dashboard"."team_id" =- (SELECT "U0"."parent_team_id" AS "parent_team_id"- FROM "posthog_team" "U0"- WHERE "U0"."id" = 99999- LIMIT 1)- OR ("posthog_team"."parent_team_id" IS NULL- AND "posthog_dashboard"."team_id" = 99999))- AND "posthog_dashboard"."id" IN (1,- 2,- 3,- 4,- 5 /* ... */))- '''-# ----# name: TestDashboard.test_listing_dashboards_is_not_nplus1.464- '''- SELECT "posthog_dashboard"."id" AS "id",- "posthog_dashboard"."name" AS "name"- FROM "posthog_dashboard"- WHERE (NOT ("posthog_dashboard"."deleted")- AND "posthog_dashboard"."id" IN (1,- 2,- 3,- 4,- 5 /* ... */))- '''-# ----# name: TestDashboard.test_listing_dashboards_is_not_nplus1.465- '''- 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.466- '''- 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"."quick_filter_ids",- "posthog_dashboard"."customization",- "posthog_dashboard"."deprecated_tags",- "posthog_dashboard"."tags",- "posthog_dashboard"."share_token",- "posthog_dashboard"."is_shared"- FROM "posthog_dashboard"- WHERE (NOT ("posthog_dashboard"."deleted")- AND "posthog_dashboard"."id" IN (1,- 2,- 3,- 4,- 5 /* ... */))- '''-# ----# name: TestDashboard.test_listing_dashboards_is_not_nplus1.467- '''- 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"."session_recording_retention_period_days",- "posthog_team"."external_data_workspace_id",- "posthog_team"."external_data_workspace_last_synced_at",- "posthog_team"."api_query_rate_limit",- "posthog_team"."drop_events_older_than",- "posthog_team"."base_currency",- "posthog_team"."business_model"- FROM "posthog_team"- WHERE "posthog_team"."id" = 99999- LIMIT 21- '''-# ----# name: TestDashboard.test_listing_dashboards_is_not_nplus1.468- '''- SELECT "posthog_organization"."id",- "posthog_organization"."name",- "posthog_organization"."slug",- "posthog_organization"."logo_media_id",- "posthog_organization"."created_at",- "posthog_organization"."updated_at",- "posthog_organization"."is_active",- "posthog_organization"."is_not_active_reason",- "posthog_organization"."session_cookie_age",- "posthog_organization"."is_member_join_email_enabled",- "posthog_organization"."is_ai_data_processing_approved",- "posthog_organization"."is_ai_training_opted_in",- "posthog_organization"."is_ai_training_locked",- "posthog_organization"."is_ai_training_cta_shown",- "posthog_organization"."enforce_2fa",- "posthog_organization"."enforce_verified_domains",- "posthog_organization"."members_can_invite",- "posthog_organization"."members_can_create_projects",- "posthog_organization"."members_can_use_personal_api_keys",- "posthog_organization"."members_can_see_org_members",- "posthog_organization"."uses_most_specific_access_resolution",- "posthog_organization"."allow_publicly_shared_resources",- "posthog_organization"."member_notice",- "posthog_organization"."read_only_mcp_access",- "posthog_organization"."default_role_id",- "posthog_organization"."plugins_access_level",- "posthog_organization"."for_internal_metrics",- "posthog_organization"."default_anonymize_ips",- "posthog_organization"."is_pending_deletion",- "posthog_organization"."customer_id",- "posthog_organization"."available_product_features",- "posthog_organization"."usage",- "posthog_organization"."never_drop_data",- "posthog_organization"."customer_trust_scores",- "posthog_organization"."has_active_subscription",- "posthog_organization"."setup_section_2_completed",- "posthog_organization"."personalization",- "posthog_organization"."domain_whitelist",- "posthog_organization"."is_platform"- FROM "posthog_organization"- WHERE "posthog_organization"."id" = '00000000-0000-0000-0000-000000000000'::uuid- LIMIT 21- '''-# ----# name: TestDashboard.test_listing_dashboards_is_not_nplus1.469- '''- 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"."session_recording_retention_period_days",- "posthog_team"."external_data_workspace_id",- "posthog_team"."external_data_workspace_last_synced_at",- "posthog_team"."api_query_rate_limit",- "posthog_team"."drop_events_older_than",- "posthog_team"."base_currency",- "posthog_team"."business_model"- FROM "posthog_team"- WHERE "posthog_team"."id" = 99999- LIMIT 21- '''-# ----# name: TestDashboard.test_listing_dashboards_is_not_nplus1.47- '''- SELECT "ee_accesscontrol"."id",- "ee_accesscontrol"."team_id",- "ee_accesscontrol"."access_level",- "ee_accesscontrol"."resource",- "ee_accesscontrol"."resource_id",- "ee_accesscontrol"."organization_member_id",- "ee_accesscontrol"."role_id",- "ee_accesscontrol"."created_by_id",- "ee_accesscontrol"."created_at",- "ee_accesscontrol"."updated_at"- FROM "ee_accesscontrol"- LEFT OUTER JOIN "posthog_organizationmembership" ON ("ee_accesscontrol"."organization_member_id" = "posthog_organizationmembership"."id")- WHERE (("ee_accesscontrol"."organization_member_id" IS NULL- AND "ee_accesscontrol"."role_id" IS NULL- AND "ee_accesscontrol"."team_id" = 99999)- OR ("posthog_organizationmembership"."organization_id" = '00000000-0000-0000-0000-000000000000'::uuid- AND "posthog_organizationmembership"."user_id" = 99999- AND "ee_accesscontrol"."role_id" IS NULL- AND "ee_accesscontrol"."team_id" = 99999))- '''-# ----# name: TestDashboard.test_listing_dashboards_is_not_nplus1.470- '''- 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.471- '''- SELECT "posthog_insightviewed"."id",- "posthog_insightviewed"."team_id",- "posthog_insightviewed"."user_id",- "posthog_insightviewed"."insight_id",- "posthog_insightviewed"."last_viewed_at",- "posthog_insightviewed"."source",- "posthog_insightviewed"."dashboard_id"- FROM "posthog_insightviewed"- WHERE ("posthog_insightviewed"."insight_id" = 99999- AND "posthog_insightviewed"."team_id" = 99999- AND "posthog_insightviewed"."user_id" = 99999)- LIMIT 21- FOR- UPDATE- '''-# ----# name: TestDashboard.test_listing_dashboards_is_not_nplus1.472- '''- SELECT "posthog_organization"."id",- "posthog_organization"."name",- "posthog_organization"."slug",- "posthog_organization"."logo_media_id",- "posthog_organization"."created_at",- "posthog_organization"."updated_at",- "posthog_organization"."is_active",- "posthog_organization"."is_not_active_reason",- "posthog_organization"."session_cookie_age",- "posthog_organization"."is_member_join_email_enabled",- "posthog_organization"."is_ai_data_processing_approved",- "posthog_organization"."is_ai_training_opted_in",- "posthog_organization"."is_ai_training_locked",- "posthog_organization"."is_ai_training_cta_shown",- "posthog_organization"."enforce_2fa",- "posthog_organization"."enforce_verified_domains",- "posthog_organization"."members_can_invite",- "posthog_organization"."members_can_create_projects",- "posthog_organization"."members_can_use_personal_api_keys",- "posthog_organization"."members_can_see_org_members",- "posthog_organization"."uses_most_specific_access_resolution",- "posthog_organization"."allow_publicly_shared_resources",- "posthog_organization"."member_notice",- "posthog_organization"."read_only_mcp_access",- "posthog_organization"."default_role_id",- "posthog_organization"."plugins_access_level",- "posthog_organization"."for_internal_metrics",- "posthog_organization"."default_anonymize_ips",- "posthog_organization"."is_pending_deletion",- "posthog_organization"."customer_id",- "posthog_organization"."available_product_features",- "posthog_organization"."usage",- "posthog_organization"."never_drop_data",- "posthog_organization"."customer_trust_scores",- "posthog_organization"."has_active_subscription",- "posthog_organization"."setup_section_2_completed",- "posthog_organization"."personalization",- "posthog_organization"."domain_whitelist",- "posthog_organization"."is_platform"- FROM "posthog_organization"- WHERE "posthog_organization"."id" = '00000000-0000-0000-0000-000000000000'::uuid- LIMIT 21- '''-# ----# name: TestDashboard.test_listing_dashboards_is_not_nplus1.473- '''- 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"."session_recording_retention_period_days",- "posthog_team"."external_data_workspace_id",- "posthog_team"."external_data_workspace_last_synced_at",- "posthog_team"."api_query_rate_limit",- "posthog_team"."drop_events_older_than",- "posthog_team"."base_currency",- "posthog_team"."business_model"- FROM "posthog_team"- WHERE "posthog_team"."id" = 99999- LIMIT 21- '''-# ----# name: TestDashboard.test_listing_dashboards_is_not_nplus1.474- '''- SELECT "posthog_dashboardtile"."id",- "posthog_dashboardtile"."dashboard_id",- "posthog_dashboardtile"."insight_id",- "posthog_dashboardtile"."text_id",- "posthog_dashboardtile"."button_tile_id",- "posthog_dashboardtile"."widget_id",- "posthog_dashboardtile"."team_id",- "posthog_dashboardtile"."layouts",- "posthog_dashboardtile"."color",- "posthog_dashboardtile"."filters_hash",- "posthog_dashboardtile"."last_refresh",- "posthog_dashboardtile"."refreshing",- "posthog_dashboardtile"."refresh_attempt",- "posthog_dashboardtile"."filters_overrides",- "posthog_dashboardtile"."show_description",- "posthog_dashboardtile"."transparent_background",- "posthog_dashboardtile"."group_key",- "posthog_dashboardtile"."badge",- "posthog_dashboardtile"."deleted"- FROM "posthog_dashboardtile"- INNER JOIN "posthog_dashboard" ON ("posthog_dashboardtile"."dashboard_id" = "posthog_dashboard"."id")- WHERE (NOT ("posthog_dashboardtile"."deleted"- AND "posthog_dashboardtile"."deleted" IS NOT NULL)- AND NOT ("posthog_dashboard"."deleted")- AND "posthog_dashboardtile"."insight_id" = 99999)- '''-# ----# name: TestDashboard.test_listing_dashboards_is_not_nplus1.475- '''- SELECT "posthog_dashboardtile"."id",- "posthog_dashboardtile"."dashboard_id",- "posthog_dashboardtile"."insight_id",- "posthog_dashboardtile"."text_id",- "posthog_dashboardtile"."button_tile_id",- "posthog_dashboardtile"."widget_id",- "posthog_dashboardtile"."team_id",- "posthog_dashboardtile"."layouts",- "posthog_dashboardtile"."color",- "posthog_dashboardtile"."filters_hash",- "posthog_dashboardtile"."last_refresh",- "posthog_dashboardtile"."refreshing",- "posthog_dashboardtile"."refresh_attempt",- "posthog_dashboardtile"."filters_overrides",- "posthog_dashboardtile"."show_description",- "posthog_dashboardtile"."transparent_background",- "posthog_dashboardtile"."group_key",- "posthog_dashboardtile"."badge",- "posthog_dashboardtile"."deleted"- FROM "posthog_dashboardtile"- INNER JOIN "posthog_dashboard" ON ("posthog_dashboardtile"."dashboard_id" = "posthog_dashboard"."id")- WHERE (NOT ("posthog_dashboardtile"."deleted"- AND "posthog_dashboardtile"."deleted" IS NOT NULL)- AND NOT ("posthog_dashboard"."deleted")- AND "posthog_dashboardtile"."insight_id" = 99999)- '''-# ----# name: TestDashboard.test_listing_dashboards_is_not_nplus1.476- '''- SELECT "posthog_insightvariable"."id",- "posthog_insightvariable"."name",- "posthog_insightvariable"."code_name",- "posthog_insightvariable"."type",- "posthog_insightvariable"."default_value",- "posthog_insightvariable"."is_multi"- FROM "posthog_insightvariable"- INNER JOIN "posthog_team" ON ("posthog_insightvariable"."team_id" = "posthog_team"."id")- WHERE ("posthog_insightvariable"."team_id" =- (SELECT "U0"."parent_team_id" AS "parent_team_id"- FROM "posthog_team" "U0"- WHERE "U0"."id" = 99999- LIMIT 1)- OR ("posthog_team"."parent_team_id" IS NULL- AND "posthog_insightvariable"."team_id" = 99999))- ORDER BY "posthog_insightvariable"."name" ASC- '''-# ----# name: TestDashboard.test_listing_dashboards_is_not_nplus1.477- '''- SELECT "posthog_teamrevenueanalyticsconfig"."team_id",- "posthog_teamrevenueanalyticsconfig"."filter_test_accounts",- "posthog_teamrevenueanalyticsconfig"."notified_first_sync",- "posthog_teamrevenueanalyticsconfig"."events",- "posthog_teamrevenueanalyticsconfig"."goals",- "posthog_teamrevenueanalyticsconfig"."base_currency"- FROM "posthog_teamrevenueanalyticsconfig"- WHERE "posthog_teamrevenueanalyticsconfig"."team_id" = 99999- LIMIT 21- '''-# ----# name: TestDashboard.test_listing_dashboards_is_not_nplus1.478- '''- SELECT "posthog_teammarketinganalyticsconfig"."team_id",- "posthog_teammarketinganalyticsconfig"."attribution_window_days",- "posthog_teammarketinganalyticsconfig"."attribution_mode",- "posthog_teammarketinganalyticsconfig"."filter_test_accounts",- "posthog_teammarketinganalyticsconfig"."sources_map",- "posthog_teammarketinganalyticsconfig"."conversion_goals",- "posthog_teammarketinganalyticsconfig"."campaign_name_mappings",- "posthog_teammarketinganalyticsconfig"."custom_source_mappings",- "posthog_teammarketinganalyticsconfig"."campaign_field_preferences"- FROM "posthog_teammarketinganalyticsconfig"- WHERE "posthog_teammarketinganalyticsconfig"."team_id" = 99999- LIMIT 21- '''-# ----# name: TestDashboard.test_listing_dashboards_is_not_nplus1.479- '''- SELECT "customer_analytics_teamcustomeranalyticsconfig"."team_id",- "customer_analytics_teamcustomeranalyticsconfig"."activity_event",- "customer_analytics_teamcustomeranalyticsconfig"."signup_pageview_event",- "customer_analytics_teamcustomeranalyticsconfig"."signup_event",- "customer_analytics_teamcustomeranalyticsconfig"."subscription_event",- "customer_analytics_teamcustomeranalyticsconfig"."payment_event",- "customer_analytics_teamcustomeranalyticsconfig"."account_group_type_index",- "customer_analytics_teamcustomeranalyticsconfig"."default_pinned_properties",- "customer_analytics_teamcustomeranalyticsconfig"."account_track_rules",- "customer_analytics_teamcustomeranalyticsconfig"."account_track_rules_enabled_at",- "customer_analytics_teamcustomeranalyticsconfig"."properties"- FROM "customer_analytics_teamcustomeranalyticsconfig"- WHERE "customer_analytics_teamcustomeranalyticsconfig"."team_id" = 99999- LIMIT 21- '''-# ----# name: TestDashboard.test_listing_dashboards_is_not_nplus1.48- '''- SELECT "posthog_organizationmembership"."id",- "posthog_organizationmembership"."organization_id",- "posthog_organizationmembership"."user_id",- "posthog_organizationmembership"."level",- "posthog_organizationmembership"."joined_at",- "posthog_organizationmembership"."updated_at",- "posthog_organizationmembership"."invited_by_id",- "posthog_organization"."id",- "posthog_organization"."name",- "posthog_organization"."slug",- "posthog_organization"."logo_media_id",- "posthog_organization"."created_at",- "posthog_organization"."updated_at",- "posthog_organization"."is_active",- "posthog_organization"."is_not_active_reason",- "posthog_organization"."session_cookie_age",- "posthog_organization"."is_member_join_email_enabled",- "posthog_organization"."is_ai_data_processing_approved",- "posthog_organization"."is_ai_training_opted_in",- "posthog_organization"."is_ai_training_locked",- "posthog_organization"."is_ai_training_cta_shown",- "posthog_organization"."enforce_2fa",- "posthog_organization"."enforce_verified_domains",- "posthog_organization"."members_can_invite",- "posthog_organization"."members_can_create_projects",- "posthog_organization"."members_can_use_personal_api_keys",- "posthog_organization"."members_can_see_org_members",- "posthog_organization"."uses_most_specific_access_resolution",- "posthog_organization"."allow_publicly_shared_resources",- "posthog_organization"."member_notice",- "posthog_organization"."read_only_mcp_access",- "posthog_organization"."default_role_id",- "posthog_organization"."plugins_access_level",- "posthog_organization"."for_internal_metrics",- "posthog_organization"."default_anonymize_ips",- "posthog_organization"."is_pending_deletion",- "posthog_organization"."customer_id",- "posthog_organization"."available_product_features",- "posthog_organization"."usage",- "posthog_organization"."never_drop_data",- "posthog_organization"."customer_trust_scores",- "posthog_organization"."has_active_subscription",- "posthog_organization"."setup_section_2_completed",- "posthog_organization"."personalization",- "posthog_organization"."domain_whitelist",- "posthog_organization"."is_platform"- FROM "posthog_organizationmembership"- INNER JOIN "posthog_organization" ON ("posthog_organizationmembership"."organization_id" = "posthog_organization"."id")- WHERE "posthog_organizationmembership"."user_id" = 99999- '''-# ----# name: TestDashboard.test_listing_dashboards_is_not_nplus1.480- '''- SELECT "posthog_tag"."name" AS "tag__name"- FROM "posthog_taggeditem"- INNER JOIN "posthog_tag" ON ("posthog_taggeditem"."tag_id" = "posthog_tag"."id")- WHERE ("posthog_taggeditem"."content_type_id" = 99999- AND "posthog_taggeditem"."object_id" = 99999)- '''-# ----# name: TestDashboard.test_listing_dashboards_is_not_nplus1.481- '''- SELECT "posthog_user"."id",- "posthog_user"."password",- "posthog_user"."last_login",- "posthog_user"."first_name",- "posthog_user"."last_name",- "posthog_user"."is_staff",- "posthog_user"."date_joined",- "posthog_user"."uuid",- "posthog_user"."current_organization_id",- "posthog_user"."current_team_id",- "posthog_user"."email",- "posthog_user"."pending_email",- "posthog_user"."distinct_id",- "posthog_user"."is_email_verified",- "posthog_user"."credentials_reviewed_at",- "posthog_user"."requested_2fa_reset_at",- "posthog_user"."has_seen_product_intro_for",- "posthog_user"."strapi_id",- "posthog_user"."is_active",- "posthog_user"."role_at_organization",- "posthog_user"."theme_mode",- "posthog_user"."partial_notification_settings",- "posthog_user"."anonymize_data",- "posthog_user"."allow_impersonation",- "posthog_user"."toolbar_mode",- "posthog_user"."hedgehog_config",- "posthog_user"."allow_sidebar_suggestions",- "posthog_user"."shortcut_position",- "posthog_user"."passkeys_enabled_for_2fa",- "posthog_user"."hide_mcp_hints",- "posthog_user"."ui_configuration",- "posthog_user"."onboarding_skipped_at",- "posthog_user"."onboarding_skipped_reason",- "posthog_user"."onboarding_skipped_organization_id",- "posthog_user"."onboarding_delegated_to_invite_id",- "posthog_user"."onboarding_delegated_to_organization_id",- "posthog_user"."onboarding_delegation_accepted_at",- "posthog_user"."events_column_config",- "posthog_user"."email_opt_in",- "posthog_organization"."id",- "posthog_organization"."name",- "posthog_organization"."slug",- "posthog_organization"."logo_media_id",- "posthog_organization"."created_at",- "posthog_organization"."updated_at",- "posthog_organization"."is_active",- "posthog_organization"."is_not_active_reason",- "posthog_organization"."session_cookie_age",- "posthog_organization"."is_member_join_email_enabled",- "posthog_organization"."is_ai_data_processing_approved",- "posthog_organization"."is_ai_training_opted_in",- "posthog_organization"."is_ai_training_locked",- "posthog_organization"."is_ai_training_cta_shown",- "posthog_organization"."enforce_2fa",- "posthog_organization"."enforce_verified_domains",- "posthog_organization"."members_can_invite",- "posthog_organization"."members_can_create_projects",- "posthog_organization"."members_can_use_personal_api_keys",- "posthog_organization"."members_can_see_org_members",- "posthog_organization"."uses_most_specific_access_resolution",- "posthog_organization"."allow_publicly_shared_resources",- "posthog_organization"."member_notice",- "posthog_organization"."read_only_mcp_access",- "posthog_organization"."default_role_id",- "posthog_organization"."plugins_access_level",- "posthog_organization"."for_internal_metrics",- "posthog_organization"."default_anonymize_ips",- "posthog_organization"."is_pending_deletion",- "posthog_organization"."customer_id",- "posthog_organization"."available_product_features",- "posthog_organization"."usage",- "posthog_organization"."never_drop_data",- "posthog_organization"."customer_trust_scores",- "posthog_organization"."has_active_subscription",- "posthog_organization"."setup_section_2_completed",- "posthog_organization"."personalization",- "posthog_organization"."domain_whitelist",- "posthog_organization"."is_platform"- FROM "posthog_user"- LEFT OUTER JOIN "posthog_organization" ON ("posthog_user"."current_organization_id" = "posthog_organization"."id")- WHERE ("posthog_user"."is_active"- AND "posthog_user"."id" = 99999)- '''-# ----# name: TestDashboard.test_listing_dashboards_is_not_nplus1.482- '''- 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"."session_recording_retention_period_days",- "posthog_team"."external_data_workspace_id",- "posthog_team"."external_data_workspace_last_synced_at",- "posthog_team"."api_query_rate_limit",- "posthog_team"."drop_events_older_than",- "posthog_team"."base_currency",- "posthog_team"."business_model",- "posthog_organization"."id",- "posthog_organization"."name",- "posthog_organization"."slug",- "posthog_organization"."logo_media_id",- "posthog_organization"."created_at",- "posthog_organization"."updated_at",- "posthog_organization"."is_active",- "posthog_organization"."is_not_active_reason",- "posthog_organization"."session_cookie_age",- "posthog_organization"."is_member_join_email_enabled",- "posthog_organization"."is_ai_data_processing_approved",- "posthog_organization"."is_ai_training_opted_in",- "posthog_organization"."is_ai_training_locked",- "posthog_organization"."is_ai_training_cta_shown",- "posthog_organization"."enforce_2fa",- "posthog_organization"."enforce_verified_domains",- "posthog_organization"."members_can_invite",- "posthog_organization"."members_can_create_projects",- "posthog_organization"."members_can_use_personal_api_keys",- "posthog_organization"."members_can_see_org_members",- "posthog_organization"."uses_most_specific_access_resolution",- "posthog_organization"."allow_publicly_shared_resources",- "posthog_organization"."member_notice",- "posthog_organization"."read_only_mcp_access",- "posthog_organization"."default_role_id",- "posthog_organization"."plugins_access_level",- "posthog_organization"."for_internal_metrics",- "posthog_organization"."default_anonymize_ips",- "posthog_organization"."is_pending_deletion",- "posthog_organization"."customer_id",- "posthog_organization"."available_product_features",- "posthog_organization"."usage",- "posthog_organization"."never_drop_data",- "posthog_organization"."customer_trust_scores",- "posthog_organization"."has_active_subscription",- "posthog_organization"."setup_section_2_completed",- "posthog_organization"."personalization",- "posthog_organization"."domain_whitelist",- "posthog_organization"."is_platform"- FROM "posthog_team"- INNER JOIN "posthog_organization" ON ("posthog_team"."organization_id" = "posthog_organization"."id")- WHERE "posthog_team"."id" = 99999- LIMIT 21- '''-# ----# name: TestDashboard.test_listing_dashboards_is_not_nplus1.483- '''- SELECT "posthog_organizationmembership"."id",- "posthog_organizationmembership"."organization_id",- "posthog_organizationmembership"."user_id",- "posthog_organizationmembership"."level",- "posthog_organizationmembership"."joined_at",- "posthog_organizationmembership"."updated_at",- "posthog_organizationmembership"."invited_by_id",- "posthog_organization"."id",- "posthog_organization"."name",- "posthog_organization"."slug",- "posthog_organization"."logo_media_id",- "posthog_organization"."created_at",- "posthog_organization"."updated_at",- "posthog_organization"."is_active",- "posthog_organization"."is_not_active_reason",- "posthog_organization"."session_cookie_age",- "posthog_organization"."is_member_join_email_enabled",- "posthog_organization"."is_ai_data_processing_approved",- "posthog_organization"."is_ai_training_opted_in",- "posthog_organization"."is_ai_training_locked",- "posthog_organization"."is_ai_training_cta_shown",- "posthog_organization"."enforce_2fa",- "posthog_organization"."enforce_verified_domains",- "posthog_organization"."members_can_invite",- "posthog_organization"."members_can_create_projects",- "posthog_organization"."members_can_use_personal_api_keys",- "posthog_organization"."members_can_see_org_members",- "posthog_organization"."uses_most_specific_access_resolution",- "posthog_organization"."allow_publicly_shared_resources",- "posthog_organization"."member_notice",- "posthog_organization"."read_only_mcp_access",- "posthog_organization"."default_role_id",- "posthog_organization"."plugins_access_level",- "posthog_organization"."for_internal_metrics",- "posthog_organization"."default_anonymize_ips",- "posthog_organization"."is_pending_deletion",- "posthog_organization"."customer_id",- "posthog_organization"."available_product_features",- "posthog_organization"."usage",- "posthog_organization"."never_drop_data",- "posthog_organization"."customer_trust_scores",- "posthog_organization"."has_active_subscription",- "posthog_organization"."setup_section_2_completed",- "posthog_organization"."personalization",- "posthog_organization"."domain_whitelist",- "posthog_organization"."is_platform"- FROM "posthog_organizationmembership"- INNER JOIN "posthog_organization" ON ("posthog_organizationmembership"."organization_id" = "posthog_organization"."id")- WHERE ("posthog_organizationmembership"."organization_id" = '00000000-0000-0000-0000-000000000000'::uuid- AND "posthog_organizationmembership"."user_id" = 99999)- LIMIT 21- '''-# ----# name: TestDashboard.test_listing_dashboards_is_not_nplus1.484- '''- SELECT "ee_accesscontrol"."id",- "ee_accesscontrol"."team_id",- "ee_accesscontrol"."access_level",- "ee_accesscontrol"."resource",- "ee_accesscontrol"."resource_id",- "ee_accesscontrol"."organization_member_id",- "ee_accesscontrol"."role_id",- "ee_accesscontrol"."created_by_id",- "ee_accesscontrol"."created_at",- "ee_accesscontrol"."updated_at"- FROM "ee_accesscontrol"- LEFT OUTER JOIN "posthog_organizationmembership" ON ("ee_accesscontrol"."organization_member_id" = "posthog_organizationmembership"."id")- WHERE (("ee_accesscontrol"."organization_member_id" IS NULL- AND "ee_accesscontrol"."role_id" IS NULL- AND "ee_accesscontrol"."team_id" = 99999)- OR ("posthog_organizationmembership"."organization_id" = '00000000-0000-0000-0000-000000000000'::uuid- AND "posthog_organizationmembership"."user_id" = 99999- AND "ee_accesscontrol"."role_id" IS NULL- AND "ee_accesscontrol"."team_id" = 99999))- '''-# ----# name: TestDashboard.test_listing_dashboards_is_not_nplus1.485- '''- SELECT "posthog_organizationmembership"."id",- "posthog_organizationmembership"."organization_id",- "posthog_organizationmembership"."user_id",- "posthog_organizationmembership"."level",- "posthog_organizationmembership"."joined_at",- "posthog_organizationmembership"."updated_at",- "posthog_organizationmembership"."invited_by_id",- "posthog_organization"."id",- "posthog_organization"."name",- "posthog_organization"."slug",- "posthog_organization"."logo_media_id",- "posthog_organization"."created_at",- "posthog_organization"."updated_at",- "posthog_organization"."is_active",- "posthog_organization"."is_not_active_reason",- "posthog_organization"."session_cookie_age",- "posthog_organization"."is_member_join_email_enabled",- "posthog_organization"."is_ai_data_processing_approved",- "posthog_organization"."is_ai_training_opted_in",- "posthog_organization"."is_ai_training_locked",- "posthog_organization"."is_ai_training_cta_shown",- "posthog_organization"."enforce_2fa",- "posthog_organization"."enforce_verified_domains",- "posthog_organization"."members_can_invite",- "posthog_organization"."members_can_create_projects",- "posthog_organization"."members_can_use_personal_api_keys",- "posthog_organization"."members_can_see_org_members",- "posthog_organization"."uses_most_specific_access_resolution",- "posthog_organization"."allow_publicly_shared_resources",- "posthog_organization"."member_notice",- "posthog_organization"."read_only_mcp_access",- "posthog_organization"."default_role_id",- "posthog_organization"."plugins_access_level",- "posthog_organization"."for_internal_metrics",- "posthog_organization"."default_anonymize_ips",- "posthog_organization"."is_pending_deletion",- "posthog_organization"."customer_id",- "posthog_organization"."available_product_features",- "posthog_organization"."usage",- "posthog_organization"."never_drop_data",- "posthog_organization"."customer_trust_scores",- "posthog_organization"."has_active_subscription",- "posthog_organization"."setup_section_2_completed",- "posthog_organization"."personalization",- "posthog_organization"."domain_whitelist",- "posthog_organization"."is_platform"- FROM "posthog_organizationmembership"- INNER JOIN "posthog_organization" ON ("posthog_organizationmembership"."organization_id" = "posthog_organization"."id")- WHERE "posthog_organizationmembership"."user_id" = 99999- '''-# ----# name: TestDashboard.test_listing_dashboards_is_not_nplus1.486+# name: TestDashboard.test_listing_dashboards_is_not_nplus1.463'''SELECT "posthog_dashboard"."id" AS "id"FROM "posthog_dashboard"@@ -28327,7 +26707,7 @@5 /* ... */))'''# ----# name: TestDashboard.test_listing_dashboards_is_not_nplus1.487+# name: TestDashboard.test_listing_dashboards_is_not_nplus1.464'''SELECT "posthog_dashboard"."id" AS "id","posthog_dashboard"."name" AS "name"@@ -28340,7 +26720,7 @@5 /* ... */))'''# ----# name: TestDashboard.test_listing_dashboards_is_not_nplus1.488+# name: TestDashboard.test_listing_dashboards_is_not_nplus1.465'''SELECT COUNT(*) AS "__count"FROM "posthog_dashboardtile"@@ -28353,7 +26733,7 @@AND "posthog_dashboardtile"."deleted" IS NOT NULL))'''# ----# name: TestDashboard.test_listing_dashboards_is_not_nplus1.489+# name: TestDashboard.test_listing_dashboards_is_not_nplus1.466'''SELECT "posthog_dashboard"."id","posthog_dashboard"."name",@@ -28385,21 +26765,7 @@5 /* ... */))'''# ----# name: TestDashboard.test_listing_dashboards_is_not_nplus1.49- '''- SELECT COUNT(*) AS "__count"- FROM "posthog_dashboard"- INNER JOIN "posthog_team" ON ("posthog_dashboard"."team_id" = "posthog_team"."id")- LEFT OUTER JOIN "posthog_filesystemviewlog" "recent_dashboard_views" ON ("posthog_team"."id" = "recent_dashboard_views"."team_id"- AND (("recent_dashboard_views"."user_id" = 99999- AND "recent_dashboard_views"."type" = 'dashboard'- AND "recent_dashboard_views"."ref" = ("posthog_dashboard"."id")::varchar)))- WHERE ("posthog_team"."project_id" = 99999- AND NOT ("posthog_dashboard"."deleted")- AND NOT ("posthog_dashboard"."creation_mode" = 'unlisted'))- '''-# ----# name: TestDashboard.test_listing_dashboards_is_not_nplus1.490+# name: TestDashboard.test_listing_dashboards_is_not_nplus1.467'''SELECT "posthog_team"."id","posthog_team"."uuid",@@ -28497,7 +26863,7 @@LIMIT 21'''# ----# name: TestDashboard.test_listing_dashboards_is_not_nplus1.491+# name: TestDashboard.test_listing_dashboards_is_not_nplus1.468'''SELECT "posthog_organization"."id","posthog_organization"."name",@@ -28543,7 +26909,7 @@LIMIT 21'''# ----# name: TestDashboard.test_listing_dashboards_is_not_nplus1.492+# name: TestDashboard.test_listing_dashboards_is_not_nplus1.469'''SELECT "posthog_team"."id","posthog_team"."uuid",@@ -28641,7 +27007,30 @@LIMIT 21'''# ----# name: TestDashboard.test_listing_dashboards_is_not_nplus1.493+# name: TestDashboard.test_listing_dashboards_is_not_nplus1.47+ '''+ SELECT "ee_accesscontrol"."id",+ "ee_accesscontrol"."team_id",+ "ee_accesscontrol"."access_level",+ "ee_accesscontrol"."resource",+ "ee_accesscontrol"."resource_id",+ "ee_accesscontrol"."organization_member_id",+ "ee_accesscontrol"."role_id",+ "ee_accesscontrol"."created_by_id",+ "ee_accesscontrol"."created_at",+ "ee_accesscontrol"."updated_at"+ FROM "ee_accesscontrol"+ LEFT OUTER JOIN "posthog_organizationmembership" ON ("ee_accesscontrol"."organization_member_id" = "posthog_organizationmembership"."id")+ WHERE (("ee_accesscontrol"."organization_member_id" IS NULL+ AND "ee_accesscontrol"."role_id" IS NULL+ AND "ee_accesscontrol"."team_id" = 99999)+ OR ("posthog_organizationmembership"."organization_id" = '00000000-0000-0000-0000-000000000000'::uuid+ AND "posthog_organizationmembership"."user_id" = 99999+ AND "ee_accesscontrol"."role_id" IS NULL+ AND "ee_accesscontrol"."team_id" = 99999))+ '''+# ---+# name: TestDashboard.test_listing_dashboards_is_not_nplus1.470'''SELECT "posthog_filesystem"."team_id","posthog_filesystem"."id",@@ -28666,7 +27055,7 @@AND "posthog_filesystem"."shortcut" IS NOT NULL))'''# ----# name: TestDashboard.test_listing_dashboards_is_not_nplus1.494+# name: TestDashboard.test_listing_dashboards_is_not_nplus1.471'''SELECT "posthog_insightviewed"."id","posthog_insightviewed"."team_id",@@ -28684,7 +27073,7 @@UPDATE'''# ----# name: TestDashboard.test_listing_dashboards_is_not_nplus1.495+# name: TestDashboard.test_listing_dashboards_is_not_nplus1.472'''SELECT "posthog_organization"."id","posthog_organization"."name",@@ -28730,7 +27119,7 @@LIMIT 21'''# ----# name: TestDashboard.test_listing_dashboards_is_not_nplus1.496+# name: TestDashboard.test_listing_dashboards_is_not_nplus1.473'''SELECT "posthog_team"."id","posthog_team"."uuid",@@ -28828,7 +27217,7 @@LIMIT 21'''# ----# name: TestDashboard.test_listing_dashboards_is_not_nplus1.497+# name: TestDashboard.test_listing_dashboards_is_not_nplus1.474'''SELECT "posthog_dashboardtile"."id","posthog_dashboardtile"."dashboard_id",@@ -28857,7 +27246,7 @@AND "posthog_dashboardtile"."insight_id" = 99999)'''# ----# name: TestDashboard.test_listing_dashboards_is_not_nplus1.498+# name: TestDashboard.test_listing_dashboards_is_not_nplus1.475'''SELECT "posthog_dashboardtile"."id","posthog_dashboardtile"."dashboard_id",@@ -28886,7 +27275,7 @@AND "posthog_dashboardtile"."insight_id" = 99999)'''# ----# name: TestDashboard.test_listing_dashboards_is_not_nplus1.499+# name: TestDashboard.test_listing_dashboards_is_not_nplus1.476'''SELECT "posthog_insightvariable"."id","posthog_insightvariable"."name",@@ -28906,62 +27295,62 @@ORDER BY "posthog_insightvariable"."name" ASC'''# ----# name: TestDashboard.test_listing_dashboards_is_not_nplus1.5+# name: TestDashboard.test_listing_dashboards_is_not_nplus1.477'''- SELECT "posthog_organizationmembernotificationlock"."id",- "posthog_organizationmembernotificationlock"."organization_id",- "posthog_organizationmembernotificationlock"."organization_membership_id",- "posthog_organizationmembernotificationlock"."setting",- "posthog_organizationmembernotificationlock"."scope_id",- "posthog_organizationmembernotificationlock"."locked_value",- "posthog_organizationmembernotificationlock"."created_by_id",- "posthog_organizationmembernotificationlock"."created_at",- "posthog_organizationmembernotificationlock"."updated_at"- FROM "posthog_organizationmembernotificationlock"- WHERE "posthog_organizationmembernotificationlock"."organization_id" = '00000000-0000-0000-0000-000000000000'::uuid+ SELECT "posthog_teamrevenueanalyticsconfig"."team_id",+ "posthog_teamrevenueanalyticsconfig"."filter_test_accounts",+ "posthog_teamrevenueanalyticsconfig"."notified_first_sync",+ "posthog_teamrevenueanalyticsconfig"."events",+ "posthog_teamrevenueanalyticsconfig"."goals",+ "posthog_teamrevenueanalyticsconfig"."base_currency"+ FROM "posthog_teamrevenueanalyticsconfig"+ WHERE "posthog_teamrevenueanalyticsconfig"."team_id" = 99999+ LIMIT 21'''# ----# name: TestDashboard.test_listing_dashboards_is_not_nplus1.50+# name: TestDashboard.test_listing_dashboards_is_not_nplus1.478'''- SELECT "posthog_user"."id",- "posthog_user"."password",- "posthog_user"."last_login",- "posthog_user"."first_name",- "posthog_user"."last_name",- "posthog_user"."is_staff",- "posthog_user"."date_joined",- "posthog_user"."uuid",- "posthog_user"."current_organization_id",- "posthog_user"."current_team_id",- "posthog_user"."email",- "posthog_user"."pending_email",- "posthog_user"."distinct_id",- "posthog_user"."is_email_verified",- "posthog_user"."credentials_reviewed_at",- "posthog_user"."requested_2fa_reset_at",- "posthog_user"."has_seen_product_intro_for",- "posthog_user"."strapi_id",- "posthog_user"."is_active",- "posthog_user"."role_at_organization",- "posthog_user"."theme_mode",- "posthog_user"."partial_notification_settings",- "posthog_user"."anonymize_data",- "posthog_user"."allow_impersonation",- "posthog_user"."toolbar_mode",- "posthog_user"."hedgehog_config",- "posthog_user"."allow_sidebar_suggestions",- "posthog_user"."shortcut_position",- "posthog_user"."passkeys_enabled_for_2fa",- "posthog_user"."hide_mcp_hints",- "posthog_user"."ui_configuration",- "posthog_user"."onboarding_skipped_at",- "posthog_user"."onboarding_skipped_reason",- "posthog_user"."onboarding_skipped_organization_id",- "posthog_user"."onboarding_delegated_to_invite_id",- "posthog_user"."onboarding_delegated_to_organization_id",- "posthog_user"."onboarding_delegation_accepted_at",- "posthog_user"."events_column_config",- "posthog_user"."email_opt_in",+ SELECT "posthog_teammarketinganalyticsconfig"."team_id",+ "posthog_teammarketinganalyticsconfig"."attribution_window_days",+ "posthog_teammarketinganalyticsconfig"."attribution_mode",+ "posthog_teammarketinganalyticsconfig"."filter_test_accounts",+ "posthog_teammarketinganalyticsconfig"."sources_map",+ "posthog_teammarketinganalyticsconfig"."conversion_goals",+ "posthog_teammarketinganalyticsconfig"."campaign_name_mappings",+ "posthog_teammarketinganalyticsconfig"."custom_source_mappings",+ "posthog_teammarketinganalyticsconfig"."campaign_field_preferences"+ FROM "posthog_teammarketinganalyticsconfig"+ WHERE "posthog_teammarketinganalyticsconfig"."team_id" = 99999+ LIMIT 21+ '''+# ---+# name: TestDashboard.test_listing_dashboards_is_not_nplus1.479+ '''+ SELECT "customer_analytics_teamcustomeranalyticsconfig"."team_id",+ "customer_analytics_teamcustomeranalyticsconfig"."activity_event",+ "customer_analytics_teamcustomeranalyticsconfig"."signup_pageview_event",+ "customer_analytics_teamcustomeranalyticsconfig"."signup_event",+ "customer_analytics_teamcustomeranalyticsconfig"."subscription_event",+ "customer_analytics_teamcustomeranalyticsconfig"."payment_event",+ "customer_analytics_teamcustomeranalyticsconfig"."account_group_type_index",+ "customer_analytics_teamcustomeranalyticsconfig"."default_pinned_properties",+ "customer_analytics_teamcustomeranalyticsconfig"."account_track_rules",+ "customer_analytics_teamcustomeranalyticsconfig"."account_track_rules_enabled_at",+ "customer_analytics_teamcustomeranalyticsconfig"."properties"+ FROM "customer_analytics_teamcustomeranalyticsconfig"+ WHERE "customer_analytics_teamcustomeranalyticsconfig"."team_id" = 99999+ LIMIT 21+ '''+# ---+# name: TestDashboard.test_listing_dashboards_is_not_nplus1.48+ '''+ SELECT "posthog_organizationmembership"."id",+ "posthog_organizationmembership"."organization_id",+ "posthog_organizationmembership"."user_id",+ "posthog_organizationmembership"."level",+ "posthog_organizationmembership"."joined_at",+ "posthog_organizationmembership"."updated_at",+ "posthog_organizationmembership"."invited_by_id","posthog_organization"."id","posthog_organization"."name","posthog_organization"."slug",@@ -29001,60 +27390,12 @@"posthog_organization"."personalization","posthog_organization"."domain_whitelist","posthog_organization"."is_platform"- FROM "posthog_user"- LEFT OUTER JOIN "posthog_organization" ON ("posthog_user"."current_organization_id" = "posthog_organization"."id")- WHERE ("posthog_user"."is_active"- AND "posthog_user"."id" = 99999)- '''-# ----# name: TestDashboard.test_listing_dashboards_is_not_nplus1.500- '''- SELECT "posthog_teamrevenueanalyticsconfig"."team_id",- "posthog_teamrevenueanalyticsconfig"."filter_test_accounts",- "posthog_teamrevenueanalyticsconfig"."notified_first_sync",- "posthog_teamrevenueanalyticsconfig"."events",- "posthog_teamrevenueanalyticsconfig"."goals",- "posthog_teamrevenueanalyticsconfig"."base_currency"- FROM "posthog_teamrevenueanalyticsconfig"- WHERE "posthog_teamrevenueanalyticsconfig"."team_id" = 99999- LIMIT 21- '''-# ----# name: TestDashboard.test_listing_dashboards_is_not_nplus1.501- '''- SELECT "posthog_teammarketinganalyticsconfig"."team_id",- "posthog_teammarketinganalyticsconfig"."attribution_window_days",- "posthog_teammarketinganalyticsconfig"."attribution_mode",- "posthog_teammarketinganalyticsconfig"."filter_test_accounts",- "posthog_teammarketinganalyticsconfig"."sources_map",- "posthog_teammarketinganalyticsconfig"."conversion_goals",- "posthog_teammarketinganalyticsconfig"."campaign_name_mappings",- "posthog_teammarketinganalyticsconfig"."custom_source_mappings",- "posthog_teammarketinganalyticsconfig"."campaign_field_preferences"- FROM "posthog_teammarketinganalyticsconfig"- WHERE "posthog_teammarketinganalyticsconfig"."team_id" = 99999- LIMIT 21- '''-# ----# name: TestDashboard.test_listing_dashboards_is_not_nplus1.502- '''- SELECT "customer_analytics_teamcustomeranalyticsconfig"."team_id",- "customer_analytics_teamcustomeranalyticsconfig"."activity_event",- "customer_analytics_teamcustomeranalyticsconfig"."signup_pageview_event",- "customer_analytics_teamcustomeranalyticsconfig"."signup_event",- "customer_analytics_teamcustomeranalyticsconfig"."subscription_event",- "customer_analytics_teamcustomeranalyticsconfig"."payment_event",- "customer_analytics_teamcustomeranalyticsconfig"."account_group_type_index",- "customer_analytics_teamcustomeranalyticsconfig"."default_pinned_properties",- "customer_analytics_teamcustomeranalyticsconfig"."account_track_rules",- "customer_analytics_teamcustomeranalyticsconfig"."account_track_rules_enabled_at",- "customer_analytics_teamcustomeranalyticsconfig"."properties"- FROM "customer_analytics_teamcustomeranalyticsconfig"- WHERE "customer_analytics_teamcustomeranalyticsconfig"."team_id" = 99999- LIMIT 21+ FROM "posthog_organizationmembership"+ INNER JOIN "posthog_organization" ON ("posthog_organizationmembership"."organization_id" = "posthog_organization"."id")+ WHERE "posthog_organizationmembership"."user_id" = 99999'''# ----# name: TestDashboard.test_listing_dashboards_is_not_nplus1.503+# name: TestDashboard.test_listing_dashboards_is_not_nplus1.480'''SELECT "posthog_tag"."name" AS "tag__name"FROM "posthog_taggeditem"@@ -29063,7 +27404,7 @@AND "posthog_taggeditem"."object_id" = 99999)'''# ----# name: TestDashboard.test_listing_dashboards_is_not_nplus1.504+# name: TestDashboard.test_listing_dashboards_is_not_nplus1.481'''SELECT "posthog_user"."id","posthog_user"."password",@@ -29149,7 +27490,7 @@AND "posthog_user"."id" = 99999)'''# ----# name: TestDashboard.test_listing_dashboards_is_not_nplus1.505+# name: TestDashboard.test_listing_dashboards_is_not_nplus1.482'''SELECT "posthog_team"."id","posthog_team"."uuid",@@ -29287,85 +27628,7 @@LIMIT 21'''# ----# name: TestDashboard.test_listing_dashboards_is_not_nplus1.506- '''- SELECT "posthog_organizationmembership"."id",- "posthog_organizationmembership"."organization_id",- "posthog_organizationmembership"."user_id",- "posthog_organizationmembership"."level",- "posthog_organizationmembership"."joined_at",- "posthog_organizationmembership"."updated_at",- "posthog_organizationmembership"."invited_by_id",- "posthog_organization"."id",- "posthog_organization"."name",- "posthog_organization"."slug",- "posthog_organization"."logo_media_id",- "posthog_organization"."created_at",- "posthog_organization"."updated_at",- "posthog_organization"."is_active",- "posthog_organization"."is_not_active_reason",- "posthog_organization"."session_cookie_age",- "posthog_organization"."is_member_join_email_enabled",- "posthog_organization"."is_ai_data_processing_approved",- "posthog_organization"."is_ai_training_opted_in",- "posthog_organization"."is_ai_training_locked",- "posthog_organization"."is_ai_training_cta_shown",- "posthog_organization"."enforce_2fa",- "posthog_organization"."enforce_verified_domains",- "posthog_organization"."members_can_invite",- "posthog_organization"."members_can_create_projects",- "posthog_organization"."members_can_use_personal_api_keys",- "posthog_organization"."members_can_see_org_members",- "posthog_organization"."uses_most_specific_access_resolution",- "posthog_organization"."allow_publicly_shared_resources",- "posthog_organization"."member_notice",- "posthog_organization"."read_only_mcp_access",- "posthog_organization"."default_role_id",- "posthog_organization"."plugins_access_level",- "posthog_organization"."for_internal_metrics",- "posthog_organization"."default_anonymize_ips",- "posthog_organization"."is_pending_deletion",- "posthog_organization"."customer_id",- "posthog_organization"."available_product_features",- "posthog_organization"."usage",- "posthog_organization"."never_drop_data",- "posthog_organization"."customer_trust_scores",- "posthog_organization"."has_active_subscription",- "posthog_organization"."setup_section_2_completed",- "posthog_organization"."personalization",- "posthog_organization"."domain_whitelist",- "posthog_organization"."is_platform"- FROM "posthog_organizationmembership"- INNER JOIN "posthog_organization" ON ("posthog_organizationmembership"."organization_id" = "posthog_organization"."id")- WHERE ("posthog_organizationmembership"."organization_id" = '00000000-0000-0000-0000-000000000000'::uuid- AND "posthog_organizationmembership"."user_id" = 99999)- LIMIT 21- '''-# ----# name: TestDashboard.test_listing_dashboards_is_not_nplus1.507- '''- SELECT "ee_accesscontrol"."id",- "ee_accesscontrol"."team_id",- "ee_accesscontrol"."access_level",- "ee_accesscontrol"."resource",- "ee_accesscontrol"."resource_id",- "ee_accesscontrol"."organization_member_id",- "ee_accesscontrol"."role_id",- "ee_accesscontrol"."created_by_id",- "ee_accesscontrol"."created_at",- "ee_accesscontrol"."updated_at"- FROM "ee_accesscontrol"- LEFT OUTER JOIN "posthog_organizationmembership" ON ("ee_accesscontrol"."organization_member_id" = "posthog_organizationmembership"."id")- WHERE (("ee_accesscontrol"."organization_member_id" IS NULL- AND "ee_accesscontrol"."role_id" IS NULL- AND "ee_accesscontrol"."team_id" = 99999)- OR ("posthog_organizationmembership"."organization_id" = '00000000-0000-0000-0000-000000000000'::uuid- AND "posthog_organizationmembership"."user_id" = 99999- AND "ee_accesscontrol"."role_id" IS NULL- AND "ee_accesscontrol"."team_id" = 99999))- '''-# ----# name: TestDashboard.test_listing_dashboards_is_not_nplus1.508+# name: TestDashboard.test_listing_dashboards_is_not_nplus1.483'''SELECT "posthog_organizationmembership"."id","posthog_organizationmembership"."organization_id",@@ -29413,170 +27676,110 @@"posthog_organization"."personalization","posthog_organization"."domain_whitelist","posthog_organization"."is_platform"- FROM "posthog_organizationmembership"- INNER JOIN "posthog_organization" ON ("posthog_organizationmembership"."organization_id" = "posthog_organization"."id")- WHERE "posthog_organizationmembership"."user_id" = 99999- '''-# ----# name: TestDashboard.test_listing_dashboards_is_not_nplus1.509- '''- SELECT "posthog_dashboard"."id" AS "id"- FROM "posthog_dashboard"- INNER JOIN "posthog_team" ON ("posthog_dashboard"."team_id" = "posthog_team"."id")- WHERE (NOT ("posthog_dashboard"."deleted")- AND ("posthog_dashboard"."team_id" =- (SELECT "U0"."parent_team_id" AS "parent_team_id"- FROM "posthog_team" "U0"- WHERE "U0"."id" = 99999- LIMIT 1)- OR ("posthog_team"."parent_team_id" IS NULL- AND "posthog_dashboard"."team_id" = 99999))- AND "posthog_dashboard"."id" IN (1,- 2,- 3,- 4,- 5 /* ... */))- '''-# ----# name: TestDashboard.test_listing_dashboards_is_not_nplus1.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"."session_recording_retention_period_days",- "posthog_team"."external_data_workspace_id",- "posthog_team"."external_data_workspace_last_synced_at",- "posthog_team"."api_query_rate_limit",- "posthog_team"."drop_events_older_than",- "posthog_team"."base_currency",- "posthog_team"."business_model",- "posthog_organization"."id",- "posthog_organization"."name",- "posthog_organization"."slug",- "posthog_organization"."logo_media_id",- "posthog_organization"."created_at",- "posthog_organization"."updated_at",- "posthog_organization"."is_active",- "posthog_organization"."is_not_active_reason",- "posthog_organization"."session_cookie_age",- "posthog_organization"."is_member_join_email_enabled",- "posthog_organization"."is_ai_data_processing_approved",- "posthog_organization"."is_ai_training_opted_in",- "posthog_organization"."is_ai_training_locked",- "posthog_organization"."is_ai_training_cta_shown",- "posthog_organization"."enforce_2fa",- "posthog_organization"."enforce_verified_domains",- "posthog_organization"."members_can_invite",- "posthog_organization"."members_can_create_projects",- "posthog_organization"."members_can_use_personal_api_keys",- "posthog_organization"."members_can_see_org_members",- "posthog_organization"."uses_most_specific_access_resolution",- "posthog_organization"."allow_publicly_shared_resources",- "posthog_organization"."member_notice",- "posthog_organization"."read_only_mcp_access",- "posthog_organization"."default_role_id",- "posthog_organization"."plugins_access_level",- "posthog_organization"."for_internal_metrics",- "posthog_organization"."default_anonymize_ips",- "posthog_organization"."is_pending_deletion",- "posthog_organization"."customer_id",- "posthog_organization"."available_product_features",- "posthog_organization"."usage",- "posthog_organization"."never_drop_data",- "posthog_organization"."customer_trust_scores",- "posthog_organization"."has_active_subscription",- "posthog_organization"."setup_section_2_completed",- "posthog_organization"."personalization",- "posthog_organization"."domain_whitelist",- "posthog_organization"."is_platform"- FROM "posthog_team"- INNER JOIN "posthog_organization" ON ("posthog_team"."organization_id" = "posthog_organization"."id")- WHERE "posthog_team"."id" = 99999+ 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.510+# name: TestDashboard.test_listing_dashboards_is_not_nplus1.484+ '''+ SELECT "ee_accesscontrol"."id",+ "ee_accesscontrol"."team_id",+ "ee_accesscontrol"."access_level",+ "ee_accesscontrol"."resource",+ "ee_accesscontrol"."resource_id",+ "ee_accesscontrol"."organization_member_id",+ "ee_accesscontrol"."role_id",+ "ee_accesscontrol"."created_by_id",+ "ee_accesscontrol"."created_at",+ "ee_accesscontrol"."updated_at"+ FROM "ee_accesscontrol"+ LEFT OUTER JOIN "posthog_organizationmembership" ON ("ee_accesscontrol"."organization_member_id" = "posthog_organizationmembership"."id")+ WHERE (("ee_accesscontrol"."organization_member_id" IS NULL+ AND "ee_accesscontrol"."role_id" IS NULL+ AND "ee_accesscontrol"."team_id" = 99999)+ OR ("posthog_organizationmembership"."organization_id" = '00000000-0000-0000-0000-000000000000'::uuid+ AND "posthog_organizationmembership"."user_id" = 99999+ AND "ee_accesscontrol"."role_id" IS NULL+ AND "ee_accesscontrol"."team_id" = 99999))+ '''+# ---+# name: TestDashboard.test_listing_dashboards_is_not_nplus1.485+ '''+ SELECT "posthog_organizationmembership"."id",+ "posthog_organizationmembership"."organization_id",+ "posthog_organizationmembership"."user_id",+ "posthog_organizationmembership"."level",+ "posthog_organizationmembership"."joined_at",+ "posthog_organizationmembership"."updated_at",+ "posthog_organizationmembership"."invited_by_id",+ "posthog_organization"."id",+ "posthog_organization"."name",+ "posthog_organization"."slug",+ "posthog_organization"."logo_media_id",+ "posthog_organization"."created_at",+ "posthog_organization"."updated_at",+ "posthog_organization"."is_active",+ "posthog_organization"."is_not_active_reason",+ "posthog_organization"."session_cookie_age",+ "posthog_organization"."is_member_join_email_enabled",+ "posthog_organization"."is_ai_data_processing_approved",+ "posthog_organization"."is_ai_training_opted_in",+ "posthog_organization"."is_ai_training_locked",+ "posthog_organization"."is_ai_training_cta_shown",+ "posthog_organization"."enforce_2fa",+ "posthog_organization"."enforce_verified_domains",+ "posthog_organization"."members_can_invite",+ "posthog_organization"."members_can_create_projects",+ "posthog_organization"."members_can_use_personal_api_keys",+ "posthog_organization"."members_can_see_org_members",+ "posthog_organization"."uses_most_specific_access_resolution",+ "posthog_organization"."allow_publicly_shared_resources",+ "posthog_organization"."member_notice",+ "posthog_organization"."read_only_mcp_access",+ "posthog_organization"."default_role_id",+ "posthog_organization"."plugins_access_level",+ "posthog_organization"."for_internal_metrics",+ "posthog_organization"."default_anonymize_ips",+ "posthog_organization"."is_pending_deletion",+ "posthog_organization"."customer_id",+ "posthog_organization"."available_product_features",+ "posthog_organization"."usage",+ "posthog_organization"."never_drop_data",+ "posthog_organization"."customer_trust_scores",+ "posthog_organization"."has_active_subscription",+ "posthog_organization"."setup_section_2_completed",+ "posthog_organization"."personalization",+ "posthog_organization"."domain_whitelist",+ "posthog_organization"."is_platform"+ FROM "posthog_organizationmembership"+ INNER JOIN "posthog_organization" ON ("posthog_organizationmembership"."organization_id" = "posthog_organization"."id")+ WHERE "posthog_organizationmembership"."user_id" = 99999+ '''+# ---+# name: TestDashboard.test_listing_dashboards_is_not_nplus1.486+ '''+ SELECT "posthog_dashboard"."id" AS "id"+ FROM "posthog_dashboard"+ INNER JOIN "posthog_team" ON ("posthog_dashboard"."team_id" = "posthog_team"."id")+ WHERE (NOT ("posthog_dashboard"."deleted")+ AND ("posthog_dashboard"."team_id" =+ (SELECT "U0"."parent_team_id" AS "parent_team_id"+ FROM "posthog_team" "U0"+ WHERE "U0"."id" = 99999+ LIMIT 1)+ OR ("posthog_team"."parent_team_id" IS NULL+ AND "posthog_dashboard"."team_id" = 99999))+ AND "posthog_dashboard"."id" IN (1,+ 2,+ 3,+ 4,+ 5 /* ... */))+ '''+# ---+# name: TestDashboard.test_listing_dashboards_is_not_nplus1.487'''SELECT "posthog_dashboard"."id" AS "id","posthog_dashboard"."name" AS "name"@@ -29589,7 +27792,7 @@5 /* ... */))'''# ----# name: TestDashboard.test_listing_dashboards_is_not_nplus1.511+# name: TestDashboard.test_listing_dashboards_is_not_nplus1.488'''SELECT COUNT(*) AS "__count"FROM "posthog_dashboardtile"@@ -29602,7 +27805,7 @@AND "posthog_dashboardtile"."deleted" IS NOT NULL))'''# ----# name: TestDashboard.test_listing_dashboards_is_not_nplus1.512+# name: TestDashboard.test_listing_dashboards_is_not_nplus1.489'''SELECT "posthog_dashboard"."id","posthog_dashboard"."name",@@ -29634,7 +27837,21 @@5 /* ... */))'''# ----# name: TestDashboard.test_listing_dashboards_is_not_nplus1.513+# name: TestDashboard.test_listing_dashboards_is_not_nplus1.49+ '''+ SELECT COUNT(*) AS "__count"+ FROM "posthog_dashboard"+ INNER JOIN "posthog_team" ON ("posthog_dashboard"."team_id" = "posthog_team"."id")+ LEFT OUTER JOIN "posthog_filesystemviewlog" "recent_dashboard_views" ON ("posthog_team"."id" = "recent_dashboard_views"."team_id"+ AND (("recent_dashboard_views"."user_id" = 99999+ AND "recent_dashboard_views"."type" = 'dashboard'+ AND "recent_dashboard_views"."ref" = ("posthog_dashboard"."id")::varchar)))+ WHERE ("posthog_team"."project_id" = 99999+ AND NOT ("posthog_dashboard"."deleted")+ AND NOT ("posthog_dashboard"."creation_mode" = 'unlisted'))+ '''+# ---+# name: TestDashboard.test_listing_dashboards_is_not_nplus1.490'''SELECT "posthog_team"."id","posthog_team"."uuid",@@ -29732,7 +27949,7 @@LIMIT 21'''# ----# name: TestDashboard.test_listing_dashboards_is_not_nplus1.514+# name: TestDashboard.test_listing_dashboards_is_not_nplus1.491'''SELECT "posthog_organization"."id","posthog_organization"."name",@@ -29778,7 +27995,7 @@LIMIT 21'''# ----# name: TestDashboard.test_listing_dashboards_is_not_nplus1.515+# name: TestDashboard.test_listing_dashboards_is_not_nplus1.492'''SELECT "posthog_team"."id","posthog_team"."uuid",@@ -29876,7 +28093,7 @@LIMIT 21'''# ----# name: TestDashboard.test_listing_dashboards_is_not_nplus1.516+# name: TestDashboard.test_listing_dashboards_is_not_nplus1.493'''SELECT "posthog_filesystem"."team_id","posthog_filesystem"."id",@@ -29901,7 +28118,7 @@AND "posthog_filesystem"."shortcut" IS NOT NULL))'''# ----# name: TestDashboard.test_listing_dashboards_is_not_nplus1.517+# name: TestDashboard.test_listing_dashboards_is_not_nplus1.494'''SELECT "posthog_insightviewed"."id","posthog_insightviewed"."team_id",@@ -29919,7 +28136,7 @@UPDATE'''# ----# name: TestDashboard.test_listing_dashboards_is_not_nplus1.518+# name: TestDashboard.test_listing_dashboards_is_not_nplus1.495'''SELECT "posthog_organization"."id","posthog_organization"."name",@@ -29965,7 +28182,7 @@LIMIT 21'''# ----# name: TestDashboard.test_listing_dashboards_is_not_nplus1.519+# name: TestDashboard.test_listing_dashboards_is_not_nplus1.496'''SELECT "posthog_team"."id","posthog_team"."uuid",@@ -30063,62 +28280,7 @@LIMIT 21'''# ----# name: TestDashboard.test_listing_dashboards_is_not_nplus1.52- '''- SELECT "posthog_organizationmembership"."id",- "posthog_organizationmembership"."organization_id",- "posthog_organizationmembership"."user_id",- "posthog_organizationmembership"."level",- "posthog_organizationmembership"."joined_at",- "posthog_organizationmembership"."updated_at",- "posthog_organizationmembership"."invited_by_id",- "posthog_organization"."id",- "posthog_organization"."name",- "posthog_organization"."slug",- "posthog_organization"."logo_media_id",- "posthog_organization"."created_at",- "posthog_organization"."updated_at",- "posthog_organization"."is_active",- "posthog_organization"."is_not_active_reason",- "posthog_organization"."session_cookie_age",- "posthog_organization"."is_member_join_email_enabled",- "posthog_organization"."is_ai_data_processing_approved",- "posthog_organization"."is_ai_training_opted_in",- "posthog_organization"."is_ai_training_locked",- "posthog_organization"."is_ai_training_cta_shown",- "posthog_organization"."enforce_2fa",- "posthog_organization"."enforce_verified_domains",- "posthog_organization"."members_can_invite",- "posthog_organization"."members_can_create_projects",- "posthog_organization"."members_can_use_personal_api_keys",- "posthog_organization"."members_can_see_org_members",- "posthog_organization"."uses_most_specific_access_resolution",- "posthog_organization"."allow_publicly_shared_resources",- "posthog_organization"."member_notice",- "posthog_organization"."read_only_mcp_access",- "posthog_organization"."default_role_id",- "posthog_organization"."plugins_access_level",- "posthog_organization"."for_internal_metrics",- "posthog_organization"."default_anonymize_ips",- "posthog_organization"."is_pending_deletion",- "posthog_organization"."customer_id",- "posthog_organization"."available_product_features",- "posthog_organization"."usage",- "posthog_organization"."never_drop_data",- "posthog_organization"."customer_trust_scores",- "posthog_organization"."has_active_subscription",- "posthog_organization"."setup_section_2_completed",- "posthog_organization"."personalization",- "posthog_organization"."domain_whitelist",- "posthog_organization"."is_platform"- FROM "posthog_organizationmembership"- INNER JOIN "posthog_organization" ON ("posthog_organizationmembership"."organization_id" = "posthog_organization"."id")- WHERE ("posthog_organizationmembership"."organization_id" = '00000000-0000-0000-0000-000000000000'::uuid- AND "posthog_organizationmembership"."user_id" = 99999)- LIMIT 21- '''-# ----# name: TestDashboard.test_listing_dashboards_is_not_nplus1.520+# name: TestDashboard.test_listing_dashboards_is_not_nplus1.497'''SELECT "posthog_dashboardtile"."id","posthog_dashboardtile"."dashboard_id",@@ -30147,7 +28309,7 @@AND "posthog_dashboardtile"."insight_id" = 99999)'''# ----# name: TestDashboard.test_listing_dashboards_is_not_nplus1.521+# name: TestDashboard.test_listing_dashboards_is_not_nplus1.498'''SELECT "posthog_dashboardtile"."id","posthog_dashboardtile"."dashboard_id",@@ -30176,7 +28338,7 @@AND "posthog_dashboardtile"."insight_id" = 99999)'''# ----# name: TestDashboard.test_listing_dashboards_is_not_nplus1.522+# name: TestDashboard.test_listing_dashboards_is_not_nplus1.499'''SELECT "posthog_insightvariable"."id","posthog_insightvariable"."name",@@ -30196,7 +28358,108 @@ORDER BY "posthog_insightvariable"."name" ASC'''# ----# name: TestDashboard.test_listing_dashboards_is_not_nplus1.523+# name: TestDashboard.test_listing_dashboards_is_not_nplus1.5+ '''+ SELECT "posthog_organizationmembernotificationlock"."id",+ "posthog_organizationmembernotificationlock"."organization_id",+ "posthog_organizationmembernotificationlock"."organization_membership_id",+ "posthog_organizationmembernotificationlock"."setting",+ "posthog_organizationmembernotificationlock"."scope_id",+ "posthog_organizationmembernotificationlock"."locked_value",+ "posthog_organizationmembernotificationlock"."created_by_id",+ "posthog_organizationmembernotificationlock"."created_at",+ "posthog_organizationmembernotificationlock"."updated_at"+ FROM "posthog_organizationmembernotificationlock"+ WHERE "posthog_organizationmembernotificationlock"."organization_id" = '00000000-0000-0000-0000-000000000000'::uuid+ '''+# ---+# name: TestDashboard.test_listing_dashboards_is_not_nplus1.50+ '''+ SELECT "posthog_user"."id",+ "posthog_user"."password",+ "posthog_user"."last_login",+ "posthog_user"."first_name",+ "posthog_user"."last_name",+ "posthog_user"."is_staff",+ "posthog_user"."date_joined",+ "posthog_user"."uuid",+ "posthog_user"."current_organization_id",+ "posthog_user"."current_team_id",+ "posthog_user"."email",+ "posthog_user"."pending_email",+ "posthog_user"."distinct_id",+ "posthog_user"."is_email_verified",+ "posthog_user"."credentials_reviewed_at",+ "posthog_user"."requested_2fa_reset_at",+ "posthog_user"."has_seen_product_intro_for",+ "posthog_user"."strapi_id",+ "posthog_user"."is_active",+ "posthog_user"."role_at_organization",+ "posthog_user"."theme_mode",+ "posthog_user"."partial_notification_settings",+ "posthog_user"."anonymize_data",+ "posthog_user"."allow_impersonation",+ "posthog_user"."toolbar_mode",+ "posthog_user"."hedgehog_config",+ "posthog_user"."allow_sidebar_suggestions",+ "posthog_user"."shortcut_position",+ "posthog_user"."passkeys_enabled_for_2fa",+ "posthog_user"."hide_mcp_hints",+ "posthog_user"."ui_configuration",+ "posthog_user"."onboarding_skipped_at",+ "posthog_user"."onboarding_skipped_reason",+ "posthog_user"."onboarding_skipped_organization_id",+ "posthog_user"."onboarding_delegated_to_invite_id",+ "posthog_user"."onboarding_delegated_to_organization_id",+ "posthog_user"."onboarding_delegation_accepted_at",+ "posthog_user"."events_column_config",+ "posthog_user"."email_opt_in",+ "posthog_organization"."id",+ "posthog_organization"."name",+ "posthog_organization"."slug",+ "posthog_organization"."logo_media_id",+ "posthog_organization"."created_at",+ "posthog_organization"."updated_at",+ "posthog_organization"."is_active",+ "posthog_organization"."is_not_active_reason",+ "posthog_organization"."session_cookie_age",+ "posthog_organization"."is_member_join_email_enabled",+ "posthog_organization"."is_ai_data_processing_approved",+ "posthog_organization"."is_ai_training_opted_in",+ "posthog_organization"."is_ai_training_locked",+ "posthog_organization"."is_ai_training_cta_shown",+ "posthog_organization"."enforce_2fa",+ "posthog_organization"."enforce_verified_domains",+ "posthog_organization"."members_can_invite",+ "posthog_organization"."members_can_create_projects",+ "posthog_organization"."members_can_use_personal_api_keys",+ "posthog_organization"."members_can_see_org_members",+ "posthog_organization"."uses_most_specific_access_resolution",+ "posthog_organization"."allow_publicly_shared_resources",+ "posthog_organization"."member_notice",+ "posthog_organization"."read_only_mcp_access",+ "posthog_organization"."default_role_id",+ "posthog_organization"."plugins_access_level",+ "posthog_organization"."for_internal_metrics",+ "posthog_organization"."default_anonymize_ips",+ "posthog_organization"."is_pending_deletion",+ "posthog_organization"."customer_id",+ "posthog_organization"."available_product_features",+ "posthog_organization"."usage",+ "posthog_organization"."never_drop_data",+ "posthog_organization"."customer_trust_scores",+ "posthog_organization"."has_active_subscription",+ "posthog_organization"."setup_section_2_completed",+ "posthog_organization"."personalization",+ "posthog_organization"."domain_whitelist",+ "posthog_organization"."is_platform"+ FROM "posthog_user"+ LEFT OUTER JOIN "posthog_organization" ON ("posthog_user"."current_organization_id" = "posthog_organization"."id")+ WHERE ("posthog_user"."is_active"+ AND "posthog_user"."id" = 99999)+ '''+# ---+# name: TestDashboard.test_listing_dashboards_is_not_nplus1.500'''SELECT "posthog_teamrevenueanalyticsconfig"."team_id","posthog_teamrevenueanalyticsconfig"."filter_test_accounts",@@ -30209,7 +28472,7 @@LIMIT 21'''# ----# name: TestDashboard.test_listing_dashboards_is_not_nplus1.524+# name: TestDashboard.test_listing_dashboards_is_not_nplus1.501'''SELECT "posthog_teammarketinganalyticsconfig"."team_id","posthog_teammarketinganalyticsconfig"."attribution_window_days",@@ -30225,7 +28488,7 @@LIMIT 21'''# ----# name: TestDashboard.test_listing_dashboards_is_not_nplus1.525+# name: TestDashboard.test_listing_dashboards_is_not_nplus1.502'''SELECT "customer_analytics_teamcustomeranalyticsconfig"."team_id","customer_analytics_teamcustomeranalyticsconfig"."activity_event",@@ -30243,7 +28506,7 @@LIMIT 21'''# ----# name: TestDashboard.test_listing_dashboards_is_not_nplus1.526+# name: TestDashboard.test_listing_dashboards_is_not_nplus1.503'''SELECT "posthog_tag"."name" AS "tag__name"FROM "posthog_taggeditem"@@ -30252,7 +28515,7 @@AND "posthog_taggeditem"."object_id" = 99999)'''# ----# name: TestDashboard.test_listing_dashboards_is_not_nplus1.527+# name: TestDashboard.test_listing_dashboards_is_not_nplus1.504'''SELECT "posthog_user"."id","posthog_user"."password",@@ -30338,7 +28601,7 @@AND "posthog_user"."id" = 99999)'''# ----# name: TestDashboard.test_listing_dashboards_is_not_nplus1.528+# name: TestDashboard.test_listing_dashboards_is_not_nplus1.505'''SELECT "posthog_team"."id","posthog_team"."uuid",@@ -30476,7 +28739,7 @@LIMIT 21'''# ----# name: TestDashboard.test_listing_dashboards_is_not_nplus1.529+# name: TestDashboard.test_listing_dashboards_is_not_nplus1.506'''SELECT "posthog_organizationmembership"."id","posthog_organizationmembership"."organization_id",@@ -30531,30 +28794,7 @@LIMIT 21'''# ----# name: TestDashboard.test_listing_dashboards_is_not_nplus1.53- '''- SELECT "ee_accesscontrol"."id",- "ee_accesscontrol"."team_id",- "ee_accesscontrol"."access_level",- "ee_accesscontrol"."resource",- "ee_accesscontrol"."resource_id",- "ee_accesscontrol"."organization_member_id",- "ee_accesscontrol"."role_id",- "ee_accesscontrol"."created_by_id",- "ee_accesscontrol"."created_at",- "ee_accesscontrol"."updated_at"- FROM "ee_accesscontrol"- LEFT OUTER JOIN "posthog_organizationmembership" ON ("ee_accesscontrol"."organization_member_id" = "posthog_organizationmembership"."id")- WHERE (("ee_accesscontrol"."organization_member_id" IS NULL- AND "ee_accesscontrol"."role_id" IS NULL- AND "ee_accesscontrol"."team_id" = 99999)- OR ("posthog_organizationmembership"."organization_id" = '00000000-0000-0000-0000-000000000000'::uuid- AND "posthog_organizationmembership"."user_id" = 99999- AND "ee_accesscontrol"."role_id" IS NULL- AND "ee_accesscontrol"."team_id" = 99999))- '''-# ----# name: TestDashboard.test_listing_dashboards_is_not_nplus1.530+# name: TestDashboard.test_listing_dashboards_is_not_nplus1.507'''SELECT "ee_accesscontrol"."id","ee_accesscontrol"."team_id",@@ -30577,7 +28817,7 @@AND "ee_accesscontrol"."team_id" = 99999))'''# ----# name: TestDashboard.test_listing_dashboards_is_not_nplus1.531+# name: TestDashboard.test_listing_dashboards_is_not_nplus1.508'''SELECT "posthog_organizationmembership"."id","posthog_organizationmembership"."organization_id",@@ -30630,170 +28870,178 @@WHERE "posthog_organizationmembership"."user_id" = 99999'''# ----# name: TestDashboard.test_listing_dashboards_is_not_nplus1.532- '''- SELECT COUNT(*) AS "__count"- FROM "posthog_dashboard"- INNER JOIN "posthog_team" ON ("posthog_dashboard"."team_id" = "posthog_team"."id")- LEFT OUTER JOIN "posthog_filesystemviewlog" "recent_dashboard_views" ON ("posthog_team"."id" = "recent_dashboard_views"."team_id"- AND (("recent_dashboard_views"."user_id" = 99999- AND "recent_dashboard_views"."type" = 'dashboard'- AND "recent_dashboard_views"."ref" = ("posthog_dashboard"."id")::varchar)))- WHERE ("posthog_team"."project_id" = 99999- AND NOT ("posthog_dashboard"."deleted")- AND NOT ("posthog_dashboard"."creation_mode" = 'unlisted'))- '''-# ----# name: TestDashboard.test_listing_dashboards_is_not_nplus1.533+# name: TestDashboard.test_listing_dashboards_is_not_nplus1.509'''- 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"."quick_filter_ids",- "posthog_dashboard"."customization",- "posthog_dashboard"."deprecated_tags",- "posthog_dashboard"."tags",- "posthog_dashboard"."share_token",- "posthog_dashboard"."is_shared",- "recent_dashboard_views"."viewed_at" AS "last_viewed_at",- ("posthog_dashboard"."id")::varchar AS "_ref_id",-- (SELECT "U0"."path" AS "path"- FROM "posthog_filesystem" "U0"- WHERE (("U0"."surface" IS NULL- OR "U0"."surface" = 'web')- AND "U0"."ref" = ("posthog_dashboard"."id")::varchar- AND "U0"."team_id" = ("posthog_dashboard"."team_id")- AND "U0"."type" = 'dashboard'- AND NOT ("U0"."shortcut"- AND "U0"."shortcut" IS NOT NULL))- ORDER BY "U0"."id" ASC- LIMIT 1) AS "_folder_path",-- (SELECT "U0"."id" AS "id"- FROM "posthog_filesystem" "U0"- WHERE (("U0"."surface" IS NULL- OR "U0"."surface" = 'web')- AND "U0"."ref" = ("posthog_dashboard"."id")::varchar- AND "U0"."team_id" = ("posthog_dashboard"."team_id")- AND "U0"."type" = 'dashboard'- AND NOT ("U0"."shortcut"- AND "U0"."shortcut" IS NOT NULL))- ORDER BY 1 ASC- LIMIT 1) AS "_folder_id",- "T6"."id",- "T6"."password",- "T6"."last_login",- "T6"."first_name",- "T6"."last_name",- "T6"."is_staff",- "T6"."date_joined",- "T6"."uuid",- "T6"."current_organization_id",- "T6"."current_team_id",- "T6"."email",- "T6"."pending_email",- "T6"."distinct_id",- "T6"."is_email_verified",- "T6"."credentials_reviewed_at",- "T6"."requested_password_reset_at",- "T6"."requested_2fa_reset_at",- "T6"."has_seen_product_intro_for",- "T6"."strapi_id",- "T6"."is_active",- "T6"."role_at_organization",- "T6"."theme_mode",- "T6"."partial_notification_settings",- "T6"."anonymize_data",- "T6"."allow_impersonation",- "T6"."toolbar_mode",- "T6"."hedgehog_config",- "T6"."allow_sidebar_suggestions",- "T6"."shortcut_position",- "T6"."passkeys_enabled_for_2fa",- "T6"."hide_mcp_hints",- "T6"."ui_configuration",- "T6"."onboarding_skipped_at",- "T6"."onboarding_skipped_reason",- "T6"."onboarding_skipped_organization_id",- "T6"."onboarding_delegated_to_invite_id",- "T6"."onboarding_delegated_to_organization_id",- "T6"."onboarding_delegation_accepted_at",- "T6"."events_column_config",- "T6"."email_opt_in"+ SELECT "posthog_dashboard"."id" AS "id"FROM "posthog_dashboard"INNER JOIN "posthog_team" ON ("posthog_dashboard"."team_id" = "posthog_team"."id")- LEFT OUTER JOIN "posthog_filesystemviewlog" "recent_dashboard_views" ON ("posthog_team"."id" = "recent_dashboard_views"."team_id"- AND (("recent_dashboard_views"."user_id" = 99999- AND "recent_dashboard_views"."type" = 'dashboard'- AND "recent_dashboard_views"."ref" = ("posthog_dashboard"."id")::varchar)))- LEFT OUTER JOIN "posthog_user" "T6" ON ("posthog_dashboard"."created_by_id" = "T6"."id")- WHERE ("posthog_team"."project_id" = 99999- AND NOT ("posthog_dashboard"."deleted")- AND NOT ("posthog_dashboard"."creation_mode" = 'unlisted'))- ORDER BY "posthog_dashboard"."pinned" DESC,- "posthog_dashboard"."name" ASC,- "posthog_dashboard"."id" ASC- LIMIT 300+ WHERE (NOT ("posthog_dashboard"."deleted")+ AND ("posthog_dashboard"."team_id" =+ (SELECT "U0"."parent_team_id" AS "parent_team_id"+ FROM "posthog_team" "U0"+ WHERE "U0"."id" = 99999+ LIMIT 1)+ OR ("posthog_team"."parent_team_id" IS NULL+ AND "posthog_dashboard"."team_id" = 99999))+ AND "posthog_dashboard"."id" IN (1,+ 2,+ 3,+ 4,+ 5 /* ... */))'''# ----# name: TestDashboard.test_listing_dashboards_is_not_nplus1.534+# name: TestDashboard.test_listing_dashboards_is_not_nplus1.51'''- SELECT "posthog_sharingconfiguration"."id",- "posthog_sharingconfiguration"."team_id",- "posthog_sharingconfiguration"."dashboard_id",- "posthog_sharingconfiguration"."insight_id",- "posthog_sharingconfiguration"."recording_id",- "posthog_sharingconfiguration"."notebook_id",- "posthog_sharingconfiguration"."interviewee_context_id",- "posthog_sharingconfiguration"."created_at",- "posthog_sharingconfiguration"."enabled",- "posthog_sharingconfiguration"."access_token",- "posthog_sharingconfiguration"."expires_at",- "posthog_sharingconfiguration"."settings",- "posthog_sharingconfiguration"."password_required"- FROM "posthog_sharingconfiguration"- WHERE "posthog_sharingconfiguration"."dashboard_id" IN (1,- 2,- 3,- 4,- 5 /* ... */)+ SELECT "posthog_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"."session_recording_retention_period_days",+ "posthog_team"."external_data_workspace_id",+ "posthog_team"."external_data_workspace_last_synced_at",+ "posthog_team"."api_query_rate_limit",+ "posthog_team"."drop_events_older_than",+ "posthog_team"."base_currency",+ "posthog_team"."business_model",+ "posthog_organization"."id",+ "posthog_organization"."name",+ "posthog_organization"."slug",+ "posthog_organization"."logo_media_id",+ "posthog_organization"."created_at",+ "posthog_organization"."updated_at",+ "posthog_organization"."is_active",+ "posthog_organization"."is_not_active_reason",+ "posthog_organization"."session_cookie_age",+ "posthog_organization"."is_member_join_email_enabled",+ "posthog_organization"."is_ai_data_processing_approved",+ "posthog_organization"."is_ai_training_opted_in",+ "posthog_organization"."is_ai_training_locked",+ "posthog_organization"."is_ai_training_cta_shown",+ "posthog_organization"."enforce_2fa",+ "posthog_organization"."enforce_verified_domains",+ "posthog_organization"."members_can_invite",+ "posthog_organization"."members_can_create_projects",+ "posthog_organization"."members_can_use_personal_api_keys",+ "posthog_organization"."members_can_see_org_members",+ "posthog_organization"."uses_most_specific_access_resolution",+ "posthog_organization"."allow_publicly_shared_resources",+ "posthog_organization"."member_notice",+ "posthog_organization"."read_only_mcp_access",+ "posthog_organization"."default_role_id",+ "posthog_organization"."plugins_access_level",+ "posthog_organization"."for_internal_metrics",+ "posthog_organization"."default_anonymize_ips",+ "posthog_organization"."is_pending_deletion",+ "posthog_organization"."customer_id",+ "posthog_organization"."available_product_features",+ "posthog_organization"."usage",+ "posthog_organization"."never_drop_data",+ "posthog_organization"."customer_trust_scores",+ "posthog_organization"."has_active_subscription",+ "posthog_organization"."setup_section_2_completed",+ "posthog_organization"."personalization",+ "posthog_organization"."domain_whitelist",+ "posthog_organization"."is_platform"+ FROM "posthog_team"+ INNER JOIN "posthog_organization" ON ("posthog_team"."organization_id" = "posthog_organization"."id")+ WHERE "posthog_team"."id" = 99999+ LIMIT 21'''# ----# name: TestDashboard.test_listing_dashboards_is_not_nplus1.535+# name: TestDashboard.test_listing_dashboards_is_not_nplus1.510'''- SELECT "posthog_taggeditem"."id",- "posthog_taggeditem"."tag_id",- "posthog_taggeditem"."content_type_id",- "posthog_taggeditem"."object_id",- "posthog_taggeditem"."object_uuid",- "posthog_taggeditem"."team_id",- "posthog_tag"."id",- "posthog_tag"."name",- "posthog_tag"."team_id"- FROM "posthog_taggeditem"- INNER JOIN "posthog_tag" ON ("posthog_taggeditem"."tag_id" = "posthog_tag"."id")- WHERE ("posthog_taggeditem"."content_type_id" = 99999- AND "posthog_taggeditem"."object_id" IN (1,- 2,- 3,- 4,- 5 /* ... */))+ SELECT "posthog_dashboard"."id" AS "id",+ "posthog_dashboard"."name" AS "name"+ FROM "posthog_dashboard"+ WHERE (NOT ("posthog_dashboard"."deleted")+ AND "posthog_dashboard"."id" IN (1,+ 2,+ 3,+ 4,+ 5 /* ... */))'''# ----# name: TestDashboard.test_listing_dashboards_is_not_nplus1.536+# name: TestDashboard.test_listing_dashboards_is_not_nplus1.511'''SELECT COUNT(*) AS "__count"FROM "posthog_dashboardtile"@@ -30806,7 +29054,7 @@AND "posthog_dashboardtile"."deleted" IS NOT NULL))'''# ----# name: TestDashboard.test_listing_dashboards_is_not_nplus1.537+# name: TestDashboard.test_listing_dashboards_is_not_nplus1.512'''SELECT "posthog_dashboard"."id","posthog_dashboard"."name",@@ -30838,7 +29086,7 @@5 /* ... */))'''# ----# name: TestDashboard.test_listing_dashboards_is_not_nplus1.538+# name: TestDashboard.test_listing_dashboards_is_not_nplus1.513'''SELECT "posthog_team"."id","posthog_team"."uuid",@@ -30936,7 +29184,7 @@LIMIT 21'''# ----# name: TestDashboard.test_listing_dashboards_is_not_nplus1.539+# name: TestDashboard.test_listing_dashboards_is_not_nplus1.514'''SELECT "posthog_organization"."id","posthog_organization"."name",@@ -30982,60 +29230,7 @@LIMIT 21'''# ----# name: TestDashboard.test_listing_dashboards_is_not_nplus1.54- '''- SELECT "posthog_organizationmembership"."id",- "posthog_organizationmembership"."organization_id",- "posthog_organizationmembership"."user_id",- "posthog_organizationmembership"."level",- "posthog_organizationmembership"."joined_at",- "posthog_organizationmembership"."updated_at",- "posthog_organizationmembership"."invited_by_id",- "posthog_organization"."id",- "posthog_organization"."name",- "posthog_organization"."slug",- "posthog_organization"."logo_media_id",- "posthog_organization"."created_at",- "posthog_organization"."updated_at",- "posthog_organization"."is_active",- "posthog_organization"."is_not_active_reason",- "posthog_organization"."session_cookie_age",- "posthog_organization"."is_member_join_email_enabled",- "posthog_organization"."is_ai_data_processing_approved",- "posthog_organization"."is_ai_training_opted_in",- "posthog_organization"."is_ai_training_locked",- "posthog_organization"."is_ai_training_cta_shown",- "posthog_organization"."enforce_2fa",- "posthog_organization"."enforce_verified_domains",- "posthog_organization"."members_can_invite",- "posthog_organization"."members_can_create_projects",- "posthog_organization"."members_can_use_personal_api_keys",- "posthog_organization"."members_can_see_org_members",- "posthog_organization"."uses_most_specific_access_resolution",- "posthog_organization"."allow_publicly_shared_resources",- "posthog_organization"."member_notice",- "posthog_organization"."read_only_mcp_access",- "posthog_organization"."default_role_id",- "posthog_organization"."plugins_access_level",- "posthog_organization"."for_internal_metrics",- "posthog_organization"."default_anonymize_ips",- "posthog_organization"."is_pending_deletion",- "posthog_organization"."customer_id",- "posthog_organization"."available_product_features",- "posthog_organization"."usage",- "posthog_organization"."never_drop_data",- "posthog_organization"."customer_trust_scores",- "posthog_organization"."has_active_subscription",- "posthog_organization"."setup_section_2_completed",- "posthog_organization"."personalization",- "posthog_organization"."domain_whitelist",- "posthog_organization"."is_platform"- FROM "posthog_organizationmembership"- INNER JOIN "posthog_organization" ON ("posthog_organizationmembership"."organization_id" = "posthog_organization"."id")- WHERE "posthog_organizationmembership"."user_id" = 99999- '''-# ----# name: TestDashboard.test_listing_dashboards_is_not_nplus1.540+# name: TestDashboard.test_listing_dashboards_is_not_nplus1.515'''SELECT "posthog_team"."id","posthog_team"."uuid",@@ -31133,7 +29328,7 @@LIMIT 21'''# ----# name: TestDashboard.test_listing_dashboards_is_not_nplus1.541+# name: TestDashboard.test_listing_dashboards_is_not_nplus1.516'''SELECT "posthog_filesystem"."team_id","posthog_filesystem"."id",@@ -31158,7 +29353,7 @@AND "posthog_filesystem"."shortcut" IS NOT NULL))'''# ----# name: TestDashboard.test_listing_dashboards_is_not_nplus1.542+# name: TestDashboard.test_listing_dashboards_is_not_nplus1.517'''SELECT "posthog_insightviewed"."id","posthog_insightviewed"."team_id",@@ -31176,7 +29371,7 @@UPDATE'''# ----# name: TestDashboard.test_listing_dashboards_is_not_nplus1.543+# name: TestDashboard.test_listing_dashboards_is_not_nplus1.518'''SELECT "posthog_organization"."id","posthog_organization"."name",@@ -31222,7 +29417,7 @@LIMIT 21'''# ----# name: TestDashboard.test_listing_dashboards_is_not_nplus1.544+# name: TestDashboard.test_listing_dashboards_is_not_nplus1.519'''SELECT "posthog_team"."id","posthog_team"."uuid",@@ -31320,7 +29515,62 @@LIMIT 21'''# ----# name: TestDashboard.test_listing_dashboards_is_not_nplus1.545+# name: TestDashboard.test_listing_dashboards_is_not_nplus1.52+ '''+ SELECT "posthog_organizationmembership"."id",+ "posthog_organizationmembership"."organization_id",+ "posthog_organizationmembership"."user_id",+ "posthog_organizationmembership"."level",+ "posthog_organizationmembership"."joined_at",+ "posthog_organizationmembership"."updated_at",+ "posthog_organizationmembership"."invited_by_id",+ "posthog_organization"."id",+ "posthog_organization"."name",+ "posthog_organization"."slug",+ "posthog_organization"."logo_media_id",+ "posthog_organization"."created_at",+ "posthog_organization"."updated_at",+ "posthog_organization"."is_active",+ "posthog_organization"."is_not_active_reason",+ "posthog_organization"."session_cookie_age",+ "posthog_organization"."is_member_join_email_enabled",+ "posthog_organization"."is_ai_data_processing_approved",+ "posthog_organization"."is_ai_training_opted_in",+ "posthog_organization"."is_ai_training_locked",+ "posthog_organization"."is_ai_training_cta_shown",+ "posthog_organization"."enforce_2fa",+ "posthog_organization"."enforce_verified_domains",+ "posthog_organization"."members_can_invite",+ "posthog_organization"."members_can_create_projects",+ "posthog_organization"."members_can_use_personal_api_keys",+ "posthog_organization"."members_can_see_org_members",+ "posthog_organization"."uses_most_specific_access_resolution",+ "posthog_organization"."allow_publicly_shared_resources",+ "posthog_organization"."member_notice",+ "posthog_organization"."read_only_mcp_access",+ "posthog_organization"."default_role_id",+ "posthog_organization"."plugins_access_level",+ "posthog_organization"."for_internal_metrics",+ "posthog_organization"."default_anonymize_ips",+ "posthog_organization"."is_pending_deletion",+ "posthog_organization"."customer_id",+ "posthog_organization"."available_product_features",+ "posthog_organization"."usage",+ "posthog_organization"."never_drop_data",+ "posthog_organization"."customer_trust_scores",+ "posthog_organization"."has_active_subscription",+ "posthog_organization"."setup_section_2_completed",+ "posthog_organization"."personalization",+ "posthog_organization"."domain_whitelist",+ "posthog_organization"."is_platform"+ FROM "posthog_organizationmembership"+ INNER JOIN "posthog_organization" ON ("posthog_organizationmembership"."organization_id" = "posthog_organization"."id")+ WHERE ("posthog_organizationmembership"."organization_id" = '00000000-0000-0000-0000-000000000000'::uuid+ AND "posthog_organizationmembership"."user_id" = 99999)+ LIMIT 21+ '''+# ---+# name: TestDashboard.test_listing_dashboards_is_not_nplus1.520'''SELECT "posthog_dashboardtile"."id","posthog_dashboardtile"."dashboard_id",@@ -31349,7 +29599,7 @@AND "posthog_dashboardtile"."insight_id" = 99999)'''# ----# name: TestDashboard.test_listing_dashboards_is_not_nplus1.546+# name: TestDashboard.test_listing_dashboards_is_not_nplus1.521'''SELECT "posthog_dashboardtile"."id","posthog_dashboardtile"."dashboard_id",@@ -31378,7 +29628,7 @@AND "posthog_dashboardtile"."insight_id" = 99999)'''# ----# name: TestDashboard.test_listing_dashboards_is_not_nplus1.547+# name: TestDashboard.test_listing_dashboards_is_not_nplus1.522'''SELECT "posthog_insightvariable"."id","posthog_insightvariable"."name",@@ -31398,7 +29648,7 @@ORDER BY "posthog_insightvariable"."name" ASC'''# ----# name: TestDashboard.test_listing_dashboards_is_not_nplus1.548+# name: TestDashboard.test_listing_dashboards_is_not_nplus1.523'''SELECT "posthog_teamrevenueanalyticsconfig"."team_id","posthog_teamrevenueanalyticsconfig"."filter_test_accounts",@@ -31411,7 +29661,7 @@LIMIT 21'''# ----# name: TestDashboard.test_listing_dashboards_is_not_nplus1.549+# name: TestDashboard.test_listing_dashboards_is_not_nplus1.524'''SELECT "posthog_teammarketinganalyticsconfig"."team_id","posthog_teammarketinganalyticsconfig"."attribution_window_days",@@ -31427,23 +29677,7 @@LIMIT 21'''# ----# name: TestDashboard.test_listing_dashboards_is_not_nplus1.55- '''- SELECT COUNT(*) AS "__count"- FROM "posthog_dashboard"- INNER JOIN "posthog_team" ON ("posthog_dashboard"."team_id" = "posthog_team"."id")- WHERE (NOT ("posthog_dashboard"."deleted")- AND ("posthog_dashboard"."team_id" =- (SELECT "U0"."parent_team_id" AS "parent_team_id"- FROM "posthog_team" "U0"- WHERE "U0"."id" = 99999- LIMIT 1)- OR ("posthog_team"."parent_team_id" IS NULL- AND "posthog_dashboard"."team_id" = 99999))- AND NOT "posthog_dashboard"."deleted")- '''-# ----# name: TestDashboard.test_listing_dashboards_is_not_nplus1.550+# name: TestDashboard.test_listing_dashboards_is_not_nplus1.525'''SELECT "customer_analytics_teamcustomeranalyticsconfig"."team_id","customer_analytics_teamcustomeranalyticsconfig"."activity_event",@@ -31461,7 +29695,7 @@LIMIT 21'''# ----# name: TestDashboard.test_listing_dashboards_is_not_nplus1.551+# name: TestDashboard.test_listing_dashboards_is_not_nplus1.526'''SELECT "posthog_tag"."name" AS "tag__name"FROM "posthog_taggeditem"@@ -31470,7 +29704,7 @@AND "posthog_taggeditem"."object_id" = 99999)'''# ----# name: TestDashboard.test_listing_dashboards_is_not_nplus1.552+# name: TestDashboard.test_listing_dashboards_is_not_nplus1.527'''SELECT "posthog_user"."id","posthog_user"."password",@@ -31510,15 +29744,8 @@"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.553- '''- SELECT "posthog_organization"."id",+ "posthog_user"."email_opt_in",+ "posthog_organization"."id","posthog_organization"."name","posthog_organization"."slug","posthog_organization"."logo_media_id",@@ -31557,12 +29784,13 @@"posthog_organization"."personalization","posthog_organization"."domain_whitelist","posthog_organization"."is_platform"- FROM "posthog_organization"- WHERE "posthog_organization"."id" = '00000000-0000-0000-0000-000000000000'::uuid- LIMIT 21+ FROM "posthog_user"+ LEFT OUTER JOIN "posthog_organization" ON ("posthog_user"."current_organization_id" = "posthog_organization"."id")+ WHERE ("posthog_user"."is_active"+ AND "posthog_user"."id" = 99999)'''# ----# name: TestDashboard.test_listing_dashboards_is_not_nplus1.554+# name: TestDashboard.test_listing_dashboards_is_not_nplus1.528'''SELECT "posthog_team"."id","posthog_team"."uuid",@@ -31700,7 +29928,7 @@LIMIT 21'''# ----# name: TestDashboard.test_listing_dashboards_is_not_nplus1.555+# name: TestDashboard.test_listing_dashboards_is_not_nplus1.529'''SELECT "posthog_organizationmembership"."id","posthog_organizationmembership"."organization_id",@@ -31755,7 +29983,7 @@LIMIT 21'''# ----# name: TestDashboard.test_listing_dashboards_is_not_nplus1.556+# name: TestDashboard.test_listing_dashboards_is_not_nplus1.53'''SELECT "ee_accesscontrol"."id","ee_accesscontrol"."team_id",@@ -31778,321 +30006,7 @@AND "ee_accesscontrol"."team_id" = 99999))'''# ----# name: TestDashboard.test_listing_dashboards_is_not_nplus1.557- '''- SELECT "posthog_organizationmembership"."id",- "posthog_organizationmembership"."organization_id",- "posthog_organizationmembership"."user_id",- "posthog_organizationmembership"."level",- "posthog_organizationmembership"."joined_at",- "posthog_organizationmembership"."updated_at",- "posthog_organizationmembership"."invited_by_id",- "posthog_organization"."id",- "posthog_organization"."name",- "posthog_organization"."slug",- "posthog_organization"."logo_media_id",- "posthog_organization"."created_at",- "posthog_organization"."updated_at",- "posthog_organization"."is_active",- "posthog_organization"."is_not_active_reason",- "posthog_organization"."session_cookie_age",- "posthog_organization"."is_member_join_email_enabled",- "posthog_organization"."is_ai_data_processing_approved",- "posthog_organization"."is_ai_training_opted_in",- "posthog_organization"."is_ai_training_locked",- "posthog_organization"."is_ai_training_cta_shown",- "posthog_organization"."enforce_2fa",- "posthog_organization"."enforce_verified_domains",- "posthog_organization"."members_can_invite",- "posthog_organization"."members_can_create_projects",- "posthog_organization"."members_can_use_personal_api_keys",- "posthog_organization"."members_can_see_org_members",- "posthog_organization"."uses_most_specific_access_resolution",- "posthog_organization"."allow_publicly_shared_resources",- "posthog_organization"."member_notice",- "posthog_organization"."read_only_mcp_access",- "posthog_organization"."default_role_id",- "posthog_organization"."plugins_access_level",- "posthog_organization"."for_internal_metrics",- "posthog_organization"."default_anonymize_ips",- "posthog_organization"."is_pending_deletion",- "posthog_organization"."customer_id",- "posthog_organization"."available_product_features",- "posthog_organization"."usage",- "posthog_organization"."never_drop_data",- "posthog_organization"."customer_trust_scores",- "posthog_organization"."has_active_subscription",- "posthog_organization"."setup_section_2_completed",- "posthog_organization"."personalization",- "posthog_organization"."domain_whitelist",- "posthog_organization"."is_platform"- FROM "posthog_organizationmembership"- INNER JOIN "posthog_organization" ON ("posthog_organizationmembership"."organization_id" = "posthog_organization"."id")- WHERE "posthog_organizationmembership"."user_id" = 99999- '''-# ----# name: TestDashboard.test_listing_dashboards_is_not_nplus1.558- '''- SELECT COUNT(*) AS "__count"- FROM "posthog_dashboard"- INNER JOIN "posthog_team" ON ("posthog_dashboard"."team_id" = "posthog_team"."id")- LEFT OUTER JOIN "posthog_filesystemviewlog" "recent_dashboard_views" ON ("posthog_team"."id" = "recent_dashboard_views"."team_id"- AND (("recent_dashboard_views"."user_id" = 99999- AND "recent_dashboard_views"."type" = 'dashboard'- AND "recent_dashboard_views"."ref" = ("posthog_dashboard"."id")::varchar)))- WHERE ("posthog_team"."project_id" = 99999- AND NOT ("posthog_dashboard"."deleted")- AND NOT ("posthog_dashboard"."creation_mode" = 'unlisted'))- '''-# ----# name: TestDashboard.test_listing_dashboards_is_not_nplus1.559- '''- 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"."quick_filter_ids",- "posthog_dashboard"."customization",- "posthog_dashboard"."deprecated_tags",- "posthog_dashboard"."tags",- "posthog_dashboard"."share_token",- "posthog_dashboard"."is_shared",- "recent_dashboard_views"."viewed_at" AS "last_viewed_at",- ("posthog_dashboard"."id")::varchar AS "_ref_id",-- (SELECT "U0"."path" AS "path"- FROM "posthog_filesystem" "U0"- WHERE (("U0"."surface" IS NULL- OR "U0"."surface" = 'web')- AND "U0"."ref" = ("posthog_dashboard"."id")::varchar- AND "U0"."team_id" = ("posthog_dashboard"."team_id")- AND "U0"."type" = 'dashboard'- AND NOT ("U0"."shortcut"- AND "U0"."shortcut" IS NOT NULL))- ORDER BY "U0"."id" ASC- LIMIT 1) AS "_folder_path",-- (SELECT "U0"."id" AS "id"- FROM "posthog_filesystem" "U0"- WHERE (("U0"."surface" IS NULL- OR "U0"."surface" = 'web')- AND "U0"."ref" = ("posthog_dashboard"."id")::varchar- AND "U0"."team_id" = ("posthog_dashboard"."team_id")- AND "U0"."type" = 'dashboard'- AND NOT ("U0"."shortcut"- AND "U0"."shortcut" IS NOT NULL))- ORDER BY 1 ASC- LIMIT 1) AS "_folder_id",- "T6"."id",- "T6"."password",- "T6"."last_login",- "T6"."first_name",- "T6"."last_name",- "T6"."is_staff",- "T6"."date_joined",- "T6"."uuid",- "T6"."current_organization_id",- "T6"."current_team_id",- "T6"."email",- "T6"."pending_email",- "T6"."distinct_id",- "T6"."is_email_verified",- "T6"."credentials_reviewed_at",- "T6"."requested_password_reset_at",- "T6"."requested_2fa_reset_at",- "T6"."has_seen_product_intro_for",- "T6"."strapi_id",- "T6"."is_active",- "T6"."role_at_organization",- "T6"."theme_mode",- "T6"."partial_notification_settings",- "T6"."anonymize_data",- "T6"."allow_impersonation",- "T6"."toolbar_mode",- "T6"."hedgehog_config",- "T6"."allow_sidebar_suggestions",- "T6"."shortcut_position",- "T6"."passkeys_enabled_for_2fa",- "T6"."hide_mcp_hints",- "T6"."ui_configuration",- "T6"."onboarding_skipped_at",- "T6"."onboarding_skipped_reason",- "T6"."onboarding_skipped_organization_id",- "T6"."onboarding_delegated_to_invite_id",- "T6"."onboarding_delegated_to_organization_id",- "T6"."onboarding_delegation_accepted_at",- "T6"."events_column_config",- "T6"."email_opt_in"- FROM "posthog_dashboard"- INNER JOIN "posthog_team" ON ("posthog_dashboard"."team_id" = "posthog_team"."id")- LEFT OUTER JOIN "posthog_filesystemviewlog" "recent_dashboard_views" ON ("posthog_team"."id" = "recent_dashboard_views"."team_id"- AND (("recent_dashboard_views"."user_id" = 99999- AND "recent_dashboard_views"."type" = 'dashboard'- AND "recent_dashboard_views"."ref" = ("posthog_dashboard"."id")::varchar)))- LEFT OUTER JOIN "posthog_user" "T6" ON ("posthog_dashboard"."created_by_id" = "T6"."id")- WHERE ("posthog_team"."project_id" = 99999- AND NOT ("posthog_dashboard"."deleted")- AND NOT ("posthog_dashboard"."creation_mode" = 'unlisted'))- ORDER BY "posthog_dashboard"."pinned" DESC,- "posthog_dashboard"."name" ASC,- "posthog_dashboard"."id" ASC- LIMIT 300- '''-# ----# name: TestDashboard.test_listing_dashboards_is_not_nplus1.56- '''- 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"."session_recording_retention_period_days",- "posthog_team"."external_data_workspace_id",- "posthog_team"."external_data_workspace_last_synced_at",- "posthog_team"."api_query_rate_limit",- "posthog_team"."drop_events_older_than",- "posthog_team"."base_currency",- "posthog_team"."business_model"- FROM "posthog_team"- WHERE "posthog_team"."id" = 99999- LIMIT 21- '''-# ----# name: TestDashboard.test_listing_dashboards_is_not_nplus1.560- '''- 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.561- '''- SELECT "posthog_taggeditem"."id",- "posthog_taggeditem"."tag_id",- "posthog_taggeditem"."content_type_id",- "posthog_taggeditem"."object_id",- "posthog_taggeditem"."object_uuid",- "posthog_taggeditem"."team_id",- "posthog_tag"."id",- "posthog_tag"."name",- "posthog_tag"."team_id"- FROM "posthog_taggeditem"- INNER JOIN "posthog_tag" ON ("posthog_taggeditem"."tag_id" = "posthog_tag"."id")- WHERE ("posthog_taggeditem"."content_type_id" = 99999- AND "posthog_taggeditem"."object_id" IN (1,- 2,- 3,- 4,- 5 /* ... */))- '''-# ----# name: TestDashboard.test_listing_dashboards_is_not_nplus1.562+# name: TestDashboard.test_listing_dashboards_is_not_nplus1.530'''SELECT "ee_accesscontrol"."id","ee_accesscontrol"."team_id",@@ -32115,7 +30029,7 @@AND "ee_accesscontrol"."team_id" = 99999))'''# ----# name: TestDashboard.test_listing_dashboards_is_not_nplus1.563+# name: TestDashboard.test_listing_dashboards_is_not_nplus1.531'''SELECT "posthog_organizationmembership"."id","posthog_organizationmembership"."organization_id",@@ -32168,7 +30082,7 @@WHERE "posthog_organizationmembership"."user_id" = 99999'''# ----# name: TestDashboard.test_listing_dashboards_is_not_nplus1.564+# name: TestDashboard.test_listing_dashboards_is_not_nplus1.532'''SELECT COUNT(*) AS "__count"FROM "posthog_dashboard"@@ -32182,7 +30096,7 @@AND NOT ("posthog_dashboard"."creation_mode" = 'unlisted'))'''# ----# name: TestDashboard.test_listing_dashboards_is_not_nplus1.565+# name: TestDashboard.test_listing_dashboards_is_not_nplus1.533'''SELECT "posthog_dashboard"."id","posthog_dashboard"."name",@@ -32287,7 +30201,7 @@LIMIT 300'''# ----# name: TestDashboard.test_listing_dashboards_is_not_nplus1.566+# name: TestDashboard.test_listing_dashboards_is_not_nplus1.534'''SELECT "posthog_sharingconfiguration"."id","posthog_sharingconfiguration"."team_id",@@ -32310,7 +30224,7 @@5 /* ... */)'''# ----# name: TestDashboard.test_listing_dashboards_is_not_nplus1.567+# name: TestDashboard.test_listing_dashboards_is_not_nplus1.535'''SELECT "posthog_taggeditem"."id","posthog_taggeditem"."tag_id",@@ -32331,6 +30245,173 @@5 /* ... */))'''# ---+# name: TestDashboard.test_listing_dashboards_is_not_nplus1.54+ '''+ SELECT "posthog_organizationmembership"."id",+ "posthog_organizationmembership"."organization_id",+ "posthog_organizationmembership"."user_id",+ "posthog_organizationmembership"."level",+ "posthog_organizationmembership"."joined_at",+ "posthog_organizationmembership"."updated_at",+ "posthog_organizationmembership"."invited_by_id",+ "posthog_organization"."id",+ "posthog_organization"."name",+ "posthog_organization"."slug",+ "posthog_organization"."logo_media_id",+ "posthog_organization"."created_at",+ "posthog_organization"."updated_at",+ "posthog_organization"."is_active",+ "posthog_organization"."is_not_active_reason",+ "posthog_organization"."session_cookie_age",+ "posthog_organization"."is_member_join_email_enabled",+ "posthog_organization"."is_ai_data_processing_approved",+ "posthog_organization"."is_ai_training_opted_in",+ "posthog_organization"."is_ai_training_locked",+ "posthog_organization"."is_ai_training_cta_shown",+ "posthog_organization"."enforce_2fa",+ "posthog_organization"."enforce_verified_domains",+ "posthog_organization"."members_can_invite",+ "posthog_organization"."members_can_create_projects",+ "posthog_organization"."members_can_use_personal_api_keys",+ "posthog_organization"."members_can_see_org_members",+ "posthog_organization"."uses_most_specific_access_resolution",+ "posthog_organization"."allow_publicly_shared_resources",+ "posthog_organization"."member_notice",+ "posthog_organization"."read_only_mcp_access",+ "posthog_organization"."default_role_id",+ "posthog_organization"."plugins_access_level",+ "posthog_organization"."for_internal_metrics",+ "posthog_organization"."default_anonymize_ips",+ "posthog_organization"."is_pending_deletion",+ "posthog_organization"."customer_id",+ "posthog_organization"."available_product_features",+ "posthog_organization"."usage",+ "posthog_organization"."never_drop_data",+ "posthog_organization"."customer_trust_scores",+ "posthog_organization"."has_active_subscription",+ "posthog_organization"."setup_section_2_completed",+ "posthog_organization"."personalization",+ "posthog_organization"."domain_whitelist",+ "posthog_organization"."is_platform"+ FROM "posthog_organizationmembership"+ INNER JOIN "posthog_organization" ON ("posthog_organizationmembership"."organization_id" = "posthog_organization"."id")+ WHERE "posthog_organizationmembership"."user_id" = 99999+ '''+# ---+# name: TestDashboard.test_listing_dashboards_is_not_nplus1.55+ '''+ SELECT COUNT(*) AS "__count"+ FROM "posthog_dashboard"+ INNER JOIN "posthog_team" ON ("posthog_dashboard"."team_id" = "posthog_team"."id")+ WHERE (NOT ("posthog_dashboard"."deleted")+ AND ("posthog_dashboard"."team_id" =+ (SELECT "U0"."parent_team_id" AS "parent_team_id"+ FROM "posthog_team" "U0"+ WHERE "U0"."id" = 99999+ LIMIT 1)+ OR ("posthog_team"."parent_team_id" IS NULL+ AND "posthog_dashboard"."team_id" = 99999))+ AND NOT "posthog_dashboard"."deleted")+ '''+# ---+# name: TestDashboard.test_listing_dashboards_is_not_nplus1.56+ '''+ 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"."session_recording_retention_period_days",+ "posthog_team"."external_data_workspace_id",+ "posthog_team"."external_data_workspace_last_synced_at",+ "posthog_team"."api_query_rate_limit",+ "posthog_team"."drop_events_older_than",+ "posthog_team"."base_currency",+ "posthog_team"."business_model"+ FROM "posthog_team"+ WHERE "posthog_team"."id" = 99999+ LIMIT 21+ '''+# ---# name: TestDashboard.test_listing_dashboards_is_not_nplus1.57'''SELECT "posthog_filesystem"."team_id",@@ -34581,438 +32662,81 @@"posthog_team"."api_query_rate_limit","posthog_team"."drop_events_older_than","posthog_team"."base_currency",- "posthog_team"."business_model"- FROM "posthog_team"- WHERE "posthog_team"."id" = 99999- LIMIT 21- '''-# ----# name: TestDashboard.test_retrieve_dashboard.12- '''- 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.13- '''- 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.14- '''- SELECT "posthog_insightvariable"."id",- "posthog_insightvariable"."name",- "posthog_insightvariable"."code_name",- "posthog_insightvariable"."type",- "posthog_insightvariable"."default_value",- "posthog_insightvariable"."is_multi"- FROM "posthog_insightvariable"- INNER JOIN "posthog_team" ON ("posthog_insightvariable"."team_id" = "posthog_team"."id")- WHERE ("posthog_insightvariable"."team_id" =- (SELECT "U0"."parent_team_id" AS "parent_team_id"- FROM "posthog_team" "U0"- WHERE "U0"."id" = 99999- LIMIT 1)- OR ("posthog_team"."parent_team_id" IS NULL- AND "posthog_insightvariable"."team_id" = 99999))- ORDER BY "posthog_insightvariable"."name" ASC- '''-# ----# name: TestDashboard.test_retrieve_dashboard.15- '''- SELECT "posthog_dashboardtile"."id",- "posthog_dashboardtile"."dashboard_id",- "posthog_dashboardtile"."insight_id",- "posthog_dashboardtile"."text_id",- "posthog_dashboardtile"."button_tile_id",- "posthog_dashboardtile"."widget_id",- "posthog_dashboardtile"."team_id",- "posthog_dashboardtile"."layouts",- "posthog_dashboardtile"."color",- "posthog_dashboardtile"."filters_hash",- "posthog_dashboardtile"."last_refresh",- "posthog_dashboardtile"."refreshing",- "posthog_dashboardtile"."refresh_attempt",- "posthog_dashboardtile"."filters_overrides",- "posthog_dashboardtile"."show_description",- "posthog_dashboardtile"."transparent_background",- "posthog_dashboardtile"."group_key",- "posthog_dashboardtile"."badge",- "posthog_dashboardtile"."deleted",- "posthog_dashboarditem"."id",- "posthog_dashboarditem"."name",- "posthog_dashboarditem"."derived_name",- "posthog_dashboarditem"."description",- "posthog_dashboarditem"."team_id",- "posthog_dashboarditem"."filters",- "posthog_dashboarditem"."filters_hash",- "posthog_dashboarditem"."query",- "posthog_dashboarditem"."query_metadata",- "posthog_dashboarditem"."order",- "posthog_dashboarditem"."deleted",- "posthog_dashboarditem"."saved",- "posthog_dashboarditem"."created_at",- "posthog_dashboarditem"."refreshing",- "posthog_dashboarditem"."created_by_id",- "posthog_dashboarditem"."is_sample",- "posthog_dashboarditem"."short_id",- "posthog_dashboarditem"."favorited",- "posthog_dashboarditem"."refresh_attempt",- "posthog_dashboarditem"."last_modified_at",- "posthog_dashboarditem"."last_modified_by_id",- "posthog_dashboarditem"."dashboard_id",- "posthog_dashboarditem"."last_refresh",- "posthog_dashboarditem"."layouts",- "posthog_dashboarditem"."color",- "posthog_dashboarditem"."dive_dashboard_id",- "posthog_dashboarditem"."updated_at",- "posthog_dashboarditem"."deprecated_tags",- "posthog_dashboarditem"."tags",- "posthog_team"."id",- "posthog_team"."uuid",- "posthog_team"."organization_id",- "posthog_team"."parent_team_id",- "posthog_team"."project_id",- "posthog_team"."api_token",- "posthog_team"."app_urls",- "posthog_team"."name",- "posthog_team"."slack_incoming_webhook",- "posthog_team"."created_at",- "posthog_team"."updated_at",- "posthog_team"."anonymize_ips",- "posthog_team"."completed_snippet_onboarding",- "posthog_team"."has_completed_onboarding_for",- "posthog_team"."onboarding_tasks",- "posthog_team"."ingested_event",- "posthog_team"."ingested_production_event",- "posthog_team"."ingested_production_event_last_checked_at",- "posthog_team"."person_processing_opt_out",- "posthog_team"."secret_api_token",- "posthog_team"."secret_api_token_backup",- "posthog_team"."session_recording_opt_in",- "posthog_team"."session_recording_sample_rate",- "posthog_team"."session_recording_minimum_duration_milliseconds",- "posthog_team"."session_recording_linked_flag",- "posthog_team"."session_recording_network_payload_capture_config",- "posthog_team"."session_recording_masking_config",- "posthog_team"."session_recording_url_trigger_config",- "posthog_team"."session_recording_url_blocklist_config",- "posthog_team"."session_recording_event_trigger_config",- "posthog_team"."session_recording_trigger_match_type_config",- "posthog_team"."session_recording_trigger_groups",- "posthog_team"."session_replay_config",- "posthog_team"."session_recording_retention_period",- "posthog_team"."event_retention_months",- "posthog_team"."conversations_enabled",- "posthog_team"."conversations_settings",- "posthog_team"."proactive_tasks_enabled",- "posthog_team"."survey_config",- "posthog_team"."surveys_opt_in",- "posthog_team"."product_tours_opt_in",- "posthog_team"."capture_console_log_opt_in",- "posthog_team"."capture_performance_opt_in",- "posthog_team"."capture_dead_clicks",- "posthog_team"."autocapture_opt_out",- "posthog_team"."autocapture_web_vitals_opt_in",- "posthog_team"."autocapture_web_vitals_allowed_metrics",- "posthog_team"."autocapture_exceptions_opt_in",- "posthog_team"."autocapture_exceptions_errors_to_ignore",- "posthog_team"."logs_settings",- "posthog_team"."llm_gateway_enabled_at",- "posthog_team"."llm_gateway_revoked_at",- "posthog_team"."llm_gateway_overspend_allowance_usd",- "posthog_team"."heatmaps_opt_in",- "posthog_team"."receive_org_level_activity_logs",- "posthog_team"."web_analytics_pre_aggregated_tables_enabled",- "posthog_team"."web_analytics_pre_aggregated_tables_version",- "posthog_team"."flags_persistence_default",- "posthog_team"."feature_flag_confirmation_enabled",- "posthog_team"."feature_flag_confirmation_message",- "posthog_team"."default_evaluation_environments_enabled",- "posthog_team"."require_evaluation_environment_tags",- "posthog_team"."default_evaluation_contexts_enabled",- "posthog_team"."require_evaluation_contexts",- "posthog_team"."session_recording_version",- "posthog_team"."signup_token",- "posthog_team"."is_demo",- "posthog_team"."access_control",- "posthog_team"."week_start_day",- "posthog_team"."inject_web_apps",- "posthog_team"."test_account_filters",- "posthog_team"."test_account_filters_default_checked",- "posthog_team"."path_cleaning_filters",- "posthog_team"."timezone",- "posthog_team"."data_attributes",- "posthog_team"."person_display_name_properties",- "posthog_team"."live_events_columns",- "posthog_team"."recording_domains",- "posthog_team"."human_friendly_comparison_periods",- "posthog_team"."cookieless_server_hash_mode",- "posthog_team"."primary_dashboard_id",- "posthog_team"."default_data_theme",- "posthog_team"."extra_settings",- "posthog_team"."modifiers",- "posthog_team"."session_recording_retention_period_days",- "posthog_team"."plugins_opt_in",- "posthog_team"."opt_out_capture",- "posthog_team"."event_names",- "posthog_team"."event_names_with_usage",- "posthog_team"."event_properties",- "posthog_team"."event_properties_with_usage",- "posthog_team"."event_properties_numerical",- "posthog_team"."external_data_workspace_id",- "posthog_team"."external_data_workspace_last_synced_at",- "posthog_team"."api_query_rate_limit",- "posthog_team"."revenue_tracking_config",- "posthog_team"."drop_events_older_than",- "posthog_team"."base_currency",- "posthog_team"."business_model",- "posthog_user"."id",- "posthog_user"."password",- "posthog_user"."last_login",- "posthog_user"."first_name",- "posthog_user"."last_name",- "posthog_user"."is_staff",- "posthog_user"."date_joined",- "posthog_user"."uuid",- "posthog_user"."current_organization_id",- "posthog_user"."current_team_id",- "posthog_user"."email",- "posthog_user"."pending_email",- "posthog_user"."distinct_id",- "posthog_user"."is_email_verified",- "posthog_user"."credentials_reviewed_at",- "posthog_user"."requested_password_reset_at",- "posthog_user"."requested_2fa_reset_at",- "posthog_user"."has_seen_product_intro_for",- "posthog_user"."strapi_id",- "posthog_user"."is_active",- "posthog_user"."role_at_organization",- "posthog_user"."theme_mode",- "posthog_user"."partial_notification_settings",- "posthog_user"."anonymize_data",- "posthog_user"."allow_impersonation",- "posthog_user"."toolbar_mode",- "posthog_user"."hedgehog_config",- "posthog_user"."allow_sidebar_suggestions",- "posthog_user"."shortcut_position",- "posthog_user"."passkeys_enabled_for_2fa",- "posthog_user"."hide_mcp_hints",- "posthog_user"."ui_configuration",- "posthog_user"."onboarding_skipped_at",- "posthog_user"."onboarding_skipped_reason",- "posthog_user"."onboarding_skipped_organization_id",- "posthog_user"."onboarding_delegated_to_invite_id",- "posthog_user"."onboarding_delegated_to_organization_id",- "posthog_user"."onboarding_delegation_accepted_at",- "posthog_user"."events_column_config",- "posthog_user"."email_opt_in",- "T6"."id",- "T6"."password",- "T6"."last_login",- "T6"."first_name",- "T6"."last_name",- "T6"."is_staff",- "T6"."date_joined",- "T6"."uuid",- "T6"."current_organization_id",- "T6"."current_team_id",- "T6"."email",- "T6"."pending_email",- "T6"."distinct_id",- "T6"."is_email_verified",- "T6"."credentials_reviewed_at",- "T6"."requested_password_reset_at",- "T6"."requested_2fa_reset_at",- "T6"."has_seen_product_intro_for",- "T6"."strapi_id",- "T6"."is_active",- "T6"."role_at_organization",- "T6"."theme_mode",- "T6"."partial_notification_settings",- "T6"."anonymize_data",- "T6"."allow_impersonation",- "T6"."toolbar_mode",- "T6"."hedgehog_config",- "T6"."allow_sidebar_suggestions",- "T6"."shortcut_position",- "T6"."passkeys_enabled_for_2fa",- "T6"."hide_mcp_hints",- "T6"."ui_configuration",- "T6"."onboarding_skipped_at",- "T6"."onboarding_skipped_reason",- "T6"."onboarding_skipped_organization_id",- "T6"."onboarding_delegated_to_invite_id",- "T6"."onboarding_delegated_to_organization_id",- "T6"."onboarding_delegation_accepted_at",- "T6"."events_column_config",- "T6"."email_opt_in",- "posthog_text"."id",- "posthog_text"."body",- "posthog_text"."agent_context",- "posthog_text"."created_by_id",- "posthog_text"."last_modified_at",- "posthog_text"."last_modified_by_id",- "posthog_text"."team_id",- "posthog_buttontile"."id",- "posthog_buttontile"."url",- "posthog_buttontile"."text",- "posthog_buttontile"."placement",- "posthog_buttontile"."style",- "posthog_buttontile"."created_by_id",- "posthog_buttontile"."last_modified_at",- "posthog_buttontile"."last_modified_by_id",- "posthog_buttontile"."team_id",- "posthog_dashboardwidget"."id",- "posthog_dashboardwidget"."widget_type",- "posthog_dashboardwidget"."name",- "posthog_dashboardwidget"."description",- "posthog_dashboardwidget"."config",- "posthog_dashboardwidget"."created_by_id",- "posthog_dashboardwidget"."last_modified_at",- "posthog_dashboardwidget"."last_modified_by_id",- "posthog_dashboardwidget"."team_id",- "T10"."id",- "T10"."password",- "T10"."last_login",- "T10"."first_name",- "T10"."last_name",- "T10"."is_staff",- "T10"."date_joined",- "T10"."uuid",- "T10"."current_organization_id",- "T10"."current_team_id",- "T10"."email",- "T10"."pending_email",- "T10"."distinct_id",- "T10"."is_email_verified",- "T10"."credentials_reviewed_at",- "T10"."requested_password_reset_at",- "T10"."requested_2fa_reset_at",- "T10"."has_seen_product_intro_for",- "T10"."strapi_id",- "T10"."is_active",- "T10"."role_at_organization",- "T10"."theme_mode",- "T10"."partial_notification_settings",- "T10"."anonymize_data",- "T10"."allow_impersonation",- "T10"."toolbar_mode",- "T10"."hedgehog_config",- "T10"."allow_sidebar_suggestions",- "T10"."shortcut_position",- "T10"."passkeys_enabled_for_2fa",- "T10"."hide_mcp_hints",- "T10"."ui_configuration",- "T10"."onboarding_skipped_at",- "T10"."onboarding_skipped_reason",- "T10"."onboarding_skipped_organization_id",- "T10"."onboarding_delegated_to_invite_id",- "T10"."onboarding_delegated_to_organization_id",- "T10"."onboarding_delegation_accepted_at",- "T10"."events_column_config",- "T10"."email_opt_in",- "T11"."id",- "T11"."password",- "T11"."last_login",- "T11"."first_name",- "T11"."last_name",- "T11"."is_staff",- "T11"."date_joined",- "T11"."uuid",- "T11"."current_organization_id",- "T11"."current_team_id",- "T11"."email",- "T11"."pending_email",- "T11"."distinct_id",- "T11"."is_email_verified",- "T11"."credentials_reviewed_at",- "T11"."requested_password_reset_at",- "T11"."requested_2fa_reset_at",- "T11"."has_seen_product_intro_for",- "T11"."strapi_id",- "T11"."is_active",- "T11"."role_at_organization",- "T11"."theme_mode",- "T11"."partial_notification_settings",- "T11"."anonymize_data",- "T11"."allow_impersonation",- "T11"."toolbar_mode",- "T11"."hedgehog_config",- "T11"."allow_sidebar_suggestions",- "T11"."shortcut_position",- "T11"."passkeys_enabled_for_2fa",- "T11"."hide_mcp_hints",- "T11"."ui_configuration",- "T11"."onboarding_skipped_at",- "T11"."onboarding_skipped_reason",- "T11"."onboarding_skipped_organization_id",- "T11"."onboarding_delegated_to_invite_id",- "T11"."onboarding_delegated_to_organization_id",- "T11"."onboarding_delegation_accepted_at",- "T11"."events_column_config",- "T11"."email_opt_in"- FROM "posthog_dashboardtile"- INNER JOIN "posthog_dashboard" ON ("posthog_dashboardtile"."dashboard_id" = "posthog_dashboard"."id")- LEFT OUTER JOIN "posthog_dashboarditem" ON ("posthog_dashboardtile"."insight_id" = "posthog_dashboarditem"."id")- LEFT OUTER JOIN "posthog_team" ON ("posthog_dashboarditem"."team_id" = "posthog_team"."id")- LEFT OUTER JOIN "posthog_user" ON ("posthog_dashboarditem"."created_by_id" = "posthog_user"."id")- LEFT OUTER JOIN "posthog_user" "T6" ON ("posthog_dashboarditem"."last_modified_by_id" = "T6"."id")- LEFT OUTER JOIN "posthog_text" ON ("posthog_dashboardtile"."text_id" = "posthog_text"."id")- LEFT OUTER JOIN "posthog_buttontile" ON ("posthog_dashboardtile"."button_tile_id" = "posthog_buttontile"."id")- LEFT OUTER JOIN "posthog_dashboardwidget" ON ("posthog_dashboardtile"."widget_id" = "posthog_dashboardwidget"."id")- LEFT OUTER JOIN "posthog_user" "T10" ON ("posthog_dashboardwidget"."created_by_id" = "T10"."id")- LEFT OUTER JOIN "posthog_user" "T11" ON ("posthog_dashboardwidget"."last_modified_by_id" = "T11"."id")- WHERE (NOT ("posthog_dashboardtile"."deleted"- AND "posthog_dashboardtile"."deleted" IS NOT NULL)- AND NOT ("posthog_dashboard"."deleted")- AND "posthog_dashboardtile"."dashboard_id" = 99999- AND NOT ("posthog_dashboard"."deleted"- AND "posthog_dashboardtile"."deleted"- AND "posthog_dashboardtile"."deleted" IS NOT NULL)- AND (NOT "posthog_dashboarditem"."deleted"- OR "posthog_dashboardtile"."insight_id" IS NULL))- ORDER BY "posthog_dashboarditem"."order" ASC+ "posthog_team"."business_model"+ FROM "posthog_team"+ WHERE "posthog_team"."id" = 99999+ LIMIT 21+ '''+# ---+# name: TestDashboard.test_retrieve_dashboard.12+ '''+ 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+# name: TestDashboard.test_retrieve_dashboard.13+ '''+ 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.14+ '''+ SELECT "posthog_insightvariable"."id",+ "posthog_insightvariable"."name",+ "posthog_insightvariable"."code_name",+ "posthog_insightvariable"."type",+ "posthog_insightvariable"."default_value",+ "posthog_insightvariable"."is_multi"+ FROM "posthog_insightvariable"+ INNER JOIN "posthog_team" ON ("posthog_insightvariable"."team_id" = "posthog_team"."id")+ WHERE ("posthog_insightvariable"."team_id" =+ (SELECT "U0"."parent_team_id" AS "parent_team_id"+ FROM "posthog_team" "U0"+ WHERE "U0"."id" = 99999+ LIMIT 1)+ OR ("posthog_team"."parent_team_id" IS NULL+ AND "posthog_insightvariable"."team_id" = 99999))+ ORDER BY "posthog_insightvariable"."name" ASC+ '''+# ---+# name: TestDashboard.test_retrieve_dashboard.15'''SELECT "posthog_dashboardtile"."id","posthog_dashboardtile"."dashboard_id",@@ -38256,155 +35980,6 @@5 /* ... */))'''# ----# name: TestDashboard.test_retrieve_dashboard_list.53- '''- 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"."quick_filter_ids",- "posthog_dashboard"."customization",- "posthog_dashboard"."deprecated_tags",- "posthog_dashboard"."tags",- "posthog_dashboard"."share_token",- "posthog_dashboard"."is_shared",- "recent_dashboard_views"."viewed_at" AS "last_viewed_at",- ("posthog_dashboard"."id")::varchar AS "_ref_id",-- (SELECT "U0"."path" AS "path"- FROM "posthog_filesystem" "U0"- WHERE (("U0"."surface" IS NULL- OR "U0"."surface" = 'web')- AND "U0"."ref" = ("posthog_dashboard"."id")::varchar- AND "U0"."team_id" = ("posthog_dashboard"."team_id")- AND "U0"."type" = 'dashboard'- AND NOT ("U0"."shortcut"- AND "U0"."shortcut" IS NOT NULL))- ORDER BY "U0"."id" ASC- LIMIT 1) AS "_folder_path",-- (SELECT "U0"."id" AS "id"- FROM "posthog_filesystem" "U0"- WHERE (("U0"."surface" IS NULL- OR "U0"."surface" = 'web')- AND "U0"."ref" = ("posthog_dashboard"."id")::varchar- AND "U0"."team_id" = ("posthog_dashboard"."team_id")- AND "U0"."type" = 'dashboard'- AND NOT ("U0"."shortcut"- AND "U0"."shortcut" IS NOT NULL))- ORDER BY 1 ASC- LIMIT 1) AS "_folder_id",- "T6"."id",- "T6"."password",- "T6"."last_login",- "T6"."first_name",- "T6"."last_name",- "T6"."is_staff",- "T6"."date_joined",- "T6"."uuid",- "T6"."current_organization_id",- "T6"."current_team_id",- "T6"."email",- "T6"."pending_email",- "T6"."distinct_id",- "T6"."is_email_verified",- "T6"."credentials_reviewed_at",- "T6"."requested_password_reset_at",- "T6"."requested_2fa_reset_at",- "T6"."has_seen_product_intro_for",- "T6"."strapi_id",- "T6"."is_active",- "T6"."role_at_organization",- "T6"."theme_mode",- "T6"."partial_notification_settings",- "T6"."anonymize_data",- "T6"."allow_impersonation",- "T6"."toolbar_mode",- "T6"."hedgehog_config",- "T6"."allow_sidebar_suggestions",- "T6"."shortcut_position",- "T6"."passkeys_enabled_for_2fa",- "T6"."hide_mcp_hints",- "T6"."ui_configuration",- "T6"."onboarding_skipped_at",- "T6"."onboarding_skipped_reason",- "T6"."onboarding_skipped_organization_id",- "T6"."onboarding_delegated_to_invite_id",- "T6"."onboarding_delegated_to_organization_id",- "T6"."onboarding_delegation_accepted_at",- "T6"."events_column_config",- "T6"."email_opt_in"- FROM "posthog_dashboard"- INNER JOIN "posthog_team" ON ("posthog_dashboard"."team_id" = "posthog_team"."id")- LEFT OUTER JOIN "posthog_filesystemviewlog" "recent_dashboard_views" ON ("posthog_team"."id" = "recent_dashboard_views"."team_id"- AND (("recent_dashboard_views"."user_id" = 99999- AND "recent_dashboard_views"."type" = 'dashboard'- AND "recent_dashboard_views"."ref" = ("posthog_dashboard"."id")::varchar)))- LEFT OUTER JOIN "posthog_user" "T6" ON ("posthog_dashboard"."created_by_id" = "T6"."id")- WHERE ("posthog_team"."project_id" = 99999- AND NOT ("posthog_dashboard"."deleted")- AND NOT ("posthog_dashboard"."creation_mode" = 'unlisted'))- ORDER BY "posthog_dashboard"."pinned" DESC,- "posthog_dashboard"."name" ASC,- "posthog_dashboard"."id" ASC- LIMIT 100- '''-# ----# name: TestDashboard.test_retrieve_dashboard_list.54- '''- 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.55- '''- SELECT "posthog_taggeditem"."id",- "posthog_taggeditem"."tag_id",- "posthog_taggeditem"."content_type_id",- "posthog_taggeditem"."object_id",- "posthog_taggeditem"."object_uuid",- "posthog_taggeditem"."team_id",- "posthog_tag"."id",- "posthog_tag"."name",- "posthog_tag"."team_id"- FROM "posthog_taggeditem"- INNER JOIN "posthog_tag" ON ("posthog_taggeditem"."tag_id" = "posthog_tag"."id")- WHERE ("posthog_taggeditem"."content_type_id" = 99999- AND "posthog_taggeditem"."object_id" IN (1,- 2,- 3,- 4,- 5 /* ... */))- '''-# ---# name: TestDashboard.test_retrieve_dashboard_list.6'''SELECT "ee_accesscontrol"."id",diff --git a/products/conversations/frontend/components/ComposeTicket/ComposeTicketModalHost.tsx b/products/conversations/frontend/components/ComposeTicket/ComposeTicketModalHost.tsxnew file mode 100644index 000000000000..f750cb0321b5--- /dev/null+++ b/products/conversations/frontend/components/ComposeTicket/ComposeTicketModalHost.tsx@@ -0,0 +1,22 @@+import { useValues } from 'kea'+import { Suspense } from 'react'++import { useKeepMountedWhileOpen } from 'lib/hooks/useKeepMountedWhileOpen'+import { lazyWithRetry } from 'lib/utils/retryImport'++import { composeTicketLogic } from './composeTicketLogic'++// The modal anchors the support rich text editor (tiptap and prosemirror), so it loads only when it opens.+const ComposeTicketModal = lazyWithRetry(() =>+ import('./ComposeTicketModal').then((m) => ({ default: m.ComposeTicketModal }))+)++export function ComposeTicketModalHost(): JSX.Element | null {+ const { isOpen } = useValues(composeTicketLogic)+ const shouldRender = useKeepMountedWhileOpen(isOpen)+ return shouldRender ? (+ <Suspense fallback={null}>+ <ComposeTicketModal />+ </Suspense>+ ) : null+}diff --git a/products/conversations/manifest.tsx b/products/conversations/manifest.tsxindex 656f4e6800e7..59d4baaeb210 100644--- a/products/conversations/manifest.tsx+++ b/products/conversations/manifest.tsx@@ -6,6 +6,12 @@ import { ActivityScope, FileSystemIconColor, ProductManifest } from '../../frontexport const manifest: ProductManifest = {name: 'Support',+ globalModals: {+ ComposeTicketModal: () =>+ import('./frontend/components/ComposeTicket/ComposeTicketModalHost').then(+ (module) => module.ComposeTicketModalHost+ ),+ },activityDescribers: {[ActivityScope.TICKET]: () =>import('./frontend/activityDescriber').then((module) => module.ticketActivityDescriber),diff --git a/products/customer_analytics/frontend/components/Accounts/accountSessionReplaysLogic.test.ts b/products/customer_analytics/frontend/components/Accounts/accountSessionReplaysLogic.test.tsindex 96d3587486b4..f949def622e3 100644--- a/products/customer_analytics/frontend/components/Accounts/accountSessionReplaysLogic.test.ts+++ b/products/customer_analytics/frontend/components/Accounts/accountSessionReplaysLogic.test.ts@@ -274,27 +274,22 @@ describe('accountSessionReplaysLogic', () => {it('opens the global player without changing filters or rows and emits no customer data', async () => {const capture = jest.spyOn(posthog, 'capture')- sessionPlayerModalLogic.mount()- try {- const logic = mount()- await expectLogic(logic).toFinishAllListeners()- logic.actions.setUser(logic.values.availableUsers[0])- await expectLogic(logic).toFinishAllListeners()- const list = logic.values.replayList- logic.actions.openRecording('recording-one')- expect(sessionPlayerModalLogic.values.activeSessionRecording).toEqual({ id: 'recording-one' })- sessionPlayerModalLogic.actions.closeSessionPlayer()- expect(logic.values.replayList).toBe(list)- expect(logic.values.selectedUser?.value).toBe(PERSON_UUID)- expect(capture).toHaveBeenCalledWith(AccountsEvents.ReplaysRecordingOpened)- const replayCalls = capture.mock.calls.filter(([event]) =>- event.startsWith('customer analytics account replay')- )- expect(JSON.stringify(replayCalls)).not.toMatch(- /account-key-one|recording-one|Example user|example-user|11111111/- )- } finally {- sessionPlayerModalLogic.unmount()- }+ const logic = mount()+ await expectLogic(logic).toFinishAllListeners()+ logic.actions.setUser(logic.values.availableUsers[0])+ await expectLogic(logic).toFinishAllListeners()+ const list = logic.values.replayList+ logic.actions.openRecording('recording-one')+ expect(sessionPlayerModalLogic.findMounted()?.values.activeSessionRecording).toEqual({ id: 'recording-one' })+ sessionPlayerModalLogic.actions.closeSessionPlayer()+ expect(logic.values.replayList).toBe(list)+ expect(logic.values.selectedUser?.value).toBe(PERSON_UUID)+ expect(capture).toHaveBeenCalledWith(AccountsEvents.ReplaysRecordingOpened)+ const replayCalls = capture.mock.calls.filter(([event]) =>+ event.startsWith('customer analytics account replay')+ )+ expect(JSON.stringify(replayCalls)).not.toMatch(+ /account-key-one|recording-one|Example user|example-user|11111111/+ )})})diff --git a/products/customer_analytics/frontend/components/Accounts/accountSessionReplaysLogic.ts b/products/customer_analytics/frontend/components/Accounts/accountSessionReplaysLogic.tsindex 56fea7b7ab66..4cee02a7dec6 100644--- a/products/customer_analytics/frontend/components/Accounts/accountSessionReplaysLogic.ts+++ b/products/customer_analytics/frontend/components/Accounts/accountSessionReplaysLogic.ts@@ -69,6 +69,17 @@ export interface accountSessionReplaysLogicValues {// Generated by kea-typegen. Update if you're an agent, ignore if you're human.export interface accountSessionReplaysLogicActions {+ openSessionPlayer: (+ sessionRecording: Pick<SessionRecordingType, 'id' | 'matching_events'>,+ initialTimestamp?: number | null | undefined,+ modalContext?:+ | import('scenes/session-recordings/player/modal/sessionPlayerModalLogic').SessionPlayerModalContext+ | undefined+ ) => {+ initialTimestamp: number | null+ modalContext: import('scenes/session-recordings/player/modal/sessionPlayerModalLogic').SessionPlayerModalContext+ sessionRecording: Pick<SessionRecordingType, 'id' | 'matching_events'>+ } // sessionPlayerModalLogicloadMore: () => {value: true}@@ -128,7 +139,10 @@ export const accountSessionReplaysLogic: LogicWrapper<accountSessionReplaysLogicprops({} as AccountSessionReplaysLogicProps),key((props) => `${props.projectId}:${props.accountId}:${props.externalId}:${props.instanceId ?? 'default'}`),path((key) => ['products', 'customerAnalytics', 'accountSessionReplaysLogic', key]),- connect({ values: [teamLogic, ['customerAnalyticsConfig']] }),+ connect({+ values: [teamLogic, ['customerAnalyticsConfig']],+ actions: [sessionPlayerModalLogic, ['openSessionPlayer']],+ }),actions({setDateRange: (dateFrom: string | null, dateTo: string | null) => ({ dateFrom, dateTo }),setUser: (user: AccountReplayUserOption | null) => ({ user }),@@ -271,7 +285,7 @@ export const accountSessionReplaysLogic: LogicWrapper<accountSessionReplaysLogicvalues.replayList?.recordings.some((recording) => recording.id === id)) {posthog.capture(AccountsEvents.ReplaysRecordingOpened)- sessionPlayerModalLogic.actions.openSessionPlayer({ id })+ actions.openSessionPlayer({ id })}},[teamLogic.actionTypes.loadCurrentTeamSuccess]: () => actions.loadReplayList({ append: false }),diff --git a/products/logs/frontend/components/LogsViewer/LogsViewerModal/LogsViewerModalHost.tsx b/products/logs/frontend/components/LogsViewer/LogsViewerModal/LogsViewerModalHost.tsxnew file mode 100644index 000000000000..98cc12c1bc5c--- /dev/null+++ b/products/logs/frontend/components/LogsViewer/LogsViewerModal/LogsViewerModalHost.tsx@@ -0,0 +1,20 @@+import { useValues } from 'kea'+import { Suspense } from 'react'++import { useKeepMountedWhileOpen } from 'lib/hooks/useKeepMountedWhileOpen'+import { lazyWithRetry } from 'lib/utils/retryImport'++import { logsViewerModalLogic } from './logsViewerModalLogic'++// The viewer's sparkline anchors chart.js, so the modal loads only when it opens.+const LogsViewerModal = lazyWithRetry(() => import('./LogsViewerModal').then((m) => ({ default: m.LogsViewerModal })))++export function LogsViewerModalHost(): JSX.Element | null {+ const { isOpen } = useValues(logsViewerModalLogic)+ const shouldRender = useKeepMountedWhileOpen(isOpen)+ return shouldRender ? (+ <Suspense fallback={null}>+ <LogsViewerModal />+ </Suspense>+ ) : null+}diff --git a/products/logs/manifest.tsx b/products/logs/manifest.tsxindex 23280636b572..cba166f4cb84 100644--- a/products/logs/manifest.tsx+++ b/products/logs/manifest.tsx@@ -10,6 +10,12 @@ import type { LogsSceneActiveTab } from './frontend/logsSceneLogic'export const manifest: ProductManifest = {name: 'Logs',+ globalModals: {+ LogsViewerModal: () =>+ import('./frontend/components/LogsViewer/LogsViewerModal/LogsViewerModalHost').then(+ (module) => module.LogsViewerModalHost+ ),+ },scenes: {Logs: {import: () => import('./frontend/LogsScene'),diff --git a/products/replay/manifest.tsx b/products/replay/manifest.tsxindex 5babb3f566ca..82084789b0ab 100644--- a/products/replay/manifest.tsx+++ b/products/replay/manifest.tsx@@ -8,6 +8,12 @@ import { ActivityScope, ProductManifest, RecordingUniversalFilters, ReplayTabs }export const manifest: ProductManifest = {name: 'Replay',+ globalModals: {+ SessionPlayerModal: () =>+ import('scenes/session-recordings/player/modal/SessionPlayerModalHost').then(+ (module) => module.SessionPlayerModalHost+ ),+ },activityDescribers: {[ActivityScope.REPLAY]: () =>import('scenes/session-recordings/activityDescription').then((module) => module.replayActivityDescriber),