diff --git a/posthog/session_recordings/test/__snapshots__/test_session_recordings.ambr b/posthog/session_recordings/test/__snapshots__/test_session_recordings.ambr index 80349bbc75121..b63b1c5a0f1cb 100644 --- a/posthog/session_recordings/test/__snapshots__/test_session_recordings.ambr +++ b/posthog/session_recordings/test/__snapshots__/test_session_recordings.ambr @@ -743,6 +743,42 @@ # --- # name: TestSessionRecordings.test_get_session_recordings.24 ''' +<<<<<<< HEAD +======= + SELECT "posthog_datawarehousejoin"."created_by_id", + "posthog_datawarehousejoin"."created_at", + "posthog_datawarehousejoin"."deleted", + "posthog_datawarehousejoin"."deleted_at", + "posthog_datawarehousejoin"."id", + "posthog_datawarehousejoin"."team_id", + "posthog_datawarehousejoin"."source_table_name", + "posthog_datawarehousejoin"."source_table_key", + "posthog_datawarehousejoin"."joining_table_name", + "posthog_datawarehousejoin"."joining_table_key", + "posthog_datawarehousejoin"."field_name", + "posthog_datawarehousejoin"."configuration" + FROM "posthog_datawarehousejoin" + WHERE ("posthog_datawarehousejoin"."team_id" = 99999 + AND NOT ("posthog_datawarehousejoin"."deleted" + AND "posthog_datawarehousejoin"."deleted" IS NOT NULL)) + ''' +# --- +# name: TestSessionRecordings.test_get_session_recordings.25 + ''' + SELECT "posthog_grouptypemapping"."id", + "posthog_grouptypemapping"."team_id", + "posthog_grouptypemapping"."project_id", + "posthog_grouptypemapping"."group_type", + "posthog_grouptypemapping"."group_type_index", + "posthog_grouptypemapping"."name_singular", + "posthog_grouptypemapping"."name_plural" + FROM "posthog_grouptypemapping" + WHERE "posthog_grouptypemapping"."team_id" = 99999 + ''' +# --- +# name: TestSessionRecordings.test_get_session_recordings.26 + ''' +>>>>>>> c835d19e29 (Update query snapshots) SELECT "posthog_datawarehousesavedquery"."created_by_id", "posthog_datawarehousesavedquery"."created_at", "posthog_datawarehousesavedquery"."deleted", @@ -847,7 +883,8 @@ "posthog_datawarehousejoin"."source_table_key", "posthog_datawarehousejoin"."joining_table_name", "posthog_datawarehousejoin"."joining_table_key", - "posthog_datawarehousejoin"."field_name" + "posthog_datawarehousejoin"."field_name", + "posthog_datawarehousejoin"."configuration" FROM "posthog_datawarehousejoin" WHERE ("posthog_datawarehousejoin"."team_id" = 99999 AND NOT ("posthog_datawarehousejoin"."deleted" @@ -2529,7 +2566,27 @@ LIMIT 21 ''' # --- -# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.124 +# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.11 + ''' + SELECT "posthog_datawarehousejoin"."created_by_id", + "posthog_datawarehousejoin"."created_at", + "posthog_datawarehousejoin"."deleted", + "posthog_datawarehousejoin"."deleted_at", + "posthog_datawarehousejoin"."id", + "posthog_datawarehousejoin"."team_id", + "posthog_datawarehousejoin"."source_table_name", + "posthog_datawarehousejoin"."source_table_key", + "posthog_datawarehousejoin"."joining_table_name", + "posthog_datawarehousejoin"."joining_table_key", + "posthog_datawarehousejoin"."field_name", + "posthog_datawarehousejoin"."configuration" + FROM "posthog_datawarehousejoin" + WHERE ("posthog_datawarehousejoin"."team_id" = 99999 + AND NOT ("posthog_datawarehousejoin"."deleted" + AND "posthog_datawarehousejoin"."deleted" IS NOT NULL)) + ''' +# --- +# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.110 ''' SELECT "posthog_grouptypemapping"."id", "posthog_grouptypemapping"."team_id", @@ -2542,7 +2599,7 @@ WHERE "posthog_grouptypemapping"."team_id" = 99999 ''' # --- -# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.125 +# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.111 ''' SELECT "posthog_datawarehousesavedquery"."created_by_id", "posthog_datawarehousesavedquery"."created_at", @@ -2563,7 +2620,7 @@ AND "posthog_datawarehousesavedquery"."deleted" IS NOT NULL)) ''' # --- -# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.126 +# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.112 ''' SELECT "posthog_datawarehousetable"."created_by_id", "posthog_datawarehousetable"."created_at", @@ -2636,7 +2693,7 @@ AND "posthog_datawarehousetable"."deleted" IS NOT NULL)) ''' # --- -# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.127 +# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.113 ''' SELECT "posthog_datawarehousejoin"."created_by_id", "posthog_datawarehousejoin"."created_at", @@ -2648,14 +2705,15 @@ "posthog_datawarehousejoin"."source_table_key", "posthog_datawarehousejoin"."joining_table_name", "posthog_datawarehousejoin"."joining_table_key", - "posthog_datawarehousejoin"."field_name" + "posthog_datawarehousejoin"."field_name", + "posthog_datawarehousejoin"."configuration" FROM "posthog_datawarehousejoin" WHERE ("posthog_datawarehousejoin"."team_id" = 99999 AND NOT ("posthog_datawarehousejoin"."deleted" AND "posthog_datawarehousejoin"."deleted" IS NOT NULL)) ''' # --- -# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.128 +# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.114 ''' SELECT "posthog_grouptypemapping"."id", "posthog_grouptypemapping"."team_id", @@ -2668,7 +2726,7 @@ WHERE "posthog_grouptypemapping"."team_id" = 99999 ''' # --- -# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.129 +# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.115 ''' SELECT "posthog_datawarehousesavedquery"."created_by_id", "posthog_datawarehousesavedquery"."created_at", @@ -2689,26 +2747,7 @@ AND "posthog_datawarehousesavedquery"."deleted" IS NOT NULL)) ''' # --- -# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.13 - ''' - SELECT "posthog_datawarehousejoin"."created_by_id", - "posthog_datawarehousejoin"."created_at", - "posthog_datawarehousejoin"."deleted", - "posthog_datawarehousejoin"."deleted_at", - "posthog_datawarehousejoin"."id", - "posthog_datawarehousejoin"."team_id", - "posthog_datawarehousejoin"."source_table_name", - "posthog_datawarehousejoin"."source_table_key", - "posthog_datawarehousejoin"."joining_table_name", - "posthog_datawarehousejoin"."joining_table_key", - "posthog_datawarehousejoin"."field_name" - FROM "posthog_datawarehousejoin" - WHERE ("posthog_datawarehousejoin"."team_id" = 99999 - AND NOT ("posthog_datawarehousejoin"."deleted" - AND "posthog_datawarehousejoin"."deleted" IS NOT NULL)) - ''' -# --- -# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.130 +# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.116 ''' SELECT "posthog_datawarehousetable"."created_by_id", "posthog_datawarehousetable"."created_at", @@ -2781,7 +2820,7 @@ AND "posthog_datawarehousetable"."deleted" IS NOT NULL)) ''' # --- -# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.131 +# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.117 ''' SELECT "posthog_datawarehousejoin"."created_by_id", "posthog_datawarehousejoin"."created_at", @@ -2793,14 +2832,15 @@ "posthog_datawarehousejoin"."source_table_key", "posthog_datawarehousejoin"."joining_table_name", "posthog_datawarehousejoin"."joining_table_key", - "posthog_datawarehousejoin"."field_name" + "posthog_datawarehousejoin"."field_name", + "posthog_datawarehousejoin"."configuration" FROM "posthog_datawarehousejoin" WHERE ("posthog_datawarehousejoin"."team_id" = 99999 AND NOT ("posthog_datawarehousejoin"."deleted" AND "posthog_datawarehousejoin"."deleted" IS NOT NULL)) ''' # --- -# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.132 +# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.118 ''' SELECT "posthog_sessionrecording"."id", "posthog_sessionrecording"."session_id", @@ -2832,7 +2872,7 @@ AND "posthog_sessionrecording"."team_id" = 99999) ''' # --- -# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.133 +# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.119 ''' SELECT "posthog_sessionrecordingviewed"."session_id" FROM "posthog_sessionrecordingviewed" @@ -2840,7 +2880,15 @@ AND "posthog_sessionrecordingviewed"."user_id" = 99999) ''' # --- -# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.134 +# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.12 + ''' + SELECT "posthog_sessionrecordingviewed"."session_id" + FROM "posthog_sessionrecordingviewed" + WHERE ("posthog_sessionrecordingviewed"."team_id" = 99999 + AND "posthog_sessionrecordingviewed"."user_id" = 99999) + ''' +# --- +# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.120 ''' SELECT "posthog_persondistinctid"."id", "posthog_persondistinctid"."team_id", @@ -2868,7 +2916,7 @@ AND "posthog_persondistinctid"."team_id" = 99999) ''' # --- -# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.135 +# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.121 ''' SELECT "posthog_team"."id", "posthog_team"."uuid", @@ -2938,7 +2986,7 @@ LIMIT 21 ''' # --- -# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.136 +# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.122 ''' SELECT "posthog_person"."id", "posthog_person"."created_at", @@ -2957,7 +3005,7 @@ LIMIT 21 ''' # --- -# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.137 +# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.123 ''' SELECT "posthog_person"."id", "posthog_person"."created_at", @@ -2976,9 +3024,57 @@ LIMIT 21 ''' # --- -# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.138 +# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.124 ''' - SELECT "posthog_user"."id", + SELECT "posthog_grouptypemapping"."id", + "posthog_grouptypemapping"."team_id", + "posthog_grouptypemapping"."project_id", + "posthog_grouptypemapping"."group_type", + "posthog_grouptypemapping"."group_type_index", + "posthog_grouptypemapping"."name_singular", + "posthog_grouptypemapping"."name_plural" + FROM "posthog_grouptypemapping" + WHERE "posthog_grouptypemapping"."team_id" = 99999 + ''' +# --- +# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.125 + ''' + SELECT "posthog_datawarehousesavedquery"."created_by_id", + "posthog_datawarehousesavedquery"."created_at", + "posthog_datawarehousesavedquery"."deleted", + "posthog_datawarehousesavedquery"."deleted_at", + "posthog_datawarehousesavedquery"."id", + "posthog_datawarehousesavedquery"."name", + "posthog_datawarehousesavedquery"."team_id", + "posthog_datawarehousesavedquery"."columns", + "posthog_datawarehousesavedquery"."external_tables", + "posthog_datawarehousesavedquery"."query", + "posthog_datawarehousesavedquery"."status", + "posthog_datawarehousesavedquery"."last_run_at", + "posthog_datawarehousesavedquery"."table_id" + FROM "posthog_datawarehousesavedquery" + WHERE ("posthog_datawarehousesavedquery"."team_id" = 99999 + AND NOT ("posthog_datawarehousesavedquery"."deleted" + AND "posthog_datawarehousesavedquery"."deleted" IS NOT NULL)) + ''' +# --- +# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.126 + ''' + SELECT "posthog_datawarehousetable"."created_by_id", + "posthog_datawarehousetable"."created_at", + "posthog_datawarehousetable"."updated_at", + "posthog_datawarehousetable"."deleted", + "posthog_datawarehousetable"."deleted_at", + "posthog_datawarehousetable"."id", + "posthog_datawarehousetable"."name", + "posthog_datawarehousetable"."format", + "posthog_datawarehousetable"."team_id", + "posthog_datawarehousetable"."url_pattern", + "posthog_datawarehousetable"."credential_id", + "posthog_datawarehousetable"."external_data_source_id", + "posthog_datawarehousetable"."columns", + "posthog_datawarehousetable"."row_count", + "posthog_user"."id", "posthog_user"."password", "posthog_user"."last_login", "posthog_user"."first_name", @@ -2993,6 +3089,7 @@ "posthog_user"."temporary_token", "posthog_user"."distinct_id", "posthog_user"."is_email_verified", + "posthog_user"."requested_password_reset_at", "posthog_user"."has_seen_product_intro_for", "posthog_user"."strapi_id", "posthog_user"."is_active", @@ -3002,222 +3099,58 @@ "posthog_user"."toolbar_mode", "posthog_user"."hedgehog_config", "posthog_user"."events_column_config", - "posthog_user"."email_opt_in" - FROM "posthog_user" - WHERE "posthog_user"."id" = 99999 - LIMIT 21 + "posthog_user"."email_opt_in", + "posthog_datawarehousecredential"."created_by_id", + "posthog_datawarehousecredential"."created_at", + "posthog_datawarehousecredential"."id", + "posthog_datawarehousecredential"."access_key", + "posthog_datawarehousecredential"."access_secret", + "posthog_datawarehousecredential"."team_id", + "posthog_externaldatasource"."created_by_id", + "posthog_externaldatasource"."created_at", + "posthog_externaldatasource"."updated_at", + "posthog_externaldatasource"."deleted", + "posthog_externaldatasource"."deleted_at", + "posthog_externaldatasource"."id", + "posthog_externaldatasource"."source_id", + "posthog_externaldatasource"."connection_id", + "posthog_externaldatasource"."destination_id", + "posthog_externaldatasource"."team_id", + "posthog_externaldatasource"."sync_frequency", + "posthog_externaldatasource"."status", + "posthog_externaldatasource"."source_type", + "posthog_externaldatasource"."job_inputs", + "posthog_externaldatasource"."are_tables_created", + "posthog_externaldatasource"."prefix" + FROM "posthog_datawarehousetable" + LEFT OUTER JOIN "posthog_user" ON ("posthog_datawarehousetable"."created_by_id" = "posthog_user"."id") + LEFT OUTER JOIN "posthog_datawarehousecredential" ON ("posthog_datawarehousetable"."credential_id" = "posthog_datawarehousecredential"."id") + LEFT OUTER JOIN "posthog_externaldatasource" ON ("posthog_datawarehousetable"."external_data_source_id" = "posthog_externaldatasource"."id") + WHERE ("posthog_datawarehousetable"."team_id" = 99999 + AND NOT ("posthog_datawarehousetable"."deleted" + AND "posthog_datawarehousetable"."deleted" IS NOT NULL)) ''' # --- -# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.139 - ''' - SELECT "posthog_team"."id", - "posthog_team"."uuid", - "posthog_team"."organization_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"."ingested_event", - "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"."person_processing_opt_out", - "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_url_trigger_config", - "posthog_team"."session_recording_url_blocklist_config", - "posthog_team"."session_recording_event_trigger_config", - "posthog_team"."session_replay_config", - "posthog_team"."survey_config", - "posthog_team"."capture_console_log_opt_in", - "posthog_team"."capture_performance_opt_in", - "posthog_team"."capture_dead_clicks", - "posthog_team"."surveys_opt_in", - "posthog_team"."heatmaps_opt_in", - "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"."primary_dashboard_id", - "posthog_team"."extra_settings", - "posthog_team"."modifiers", - "posthog_team"."correlation_config", - "posthog_team"."session_recording_retention_period_days", - "posthog_team"."external_data_workspace_id", - "posthog_team"."external_data_workspace_last_synced_at" - FROM "posthog_team" - WHERE "posthog_team"."id" = 99999 - LIMIT 21 +# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.127 ''' -# --- -# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.14 - ''' - SELECT "posthog_sessionrecordingviewed"."session_id" - FROM "posthog_sessionrecordingviewed" - WHERE ("posthog_sessionrecordingviewed"."team_id" = 99999 - AND "posthog_sessionrecordingviewed"."user_id" = 99999) - ''' -# --- -# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.140 - ''' - SELECT "posthog_organizationmembership"."id", - "posthog_organizationmembership"."organization_id", - "posthog_organizationmembership"."user_id", - "posthog_organizationmembership"."level", - "posthog_organizationmembership"."joined_at", - "posthog_organizationmembership"."updated_at", - "posthog_organization"."id", - "posthog_organization"."name", - "posthog_organization"."slug", - "posthog_organization"."logo_media_id", - "posthog_organization"."created_at", - "posthog_organization"."updated_at", - "posthog_organization"."plugins_access_level", - "posthog_organization"."for_internal_metrics", - "posthog_organization"."is_member_join_email_enabled", - "posthog_organization"."enforce_2fa", - "posthog_organization"."is_hipaa", - "posthog_organization"."customer_id", - "posthog_organization"."available_product_features", - "posthog_organization"."usage", - "posthog_organization"."never_drop_data", - "posthog_organization"."customer_trust_scores", - "posthog_organization"."setup_section_2_completed", - "posthog_organization"."personalization", - "posthog_organization"."domain_whitelist" - 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: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.141 - ''' - 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"."resource" = 'project' - AND "ee_accesscontrol"."resource_id" = '444' - AND "ee_accesscontrol"."role_id" IS NULL - AND "ee_accesscontrol"."team_id" = 99999) - OR ("posthog_organizationmembership"."user_id" = 99999 - AND "ee_accesscontrol"."resource" = 'project' - AND "ee_accesscontrol"."resource_id" = '444' - AND "ee_accesscontrol"."role_id" IS NULL - AND "ee_accesscontrol"."team_id" = 99999) - OR ("ee_accesscontrol"."organization_member_id" IS NULL - AND "ee_accesscontrol"."resource" = 'session_recording' - AND "ee_accesscontrol"."resource_id" IS NULL - AND "ee_accesscontrol"."role_id" IS NULL - AND "ee_accesscontrol"."team_id" = 99999) - OR ("posthog_organizationmembership"."user_id" = 99999 - AND "ee_accesscontrol"."resource" = 'session_recording' - AND "ee_accesscontrol"."resource_id" IS NULL - AND "ee_accesscontrol"."role_id" IS NULL - AND "ee_accesscontrol"."team_id" = 99999) - OR ("ee_accesscontrol"."organization_member_id" IS NULL - AND "ee_accesscontrol"."resource" = 'session_recording' - AND "ee_accesscontrol"."resource_id" IS NOT NULL - AND "ee_accesscontrol"."role_id" IS NULL - AND "ee_accesscontrol"."team_id" = 99999) - OR ("posthog_organizationmembership"."user_id" = 99999 - AND "ee_accesscontrol"."resource" = 'session_recording' - AND "ee_accesscontrol"."resource_id" IS NOT NULL - AND "ee_accesscontrol"."role_id" IS NULL - AND "ee_accesscontrol"."team_id" = 99999)) - ''' -# --- -# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.142 - ''' - SELECT "posthog_organizationmembership"."id", - "posthog_organizationmembership"."organization_id", - "posthog_organizationmembership"."user_id", - "posthog_organizationmembership"."level", - "posthog_organizationmembership"."joined_at", - "posthog_organizationmembership"."updated_at", - "posthog_organization"."id", - "posthog_organization"."name", - "posthog_organization"."slug", - "posthog_organization"."logo_media_id", - "posthog_organization"."created_at", - "posthog_organization"."updated_at", - "posthog_organization"."plugins_access_level", - "posthog_organization"."for_internal_metrics", - "posthog_organization"."is_member_join_email_enabled", - "posthog_organization"."enforce_2fa", - "posthog_organization"."is_hipaa", - "posthog_organization"."customer_id", - "posthog_organization"."available_product_features", - "posthog_organization"."usage", - "posthog_organization"."never_drop_data", - "posthog_organization"."customer_trust_scores", - "posthog_organization"."setup_section_2_completed", - "posthog_organization"."personalization", - "posthog_organization"."domain_whitelist" - FROM "posthog_organizationmembership" - INNER JOIN "posthog_organization" ON ("posthog_organizationmembership"."organization_id" = "posthog_organization"."id") - WHERE "posthog_organizationmembership"."user_id" = 99999 - ''' -# --- -# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.143 - ''' - 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"."plugins_access_level", - "posthog_organization"."for_internal_metrics", - "posthog_organization"."is_member_join_email_enabled", - "posthog_organization"."enforce_2fa", - "posthog_organization"."is_hipaa", - "posthog_organization"."customer_id", - "posthog_organization"."available_product_features", - "posthog_organization"."usage", - "posthog_organization"."never_drop_data", - "posthog_organization"."customer_trust_scores", - "posthog_organization"."setup_section_2_completed", - "posthog_organization"."personalization", - "posthog_organization"."domain_whitelist" - FROM "posthog_organization" - WHERE "posthog_organization"."id" = '00000000-0000-0000-0000-000000000000'::uuid - LIMIT 21 + SELECT "posthog_datawarehousejoin"."created_by_id", + "posthog_datawarehousejoin"."created_at", + "posthog_datawarehousejoin"."deleted", + "posthog_datawarehousejoin"."deleted_at", + "posthog_datawarehousejoin"."id", + "posthog_datawarehousejoin"."team_id", + "posthog_datawarehousejoin"."source_table_name", + "posthog_datawarehousejoin"."source_table_key", + "posthog_datawarehousejoin"."joining_table_name", + "posthog_datawarehousejoin"."joining_table_key", + "posthog_datawarehousejoin"."field_name" + FROM "posthog_datawarehousejoin" + WHERE ("posthog_datawarehousejoin"."team_id" = 99999 + AND NOT ("posthog_datawarehousejoin"."deleted" + AND "posthog_datawarehousejoin"."deleted" IS NOT NULL)) ''' # --- -# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.144 +# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.128 ''' SELECT "posthog_grouptypemapping"."id", "posthog_grouptypemapping"."team_id", @@ -3230,7 +3163,7 @@ WHERE "posthog_grouptypemapping"."team_id" = 99999 ''' # --- -# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.145 +# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.129 ''' SELECT "posthog_datawarehousesavedquery"."created_by_id", "posthog_datawarehousesavedquery"."created_at", @@ -3251,7 +3184,26 @@ AND "posthog_datawarehousesavedquery"."deleted" IS NOT NULL)) ''' # --- -# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.146 +# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.13 + ''' + SELECT "posthog_datawarehousejoin"."created_by_id", + "posthog_datawarehousejoin"."created_at", + "posthog_datawarehousejoin"."deleted", + "posthog_datawarehousejoin"."deleted_at", + "posthog_datawarehousejoin"."id", + "posthog_datawarehousejoin"."team_id", + "posthog_datawarehousejoin"."source_table_name", + "posthog_datawarehousejoin"."source_table_key", + "posthog_datawarehousejoin"."joining_table_name", + "posthog_datawarehousejoin"."joining_table_key", + "posthog_datawarehousejoin"."field_name" + FROM "posthog_datawarehousejoin" + WHERE ("posthog_datawarehousejoin"."team_id" = 99999 + AND NOT ("posthog_datawarehousejoin"."deleted" + AND "posthog_datawarehousejoin"."deleted" IS NOT NULL)) + ''' +# --- +# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.130 ''' SELECT "posthog_datawarehousetable"."created_by_id", "posthog_datawarehousetable"."created_at", @@ -3324,7 +3276,7 @@ AND "posthog_datawarehousetable"."deleted" IS NOT NULL)) ''' # --- -# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.147 +# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.131 ''' SELECT "posthog_datawarehousejoin"."created_by_id", "posthog_datawarehousejoin"."created_at", @@ -3336,14 +3288,15 @@ "posthog_datawarehousejoin"."source_table_key", "posthog_datawarehousejoin"."joining_table_name", "posthog_datawarehousejoin"."joining_table_key", - "posthog_datawarehousejoin"."field_name" + "posthog_datawarehousejoin"."field_name", + "posthog_datawarehousejoin"."configuration" FROM "posthog_datawarehousejoin" WHERE ("posthog_datawarehousejoin"."team_id" = 99999 AND NOT ("posthog_datawarehousejoin"."deleted" AND "posthog_datawarehousejoin"."deleted" IS NOT NULL)) ''' # --- -# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.148 +# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.132 ''' SELECT "posthog_grouptypemapping"."id", "posthog_grouptypemapping"."team_id", @@ -3356,7 +3309,7 @@ WHERE "posthog_grouptypemapping"."team_id" = 99999 ''' # --- -# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.149 +# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.133 ''' SELECT "posthog_datawarehousesavedquery"."created_by_id", "posthog_datawarehousesavedquery"."created_at", @@ -3377,77 +3330,7 @@ AND "posthog_datawarehousesavedquery"."deleted" IS NOT NULL)) ''' # --- -# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.15 - ''' - SELECT "posthog_team"."id", - "posthog_team"."uuid", - "posthog_team"."organization_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"."ingested_event", - "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"."person_processing_opt_out", - "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_url_trigger_config", - "posthog_team"."session_recording_url_blocklist_config", - "posthog_team"."session_recording_event_trigger_config", - "posthog_team"."session_replay_config", - "posthog_team"."survey_config", - "posthog_team"."capture_console_log_opt_in", - "posthog_team"."capture_performance_opt_in", - "posthog_team"."capture_dead_clicks", - "posthog_team"."surveys_opt_in", - "posthog_team"."heatmaps_opt_in", - "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"."primary_dashboard_id", - "posthog_team"."extra_settings", - "posthog_team"."modifiers", - "posthog_team"."correlation_config", - "posthog_team"."session_recording_retention_period_days", - "posthog_team"."plugins_opt_in", - "posthog_team"."opt_out_capture", - "posthog_team"."event_names", - "posthog_team"."event_names_with_usage", - "posthog_team"."event_properties", - "posthog_team"."event_properties_with_usage", - "posthog_team"."event_properties_numerical", - "posthog_team"."external_data_workspace_id", - "posthog_team"."external_data_workspace_last_synced_at" - FROM "posthog_team" - WHERE "posthog_team"."id" = 99999 - LIMIT 21 - ''' -# --- -# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.150 +# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.134 ''' SELECT "posthog_datawarehousetable"."created_by_id", "posthog_datawarehousetable"."created_at", @@ -3520,7 +3403,7 @@ AND "posthog_datawarehousetable"."deleted" IS NOT NULL)) ''' # --- -# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.151 +# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.135 ''' SELECT "posthog_datawarehousejoin"."created_by_id", "posthog_datawarehousejoin"."created_at", @@ -3532,14 +3415,15 @@ "posthog_datawarehousejoin"."source_table_key", "posthog_datawarehousejoin"."joining_table_name", "posthog_datawarehousejoin"."joining_table_key", - "posthog_datawarehousejoin"."field_name" + "posthog_datawarehousejoin"."field_name", + "posthog_datawarehousejoin"."configuration" FROM "posthog_datawarehousejoin" WHERE ("posthog_datawarehousejoin"."team_id" = 99999 AND NOT ("posthog_datawarehousejoin"."deleted" AND "posthog_datawarehousejoin"."deleted" IS NOT NULL)) ''' # --- -# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.152 +# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.136 ''' SELECT "posthog_sessionrecording"."id", "posthog_sessionrecording"."session_id", @@ -3567,12 +3451,11 @@ '3', '4', '5', - '6', - '7') + '6') AND "posthog_sessionrecording"."team_id" = 99999) ''' # --- -# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.153 +# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.133 ''' SELECT "posthog_sessionrecordingviewed"."session_id" FROM "posthog_sessionrecordingviewed" @@ -3580,7 +3463,7 @@ AND "posthog_sessionrecordingviewed"."user_id" = 99999) ''' # --- -# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.154 +# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.134 ''' SELECT "posthog_persondistinctid"."id", "posthog_persondistinctid"."team_id", @@ -3604,12 +3487,11 @@ 'user3', 'user4', 'user5', - 'user6', - 'user7') + 'user6') AND "posthog_persondistinctid"."team_id" = 99999) ''' # --- -# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.155 +# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.135 ''' SELECT "posthog_team"."id", "posthog_team"."uuid", @@ -3679,7 +3561,7 @@ LIMIT 21 ''' # --- -# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.156 +# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.136 ''' SELECT "posthog_person"."id", "posthog_person"."created_at", @@ -3693,12 +3575,12 @@ "posthog_person"."version" FROM "posthog_person" INNER JOIN "posthog_persondistinctid" ON ("posthog_person"."id" = "posthog_persondistinctid"."person_id") - WHERE ("posthog_persondistinctid"."distinct_id" = 'user8' + WHERE ("posthog_persondistinctid"."distinct_id" = 'user7' AND "posthog_persondistinctid"."team_id" = 99999) LIMIT 21 ''' # --- -# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.157 +# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.137 ''' SELECT "posthog_person"."id", "posthog_person"."created_at", @@ -3712,12 +3594,12 @@ "posthog_person"."version" FROM "posthog_person" INNER JOIN "posthog_persondistinctid" ON ("posthog_person"."id" = "posthog_persondistinctid"."person_id") - WHERE ("posthog_persondistinctid"."distinct_id" = 'user8' + WHERE ("posthog_persondistinctid"."distinct_id" = 'user7' AND "posthog_persondistinctid"."team_id" = 99999) LIMIT 21 ''' # --- -# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.158 +# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.138 ''' SELECT "posthog_user"."id", "posthog_user"."password", @@ -3749,7 +3631,7 @@ LIMIT 21 ''' # --- -# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.159 +# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.139 ''' SELECT "posthog_team"."id", "posthog_team"."uuid", @@ -3812,26 +3694,15 @@ LIMIT 21 ''' # --- -# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.16 +# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.14 ''' - SELECT "posthog_person"."id", - "posthog_person"."created_at", - "posthog_person"."properties_last_updated_at", - "posthog_person"."properties_last_operation", - "posthog_person"."team_id", - "posthog_person"."properties", - "posthog_person"."is_user_id", - "posthog_person"."is_identified", - "posthog_person"."uuid", - "posthog_person"."version" - FROM "posthog_person" - INNER JOIN "posthog_persondistinctid" ON ("posthog_person"."id" = "posthog_persondistinctid"."person_id") - WHERE ("posthog_persondistinctid"."distinct_id" = 'user1' - AND "posthog_persondistinctid"."team_id" = 99999) - LIMIT 21 + SELECT "posthog_sessionrecordingviewed"."session_id" + FROM "posthog_sessionrecordingviewed" + WHERE ("posthog_sessionrecordingviewed"."team_id" = 99999 + AND "posthog_sessionrecordingviewed"."user_id" = 99999) ''' # --- -# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.160 +# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.140 ''' SELECT "posthog_organizationmembership"."id", "posthog_organizationmembership"."organization_id", @@ -3865,7 +3736,7 @@ LIMIT 21 ''' # --- -# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.161 +# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.141 ''' SELECT "ee_accesscontrol"."id", "ee_accesscontrol"."team_id", @@ -3911,7 +3782,7 @@ AND "ee_accesscontrol"."team_id" = 99999)) ''' # --- -# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.162 +# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.142 ''' SELECT "posthog_organizationmembership"."id", "posthog_organizationmembership"."organization_id", @@ -3943,7 +3814,7 @@ WHERE "posthog_organizationmembership"."user_id" = 99999 ''' # --- -# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.163 +# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.143 ''' SELECT "posthog_organization"."id", "posthog_organization"."name", @@ -3969,7 +3840,7 @@ LIMIT 21 ''' # --- -# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.164 +# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.144 ''' SELECT "posthog_grouptypemapping"."id", "posthog_grouptypemapping"."team_id", @@ -3982,7 +3853,7 @@ WHERE "posthog_grouptypemapping"."team_id" = 99999 ''' # --- -# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.165 +# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.145 ''' SELECT "posthog_datawarehousesavedquery"."created_by_id", "posthog_datawarehousesavedquery"."created_at", @@ -4003,7 +3874,7 @@ AND "posthog_datawarehousesavedquery"."deleted" IS NOT NULL)) ''' # --- -# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.166 +# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.146 ''' SELECT "posthog_datawarehousetable"."created_by_id", "posthog_datawarehousetable"."created_at", @@ -4076,7 +3947,7 @@ AND "posthog_datawarehousetable"."deleted" IS NOT NULL)) ''' # --- -# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.167 +# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.147 ''' SELECT "posthog_datawarehousejoin"."created_by_id", "posthog_datawarehousejoin"."created_at", @@ -4088,14 +3959,15 @@ "posthog_datawarehousejoin"."source_table_key", "posthog_datawarehousejoin"."joining_table_name", "posthog_datawarehousejoin"."joining_table_key", - "posthog_datawarehousejoin"."field_name" + "posthog_datawarehousejoin"."field_name", + "posthog_datawarehousejoin"."configuration" FROM "posthog_datawarehousejoin" WHERE ("posthog_datawarehousejoin"."team_id" = 99999 AND NOT ("posthog_datawarehousejoin"."deleted" AND "posthog_datawarehousejoin"."deleted" IS NOT NULL)) ''' # --- -# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.168 +# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.148 ''' SELECT "posthog_grouptypemapping"."id", "posthog_grouptypemapping"."team_id", @@ -4108,7 +3980,7 @@ WHERE "posthog_grouptypemapping"."team_id" = 99999 ''' # --- -# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.169 +# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.149 ''' SELECT "posthog_datawarehousesavedquery"."created_by_id", "posthog_datawarehousesavedquery"."created_at", @@ -4129,26 +4001,10 @@ AND "posthog_datawarehousesavedquery"."deleted" IS NOT NULL)) ''' # --- -# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.17 - ''' - SELECT "posthog_person"."id", - "posthog_person"."created_at", - "posthog_person"."properties_last_updated_at", - "posthog_person"."properties_last_operation", - "posthog_person"."team_id", - "posthog_person"."properties", - "posthog_person"."is_user_id", - "posthog_person"."is_identified", - "posthog_person"."uuid", - "posthog_person"."version" - FROM "posthog_person" - INNER JOIN "posthog_persondistinctid" ON ("posthog_person"."id" = "posthog_persondistinctid"."person_id") - WHERE ("posthog_persondistinctid"."distinct_id" = 'user1' - AND "posthog_persondistinctid"."team_id" = 99999) - LIMIT 21 - ''' -# --- -# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.170 +<<<<<<< HEAD +# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.15 +======= +# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.152 ''' SELECT "posthog_datawarehousetable"."created_by_id", "posthog_datawarehousetable"."created_at", @@ -4221,7 +4077,7 @@ AND "posthog_datawarehousetable"."deleted" IS NOT NULL)) ''' # --- -# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.171 +# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.153 ''' SELECT "posthog_datawarehousejoin"."created_by_id", "posthog_datawarehousejoin"."created_at", @@ -4233,14 +4089,15 @@ "posthog_datawarehousejoin"."source_table_key", "posthog_datawarehousejoin"."joining_table_name", "posthog_datawarehousejoin"."joining_table_key", - "posthog_datawarehousejoin"."field_name" + "posthog_datawarehousejoin"."field_name", + "posthog_datawarehousejoin"."configuration" FROM "posthog_datawarehousejoin" WHERE ("posthog_datawarehousejoin"."team_id" = 99999 AND NOT ("posthog_datawarehousejoin"."deleted" AND "posthog_datawarehousejoin"."deleted" IS NOT NULL)) ''' # --- -# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.172 +# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.154 ''' SELECT "posthog_sessionrecording"."id", "posthog_sessionrecording"."session_id", @@ -4274,7 +4131,7 @@ AND "posthog_sessionrecording"."team_id" = 99999) ''' # --- -# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.173 +# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.155 ''' SELECT "posthog_sessionrecordingviewed"."session_id" FROM "posthog_sessionrecordingviewed" @@ -4282,7 +4139,7 @@ AND "posthog_sessionrecordingviewed"."user_id" = 99999) ''' # --- -# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.174 +# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.156 ''' SELECT "posthog_persondistinctid"."id", "posthog_persondistinctid"."team_id", @@ -4312,7 +4169,8 @@ AND "posthog_persondistinctid"."team_id" = 99999) ''' # --- -# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.175 +# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.157 +>>>>>>> c835d19e29 (Update query snapshots) ''' SELECT "posthog_team"."id", "posthog_team"."uuid", @@ -4382,47 +4240,23 @@ LIMIT 21 ''' # --- -# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.176 - ''' - SELECT "posthog_person"."id", - "posthog_person"."created_at", - "posthog_person"."properties_last_updated_at", - "posthog_person"."properties_last_operation", - "posthog_person"."team_id", - "posthog_person"."properties", - "posthog_person"."is_user_id", - "posthog_person"."is_identified", - "posthog_person"."uuid", - "posthog_person"."version" - FROM "posthog_person" - INNER JOIN "posthog_persondistinctid" ON ("posthog_person"."id" = "posthog_persondistinctid"."person_id") - WHERE ("posthog_persondistinctid"."distinct_id" = 'user9' - AND "posthog_persondistinctid"."team_id" = 99999) - LIMIT 21 - ''' -# --- -# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.177 - ''' - SELECT "posthog_person"."id", - "posthog_person"."created_at", - "posthog_person"."properties_last_updated_at", - "posthog_person"."properties_last_operation", - "posthog_person"."team_id", - "posthog_person"."properties", - "posthog_person"."is_user_id", - "posthog_person"."is_identified", - "posthog_person"."uuid", - "posthog_person"."version" - FROM "posthog_person" - INNER JOIN "posthog_persondistinctid" ON ("posthog_person"."id" = "posthog_persondistinctid"."person_id") - WHERE ("posthog_persondistinctid"."distinct_id" = 'user9' - AND "posthog_persondistinctid"."team_id" = 99999) - LIMIT 21 - ''' -# --- -# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.178 +# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.150 ''' - SELECT "posthog_user"."id", + SELECT "posthog_datawarehousetable"."created_by_id", + "posthog_datawarehousetable"."created_at", + "posthog_datawarehousetable"."updated_at", + "posthog_datawarehousetable"."deleted", + "posthog_datawarehousetable"."deleted_at", + "posthog_datawarehousetable"."id", + "posthog_datawarehousetable"."name", + "posthog_datawarehousetable"."format", + "posthog_datawarehousetable"."team_id", + "posthog_datawarehousetable"."url_pattern", + "posthog_datawarehousetable"."credential_id", + "posthog_datawarehousetable"."external_data_source_id", + "posthog_datawarehousetable"."columns", + "posthog_datawarehousetable"."row_count", + "posthog_user"."id", "posthog_user"."password", "posthog_user"."last_login", "posthog_user"."first_name", @@ -4437,6 +4271,7 @@ "posthog_user"."temporary_token", "posthog_user"."distinct_id", "posthog_user"."is_email_verified", + "posthog_user"."requested_password_reset_at", "posthog_user"."has_seen_product_intro_for", "posthog_user"."strapi_id", "posthog_user"."is_active", @@ -4446,68 +4281,190 @@ "posthog_user"."toolbar_mode", "posthog_user"."hedgehog_config", "posthog_user"."events_column_config", - "posthog_user"."email_opt_in" - FROM "posthog_user" - WHERE "posthog_user"."id" = 99999 - LIMIT 21 + "posthog_user"."email_opt_in", + "posthog_datawarehousecredential"."created_by_id", + "posthog_datawarehousecredential"."created_at", + "posthog_datawarehousecredential"."id", + "posthog_datawarehousecredential"."access_key", + "posthog_datawarehousecredential"."access_secret", + "posthog_datawarehousecredential"."team_id", + "posthog_externaldatasource"."created_by_id", + "posthog_externaldatasource"."created_at", + "posthog_externaldatasource"."updated_at", + "posthog_externaldatasource"."deleted", + "posthog_externaldatasource"."deleted_at", + "posthog_externaldatasource"."id", + "posthog_externaldatasource"."source_id", + "posthog_externaldatasource"."connection_id", + "posthog_externaldatasource"."destination_id", + "posthog_externaldatasource"."team_id", + "posthog_externaldatasource"."sync_frequency", + "posthog_externaldatasource"."status", + "posthog_externaldatasource"."source_type", + "posthog_externaldatasource"."job_inputs", + "posthog_externaldatasource"."are_tables_created", + "posthog_externaldatasource"."prefix" + FROM "posthog_datawarehousetable" + LEFT OUTER JOIN "posthog_user" ON ("posthog_datawarehousetable"."created_by_id" = "posthog_user"."id") + LEFT OUTER JOIN "posthog_datawarehousecredential" ON ("posthog_datawarehousetable"."credential_id" = "posthog_datawarehousecredential"."id") + LEFT OUTER JOIN "posthog_externaldatasource" ON ("posthog_datawarehousetable"."external_data_source_id" = "posthog_externaldatasource"."id") + WHERE ("posthog_datawarehousetable"."team_id" = 99999 + AND NOT ("posthog_datawarehousetable"."deleted" + AND "posthog_datawarehousetable"."deleted" IS NOT NULL)) ''' # --- -# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.179 +# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.151 ''' - SELECT "posthog_team"."id", - "posthog_team"."uuid", - "posthog_team"."organization_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"."ingested_event", - "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"."person_processing_opt_out", - "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_url_trigger_config", - "posthog_team"."session_recording_url_blocklist_config", - "posthog_team"."session_recording_event_trigger_config", - "posthog_team"."session_replay_config", - "posthog_team"."survey_config", - "posthog_team"."capture_console_log_opt_in", - "posthog_team"."capture_performance_opt_in", - "posthog_team"."capture_dead_clicks", - "posthog_team"."surveys_opt_in", - "posthog_team"."heatmaps_opt_in", - "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"."primary_dashboard_id", - "posthog_team"."extra_settings", + SELECT "posthog_datawarehousejoin"."created_by_id", + "posthog_datawarehousejoin"."created_at", + "posthog_datawarehousejoin"."deleted", + "posthog_datawarehousejoin"."deleted_at", + "posthog_datawarehousejoin"."id", + "posthog_datawarehousejoin"."team_id", + "posthog_datawarehousejoin"."source_table_name", + "posthog_datawarehousejoin"."source_table_key", + "posthog_datawarehousejoin"."joining_table_name", + "posthog_datawarehousejoin"."joining_table_key", + "posthog_datawarehousejoin"."field_name" + FROM "posthog_datawarehousejoin" + WHERE ("posthog_datawarehousejoin"."team_id" = 99999 + AND NOT ("posthog_datawarehousejoin"."deleted" + AND "posthog_datawarehousejoin"."deleted" IS NOT NULL)) + ''' +# --- +# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.152 + ''' + SELECT "posthog_sessionrecording"."id", + "posthog_sessionrecording"."session_id", + "posthog_sessionrecording"."team_id", + "posthog_sessionrecording"."created_at", + "posthog_sessionrecording"."deleted", + "posthog_sessionrecording"."object_storage_path", + "posthog_sessionrecording"."distinct_id", + "posthog_sessionrecording"."duration", + "posthog_sessionrecording"."active_seconds", + "posthog_sessionrecording"."inactive_seconds", + "posthog_sessionrecording"."start_time", + "posthog_sessionrecording"."end_time", + "posthog_sessionrecording"."click_count", + "posthog_sessionrecording"."keypress_count", + "posthog_sessionrecording"."mouse_activity_count", + "posthog_sessionrecording"."console_log_count", + "posthog_sessionrecording"."console_warn_count", + "posthog_sessionrecording"."console_error_count", + "posthog_sessionrecording"."start_url", + "posthog_sessionrecording"."storage_version" + FROM "posthog_sessionrecording" + WHERE ("posthog_sessionrecording"."session_id" IN ('1', + '2', + '3', + '4', + '5', + '6', + '7') + AND "posthog_sessionrecording"."team_id" = 99999) + ''' +# --- +# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.153 + ''' + SELECT "posthog_sessionrecordingviewed"."session_id" + FROM "posthog_sessionrecordingviewed" + WHERE ("posthog_sessionrecordingviewed"."team_id" = 99999 + AND "posthog_sessionrecordingviewed"."user_id" = 99999) + ''' +# --- +# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.154 + ''' + SELECT "posthog_persondistinctid"."id", + "posthog_persondistinctid"."team_id", + "posthog_persondistinctid"."person_id", + "posthog_persondistinctid"."distinct_id", + "posthog_persondistinctid"."version", + "posthog_person"."id", + "posthog_person"."created_at", + "posthog_person"."properties_last_updated_at", + "posthog_person"."properties_last_operation", + "posthog_person"."team_id", + "posthog_person"."properties", + "posthog_person"."is_user_id", + "posthog_person"."is_identified", + "posthog_person"."uuid", + "posthog_person"."version" + FROM "posthog_persondistinctid" + INNER JOIN "posthog_person" ON ("posthog_persondistinctid"."person_id" = "posthog_person"."id") + WHERE ("posthog_persondistinctid"."distinct_id" IN ('user1', + 'user2', + 'user3', + 'user4', + 'user5', + 'user6', + 'user7') + AND "posthog_persondistinctid"."team_id" = 99999) + ''' +# --- +# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.155 + ''' + SELECT "posthog_team"."id", + "posthog_team"."uuid", + "posthog_team"."organization_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"."ingested_event", + "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"."person_processing_opt_out", + "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_url_trigger_config", + "posthog_team"."session_recording_url_blocklist_config", + "posthog_team"."session_recording_event_trigger_config", + "posthog_team"."session_replay_config", + "posthog_team"."survey_config", + "posthog_team"."capture_console_log_opt_in", + "posthog_team"."capture_performance_opt_in", + "posthog_team"."capture_dead_clicks", + "posthog_team"."surveys_opt_in", + "posthog_team"."heatmaps_opt_in", + "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"."primary_dashboard_id", + "posthog_team"."extra_settings", "posthog_team"."modifiers", "posthog_team"."correlation_config", "posthog_team"."session_recording_retention_period_days", + "posthog_team"."plugins_opt_in", + "posthog_team"."opt_out_capture", + "posthog_team"."event_names", + "posthog_team"."event_names_with_usage", + "posthog_team"."event_properties", + "posthog_team"."event_properties_with_usage", + "posthog_team"."event_properties_numerical", "posthog_team"."external_data_workspace_id", "posthog_team"."external_data_workspace_last_synced_at" FROM "posthog_team" @@ -4515,7 +4472,45 @@ LIMIT 21 ''' # --- -# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.18 +# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.156 + ''' + SELECT "posthog_person"."id", + "posthog_person"."created_at", + "posthog_person"."properties_last_updated_at", + "posthog_person"."properties_last_operation", + "posthog_person"."team_id", + "posthog_person"."properties", + "posthog_person"."is_user_id", + "posthog_person"."is_identified", + "posthog_person"."uuid", + "posthog_person"."version" + FROM "posthog_person" + INNER JOIN "posthog_persondistinctid" ON ("posthog_person"."id" = "posthog_persondistinctid"."person_id") + WHERE ("posthog_persondistinctid"."distinct_id" = 'user8' + AND "posthog_persondistinctid"."team_id" = 99999) + LIMIT 21 + ''' +# --- +# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.157 + ''' + SELECT "posthog_person"."id", + "posthog_person"."created_at", + "posthog_person"."properties_last_updated_at", + "posthog_person"."properties_last_operation", + "posthog_person"."team_id", + "posthog_person"."properties", + "posthog_person"."is_user_id", + "posthog_person"."is_identified", + "posthog_person"."uuid", + "posthog_person"."version" + FROM "posthog_person" + INNER JOIN "posthog_persondistinctid" ON ("posthog_person"."id" = "posthog_persondistinctid"."person_id") + WHERE ("posthog_persondistinctid"."distinct_id" = 'user8' + AND "posthog_persondistinctid"."team_id" = 99999) + LIMIT 21 + ''' +# --- +# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.158 ''' SELECT "posthog_user"."id", "posthog_user"."password", @@ -4547,75 +4542,157 @@ LIMIT 21 ''' # --- -# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.180 - ''' - SELECT "posthog_organizationmembership"."id", - "posthog_organizationmembership"."organization_id", - "posthog_organizationmembership"."user_id", - "posthog_organizationmembership"."level", - "posthog_organizationmembership"."joined_at", - "posthog_organizationmembership"."updated_at", - "posthog_organization"."id", - "posthog_organization"."name", - "posthog_organization"."slug", - "posthog_organization"."logo_media_id", - "posthog_organization"."created_at", - "posthog_organization"."updated_at", - "posthog_organization"."plugins_access_level", - "posthog_organization"."for_internal_metrics", - "posthog_organization"."is_member_join_email_enabled", - "posthog_organization"."enforce_2fa", - "posthog_organization"."is_hipaa", - "posthog_organization"."customer_id", - "posthog_organization"."available_product_features", - "posthog_organization"."usage", - "posthog_organization"."never_drop_data", - "posthog_organization"."customer_trust_scores", - "posthog_organization"."setup_section_2_completed", - "posthog_organization"."personalization", - "posthog_organization"."domain_whitelist" - 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: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.181 +# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.159 ''' - SELECT "ee_accesscontrol"."id", - "ee_accesscontrol"."team_id", - "ee_accesscontrol"."access_level", - "ee_accesscontrol"."resource", - "ee_accesscontrol"."resource_id", - "ee_accesscontrol"."organization_member_id", - "ee_accesscontrol"."role_id", - "ee_accesscontrol"."created_by_id", - "ee_accesscontrol"."created_at", - "ee_accesscontrol"."updated_at" - FROM "ee_accesscontrol" - LEFT OUTER JOIN "posthog_organizationmembership" ON ("ee_accesscontrol"."organization_member_id" = "posthog_organizationmembership"."id") - WHERE (("ee_accesscontrol"."organization_member_id" IS NULL - AND "ee_accesscontrol"."resource" = 'project' - AND "ee_accesscontrol"."resource_id" = '444' - AND "ee_accesscontrol"."role_id" IS NULL - AND "ee_accesscontrol"."team_id" = 99999) - OR ("posthog_organizationmembership"."user_id" = 99999 - AND "ee_accesscontrol"."resource" = 'project' - AND "ee_accesscontrol"."resource_id" = '444' - AND "ee_accesscontrol"."role_id" IS NULL - AND "ee_accesscontrol"."team_id" = 99999) - OR ("ee_accesscontrol"."organization_member_id" IS NULL - AND "ee_accesscontrol"."resource" = 'session_recording' - AND "ee_accesscontrol"."resource_id" IS NULL - AND "ee_accesscontrol"."role_id" IS NULL - AND "ee_accesscontrol"."team_id" = 99999) - OR ("posthog_organizationmembership"."user_id" = 99999 - AND "ee_accesscontrol"."resource" = 'session_recording' - AND "ee_accesscontrol"."resource_id" IS NULL - AND "ee_accesscontrol"."role_id" IS NULL - AND "ee_accesscontrol"."team_id" = 99999) - OR ("ee_accesscontrol"."organization_member_id" IS NULL + SELECT "posthog_team"."id", + "posthog_team"."uuid", + "posthog_team"."organization_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"."ingested_event", + "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"."person_processing_opt_out", + "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_url_trigger_config", + "posthog_team"."session_recording_url_blocklist_config", + "posthog_team"."session_recording_event_trigger_config", + "posthog_team"."session_replay_config", + "posthog_team"."survey_config", + "posthog_team"."capture_console_log_opt_in", + "posthog_team"."capture_performance_opt_in", + "posthog_team"."capture_dead_clicks", + "posthog_team"."surveys_opt_in", + "posthog_team"."heatmaps_opt_in", + "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"."primary_dashboard_id", + "posthog_team"."extra_settings", + "posthog_team"."modifiers", + "posthog_team"."correlation_config", + "posthog_team"."session_recording_retention_period_days", + "posthog_team"."external_data_workspace_id", + "posthog_team"."external_data_workspace_last_synced_at" + FROM "posthog_team" + WHERE "posthog_team"."id" = 99999 + LIMIT 21 + ''' +# --- +# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.16 + ''' + SELECT "posthog_person"."id", + "posthog_person"."created_at", + "posthog_person"."properties_last_updated_at", + "posthog_person"."properties_last_operation", + "posthog_person"."team_id", + "posthog_person"."properties", + "posthog_person"."is_user_id", + "posthog_person"."is_identified", + "posthog_person"."uuid", + "posthog_person"."version" + FROM "posthog_person" + INNER JOIN "posthog_persondistinctid" ON ("posthog_person"."id" = "posthog_persondistinctid"."person_id") + WHERE ("posthog_persondistinctid"."distinct_id" = 'user1' + AND "posthog_persondistinctid"."team_id" = 99999) + LIMIT 21 + ''' +# --- +# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.160 + ''' + SELECT "posthog_organizationmembership"."id", + "posthog_organizationmembership"."organization_id", + "posthog_organizationmembership"."user_id", + "posthog_organizationmembership"."level", + "posthog_organizationmembership"."joined_at", + "posthog_organizationmembership"."updated_at", + "posthog_organization"."id", + "posthog_organization"."name", + "posthog_organization"."slug", + "posthog_organization"."logo_media_id", + "posthog_organization"."created_at", + "posthog_organization"."updated_at", + "posthog_organization"."plugins_access_level", + "posthog_organization"."for_internal_metrics", + "posthog_organization"."is_member_join_email_enabled", + "posthog_organization"."enforce_2fa", + "posthog_organization"."is_hipaa", + "posthog_organization"."customer_id", + "posthog_organization"."available_product_features", + "posthog_organization"."usage", + "posthog_organization"."never_drop_data", + "posthog_organization"."customer_trust_scores", + "posthog_organization"."setup_section_2_completed", + "posthog_organization"."personalization", + "posthog_organization"."domain_whitelist" + 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: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.161 + ''' + 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"."resource" = 'project' + AND "ee_accesscontrol"."resource_id" = '444' + AND "ee_accesscontrol"."role_id" IS NULL + AND "ee_accesscontrol"."team_id" = 99999) + OR ("posthog_organizationmembership"."user_id" = 99999 + AND "ee_accesscontrol"."resource" = 'project' + AND "ee_accesscontrol"."resource_id" = '444' + AND "ee_accesscontrol"."role_id" IS NULL + AND "ee_accesscontrol"."team_id" = 99999) + OR ("ee_accesscontrol"."organization_member_id" IS NULL + AND "ee_accesscontrol"."resource" = 'session_recording' + AND "ee_accesscontrol"."resource_id" IS NULL + AND "ee_accesscontrol"."role_id" IS NULL + AND "ee_accesscontrol"."team_id" = 99999) + OR ("posthog_organizationmembership"."user_id" = 99999 + AND "ee_accesscontrol"."resource" = 'session_recording' + AND "ee_accesscontrol"."resource_id" IS NULL + AND "ee_accesscontrol"."role_id" IS NULL + AND "ee_accesscontrol"."team_id" = 99999) + OR ("ee_accesscontrol"."organization_member_id" IS NULL AND "ee_accesscontrol"."resource" = 'session_recording' AND "ee_accesscontrol"."resource_id" IS NOT NULL AND "ee_accesscontrol"."role_id" IS NULL @@ -4627,7 +4704,7 @@ AND "ee_accesscontrol"."team_id" = 99999)) ''' # --- -# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.182 +# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.162 ''' SELECT "posthog_organizationmembership"."id", "posthog_organizationmembership"."organization_id", @@ -4659,7 +4736,7 @@ WHERE "posthog_organizationmembership"."user_id" = 99999 ''' # --- -# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.183 +# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.163 ''' SELECT "posthog_organization"."id", "posthog_organization"."name", @@ -4685,7 +4762,7 @@ LIMIT 21 ''' # --- -# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.184 +# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.164 ''' SELECT "posthog_grouptypemapping"."id", "posthog_grouptypemapping"."team_id", @@ -4698,7 +4775,7 @@ WHERE "posthog_grouptypemapping"."team_id" = 99999 ''' # --- -# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.185 +# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.165 ''' SELECT "posthog_datawarehousesavedquery"."created_by_id", "posthog_datawarehousesavedquery"."created_at", @@ -4719,7 +4796,7 @@ AND "posthog_datawarehousesavedquery"."deleted" IS NOT NULL)) ''' # --- -# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.186 +# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.166 ''' SELECT "posthog_datawarehousetable"."created_by_id", "posthog_datawarehousetable"."created_at", @@ -4792,7 +4869,7 @@ AND "posthog_datawarehousetable"."deleted" IS NOT NULL)) ''' # --- -# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.187 +# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.167 ''' SELECT "posthog_datawarehousejoin"."created_by_id", "posthog_datawarehousejoin"."created_at", @@ -4804,14 +4881,15 @@ "posthog_datawarehousejoin"."source_table_key", "posthog_datawarehousejoin"."joining_table_name", "posthog_datawarehousejoin"."joining_table_key", - "posthog_datawarehousejoin"."field_name" + "posthog_datawarehousejoin"."field_name", + "posthog_datawarehousejoin"."configuration" FROM "posthog_datawarehousejoin" WHERE ("posthog_datawarehousejoin"."team_id" = 99999 AND NOT ("posthog_datawarehousejoin"."deleted" AND "posthog_datawarehousejoin"."deleted" IS NOT NULL)) ''' # --- -# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.188 +# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.168 ''' SELECT "posthog_grouptypemapping"."id", "posthog_grouptypemapping"."team_id", @@ -4824,7 +4902,7 @@ WHERE "posthog_grouptypemapping"."team_id" = 99999 ''' # --- -# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.189 +# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.169 ''' SELECT "posthog_datawarehousesavedquery"."created_by_id", "posthog_datawarehousesavedquery"."created_at", @@ -4845,70 +4923,26 @@ AND "posthog_datawarehousesavedquery"."deleted" IS NOT NULL)) ''' # --- -# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.19 +# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.17 ''' - SELECT "posthog_team"."id", - "posthog_team"."uuid", - "posthog_team"."organization_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"."ingested_event", - "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"."person_processing_opt_out", - "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_url_trigger_config", - "posthog_team"."session_recording_url_blocklist_config", - "posthog_team"."session_recording_event_trigger_config", - "posthog_team"."session_replay_config", - "posthog_team"."survey_config", - "posthog_team"."capture_console_log_opt_in", - "posthog_team"."capture_performance_opt_in", - "posthog_team"."capture_dead_clicks", - "posthog_team"."surveys_opt_in", - "posthog_team"."heatmaps_opt_in", - "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"."primary_dashboard_id", - "posthog_team"."extra_settings", - "posthog_team"."modifiers", - "posthog_team"."correlation_config", - "posthog_team"."session_recording_retention_period_days", - "posthog_team"."external_data_workspace_id", - "posthog_team"."external_data_workspace_last_synced_at" - FROM "posthog_team" - WHERE "posthog_team"."id" = 99999 + SELECT "posthog_person"."id", + "posthog_person"."created_at", + "posthog_person"."properties_last_updated_at", + "posthog_person"."properties_last_operation", + "posthog_person"."team_id", + "posthog_person"."properties", + "posthog_person"."is_user_id", + "posthog_person"."is_identified", + "posthog_person"."uuid", + "posthog_person"."version" + FROM "posthog_person" + INNER JOIN "posthog_persondistinctid" ON ("posthog_person"."id" = "posthog_persondistinctid"."person_id") + WHERE ("posthog_persondistinctid"."distinct_id" = 'user1' + AND "posthog_persondistinctid"."team_id" = 99999) LIMIT 21 ''' # --- -# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.190 +# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.170 ''' SELECT "posthog_datawarehousetable"."created_by_id", "posthog_datawarehousetable"."created_at", @@ -4981,7 +5015,7 @@ AND "posthog_datawarehousetable"."deleted" IS NOT NULL)) ''' # --- -# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.191 +# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.171 ''' SELECT "posthog_datawarehousejoin"."created_by_id", "posthog_datawarehousejoin"."created_at", @@ -4993,14 +5027,15 @@ "posthog_datawarehousejoin"."source_table_key", "posthog_datawarehousejoin"."joining_table_name", "posthog_datawarehousejoin"."joining_table_key", - "posthog_datawarehousejoin"."field_name" + "posthog_datawarehousejoin"."field_name", + "posthog_datawarehousejoin"."configuration" FROM "posthog_datawarehousejoin" WHERE ("posthog_datawarehousejoin"."team_id" = 99999 AND NOT ("posthog_datawarehousejoin"."deleted" AND "posthog_datawarehousejoin"."deleted" IS NOT NULL)) ''' # --- -# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.192 +# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.172 ''' SELECT "posthog_sessionrecording"."id", "posthog_sessionrecording"."session_id", @@ -5030,12 +5065,11 @@ '5', '6', '7', - '8', - '9') + '8') AND "posthog_sessionrecording"."team_id" = 99999) ''' # --- -# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.193 +# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.173 ''' SELECT "posthog_sessionrecordingviewed"."session_id" FROM "posthog_sessionrecordingviewed" @@ -5043,7 +5077,7 @@ AND "posthog_sessionrecordingviewed"."user_id" = 99999) ''' # --- -# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.194 +# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.174 ''' SELECT "posthog_persondistinctid"."id", "posthog_persondistinctid"."team_id", @@ -5069,12 +5103,11 @@ 'user5', 'user6', 'user7', - 'user8', - 'user9') + 'user8') AND "posthog_persondistinctid"."team_id" = 99999) ''' # --- -# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.195 +# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.175 ''' SELECT "posthog_team"."id", "posthog_team"."uuid", @@ -5144,7 +5177,7 @@ LIMIT 21 ''' # --- -# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.196 +# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.176 ''' SELECT "posthog_person"."id", "posthog_person"."created_at", @@ -5158,12 +5191,12 @@ "posthog_person"."version" FROM "posthog_person" INNER JOIN "posthog_persondistinctid" ON ("posthog_person"."id" = "posthog_persondistinctid"."person_id") - WHERE ("posthog_persondistinctid"."distinct_id" = 'user10' + WHERE ("posthog_persondistinctid"."distinct_id" = 'user9' AND "posthog_persondistinctid"."team_id" = 99999) LIMIT 21 ''' # --- -# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.197 +# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.177 ''' SELECT "posthog_person"."id", "posthog_person"."created_at", @@ -5177,12 +5210,12 @@ "posthog_person"."version" FROM "posthog_person" INNER JOIN "posthog_persondistinctid" ON ("posthog_person"."id" = "posthog_persondistinctid"."person_id") - WHERE ("posthog_persondistinctid"."distinct_id" = 'user10' + WHERE ("posthog_persondistinctid"."distinct_id" = 'user9' AND "posthog_persondistinctid"."team_id" = 99999) LIMIT 21 ''' # --- -# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.198 +# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.178 ''' SELECT "posthog_user"."id", "posthog_user"."password", @@ -5214,7 +5247,7 @@ LIMIT 21 ''' # --- -# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.199 +# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.179 ''' SELECT "posthog_team"."id", "posthog_team"."uuid", @@ -5277,75 +5310,39 @@ LIMIT 21 ''' # --- -# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.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_organization"."id", - "posthog_organization"."name", - "posthog_organization"."slug", - "posthog_organization"."logo_media_id", - "posthog_organization"."created_at", - "posthog_organization"."updated_at", - "posthog_organization"."plugins_access_level", - "posthog_organization"."for_internal_metrics", - "posthog_organization"."is_member_join_email_enabled", - "posthog_organization"."enforce_2fa", - "posthog_organization"."is_hipaa", - "posthog_organization"."customer_id", - "posthog_organization"."available_product_features", - "posthog_organization"."usage", - "posthog_organization"."never_drop_data", - "posthog_organization"."customer_trust_scores", - "posthog_organization"."setup_section_2_completed", - "posthog_organization"."personalization", - "posthog_organization"."domain_whitelist" - 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: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.20 +# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.18 ''' - SELECT "posthog_organizationmembership"."id", - "posthog_organizationmembership"."organization_id", - "posthog_organizationmembership"."user_id", - "posthog_organizationmembership"."level", - "posthog_organizationmembership"."joined_at", - "posthog_organizationmembership"."updated_at", - "posthog_organization"."id", - "posthog_organization"."name", - "posthog_organization"."slug", - "posthog_organization"."logo_media_id", - "posthog_organization"."created_at", - "posthog_organization"."updated_at", - "posthog_organization"."plugins_access_level", - "posthog_organization"."for_internal_metrics", - "posthog_organization"."is_member_join_email_enabled", - "posthog_organization"."enforce_2fa", - "posthog_organization"."is_hipaa", - "posthog_organization"."customer_id", - "posthog_organization"."available_product_features", - "posthog_organization"."usage", - "posthog_organization"."never_drop_data", - "posthog_organization"."customer_trust_scores", - "posthog_organization"."setup_section_2_completed", - "posthog_organization"."personalization", - "posthog_organization"."domain_whitelist" - 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) + 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"."temporary_token", + "posthog_user"."distinct_id", + "posthog_user"."is_email_verified", + "posthog_user"."has_seen_product_intro_for", + "posthog_user"."strapi_id", + "posthog_user"."is_active", + "posthog_user"."theme_mode", + "posthog_user"."partial_notification_settings", + "posthog_user"."anonymize_data", + "posthog_user"."toolbar_mode", + "posthog_user"."hedgehog_config", + "posthog_user"."events_column_config", + "posthog_user"."email_opt_in" + FROM "posthog_user" + WHERE "posthog_user"."id" = 99999 LIMIT 21 ''' # --- -# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.200 +# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.180 ''' SELECT "posthog_organizationmembership"."id", "posthog_organizationmembership"."organization_id", @@ -5379,7 +5376,7 @@ LIMIT 21 ''' # --- -# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.201 +# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.181 ''' SELECT "ee_accesscontrol"."id", "ee_accesscontrol"."team_id", @@ -5425,7 +5422,7 @@ AND "ee_accesscontrol"."team_id" = 99999)) ''' # --- -# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.202 +# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.182 ''' SELECT "posthog_organizationmembership"."id", "posthog_organizationmembership"."organization_id", @@ -5457,47 +5454,10 @@ WHERE "posthog_organizationmembership"."user_id" = 99999 ''' # --- -# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.203 - ''' - 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"."plugins_access_level", - "posthog_organization"."for_internal_metrics", - "posthog_organization"."is_member_join_email_enabled", - "posthog_organization"."enforce_2fa", - "posthog_organization"."is_hipaa", - "posthog_organization"."customer_id", - "posthog_organization"."available_product_features", - "posthog_organization"."usage", - "posthog_organization"."never_drop_data", - "posthog_organization"."customer_trust_scores", - "posthog_organization"."setup_section_2_completed", - "posthog_organization"."personalization", - "posthog_organization"."domain_whitelist" - FROM "posthog_organization" - WHERE "posthog_organization"."id" = '00000000-0000-0000-0000-000000000000'::uuid - LIMIT 21 - ''' -# --- -# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.204 - ''' - SELECT "posthog_grouptypemapping"."id", - "posthog_grouptypemapping"."team_id", - "posthog_grouptypemapping"."project_id", - "posthog_grouptypemapping"."group_type", - "posthog_grouptypemapping"."group_type_index", - "posthog_grouptypemapping"."name_singular", - "posthog_grouptypemapping"."name_plural" - FROM "posthog_grouptypemapping" - WHERE "posthog_grouptypemapping"."team_id" = 99999 - ''' -# --- -# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.205 +# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.183 ''' +<<<<<<< HEAD +======= SELECT "posthog_datawarehousesavedquery"."created_by_id", "posthog_datawarehousesavedquery"."created_at", "posthog_datawarehousesavedquery"."deleted", @@ -5517,7 +5477,7 @@ AND "posthog_datawarehousesavedquery"."deleted" IS NOT NULL)) ''' # --- -# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.206 +# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.184 ''' SELECT "posthog_datawarehousetable"."created_by_id", "posthog_datawarehousetable"."created_at", @@ -5590,7 +5550,7 @@ AND "posthog_datawarehousetable"."deleted" IS NOT NULL)) ''' # --- -# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.207 +# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.185 ''' SELECT "posthog_datawarehousejoin"."created_by_id", "posthog_datawarehousejoin"."created_at", @@ -5602,14 +5562,15 @@ "posthog_datawarehousejoin"."source_table_key", "posthog_datawarehousejoin"."joining_table_name", "posthog_datawarehousejoin"."joining_table_key", - "posthog_datawarehousejoin"."field_name" + "posthog_datawarehousejoin"."field_name", + "posthog_datawarehousejoin"."configuration" FROM "posthog_datawarehousejoin" WHERE ("posthog_datawarehousejoin"."team_id" = 99999 AND NOT ("posthog_datawarehousejoin"."deleted" AND "posthog_datawarehousejoin"."deleted" IS NOT NULL)) ''' # --- -# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.208 +# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.186 ''' SELECT "posthog_grouptypemapping"."id", "posthog_grouptypemapping"."team_id", @@ -5622,7 +5583,7 @@ WHERE "posthog_grouptypemapping"."team_id" = 99999 ''' # --- -# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.209 +# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.187 ''' SELECT "posthog_datawarehousesavedquery"."created_by_id", "posthog_datawarehousesavedquery"."created_at", @@ -5643,53 +5604,7 @@ AND "posthog_datawarehousesavedquery"."deleted" IS NOT NULL)) ''' # --- -# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.21 - ''' - SELECT "ee_accesscontrol"."id", - "ee_accesscontrol"."team_id", - "ee_accesscontrol"."access_level", - "ee_accesscontrol"."resource", - "ee_accesscontrol"."resource_id", - "ee_accesscontrol"."organization_member_id", - "ee_accesscontrol"."role_id", - "ee_accesscontrol"."created_by_id", - "ee_accesscontrol"."created_at", - "ee_accesscontrol"."updated_at" - FROM "ee_accesscontrol" - LEFT OUTER JOIN "posthog_organizationmembership" ON ("ee_accesscontrol"."organization_member_id" = "posthog_organizationmembership"."id") - WHERE (("ee_accesscontrol"."organization_member_id" IS NULL - AND "ee_accesscontrol"."resource" = 'project' - AND "ee_accesscontrol"."resource_id" = '444' - AND "ee_accesscontrol"."role_id" IS NULL - AND "ee_accesscontrol"."team_id" = 99999) - OR ("posthog_organizationmembership"."user_id" = 99999 - AND "ee_accesscontrol"."resource" = 'project' - AND "ee_accesscontrol"."resource_id" = '444' - AND "ee_accesscontrol"."role_id" IS NULL - AND "ee_accesscontrol"."team_id" = 99999) - OR ("ee_accesscontrol"."organization_member_id" IS NULL - AND "ee_accesscontrol"."resource" = 'session_recording' - AND "ee_accesscontrol"."resource_id" IS NULL - AND "ee_accesscontrol"."role_id" IS NULL - AND "ee_accesscontrol"."team_id" = 99999) - OR ("posthog_organizationmembership"."user_id" = 99999 - AND "ee_accesscontrol"."resource" = 'session_recording' - AND "ee_accesscontrol"."resource_id" IS NULL - AND "ee_accesscontrol"."role_id" IS NULL - AND "ee_accesscontrol"."team_id" = 99999) - OR ("ee_accesscontrol"."organization_member_id" IS NULL - AND "ee_accesscontrol"."resource" = 'session_recording' - AND "ee_accesscontrol"."resource_id" IS NOT NULL - AND "ee_accesscontrol"."role_id" IS NULL - AND "ee_accesscontrol"."team_id" = 99999) - OR ("posthog_organizationmembership"."user_id" = 99999 - AND "ee_accesscontrol"."resource" = 'session_recording' - AND "ee_accesscontrol"."resource_id" IS NOT NULL - AND "ee_accesscontrol"."role_id" IS NULL - AND "ee_accesscontrol"."team_id" = 99999)) - ''' -# --- -# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.210 +# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.188 ''' SELECT "posthog_datawarehousetable"."created_by_id", "posthog_datawarehousetable"."created_at", @@ -5762,7 +5677,7 @@ AND "posthog_datawarehousetable"."deleted" IS NOT NULL)) ''' # --- -# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.211 +# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.189 ''' SELECT "posthog_datawarehousejoin"."created_by_id", "posthog_datawarehousejoin"."created_at", @@ -5774,123 +5689,17 @@ "posthog_datawarehousejoin"."source_table_key", "posthog_datawarehousejoin"."joining_table_name", "posthog_datawarehousejoin"."joining_table_key", - "posthog_datawarehousejoin"."field_name" + "posthog_datawarehousejoin"."field_name", + "posthog_datawarehousejoin"."configuration" FROM "posthog_datawarehousejoin" WHERE ("posthog_datawarehousejoin"."team_id" = 99999 AND NOT ("posthog_datawarehousejoin"."deleted" AND "posthog_datawarehousejoin"."deleted" IS NOT NULL)) ''' # --- -# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.212 - ''' - SELECT "posthog_sessionrecording"."id", - "posthog_sessionrecording"."session_id", - "posthog_sessionrecording"."team_id", - "posthog_sessionrecording"."created_at", - "posthog_sessionrecording"."deleted", - "posthog_sessionrecording"."object_storage_path", - "posthog_sessionrecording"."distinct_id", - "posthog_sessionrecording"."duration", - "posthog_sessionrecording"."active_seconds", - "posthog_sessionrecording"."inactive_seconds", - "posthog_sessionrecording"."start_time", - "posthog_sessionrecording"."end_time", - "posthog_sessionrecording"."click_count", - "posthog_sessionrecording"."keypress_count", - "posthog_sessionrecording"."mouse_activity_count", - "posthog_sessionrecording"."console_log_count", - "posthog_sessionrecording"."console_warn_count", - "posthog_sessionrecording"."console_error_count", - "posthog_sessionrecording"."start_url", - "posthog_sessionrecording"."storage_version" - FROM "posthog_sessionrecording" - WHERE ("posthog_sessionrecording"."session_id" IN ('1', - '10', - '2', - '3', - '4', - '5', - '6', - '7', - '8', - '9') - AND "posthog_sessionrecording"."team_id" = 99999) - ''' -# --- -# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.213 - ''' - SELECT "posthog_sessionrecordingviewed"."session_id" - FROM "posthog_sessionrecordingviewed" - WHERE ("posthog_sessionrecordingviewed"."team_id" = 99999 - AND "posthog_sessionrecordingviewed"."user_id" = 99999) - ''' -# --- -# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.214 - ''' - SELECT "posthog_persondistinctid"."id", - "posthog_persondistinctid"."team_id", - "posthog_persondistinctid"."person_id", - "posthog_persondistinctid"."distinct_id", - "posthog_persondistinctid"."version", - "posthog_person"."id", - "posthog_person"."created_at", - "posthog_person"."properties_last_updated_at", - "posthog_person"."properties_last_operation", - "posthog_person"."team_id", - "posthog_person"."properties", - "posthog_person"."is_user_id", - "posthog_person"."is_identified", - "posthog_person"."uuid", - "posthog_person"."version" - FROM "posthog_persondistinctid" - INNER JOIN "posthog_person" ON ("posthog_persondistinctid"."person_id" = "posthog_person"."id") - WHERE ("posthog_persondistinctid"."distinct_id" IN ('user1', - 'user10', - 'user2', - 'user3', - 'user4', - 'user5', - 'user6', - 'user7', - 'user8', - 'user9') - AND "posthog_persondistinctid"."team_id" = 99999) - ''' -# --- -# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.22 - ''' - SELECT "posthog_organizationmembership"."id", - "posthog_organizationmembership"."organization_id", - "posthog_organizationmembership"."user_id", - "posthog_organizationmembership"."level", - "posthog_organizationmembership"."joined_at", - "posthog_organizationmembership"."updated_at", - "posthog_organization"."id", - "posthog_organization"."name", - "posthog_organization"."slug", - "posthog_organization"."logo_media_id", - "posthog_organization"."created_at", - "posthog_organization"."updated_at", - "posthog_organization"."plugins_access_level", - "posthog_organization"."for_internal_metrics", - "posthog_organization"."is_member_join_email_enabled", - "posthog_organization"."enforce_2fa", - "posthog_organization"."is_hipaa", - "posthog_organization"."customer_id", - "posthog_organization"."available_product_features", - "posthog_organization"."usage", - "posthog_organization"."never_drop_data", - "posthog_organization"."customer_trust_scores", - "posthog_organization"."setup_section_2_completed", - "posthog_organization"."personalization", - "posthog_organization"."domain_whitelist" - FROM "posthog_organizationmembership" - INNER JOIN "posthog_organization" ON ("posthog_organizationmembership"."organization_id" = "posthog_organization"."id") - WHERE "posthog_organizationmembership"."user_id" = 99999 - ''' -# --- -# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.23 +# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.19 ''' +>>>>>>> c835d19e29 (Update query snapshots) SELECT "posthog_organization"."id", "posthog_organization"."name", "posthog_organization"."slug", @@ -5915,7 +5724,7 @@ LIMIT 21 ''' # --- -# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.24 +# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.184 ''' SELECT "posthog_grouptypemapping"."id", "posthog_grouptypemapping"."team_id", @@ -5928,7 +5737,7 @@ WHERE "posthog_grouptypemapping"."team_id" = 99999 ''' # --- -# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.25 +# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.185 ''' SELECT "posthog_datawarehousesavedquery"."created_by_id", "posthog_datawarehousesavedquery"."created_at", @@ -5949,7 +5758,7 @@ AND "posthog_datawarehousesavedquery"."deleted" IS NOT NULL)) ''' # --- -# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.26 +# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.186 ''' SELECT "posthog_datawarehousetable"."created_by_id", "posthog_datawarehousetable"."created_at", @@ -6022,7 +5831,7 @@ AND "posthog_datawarehousetable"."deleted" IS NOT NULL)) ''' # --- -# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.27 +# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.187 ''' SELECT "posthog_datawarehousejoin"."created_by_id", "posthog_datawarehousejoin"."created_at", @@ -6041,7 +5850,7 @@ AND "posthog_datawarehousejoin"."deleted" IS NOT NULL)) ''' # --- -# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.28 +# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.188 ''' SELECT "posthog_grouptypemapping"."id", "posthog_grouptypemapping"."team_id", @@ -6054,7 +5863,7 @@ WHERE "posthog_grouptypemapping"."team_id" = 99999 ''' # --- -# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.29 +# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.189 ''' SELECT "posthog_datawarehousesavedquery"."created_by_id", "posthog_datawarehousesavedquery"."created_at", @@ -6075,53 +5884,70 @@ AND "posthog_datawarehousesavedquery"."deleted" IS NOT NULL)) ''' # --- -# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.3 +# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.19 ''' - 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"."resource" = 'project' - AND "ee_accesscontrol"."resource_id" = '444' - AND "ee_accesscontrol"."role_id" IS NULL - AND "ee_accesscontrol"."team_id" = 99999) - OR ("posthog_organizationmembership"."user_id" = 99999 - AND "ee_accesscontrol"."resource" = 'project' - AND "ee_accesscontrol"."resource_id" = '444' - AND "ee_accesscontrol"."role_id" IS NULL - AND "ee_accesscontrol"."team_id" = 99999) - OR ("ee_accesscontrol"."organization_member_id" IS NULL - AND "ee_accesscontrol"."resource" = 'session_recording' - AND "ee_accesscontrol"."resource_id" IS NULL - AND "ee_accesscontrol"."role_id" IS NULL - AND "ee_accesscontrol"."team_id" = 99999) - OR ("posthog_organizationmembership"."user_id" = 99999 - AND "ee_accesscontrol"."resource" = 'session_recording' - AND "ee_accesscontrol"."resource_id" IS NULL - AND "ee_accesscontrol"."role_id" IS NULL - AND "ee_accesscontrol"."team_id" = 99999) - OR ("ee_accesscontrol"."organization_member_id" IS NULL - AND "ee_accesscontrol"."resource" = 'session_recording' - AND "ee_accesscontrol"."resource_id" IS NOT NULL - AND "ee_accesscontrol"."role_id" IS NULL - AND "ee_accesscontrol"."team_id" = 99999) - OR ("posthog_organizationmembership"."user_id" = 99999 - AND "ee_accesscontrol"."resource" = 'session_recording' - AND "ee_accesscontrol"."resource_id" IS NOT NULL - AND "ee_accesscontrol"."role_id" IS NULL - AND "ee_accesscontrol"."team_id" = 99999)) + SELECT "posthog_team"."id", + "posthog_team"."uuid", + "posthog_team"."organization_id", + "posthog_team"."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"."ingested_event", + "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"."person_processing_opt_out", + "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_url_trigger_config", + "posthog_team"."session_recording_url_blocklist_config", + "posthog_team"."session_recording_event_trigger_config", + "posthog_team"."session_replay_config", + "posthog_team"."survey_config", + "posthog_team"."capture_console_log_opt_in", + "posthog_team"."capture_performance_opt_in", + "posthog_team"."capture_dead_clicks", + "posthog_team"."surveys_opt_in", + "posthog_team"."heatmaps_opt_in", + "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"."primary_dashboard_id", + "posthog_team"."extra_settings", + "posthog_team"."modifiers", + "posthog_team"."correlation_config", + "posthog_team"."session_recording_retention_period_days", + "posthog_team"."external_data_workspace_id", + "posthog_team"."external_data_workspace_last_synced_at" + FROM "posthog_team" + WHERE "posthog_team"."id" = 99999 + LIMIT 21 ''' # --- -# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.30 +# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.190 ''' SELECT "posthog_datawarehousetable"."created_by_id", "posthog_datawarehousetable"."created_at", @@ -6194,7 +6020,7 @@ AND "posthog_datawarehousetable"."deleted" IS NOT NULL)) ''' # --- -# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.31 +# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.191 ''' SELECT "posthog_datawarehousejoin"."created_by_id", "posthog_datawarehousejoin"."created_at", @@ -6213,7 +6039,7 @@ AND "posthog_datawarehousejoin"."deleted" IS NOT NULL)) ''' # --- -# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.32 +# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.192 ''' SELECT "posthog_sessionrecording"."id", "posthog_sessionrecording"."session_id", @@ -6236,11 +6062,19 @@ "posthog_sessionrecording"."start_url", "posthog_sessionrecording"."storage_version" FROM "posthog_sessionrecording" - WHERE ("posthog_sessionrecording"."session_id" IN ('1') + WHERE ("posthog_sessionrecording"."session_id" IN ('1', + '2', + '3', + '4', + '5', + '6', + '7', + '8', + '9') AND "posthog_sessionrecording"."team_id" = 99999) ''' # --- -# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.33 +# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.193 ''' SELECT "posthog_sessionrecordingviewed"."session_id" FROM "posthog_sessionrecordingviewed" @@ -6248,7 +6082,7 @@ AND "posthog_sessionrecordingviewed"."user_id" = 99999) ''' # --- -# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.34 +# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.194 ''' SELECT "posthog_persondistinctid"."id", "posthog_persondistinctid"."team_id", @@ -6267,11 +6101,19 @@ "posthog_person"."version" FROM "posthog_persondistinctid" INNER JOIN "posthog_person" ON ("posthog_persondistinctid"."person_id" = "posthog_person"."id") - WHERE ("posthog_persondistinctid"."distinct_id" IN ('user1') + WHERE ("posthog_persondistinctid"."distinct_id" IN ('user1', + 'user2', + 'user3', + 'user4', + 'user5', + 'user6', + 'user7', + 'user8', + 'user9') AND "posthog_persondistinctid"."team_id" = 99999) ''' # --- -# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.35 +# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.195 ''' SELECT "posthog_team"."id", "posthog_team"."uuid", @@ -6341,7 +6183,7 @@ LIMIT 21 ''' # --- -# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.36 +# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.196 ''' SELECT "posthog_person"."id", "posthog_person"."created_at", @@ -6355,12 +6197,12 @@ "posthog_person"."version" FROM "posthog_person" INNER JOIN "posthog_persondistinctid" ON ("posthog_person"."id" = "posthog_persondistinctid"."person_id") - WHERE ("posthog_persondistinctid"."distinct_id" = 'user2' + WHERE ("posthog_persondistinctid"."distinct_id" = 'user10' AND "posthog_persondistinctid"."team_id" = 99999) LIMIT 21 ''' # --- -# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.37 +# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.197 ''' SELECT "posthog_person"."id", "posthog_person"."created_at", @@ -6374,12 +6216,12 @@ "posthog_person"."version" FROM "posthog_person" INNER JOIN "posthog_persondistinctid" ON ("posthog_person"."id" = "posthog_persondistinctid"."person_id") - WHERE ("posthog_persondistinctid"."distinct_id" = 'user2' + WHERE ("posthog_persondistinctid"."distinct_id" = 'user10' AND "posthog_persondistinctid"."team_id" = 99999) LIMIT 21 ''' # --- -# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.38 +# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.198 ''' SELECT "posthog_user"."id", "posthog_user"."password", @@ -6411,7 +6253,7 @@ LIMIT 21 ''' # --- -# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.39 +# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.199 ''' SELECT "posthog_team"."id", "posthog_team"."uuid", @@ -6474,7 +6316,7 @@ LIMIT 21 ''' # --- -# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.4 +# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.2 ''' SELECT "posthog_organizationmembership"."id", "posthog_organizationmembership"."organization_id", @@ -6503,10 +6345,12 @@ "posthog_organization"."domain_whitelist" FROM "posthog_organizationmembership" INNER JOIN "posthog_organization" ON ("posthog_organizationmembership"."organization_id" = "posthog_organization"."id") - WHERE "posthog_organizationmembership"."user_id" = 99999 + WHERE ("posthog_organizationmembership"."organization_id" = '00000000-0000-0000-0000-000000000000'::uuid + AND "posthog_organizationmembership"."user_id" = 99999) + LIMIT 21 ''' # --- -# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.40 +# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.20 ''' SELECT "posthog_organizationmembership"."id", "posthog_organizationmembership"."organization_id", @@ -6540,27 +6384,61 @@ LIMIT 21 ''' # --- -# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.41 +# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.200 ''' - 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"."resource" = 'project' - AND "ee_accesscontrol"."resource_id" = '444' - AND "ee_accesscontrol"."role_id" IS NULL - AND "ee_accesscontrol"."team_id" = 99999) - OR ("posthog_organizationmembership"."user_id" = 99999 - AND "ee_accesscontrol"."resource" = 'project' + SELECT "posthog_organizationmembership"."id", + "posthog_organizationmembership"."organization_id", + "posthog_organizationmembership"."user_id", + "posthog_organizationmembership"."level", + "posthog_organizationmembership"."joined_at", + "posthog_organizationmembership"."updated_at", + "posthog_organization"."id", + "posthog_organization"."name", + "posthog_organization"."slug", + "posthog_organization"."logo_media_id", + "posthog_organization"."created_at", + "posthog_organization"."updated_at", + "posthog_organization"."plugins_access_level", + "posthog_organization"."for_internal_metrics", + "posthog_organization"."is_member_join_email_enabled", + "posthog_organization"."enforce_2fa", + "posthog_organization"."is_hipaa", + "posthog_organization"."customer_id", + "posthog_organization"."available_product_features", + "posthog_organization"."usage", + "posthog_organization"."never_drop_data", + "posthog_organization"."customer_trust_scores", + "posthog_organization"."setup_section_2_completed", + "posthog_organization"."personalization", + "posthog_organization"."domain_whitelist" + 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: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.201 + ''' + 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"."resource" = 'project' + AND "ee_accesscontrol"."resource_id" = '444' + AND "ee_accesscontrol"."role_id" IS NULL + AND "ee_accesscontrol"."team_id" = 99999) + OR ("posthog_organizationmembership"."user_id" = 99999 + AND "ee_accesscontrol"."resource" = 'project' AND "ee_accesscontrol"."resource_id" = '444' AND "ee_accesscontrol"."role_id" IS NULL AND "ee_accesscontrol"."team_id" = 99999) @@ -6586,7 +6464,7 @@ AND "ee_accesscontrol"."team_id" = 99999)) ''' # --- -# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.42 +# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.202 ''' SELECT "posthog_organizationmembership"."id", "posthog_organizationmembership"."organization_id", @@ -6618,7 +6496,7 @@ WHERE "posthog_organizationmembership"."user_id" = 99999 ''' # --- -# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.43 +# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.203 ''' SELECT "posthog_organization"."id", "posthog_organization"."name", @@ -6644,7 +6522,7 @@ LIMIT 21 ''' # --- -# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.44 +# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.204 ''' SELECT "posthog_grouptypemapping"."id", "posthog_grouptypemapping"."team_id", @@ -6657,7 +6535,7 @@ WHERE "posthog_grouptypemapping"."team_id" = 99999 ''' # --- -# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.45 +# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.205 ''' SELECT "posthog_datawarehousesavedquery"."created_by_id", "posthog_datawarehousesavedquery"."created_at", @@ -6678,7 +6556,7 @@ AND "posthog_datawarehousesavedquery"."deleted" IS NOT NULL)) ''' # --- -# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.46 +# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.206 ''' SELECT "posthog_datawarehousetable"."created_by_id", "posthog_datawarehousetable"."created_at", @@ -6751,7 +6629,7 @@ AND "posthog_datawarehousetable"."deleted" IS NOT NULL)) ''' # --- -# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.47 +# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.207 ''' SELECT "posthog_datawarehousejoin"."created_by_id", "posthog_datawarehousejoin"."created_at", @@ -6770,7 +6648,7 @@ AND "posthog_datawarehousejoin"."deleted" IS NOT NULL)) ''' # --- -# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.48 +# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.208 ''' SELECT "posthog_grouptypemapping"."id", "posthog_grouptypemapping"."team_id", @@ -6783,7 +6661,7 @@ WHERE "posthog_grouptypemapping"."team_id" = 99999 ''' # --- -# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.49 +# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.209 ''' SELECT "posthog_datawarehousesavedquery"."created_by_id", "posthog_datawarehousesavedquery"."created_at", @@ -6804,33 +6682,53 @@ AND "posthog_datawarehousesavedquery"."deleted" IS NOT NULL)) ''' # --- -# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.5 +# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.21 ''' - 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"."plugins_access_level", - "posthog_organization"."for_internal_metrics", - "posthog_organization"."is_member_join_email_enabled", - "posthog_organization"."enforce_2fa", - "posthog_organization"."is_hipaa", - "posthog_organization"."customer_id", - "posthog_organization"."available_product_features", - "posthog_organization"."usage", - "posthog_organization"."never_drop_data", - "posthog_organization"."customer_trust_scores", - "posthog_organization"."setup_section_2_completed", - "posthog_organization"."personalization", - "posthog_organization"."domain_whitelist" - FROM "posthog_organization" - WHERE "posthog_organization"."id" = '00000000-0000-0000-0000-000000000000'::uuid - LIMIT 21 + SELECT "ee_accesscontrol"."id", + "ee_accesscontrol"."team_id", + "ee_accesscontrol"."access_level", + "ee_accesscontrol"."resource", + "ee_accesscontrol"."resource_id", + "ee_accesscontrol"."organization_member_id", + "ee_accesscontrol"."role_id", + "ee_accesscontrol"."created_by_id", + "ee_accesscontrol"."created_at", + "ee_accesscontrol"."updated_at" + FROM "ee_accesscontrol" + LEFT OUTER JOIN "posthog_organizationmembership" ON ("ee_accesscontrol"."organization_member_id" = "posthog_organizationmembership"."id") + WHERE (("ee_accesscontrol"."organization_member_id" IS NULL + AND "ee_accesscontrol"."resource" = 'project' + AND "ee_accesscontrol"."resource_id" = '444' + AND "ee_accesscontrol"."role_id" IS NULL + AND "ee_accesscontrol"."team_id" = 99999) + OR ("posthog_organizationmembership"."user_id" = 99999 + AND "ee_accesscontrol"."resource" = 'project' + AND "ee_accesscontrol"."resource_id" = '444' + AND "ee_accesscontrol"."role_id" IS NULL + AND "ee_accesscontrol"."team_id" = 99999) + OR ("ee_accesscontrol"."organization_member_id" IS NULL + AND "ee_accesscontrol"."resource" = 'session_recording' + AND "ee_accesscontrol"."resource_id" IS NULL + AND "ee_accesscontrol"."role_id" IS NULL + AND "ee_accesscontrol"."team_id" = 99999) + OR ("posthog_organizationmembership"."user_id" = 99999 + AND "ee_accesscontrol"."resource" = 'session_recording' + AND "ee_accesscontrol"."resource_id" IS NULL + AND "ee_accesscontrol"."role_id" IS NULL + AND "ee_accesscontrol"."team_id" = 99999) + OR ("ee_accesscontrol"."organization_member_id" IS NULL + AND "ee_accesscontrol"."resource" = 'session_recording' + AND "ee_accesscontrol"."resource_id" IS NOT NULL + AND "ee_accesscontrol"."role_id" IS NULL + AND "ee_accesscontrol"."team_id" = 99999) + OR ("posthog_organizationmembership"."user_id" = 99999 + AND "ee_accesscontrol"."resource" = 'session_recording' + AND "ee_accesscontrol"."resource_id" IS NOT NULL + AND "ee_accesscontrol"."role_id" IS NULL + AND "ee_accesscontrol"."team_id" = 99999)) ''' # --- -# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.50 +# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.210 ''' SELECT "posthog_datawarehousetable"."created_by_id", "posthog_datawarehousetable"."created_at", @@ -6903,7 +6801,7 @@ AND "posthog_datawarehousetable"."deleted" IS NOT NULL)) ''' # --- -# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.51 +# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.211 ''' SELECT "posthog_datawarehousejoin"."created_by_id", "posthog_datawarehousejoin"."created_at", @@ -6922,7 +6820,7 @@ AND "posthog_datawarehousejoin"."deleted" IS NOT NULL)) ''' # --- -# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.52 +# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.212 ''' SELECT "posthog_sessionrecording"."id", "posthog_sessionrecording"."session_id", @@ -6946,11 +6844,19 @@ "posthog_sessionrecording"."storage_version" FROM "posthog_sessionrecording" WHERE ("posthog_sessionrecording"."session_id" IN ('1', - '2') + '10', + '2', + '3', + '4', + '5', + '6', + '7', + '8', + '9') AND "posthog_sessionrecording"."team_id" = 99999) ''' # --- -# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.53 +# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.213 ''' SELECT "posthog_sessionrecordingviewed"."session_id" FROM "posthog_sessionrecordingviewed" @@ -6958,7 +6864,7 @@ AND "posthog_sessionrecordingviewed"."user_id" = 99999) ''' # --- -# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.54 +# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.214 ''' SELECT "posthog_persondistinctid"."id", "posthog_persondistinctid"."team_id", @@ -6978,307 +6884,19 @@ FROM "posthog_persondistinctid" INNER JOIN "posthog_person" ON ("posthog_persondistinctid"."person_id" = "posthog_person"."id") WHERE ("posthog_persondistinctid"."distinct_id" IN ('user1', - 'user2') - AND "posthog_persondistinctid"."team_id" = 99999) - ''' -# --- -# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.55 - ''' - SELECT "posthog_team"."id", - "posthog_team"."uuid", - "posthog_team"."organization_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"."ingested_event", - "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"."person_processing_opt_out", - "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_url_trigger_config", - "posthog_team"."session_recording_url_blocklist_config", - "posthog_team"."session_recording_event_trigger_config", - "posthog_team"."session_replay_config", - "posthog_team"."survey_config", - "posthog_team"."capture_console_log_opt_in", - "posthog_team"."capture_performance_opt_in", - "posthog_team"."capture_dead_clicks", - "posthog_team"."surveys_opt_in", - "posthog_team"."heatmaps_opt_in", - "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"."primary_dashboard_id", - "posthog_team"."extra_settings", - "posthog_team"."modifiers", - "posthog_team"."correlation_config", - "posthog_team"."session_recording_retention_period_days", - "posthog_team"."plugins_opt_in", - "posthog_team"."opt_out_capture", - "posthog_team"."event_names", - "posthog_team"."event_names_with_usage", - "posthog_team"."event_properties", - "posthog_team"."event_properties_with_usage", - "posthog_team"."event_properties_numerical", - "posthog_team"."external_data_workspace_id", - "posthog_team"."external_data_workspace_last_synced_at" - FROM "posthog_team" - WHERE "posthog_team"."id" = 99999 - LIMIT 21 - ''' -# --- -# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.56 - ''' - SELECT "posthog_person"."id", - "posthog_person"."created_at", - "posthog_person"."properties_last_updated_at", - "posthog_person"."properties_last_operation", - "posthog_person"."team_id", - "posthog_person"."properties", - "posthog_person"."is_user_id", - "posthog_person"."is_identified", - "posthog_person"."uuid", - "posthog_person"."version" - FROM "posthog_person" - INNER JOIN "posthog_persondistinctid" ON ("posthog_person"."id" = "posthog_persondistinctid"."person_id") - WHERE ("posthog_persondistinctid"."distinct_id" = 'user3' + 'user10', + 'user2', + 'user3', + 'user4', + 'user5', + 'user6', + 'user7', + 'user8', + 'user9') AND "posthog_persondistinctid"."team_id" = 99999) - LIMIT 21 ''' # --- -# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.57 - ''' - SELECT "posthog_person"."id", - "posthog_person"."created_at", - "posthog_person"."properties_last_updated_at", - "posthog_person"."properties_last_operation", - "posthog_person"."team_id", - "posthog_person"."properties", - "posthog_person"."is_user_id", - "posthog_person"."is_identified", - "posthog_person"."uuid", - "posthog_person"."version" - FROM "posthog_person" - INNER JOIN "posthog_persondistinctid" ON ("posthog_person"."id" = "posthog_persondistinctid"."person_id") - WHERE ("posthog_persondistinctid"."distinct_id" = 'user3' - AND "posthog_persondistinctid"."team_id" = 99999) - LIMIT 21 - ''' -# --- -# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.58 - ''' - 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"."temporary_token", - "posthog_user"."distinct_id", - "posthog_user"."is_email_verified", - "posthog_user"."has_seen_product_intro_for", - "posthog_user"."strapi_id", - "posthog_user"."is_active", - "posthog_user"."theme_mode", - "posthog_user"."partial_notification_settings", - "posthog_user"."anonymize_data", - "posthog_user"."toolbar_mode", - "posthog_user"."hedgehog_config", - "posthog_user"."events_column_config", - "posthog_user"."email_opt_in" - FROM "posthog_user" - WHERE "posthog_user"."id" = 99999 - LIMIT 21 - ''' -# --- -# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.59 - ''' - SELECT "posthog_team"."id", - "posthog_team"."uuid", - "posthog_team"."organization_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"."ingested_event", - "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"."person_processing_opt_out", - "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_url_trigger_config", - "posthog_team"."session_recording_url_blocklist_config", - "posthog_team"."session_recording_event_trigger_config", - "posthog_team"."session_replay_config", - "posthog_team"."survey_config", - "posthog_team"."capture_console_log_opt_in", - "posthog_team"."capture_performance_opt_in", - "posthog_team"."capture_dead_clicks", - "posthog_team"."surveys_opt_in", - "posthog_team"."heatmaps_opt_in", - "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"."primary_dashboard_id", - "posthog_team"."extra_settings", - "posthog_team"."modifiers", - "posthog_team"."correlation_config", - "posthog_team"."session_recording_retention_period_days", - "posthog_team"."external_data_workspace_id", - "posthog_team"."external_data_workspace_last_synced_at" - FROM "posthog_team" - WHERE "posthog_team"."id" = 99999 - LIMIT 21 - ''' -# --- -# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.6 - ''' - SELECT "posthog_grouptypemapping"."id", - "posthog_grouptypemapping"."team_id", - "posthog_grouptypemapping"."project_id", - "posthog_grouptypemapping"."group_type", - "posthog_grouptypemapping"."group_type_index", - "posthog_grouptypemapping"."name_singular", - "posthog_grouptypemapping"."name_plural" - FROM "posthog_grouptypemapping" - WHERE "posthog_grouptypemapping"."team_id" = 99999 - ''' -# --- -# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.60 - ''' - SELECT "posthog_organizationmembership"."id", - "posthog_organizationmembership"."organization_id", - "posthog_organizationmembership"."user_id", - "posthog_organizationmembership"."level", - "posthog_organizationmembership"."joined_at", - "posthog_organizationmembership"."updated_at", - "posthog_organization"."id", - "posthog_organization"."name", - "posthog_organization"."slug", - "posthog_organization"."logo_media_id", - "posthog_organization"."created_at", - "posthog_organization"."updated_at", - "posthog_organization"."plugins_access_level", - "posthog_organization"."for_internal_metrics", - "posthog_organization"."is_member_join_email_enabled", - "posthog_organization"."enforce_2fa", - "posthog_organization"."is_hipaa", - "posthog_organization"."customer_id", - "posthog_organization"."available_product_features", - "posthog_organization"."usage", - "posthog_organization"."never_drop_data", - "posthog_organization"."customer_trust_scores", - "posthog_organization"."setup_section_2_completed", - "posthog_organization"."personalization", - "posthog_organization"."domain_whitelist" - 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: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.61 - ''' - SELECT "ee_accesscontrol"."id", - "ee_accesscontrol"."team_id", - "ee_accesscontrol"."access_level", - "ee_accesscontrol"."resource", - "ee_accesscontrol"."resource_id", - "ee_accesscontrol"."organization_member_id", - "ee_accesscontrol"."role_id", - "ee_accesscontrol"."created_by_id", - "ee_accesscontrol"."created_at", - "ee_accesscontrol"."updated_at" - FROM "ee_accesscontrol" - LEFT OUTER JOIN "posthog_organizationmembership" ON ("ee_accesscontrol"."organization_member_id" = "posthog_organizationmembership"."id") - WHERE (("ee_accesscontrol"."organization_member_id" IS NULL - AND "ee_accesscontrol"."resource" = 'project' - AND "ee_accesscontrol"."resource_id" = '444' - AND "ee_accesscontrol"."role_id" IS NULL - AND "ee_accesscontrol"."team_id" = 99999) - OR ("posthog_organizationmembership"."user_id" = 99999 - AND "ee_accesscontrol"."resource" = 'project' - AND "ee_accesscontrol"."resource_id" = '444' - AND "ee_accesscontrol"."role_id" IS NULL - AND "ee_accesscontrol"."team_id" = 99999) - OR ("ee_accesscontrol"."organization_member_id" IS NULL - AND "ee_accesscontrol"."resource" = 'session_recording' - AND "ee_accesscontrol"."resource_id" IS NULL - AND "ee_accesscontrol"."role_id" IS NULL - AND "ee_accesscontrol"."team_id" = 99999) - OR ("posthog_organizationmembership"."user_id" = 99999 - AND "ee_accesscontrol"."resource" = 'session_recording' - AND "ee_accesscontrol"."resource_id" IS NULL - AND "ee_accesscontrol"."role_id" IS NULL - AND "ee_accesscontrol"."team_id" = 99999) - OR ("ee_accesscontrol"."organization_member_id" IS NULL - AND "ee_accesscontrol"."resource" = 'session_recording' - AND "ee_accesscontrol"."resource_id" IS NOT NULL - AND "ee_accesscontrol"."role_id" IS NULL - AND "ee_accesscontrol"."team_id" = 99999) - OR ("posthog_organizationmembership"."user_id" = 99999 - AND "ee_accesscontrol"."resource" = 'session_recording' - AND "ee_accesscontrol"."resource_id" IS NOT NULL - AND "ee_accesscontrol"."role_id" IS NULL - AND "ee_accesscontrol"."team_id" = 99999)) - ''' -# --- -# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.62 +# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.22 ''' SELECT "posthog_organizationmembership"."id", "posthog_organizationmembership"."organization_id", @@ -7310,8 +6928,9 @@ WHERE "posthog_organizationmembership"."user_id" = 99999 ''' # --- -# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.63 +# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.23 ''' +<<<<<<< HEAD SELECT "posthog_organization"."id", "posthog_organization"."name", "posthog_organization"."slug", @@ -7334,9 +6953,27 @@ FROM "posthog_organization" WHERE "posthog_organization"."id" = '00000000-0000-0000-0000-000000000000'::uuid LIMIT 21 +======= + SELECT "posthog_datawarehousejoin"."created_by_id", + "posthog_datawarehousejoin"."created_at", + "posthog_datawarehousejoin"."deleted", + "posthog_datawarehousejoin"."deleted_at", + "posthog_datawarehousejoin"."id", + "posthog_datawarehousejoin"."team_id", + "posthog_datawarehousejoin"."source_table_name", + "posthog_datawarehousejoin"."source_table_key", + "posthog_datawarehousejoin"."joining_table_name", + "posthog_datawarehousejoin"."joining_table_key", + "posthog_datawarehousejoin"."field_name", + "posthog_datawarehousejoin"."configuration" + FROM "posthog_datawarehousejoin" + WHERE ("posthog_datawarehousejoin"."team_id" = 99999 + AND NOT ("posthog_datawarehousejoin"."deleted" + AND "posthog_datawarehousejoin"."deleted" IS NOT NULL)) +>>>>>>> c835d19e29 (Update query snapshots) ''' # --- -# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.64 +# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.24 ''' SELECT "posthog_grouptypemapping"."id", "posthog_grouptypemapping"."team_id", @@ -7349,7 +6986,7 @@ WHERE "posthog_grouptypemapping"."team_id" = 99999 ''' # --- -# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.65 +# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.25 ''' SELECT "posthog_datawarehousesavedquery"."created_by_id", "posthog_datawarehousesavedquery"."created_at", @@ -7370,7 +7007,7 @@ AND "posthog_datawarehousesavedquery"."deleted" IS NOT NULL)) ''' # --- -# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.66 +# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.26 ''' SELECT "posthog_datawarehousetable"."created_by_id", "posthog_datawarehousetable"."created_at", @@ -7443,7 +7080,7 @@ AND "posthog_datawarehousetable"."deleted" IS NOT NULL)) ''' # --- -# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.67 +# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.27 ''' SELECT "posthog_datawarehousejoin"."created_by_id", "posthog_datawarehousejoin"."created_at", @@ -7455,14 +7092,15 @@ "posthog_datawarehousejoin"."source_table_key", "posthog_datawarehousejoin"."joining_table_name", "posthog_datawarehousejoin"."joining_table_key", - "posthog_datawarehousejoin"."field_name" + "posthog_datawarehousejoin"."field_name", + "posthog_datawarehousejoin"."configuration" FROM "posthog_datawarehousejoin" WHERE ("posthog_datawarehousejoin"."team_id" = 99999 AND NOT ("posthog_datawarehousejoin"."deleted" AND "posthog_datawarehousejoin"."deleted" IS NOT NULL)) ''' # --- -# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.68 +# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.28 ''' SELECT "posthog_grouptypemapping"."id", "posthog_grouptypemapping"."team_id", @@ -7475,7 +7113,7 @@ WHERE "posthog_grouptypemapping"."team_id" = 99999 ''' # --- -# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.69 +# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.29 ''' SELECT "posthog_datawarehousesavedquery"."created_by_id", "posthog_datawarehousesavedquery"."created_at", @@ -7496,28 +7134,53 @@ AND "posthog_datawarehousesavedquery"."deleted" IS NOT NULL)) ''' # --- -# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.7 - ''' - SELECT "posthog_datawarehousesavedquery"."created_by_id", - "posthog_datawarehousesavedquery"."created_at", - "posthog_datawarehousesavedquery"."deleted", - "posthog_datawarehousesavedquery"."deleted_at", - "posthog_datawarehousesavedquery"."id", - "posthog_datawarehousesavedquery"."name", - "posthog_datawarehousesavedquery"."team_id", - "posthog_datawarehousesavedquery"."columns", - "posthog_datawarehousesavedquery"."external_tables", - "posthog_datawarehousesavedquery"."query", - "posthog_datawarehousesavedquery"."status", - "posthog_datawarehousesavedquery"."last_run_at", - "posthog_datawarehousesavedquery"."table_id" - FROM "posthog_datawarehousesavedquery" - WHERE ("posthog_datawarehousesavedquery"."team_id" = 99999 - AND NOT ("posthog_datawarehousesavedquery"."deleted" - AND "posthog_datawarehousesavedquery"."deleted" IS NOT NULL)) +# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.3 + ''' + 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"."resource" = 'project' + AND "ee_accesscontrol"."resource_id" = '444' + AND "ee_accesscontrol"."role_id" IS NULL + AND "ee_accesscontrol"."team_id" = 99999) + OR ("posthog_organizationmembership"."user_id" = 99999 + AND "ee_accesscontrol"."resource" = 'project' + AND "ee_accesscontrol"."resource_id" = '444' + AND "ee_accesscontrol"."role_id" IS NULL + AND "ee_accesscontrol"."team_id" = 99999) + OR ("ee_accesscontrol"."organization_member_id" IS NULL + AND "ee_accesscontrol"."resource" = 'session_recording' + AND "ee_accesscontrol"."resource_id" IS NULL + AND "ee_accesscontrol"."role_id" IS NULL + AND "ee_accesscontrol"."team_id" = 99999) + OR ("posthog_organizationmembership"."user_id" = 99999 + AND "ee_accesscontrol"."resource" = 'session_recording' + AND "ee_accesscontrol"."resource_id" IS NULL + AND "ee_accesscontrol"."role_id" IS NULL + AND "ee_accesscontrol"."team_id" = 99999) + OR ("ee_accesscontrol"."organization_member_id" IS NULL + AND "ee_accesscontrol"."resource" = 'session_recording' + AND "ee_accesscontrol"."resource_id" IS NOT NULL + AND "ee_accesscontrol"."role_id" IS NULL + AND "ee_accesscontrol"."team_id" = 99999) + OR ("posthog_organizationmembership"."user_id" = 99999 + AND "ee_accesscontrol"."resource" = 'session_recording' + AND "ee_accesscontrol"."resource_id" IS NOT NULL + AND "ee_accesscontrol"."role_id" IS NULL + AND "ee_accesscontrol"."team_id" = 99999)) ''' # --- -# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.70 +# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.30 ''' SELECT "posthog_datawarehousetable"."created_by_id", "posthog_datawarehousetable"."created_at", @@ -7590,7 +7253,7 @@ AND "posthog_datawarehousetable"."deleted" IS NOT NULL)) ''' # --- -# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.71 +# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.31 ''' SELECT "posthog_datawarehousejoin"."created_by_id", "posthog_datawarehousejoin"."created_at", @@ -7609,7 +7272,7 @@ AND "posthog_datawarehousejoin"."deleted" IS NOT NULL)) ''' # --- -# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.72 +# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.32 ''' SELECT "posthog_sessionrecording"."id", "posthog_sessionrecording"."session_id", @@ -7632,13 +7295,11 @@ "posthog_sessionrecording"."start_url", "posthog_sessionrecording"."storage_version" FROM "posthog_sessionrecording" - WHERE ("posthog_sessionrecording"."session_id" IN ('1', - '2', - '3') + WHERE ("posthog_sessionrecording"."session_id" IN ('1') AND "posthog_sessionrecording"."team_id" = 99999) ''' # --- -# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.73 +# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.33 ''' SELECT "posthog_sessionrecordingviewed"."session_id" FROM "posthog_sessionrecordingviewed" @@ -7646,7 +7307,7 @@ AND "posthog_sessionrecordingviewed"."user_id" = 99999) ''' # --- -# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.74 +# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.34 ''' SELECT "posthog_persondistinctid"."id", "posthog_persondistinctid"."team_id", @@ -7665,13 +7326,11 @@ "posthog_person"."version" FROM "posthog_persondistinctid" INNER JOIN "posthog_person" ON ("posthog_persondistinctid"."person_id" = "posthog_person"."id") - WHERE ("posthog_persondistinctid"."distinct_id" IN ('user1', - 'user2', - 'user3') + WHERE ("posthog_persondistinctid"."distinct_id" IN ('user1') AND "posthog_persondistinctid"."team_id" = 99999) ''' # --- -# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.75 +# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.35 ''' SELECT "posthog_team"."id", "posthog_team"."uuid", @@ -7741,7 +7400,7 @@ LIMIT 21 ''' # --- -# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.76 +# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.36 ''' SELECT "posthog_person"."id", "posthog_person"."created_at", @@ -7755,12 +7414,12 @@ "posthog_person"."version" FROM "posthog_person" INNER JOIN "posthog_persondistinctid" ON ("posthog_person"."id" = "posthog_persondistinctid"."person_id") - WHERE ("posthog_persondistinctid"."distinct_id" = 'user4' + WHERE ("posthog_persondistinctid"."distinct_id" = 'user2' AND "posthog_persondistinctid"."team_id" = 99999) LIMIT 21 ''' # --- -# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.77 +# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.37 ''' SELECT "posthog_person"."id", "posthog_person"."created_at", @@ -7774,12 +7433,12 @@ "posthog_person"."version" FROM "posthog_person" INNER JOIN "posthog_persondistinctid" ON ("posthog_person"."id" = "posthog_persondistinctid"."person_id") - WHERE ("posthog_persondistinctid"."distinct_id" = 'user4' + WHERE ("posthog_persondistinctid"."distinct_id" = 'user2' AND "posthog_persondistinctid"."team_id" = 99999) LIMIT 21 ''' # --- -# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.78 +# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.38 ''' SELECT "posthog_user"."id", "posthog_user"."password", @@ -7811,7 +7470,7 @@ LIMIT 21 ''' # --- -# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.79 +# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.39 ''' SELECT "posthog_team"."id", "posthog_team"."uuid", @@ -7874,80 +7533,39 @@ LIMIT 21 ''' # --- -# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.8 +# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.4 ''' - SELECT "posthog_datawarehousetable"."created_by_id", - "posthog_datawarehousetable"."created_at", - "posthog_datawarehousetable"."updated_at", - "posthog_datawarehousetable"."deleted", - "posthog_datawarehousetable"."deleted_at", - "posthog_datawarehousetable"."id", - "posthog_datawarehousetable"."name", - "posthog_datawarehousetable"."format", - "posthog_datawarehousetable"."team_id", - "posthog_datawarehousetable"."url_pattern", - "posthog_datawarehousetable"."credential_id", - "posthog_datawarehousetable"."external_data_source_id", - "posthog_datawarehousetable"."columns", - "posthog_datawarehousetable"."row_count", - "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"."temporary_token", - "posthog_user"."distinct_id", - "posthog_user"."is_email_verified", - "posthog_user"."requested_password_reset_at", - "posthog_user"."has_seen_product_intro_for", - "posthog_user"."strapi_id", - "posthog_user"."is_active", - "posthog_user"."theme_mode", - "posthog_user"."partial_notification_settings", - "posthog_user"."anonymize_data", - "posthog_user"."toolbar_mode", - "posthog_user"."hedgehog_config", - "posthog_user"."events_column_config", - "posthog_user"."email_opt_in", - "posthog_datawarehousecredential"."created_by_id", - "posthog_datawarehousecredential"."created_at", - "posthog_datawarehousecredential"."id", - "posthog_datawarehousecredential"."access_key", - "posthog_datawarehousecredential"."access_secret", - "posthog_datawarehousecredential"."team_id", - "posthog_externaldatasource"."created_by_id", - "posthog_externaldatasource"."created_at", - "posthog_externaldatasource"."updated_at", - "posthog_externaldatasource"."deleted", - "posthog_externaldatasource"."deleted_at", - "posthog_externaldatasource"."id", - "posthog_externaldatasource"."source_id", - "posthog_externaldatasource"."connection_id", - "posthog_externaldatasource"."destination_id", - "posthog_externaldatasource"."team_id", - "posthog_externaldatasource"."sync_frequency", - "posthog_externaldatasource"."status", - "posthog_externaldatasource"."source_type", - "posthog_externaldatasource"."job_inputs", - "posthog_externaldatasource"."are_tables_created", - "posthog_externaldatasource"."prefix" - FROM "posthog_datawarehousetable" - LEFT OUTER JOIN "posthog_user" ON ("posthog_datawarehousetable"."created_by_id" = "posthog_user"."id") - LEFT OUTER JOIN "posthog_datawarehousecredential" ON ("posthog_datawarehousetable"."credential_id" = "posthog_datawarehousecredential"."id") - LEFT OUTER JOIN "posthog_externaldatasource" ON ("posthog_datawarehousetable"."external_data_source_id" = "posthog_externaldatasource"."id") - WHERE ("posthog_datawarehousetable"."team_id" = 99999 - AND NOT ("posthog_datawarehousetable"."deleted" - AND "posthog_datawarehousetable"."deleted" IS NOT NULL)) + SELECT "posthog_organizationmembership"."id", + "posthog_organizationmembership"."organization_id", + "posthog_organizationmembership"."user_id", + "posthog_organizationmembership"."level", + "posthog_organizationmembership"."joined_at", + "posthog_organizationmembership"."updated_at", + "posthog_organization"."id", + "posthog_organization"."name", + "posthog_organization"."slug", + "posthog_organization"."logo_media_id", + "posthog_organization"."created_at", + "posthog_organization"."updated_at", + "posthog_organization"."plugins_access_level", + "posthog_organization"."for_internal_metrics", + "posthog_organization"."is_member_join_email_enabled", + "posthog_organization"."enforce_2fa", + "posthog_organization"."is_hipaa", + "posthog_organization"."customer_id", + "posthog_organization"."available_product_features", + "posthog_organization"."usage", + "posthog_organization"."never_drop_data", + "posthog_organization"."customer_trust_scores", + "posthog_organization"."setup_section_2_completed", + "posthog_organization"."personalization", + "posthog_organization"."domain_whitelist" + FROM "posthog_organizationmembership" + INNER JOIN "posthog_organization" ON ("posthog_organizationmembership"."organization_id" = "posthog_organization"."id") + WHERE "posthog_organizationmembership"."user_id" = 99999 ''' # --- -# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.80 +# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.40 ''' SELECT "posthog_organizationmembership"."id", "posthog_organizationmembership"."organization_id", @@ -7981,7 +7599,7 @@ LIMIT 21 ''' # --- -# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.81 +# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.41 ''' SELECT "ee_accesscontrol"."id", "ee_accesscontrol"."team_id", @@ -8027,7 +7645,7 @@ AND "ee_accesscontrol"."team_id" = 99999)) ''' # --- -# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.82 +# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.42 ''' SELECT "posthog_organizationmembership"."id", "posthog_organizationmembership"."organization_id", @@ -8059,7 +7677,7 @@ WHERE "posthog_organizationmembership"."user_id" = 99999 ''' # --- -# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.83 +# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.43 ''' SELECT "posthog_organization"."id", "posthog_organization"."name", @@ -8085,7 +7703,9 @@ LIMIT 21 ''' # --- -# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.84 +<<<<<<< HEAD +======= +# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.38 ''' SELECT "posthog_grouptypemapping"."id", "posthog_grouptypemapping"."team_id", @@ -8098,7 +7718,7 @@ WHERE "posthog_grouptypemapping"."team_id" = 99999 ''' # --- -# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.85 +# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.39 ''' SELECT "posthog_datawarehousesavedquery"."created_by_id", "posthog_datawarehousesavedquery"."created_at", @@ -8119,7 +7739,20 @@ AND "posthog_datawarehousesavedquery"."deleted" IS NOT NULL)) ''' # --- -# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.86 +# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.4 + ''' + SELECT "posthog_grouptypemapping"."id", + "posthog_grouptypemapping"."team_id", + "posthog_grouptypemapping"."project_id", + "posthog_grouptypemapping"."group_type", + "posthog_grouptypemapping"."group_type_index", + "posthog_grouptypemapping"."name_singular", + "posthog_grouptypemapping"."name_plural" + FROM "posthog_grouptypemapping" + WHERE "posthog_grouptypemapping"."team_id" = 99999 + ''' +# --- +# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.40 ''' SELECT "posthog_datawarehousetable"."created_by_id", "posthog_datawarehousetable"."created_at", @@ -8192,7 +7825,7 @@ AND "posthog_datawarehousetable"."deleted" IS NOT NULL)) ''' # --- -# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.87 +# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.41 ''' SELECT "posthog_datawarehousejoin"."created_by_id", "posthog_datawarehousejoin"."created_at", @@ -8204,14 +7837,15 @@ "posthog_datawarehousejoin"."source_table_key", "posthog_datawarehousejoin"."joining_table_name", "posthog_datawarehousejoin"."joining_table_key", - "posthog_datawarehousejoin"."field_name" + "posthog_datawarehousejoin"."field_name", + "posthog_datawarehousejoin"."configuration" FROM "posthog_datawarehousejoin" WHERE ("posthog_datawarehousejoin"."team_id" = 99999 AND NOT ("posthog_datawarehousejoin"."deleted" AND "posthog_datawarehousejoin"."deleted" IS NOT NULL)) ''' # --- -# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.88 +# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.42 ''' SELECT "posthog_grouptypemapping"."id", "posthog_grouptypemapping"."team_id", @@ -8224,7 +7858,7 @@ WHERE "posthog_grouptypemapping"."team_id" = 99999 ''' # --- -# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.89 +# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.43 ''' SELECT "posthog_datawarehousesavedquery"."created_by_id", "posthog_datawarehousesavedquery"."created_at", @@ -8245,47 +7879,63 @@ AND "posthog_datawarehousesavedquery"."deleted" IS NOT NULL)) ''' # --- -# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.9 +>>>>>>> c835d19e29 (Update query snapshots) +# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.44 ''' - SELECT "posthog_datawarehousejoin"."created_by_id", - "posthog_datawarehousejoin"."created_at", - "posthog_datawarehousejoin"."deleted", - "posthog_datawarehousejoin"."deleted_at", - "posthog_datawarehousejoin"."id", - "posthog_datawarehousejoin"."team_id", - "posthog_datawarehousejoin"."source_table_name", - "posthog_datawarehousejoin"."source_table_key", - "posthog_datawarehousejoin"."joining_table_name", - "posthog_datawarehousejoin"."joining_table_key", - "posthog_datawarehousejoin"."field_name" - FROM "posthog_datawarehousejoin" - WHERE ("posthog_datawarehousejoin"."team_id" = 99999 - AND NOT ("posthog_datawarehousejoin"."deleted" - AND "posthog_datawarehousejoin"."deleted" IS NOT NULL)) + SELECT "posthog_grouptypemapping"."id", + "posthog_grouptypemapping"."team_id", + "posthog_grouptypemapping"."project_id", + "posthog_grouptypemapping"."group_type", + "posthog_grouptypemapping"."group_type_index", + "posthog_grouptypemapping"."name_singular", + "posthog_grouptypemapping"."name_plural" + FROM "posthog_grouptypemapping" + WHERE "posthog_grouptypemapping"."team_id" = 99999 ''' # --- -# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.90 +# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.45 ''' - SELECT "posthog_datawarehousetable"."created_by_id", - "posthog_datawarehousetable"."created_at", - "posthog_datawarehousetable"."updated_at", - "posthog_datawarehousetable"."deleted", - "posthog_datawarehousetable"."deleted_at", - "posthog_datawarehousetable"."id", - "posthog_datawarehousetable"."name", - "posthog_datawarehousetable"."format", - "posthog_datawarehousetable"."team_id", - "posthog_datawarehousetable"."url_pattern", - "posthog_datawarehousetable"."credential_id", - "posthog_datawarehousetable"."external_data_source_id", - "posthog_datawarehousetable"."columns", - "posthog_datawarehousetable"."row_count", - "posthog_user"."id", - "posthog_user"."password", - "posthog_user"."last_login", - "posthog_user"."first_name", - "posthog_user"."last_name", - "posthog_user"."is_staff", + SELECT "posthog_datawarehousesavedquery"."created_by_id", + "posthog_datawarehousesavedquery"."created_at", + "posthog_datawarehousesavedquery"."deleted", + "posthog_datawarehousesavedquery"."deleted_at", + "posthog_datawarehousesavedquery"."id", + "posthog_datawarehousesavedquery"."name", + "posthog_datawarehousesavedquery"."team_id", + "posthog_datawarehousesavedquery"."columns", + "posthog_datawarehousesavedquery"."external_tables", + "posthog_datawarehousesavedquery"."query", + "posthog_datawarehousesavedquery"."status", + "posthog_datawarehousesavedquery"."last_run_at", + "posthog_datawarehousesavedquery"."table_id" + FROM "posthog_datawarehousesavedquery" + WHERE ("posthog_datawarehousesavedquery"."team_id" = 99999 + AND NOT ("posthog_datawarehousesavedquery"."deleted" + AND "posthog_datawarehousesavedquery"."deleted" IS NOT NULL)) + ''' +# --- +# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.46 + ''' + SELECT "posthog_datawarehousetable"."created_by_id", + "posthog_datawarehousetable"."created_at", + "posthog_datawarehousetable"."updated_at", + "posthog_datawarehousetable"."deleted", + "posthog_datawarehousetable"."deleted_at", + "posthog_datawarehousetable"."id", + "posthog_datawarehousetable"."name", + "posthog_datawarehousetable"."format", + "posthog_datawarehousetable"."team_id", + "posthog_datawarehousetable"."url_pattern", + "posthog_datawarehousetable"."credential_id", + "posthog_datawarehousetable"."external_data_source_id", + "posthog_datawarehousetable"."columns", + "posthog_datawarehousetable"."row_count", + "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", @@ -8337,7 +7987,160 @@ AND "posthog_datawarehousetable"."deleted" IS NOT NULL)) ''' # --- -# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.91 +# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.47 + ''' + SELECT "posthog_datawarehousejoin"."created_by_id", + "posthog_datawarehousejoin"."created_at", + "posthog_datawarehousejoin"."deleted", + "posthog_datawarehousejoin"."deleted_at", + "posthog_datawarehousejoin"."id", + "posthog_datawarehousejoin"."team_id", + "posthog_datawarehousejoin"."source_table_name", + "posthog_datawarehousejoin"."source_table_key", + "posthog_datawarehousejoin"."joining_table_name", + "posthog_datawarehousejoin"."joining_table_key", + "posthog_datawarehousejoin"."field_name", + "posthog_datawarehousejoin"."configuration" + FROM "posthog_datawarehousejoin" + WHERE ("posthog_datawarehousejoin"."team_id" = 99999 + AND NOT ("posthog_datawarehousejoin"."deleted" + AND "posthog_datawarehousejoin"."deleted" IS NOT NULL)) + ''' +# --- +# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.48 + ''' + SELECT "posthog_grouptypemapping"."id", + "posthog_grouptypemapping"."team_id", + "posthog_grouptypemapping"."project_id", + "posthog_grouptypemapping"."group_type", + "posthog_grouptypemapping"."group_type_index", + "posthog_grouptypemapping"."name_singular", + "posthog_grouptypemapping"."name_plural" + FROM "posthog_grouptypemapping" + WHERE "posthog_grouptypemapping"."team_id" = 99999 + ''' +# --- +# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.49 + ''' + SELECT "posthog_datawarehousesavedquery"."created_by_id", + "posthog_datawarehousesavedquery"."created_at", + "posthog_datawarehousesavedquery"."deleted", + "posthog_datawarehousesavedquery"."deleted_at", + "posthog_datawarehousesavedquery"."id", + "posthog_datawarehousesavedquery"."name", + "posthog_datawarehousesavedquery"."team_id", + "posthog_datawarehousesavedquery"."columns", + "posthog_datawarehousesavedquery"."external_tables", + "posthog_datawarehousesavedquery"."query", + "posthog_datawarehousesavedquery"."status", + "posthog_datawarehousesavedquery"."last_run_at", + "posthog_datawarehousesavedquery"."table_id" + FROM "posthog_datawarehousesavedquery" + WHERE ("posthog_datawarehousesavedquery"."team_id" = 99999 + AND NOT ("posthog_datawarehousesavedquery"."deleted" + AND "posthog_datawarehousesavedquery"."deleted" IS NOT NULL)) + ''' +# --- +# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.5 + ''' + SELECT "posthog_organization"."id", + "posthog_organization"."name", + "posthog_organization"."slug", + "posthog_organization"."logo_media_id", + "posthog_organization"."created_at", + "posthog_organization"."updated_at", + "posthog_organization"."plugins_access_level", + "posthog_organization"."for_internal_metrics", + "posthog_organization"."is_member_join_email_enabled", + "posthog_organization"."enforce_2fa", + "posthog_organization"."is_hipaa", + "posthog_organization"."customer_id", + "posthog_organization"."available_product_features", + "posthog_organization"."usage", + "posthog_organization"."never_drop_data", + "posthog_organization"."customer_trust_scores", + "posthog_organization"."setup_section_2_completed", + "posthog_organization"."personalization", + "posthog_organization"."domain_whitelist" + FROM "posthog_organization" + WHERE "posthog_organization"."id" = '00000000-0000-0000-0000-000000000000'::uuid + LIMIT 21 + ''' +# --- +# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.50 + ''' + SELECT "posthog_datawarehousetable"."created_by_id", + "posthog_datawarehousetable"."created_at", + "posthog_datawarehousetable"."updated_at", + "posthog_datawarehousetable"."deleted", + "posthog_datawarehousetable"."deleted_at", + "posthog_datawarehousetable"."id", + "posthog_datawarehousetable"."name", + "posthog_datawarehousetable"."format", + "posthog_datawarehousetable"."team_id", + "posthog_datawarehousetable"."url_pattern", + "posthog_datawarehousetable"."credential_id", + "posthog_datawarehousetable"."external_data_source_id", + "posthog_datawarehousetable"."columns", + "posthog_datawarehousetable"."row_count", + "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"."temporary_token", + "posthog_user"."distinct_id", + "posthog_user"."is_email_verified", + "posthog_user"."requested_password_reset_at", + "posthog_user"."has_seen_product_intro_for", + "posthog_user"."strapi_id", + "posthog_user"."is_active", + "posthog_user"."theme_mode", + "posthog_user"."partial_notification_settings", + "posthog_user"."anonymize_data", + "posthog_user"."toolbar_mode", + "posthog_user"."hedgehog_config", + "posthog_user"."events_column_config", + "posthog_user"."email_opt_in", + "posthog_datawarehousecredential"."created_by_id", + "posthog_datawarehousecredential"."created_at", + "posthog_datawarehousecredential"."id", + "posthog_datawarehousecredential"."access_key", + "posthog_datawarehousecredential"."access_secret", + "posthog_datawarehousecredential"."team_id", + "posthog_externaldatasource"."created_by_id", + "posthog_externaldatasource"."created_at", + "posthog_externaldatasource"."updated_at", + "posthog_externaldatasource"."deleted", + "posthog_externaldatasource"."deleted_at", + "posthog_externaldatasource"."id", + "posthog_externaldatasource"."source_id", + "posthog_externaldatasource"."connection_id", + "posthog_externaldatasource"."destination_id", + "posthog_externaldatasource"."team_id", + "posthog_externaldatasource"."sync_frequency", + "posthog_externaldatasource"."status", + "posthog_externaldatasource"."source_type", + "posthog_externaldatasource"."job_inputs", + "posthog_externaldatasource"."are_tables_created", + "posthog_externaldatasource"."prefix" + FROM "posthog_datawarehousetable" + LEFT OUTER JOIN "posthog_user" ON ("posthog_datawarehousetable"."created_by_id" = "posthog_user"."id") + LEFT OUTER JOIN "posthog_datawarehousecredential" ON ("posthog_datawarehousetable"."credential_id" = "posthog_datawarehousecredential"."id") + LEFT OUTER JOIN "posthog_externaldatasource" ON ("posthog_datawarehousetable"."external_data_source_id" = "posthog_externaldatasource"."id") + WHERE ("posthog_datawarehousetable"."team_id" = 99999 + AND NOT ("posthog_datawarehousetable"."deleted" + AND "posthog_datawarehousetable"."deleted" IS NOT NULL)) + ''' +# --- +# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.51 ''' SELECT "posthog_datawarehousejoin"."created_by_id", "posthog_datawarehousejoin"."created_at", @@ -8356,7 +8159,7 @@ AND "posthog_datawarehousejoin"."deleted" IS NOT NULL)) ''' # --- -# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.92 +# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.52 ''' SELECT "posthog_sessionrecording"."id", "posthog_sessionrecording"."session_id", @@ -8380,13 +8183,11 @@ "posthog_sessionrecording"."storage_version" FROM "posthog_sessionrecording" WHERE ("posthog_sessionrecording"."session_id" IN ('1', - '2', - '3', - '4') + '2') AND "posthog_sessionrecording"."team_id" = 99999) ''' # --- -# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.93 +# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.53 ''' SELECT "posthog_sessionrecordingviewed"."session_id" FROM "posthog_sessionrecordingviewed" @@ -8394,7 +8195,7 @@ AND "posthog_sessionrecordingviewed"."user_id" = 99999) ''' # --- -# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.94 +# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.54 ''' SELECT "posthog_persondistinctid"."id", "posthog_persondistinctid"."team_id", @@ -8414,13 +8215,11 @@ FROM "posthog_persondistinctid" INNER JOIN "posthog_person" ON ("posthog_persondistinctid"."person_id" = "posthog_person"."id") WHERE ("posthog_persondistinctid"."distinct_id" IN ('user1', - 'user2', - 'user3', - 'user4') + 'user2') AND "posthog_persondistinctid"."team_id" = 99999) ''' # --- -# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.95 +# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.55 ''' SELECT "posthog_team"."id", "posthog_team"."uuid", @@ -8490,7 +8289,7 @@ LIMIT 21 ''' # --- -# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.96 +# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.56 ''' SELECT "posthog_person"."id", "posthog_person"."created_at", @@ -8504,12 +8303,12 @@ "posthog_person"."version" FROM "posthog_person" INNER JOIN "posthog_persondistinctid" ON ("posthog_person"."id" = "posthog_persondistinctid"."person_id") - WHERE ("posthog_persondistinctid"."distinct_id" = 'user5' + WHERE ("posthog_persondistinctid"."distinct_id" = 'user3' AND "posthog_persondistinctid"."team_id" = 99999) LIMIT 21 ''' # --- -# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.97 +# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.57 ''' SELECT "posthog_person"."id", "posthog_person"."created_at", @@ -8523,12 +8322,12 @@ "posthog_person"."version" FROM "posthog_person" INNER JOIN "posthog_persondistinctid" ON ("posthog_person"."id" = "posthog_persondistinctid"."person_id") - WHERE ("posthog_persondistinctid"."distinct_id" = 'user5' + WHERE ("posthog_persondistinctid"."distinct_id" = 'user3' AND "posthog_persondistinctid"."team_id" = 99999) LIMIT 21 ''' # --- -# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.98 +# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.58 ''' SELECT "posthog_user"."id", "posthog_user"."password", @@ -8560,7 +8359,7 @@ LIMIT 21 ''' # --- -# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.99 +# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.59 ''' SELECT "posthog_team"."id", "posthog_team"."uuid", @@ -8623,3 +8422,2133 @@ LIMIT 21 ''' # --- +# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.6 + ''' + SELECT "posthog_grouptypemapping"."id", + "posthog_grouptypemapping"."team_id", + "posthog_grouptypemapping"."project_id", + "posthog_grouptypemapping"."group_type", + "posthog_grouptypemapping"."group_type_index", + "posthog_grouptypemapping"."name_singular", + "posthog_grouptypemapping"."name_plural" + FROM "posthog_grouptypemapping" + WHERE "posthog_grouptypemapping"."team_id" = 99999 + ''' +# --- +# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.60 + ''' + SELECT "posthog_organizationmembership"."id", + "posthog_organizationmembership"."organization_id", + "posthog_organizationmembership"."user_id", + "posthog_organizationmembership"."level", + "posthog_organizationmembership"."joined_at", + "posthog_organizationmembership"."updated_at", + "posthog_organization"."id", + "posthog_organization"."name", + "posthog_organization"."slug", + "posthog_organization"."logo_media_id", + "posthog_organization"."created_at", + "posthog_organization"."updated_at", + "posthog_organization"."plugins_access_level", + "posthog_organization"."for_internal_metrics", + "posthog_organization"."is_member_join_email_enabled", + "posthog_organization"."enforce_2fa", + "posthog_organization"."is_hipaa", + "posthog_organization"."customer_id", + "posthog_organization"."available_product_features", + "posthog_organization"."usage", + "posthog_organization"."never_drop_data", + "posthog_organization"."customer_trust_scores", + "posthog_organization"."setup_section_2_completed", + "posthog_organization"."personalization", + "posthog_organization"."domain_whitelist" + 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: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.61 + ''' + SELECT "ee_accesscontrol"."id", + "ee_accesscontrol"."team_id", + "ee_accesscontrol"."access_level", + "ee_accesscontrol"."resource", + "ee_accesscontrol"."resource_id", + "ee_accesscontrol"."organization_member_id", + "ee_accesscontrol"."role_id", + "ee_accesscontrol"."created_by_id", + "ee_accesscontrol"."created_at", + "ee_accesscontrol"."updated_at" + FROM "ee_accesscontrol" + LEFT OUTER JOIN "posthog_organizationmembership" ON ("ee_accesscontrol"."organization_member_id" = "posthog_organizationmembership"."id") + WHERE (("ee_accesscontrol"."organization_member_id" IS NULL + AND "ee_accesscontrol"."resource" = 'project' + AND "ee_accesscontrol"."resource_id" = '444' + AND "ee_accesscontrol"."role_id" IS NULL + AND "ee_accesscontrol"."team_id" = 99999) + OR ("posthog_organizationmembership"."user_id" = 99999 + AND "ee_accesscontrol"."resource" = 'project' + AND "ee_accesscontrol"."resource_id" = '444' + AND "ee_accesscontrol"."role_id" IS NULL + AND "ee_accesscontrol"."team_id" = 99999) + OR ("ee_accesscontrol"."organization_member_id" IS NULL + AND "ee_accesscontrol"."resource" = 'session_recording' + AND "ee_accesscontrol"."resource_id" IS NULL + AND "ee_accesscontrol"."role_id" IS NULL + AND "ee_accesscontrol"."team_id" = 99999) + OR ("posthog_organizationmembership"."user_id" = 99999 + AND "ee_accesscontrol"."resource" = 'session_recording' + AND "ee_accesscontrol"."resource_id" IS NULL + AND "ee_accesscontrol"."role_id" IS NULL + AND "ee_accesscontrol"."team_id" = 99999) + OR ("ee_accesscontrol"."organization_member_id" IS NULL + AND "ee_accesscontrol"."resource" = 'session_recording' + AND "ee_accesscontrol"."resource_id" IS NOT NULL + AND "ee_accesscontrol"."role_id" IS NULL + AND "ee_accesscontrol"."team_id" = 99999) + OR ("posthog_organizationmembership"."user_id" = 99999 + AND "ee_accesscontrol"."resource" = 'session_recording' + AND "ee_accesscontrol"."resource_id" IS NOT NULL + AND "ee_accesscontrol"."role_id" IS NULL + AND "ee_accesscontrol"."team_id" = 99999)) + ''' +# --- +# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.62 + ''' + SELECT "posthog_organizationmembership"."id", + "posthog_organizationmembership"."organization_id", + "posthog_organizationmembership"."user_id", + "posthog_organizationmembership"."level", + "posthog_organizationmembership"."joined_at", + "posthog_organizationmembership"."updated_at", + "posthog_organization"."id", + "posthog_organization"."name", + "posthog_organization"."slug", + "posthog_organization"."logo_media_id", + "posthog_organization"."created_at", + "posthog_organization"."updated_at", + "posthog_organization"."plugins_access_level", + "posthog_organization"."for_internal_metrics", + "posthog_organization"."is_member_join_email_enabled", + "posthog_organization"."enforce_2fa", + "posthog_organization"."is_hipaa", + "posthog_organization"."customer_id", + "posthog_organization"."available_product_features", + "posthog_organization"."usage", + "posthog_organization"."never_drop_data", + "posthog_organization"."customer_trust_scores", + "posthog_organization"."setup_section_2_completed", + "posthog_organization"."personalization", + "posthog_organization"."domain_whitelist" + FROM "posthog_organizationmembership" + INNER JOIN "posthog_organization" ON ("posthog_organizationmembership"."organization_id" = "posthog_organization"."id") + WHERE "posthog_organizationmembership"."user_id" = 99999 + ''' +# --- +# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.63 + ''' + SELECT "posthog_organization"."id", + "posthog_organization"."name", + "posthog_organization"."slug", + "posthog_organization"."logo_media_id", + "posthog_organization"."created_at", + "posthog_organization"."updated_at", + "posthog_organization"."plugins_access_level", + "posthog_organization"."for_internal_metrics", + "posthog_organization"."is_member_join_email_enabled", + "posthog_organization"."enforce_2fa", + "posthog_organization"."is_hipaa", + "posthog_organization"."customer_id", + "posthog_organization"."available_product_features", + "posthog_organization"."usage", + "posthog_organization"."never_drop_data", + "posthog_organization"."customer_trust_scores", + "posthog_organization"."setup_section_2_completed", + "posthog_organization"."personalization", + "posthog_organization"."domain_whitelist" + FROM "posthog_organization" + WHERE "posthog_organization"."id" = '00000000-0000-0000-0000-000000000000'::uuid + LIMIT 21 + ''' +# --- +<<<<<<< HEAD +======= +# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.56 + ''' + SELECT "posthog_grouptypemapping"."id", + "posthog_grouptypemapping"."team_id", + "posthog_grouptypemapping"."project_id", + "posthog_grouptypemapping"."group_type", + "posthog_grouptypemapping"."group_type_index", + "posthog_grouptypemapping"."name_singular", + "posthog_grouptypemapping"."name_plural" + FROM "posthog_grouptypemapping" + WHERE "posthog_grouptypemapping"."team_id" = 99999 + ''' +# --- +# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.57 + ''' + SELECT "posthog_datawarehousesavedquery"."created_by_id", + "posthog_datawarehousesavedquery"."created_at", + "posthog_datawarehousesavedquery"."deleted", + "posthog_datawarehousesavedquery"."deleted_at", + "posthog_datawarehousesavedquery"."id", + "posthog_datawarehousesavedquery"."name", + "posthog_datawarehousesavedquery"."team_id", + "posthog_datawarehousesavedquery"."columns", + "posthog_datawarehousesavedquery"."external_tables", + "posthog_datawarehousesavedquery"."query", + "posthog_datawarehousesavedquery"."status", + "posthog_datawarehousesavedquery"."last_run_at", + "posthog_datawarehousesavedquery"."table_id" + FROM "posthog_datawarehousesavedquery" + WHERE ("posthog_datawarehousesavedquery"."team_id" = 99999 + AND NOT ("posthog_datawarehousesavedquery"."deleted" + AND "posthog_datawarehousesavedquery"."deleted" IS NOT NULL)) + ''' +# --- +# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.58 + ''' + SELECT "posthog_datawarehousetable"."created_by_id", + "posthog_datawarehousetable"."created_at", + "posthog_datawarehousetable"."updated_at", + "posthog_datawarehousetable"."deleted", + "posthog_datawarehousetable"."deleted_at", + "posthog_datawarehousetable"."id", + "posthog_datawarehousetable"."name", + "posthog_datawarehousetable"."format", + "posthog_datawarehousetable"."team_id", + "posthog_datawarehousetable"."url_pattern", + "posthog_datawarehousetable"."credential_id", + "posthog_datawarehousetable"."external_data_source_id", + "posthog_datawarehousetable"."columns", + "posthog_datawarehousetable"."row_count", + "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"."temporary_token", + "posthog_user"."distinct_id", + "posthog_user"."is_email_verified", + "posthog_user"."requested_password_reset_at", + "posthog_user"."has_seen_product_intro_for", + "posthog_user"."strapi_id", + "posthog_user"."is_active", + "posthog_user"."theme_mode", + "posthog_user"."partial_notification_settings", + "posthog_user"."anonymize_data", + "posthog_user"."toolbar_mode", + "posthog_user"."hedgehog_config", + "posthog_user"."events_column_config", + "posthog_user"."email_opt_in", + "posthog_datawarehousecredential"."created_by_id", + "posthog_datawarehousecredential"."created_at", + "posthog_datawarehousecredential"."id", + "posthog_datawarehousecredential"."access_key", + "posthog_datawarehousecredential"."access_secret", + "posthog_datawarehousecredential"."team_id", + "posthog_externaldatasource"."created_by_id", + "posthog_externaldatasource"."created_at", + "posthog_externaldatasource"."updated_at", + "posthog_externaldatasource"."deleted", + "posthog_externaldatasource"."deleted_at", + "posthog_externaldatasource"."id", + "posthog_externaldatasource"."source_id", + "posthog_externaldatasource"."connection_id", + "posthog_externaldatasource"."destination_id", + "posthog_externaldatasource"."team_id", + "posthog_externaldatasource"."sync_frequency", + "posthog_externaldatasource"."status", + "posthog_externaldatasource"."source_type", + "posthog_externaldatasource"."job_inputs", + "posthog_externaldatasource"."are_tables_created", + "posthog_externaldatasource"."prefix" + FROM "posthog_datawarehousetable" + LEFT OUTER JOIN "posthog_user" ON ("posthog_datawarehousetable"."created_by_id" = "posthog_user"."id") + LEFT OUTER JOIN "posthog_datawarehousecredential" ON ("posthog_datawarehousetable"."credential_id" = "posthog_datawarehousecredential"."id") + LEFT OUTER JOIN "posthog_externaldatasource" ON ("posthog_datawarehousetable"."external_data_source_id" = "posthog_externaldatasource"."id") + WHERE ("posthog_datawarehousetable"."team_id" = 99999 + AND NOT ("posthog_datawarehousetable"."deleted" + AND "posthog_datawarehousetable"."deleted" IS NOT NULL)) + ''' +# --- +# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.59 + ''' + SELECT "posthog_datawarehousejoin"."created_by_id", + "posthog_datawarehousejoin"."created_at", + "posthog_datawarehousejoin"."deleted", + "posthog_datawarehousejoin"."deleted_at", + "posthog_datawarehousejoin"."id", + "posthog_datawarehousejoin"."team_id", + "posthog_datawarehousejoin"."source_table_name", + "posthog_datawarehousejoin"."source_table_key", + "posthog_datawarehousejoin"."joining_table_name", + "posthog_datawarehousejoin"."joining_table_key", + "posthog_datawarehousejoin"."field_name", + "posthog_datawarehousejoin"."configuration" + FROM "posthog_datawarehousejoin" + WHERE ("posthog_datawarehousejoin"."team_id" = 99999 + AND NOT ("posthog_datawarehousejoin"."deleted" + AND "posthog_datawarehousejoin"."deleted" IS NOT NULL)) + ''' +# --- +# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.6 + ''' + SELECT "posthog_datawarehousetable"."created_by_id", + "posthog_datawarehousetable"."created_at", + "posthog_datawarehousetable"."updated_at", + "posthog_datawarehousetable"."deleted", + "posthog_datawarehousetable"."deleted_at", + "posthog_datawarehousetable"."id", + "posthog_datawarehousetable"."name", + "posthog_datawarehousetable"."format", + "posthog_datawarehousetable"."team_id", + "posthog_datawarehousetable"."url_pattern", + "posthog_datawarehousetable"."credential_id", + "posthog_datawarehousetable"."external_data_source_id", + "posthog_datawarehousetable"."columns", + "posthog_datawarehousetable"."row_count", + "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"."temporary_token", + "posthog_user"."distinct_id", + "posthog_user"."is_email_verified", + "posthog_user"."requested_password_reset_at", + "posthog_user"."has_seen_product_intro_for", + "posthog_user"."strapi_id", + "posthog_user"."is_active", + "posthog_user"."theme_mode", + "posthog_user"."partial_notification_settings", + "posthog_user"."anonymize_data", + "posthog_user"."toolbar_mode", + "posthog_user"."hedgehog_config", + "posthog_user"."events_column_config", + "posthog_user"."email_opt_in", + "posthog_datawarehousecredential"."created_by_id", + "posthog_datawarehousecredential"."created_at", + "posthog_datawarehousecredential"."id", + "posthog_datawarehousecredential"."access_key", + "posthog_datawarehousecredential"."access_secret", + "posthog_datawarehousecredential"."team_id", + "posthog_externaldatasource"."created_by_id", + "posthog_externaldatasource"."created_at", + "posthog_externaldatasource"."updated_at", + "posthog_externaldatasource"."deleted", + "posthog_externaldatasource"."deleted_at", + "posthog_externaldatasource"."id", + "posthog_externaldatasource"."source_id", + "posthog_externaldatasource"."connection_id", + "posthog_externaldatasource"."destination_id", + "posthog_externaldatasource"."team_id", + "posthog_externaldatasource"."sync_frequency", + "posthog_externaldatasource"."status", + "posthog_externaldatasource"."source_type", + "posthog_externaldatasource"."job_inputs", + "posthog_externaldatasource"."are_tables_created", + "posthog_externaldatasource"."prefix" + FROM "posthog_datawarehousetable" + LEFT OUTER JOIN "posthog_user" ON ("posthog_datawarehousetable"."created_by_id" = "posthog_user"."id") + LEFT OUTER JOIN "posthog_datawarehousecredential" ON ("posthog_datawarehousetable"."credential_id" = "posthog_datawarehousecredential"."id") + LEFT OUTER JOIN "posthog_externaldatasource" ON ("posthog_datawarehousetable"."external_data_source_id" = "posthog_externaldatasource"."id") + WHERE ("posthog_datawarehousetable"."team_id" = 99999 + AND NOT ("posthog_datawarehousetable"."deleted" + AND "posthog_datawarehousetable"."deleted" IS NOT NULL)) + ''' +# --- +# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.60 + ''' + SELECT "posthog_grouptypemapping"."id", + "posthog_grouptypemapping"."team_id", + "posthog_grouptypemapping"."project_id", + "posthog_grouptypemapping"."group_type", + "posthog_grouptypemapping"."group_type_index", + "posthog_grouptypemapping"."name_singular", + "posthog_grouptypemapping"."name_plural" + FROM "posthog_grouptypemapping" + WHERE "posthog_grouptypemapping"."team_id" = 99999 + ''' +# --- +# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.61 + ''' + SELECT "posthog_datawarehousesavedquery"."created_by_id", + "posthog_datawarehousesavedquery"."created_at", + "posthog_datawarehousesavedquery"."deleted", + "posthog_datawarehousesavedquery"."deleted_at", + "posthog_datawarehousesavedquery"."id", + "posthog_datawarehousesavedquery"."name", + "posthog_datawarehousesavedquery"."team_id", + "posthog_datawarehousesavedquery"."columns", + "posthog_datawarehousesavedquery"."external_tables", + "posthog_datawarehousesavedquery"."query", + "posthog_datawarehousesavedquery"."status", + "posthog_datawarehousesavedquery"."last_run_at", + "posthog_datawarehousesavedquery"."table_id" + FROM "posthog_datawarehousesavedquery" + WHERE ("posthog_datawarehousesavedquery"."team_id" = 99999 + AND NOT ("posthog_datawarehousesavedquery"."deleted" + AND "posthog_datawarehousesavedquery"."deleted" IS NOT NULL)) + ''' +# --- +# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.62 + ''' + SELECT "posthog_datawarehousetable"."created_by_id", + "posthog_datawarehousetable"."created_at", + "posthog_datawarehousetable"."updated_at", + "posthog_datawarehousetable"."deleted", + "posthog_datawarehousetable"."deleted_at", + "posthog_datawarehousetable"."id", + "posthog_datawarehousetable"."name", + "posthog_datawarehousetable"."format", + "posthog_datawarehousetable"."team_id", + "posthog_datawarehousetable"."url_pattern", + "posthog_datawarehousetable"."credential_id", + "posthog_datawarehousetable"."external_data_source_id", + "posthog_datawarehousetable"."columns", + "posthog_datawarehousetable"."row_count", + "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"."temporary_token", + "posthog_user"."distinct_id", + "posthog_user"."is_email_verified", + "posthog_user"."requested_password_reset_at", + "posthog_user"."has_seen_product_intro_for", + "posthog_user"."strapi_id", + "posthog_user"."is_active", + "posthog_user"."theme_mode", + "posthog_user"."partial_notification_settings", + "posthog_user"."anonymize_data", + "posthog_user"."toolbar_mode", + "posthog_user"."hedgehog_config", + "posthog_user"."events_column_config", + "posthog_user"."email_opt_in", + "posthog_datawarehousecredential"."created_by_id", + "posthog_datawarehousecredential"."created_at", + "posthog_datawarehousecredential"."id", + "posthog_datawarehousecredential"."access_key", + "posthog_datawarehousecredential"."access_secret", + "posthog_datawarehousecredential"."team_id", + "posthog_externaldatasource"."created_by_id", + "posthog_externaldatasource"."created_at", + "posthog_externaldatasource"."updated_at", + "posthog_externaldatasource"."deleted", + "posthog_externaldatasource"."deleted_at", + "posthog_externaldatasource"."id", + "posthog_externaldatasource"."source_id", + "posthog_externaldatasource"."connection_id", + "posthog_externaldatasource"."destination_id", + "posthog_externaldatasource"."team_id", + "posthog_externaldatasource"."sync_frequency", + "posthog_externaldatasource"."status", + "posthog_externaldatasource"."source_type", + "posthog_externaldatasource"."job_inputs", + "posthog_externaldatasource"."are_tables_created", + "posthog_externaldatasource"."prefix" + FROM "posthog_datawarehousetable" + LEFT OUTER JOIN "posthog_user" ON ("posthog_datawarehousetable"."created_by_id" = "posthog_user"."id") + LEFT OUTER JOIN "posthog_datawarehousecredential" ON ("posthog_datawarehousetable"."credential_id" = "posthog_datawarehousecredential"."id") + LEFT OUTER JOIN "posthog_externaldatasource" ON ("posthog_datawarehousetable"."external_data_source_id" = "posthog_externaldatasource"."id") + WHERE ("posthog_datawarehousetable"."team_id" = 99999 + AND NOT ("posthog_datawarehousetable"."deleted" + AND "posthog_datawarehousetable"."deleted" IS NOT NULL)) + ''' +# --- +# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.63 + ''' + SELECT "posthog_datawarehousejoin"."created_by_id", + "posthog_datawarehousejoin"."created_at", + "posthog_datawarehousejoin"."deleted", + "posthog_datawarehousejoin"."deleted_at", + "posthog_datawarehousejoin"."id", + "posthog_datawarehousejoin"."team_id", + "posthog_datawarehousejoin"."source_table_name", + "posthog_datawarehousejoin"."source_table_key", + "posthog_datawarehousejoin"."joining_table_name", + "posthog_datawarehousejoin"."joining_table_key", + "posthog_datawarehousejoin"."field_name", + "posthog_datawarehousejoin"."configuration" + FROM "posthog_datawarehousejoin" + WHERE ("posthog_datawarehousejoin"."team_id" = 99999 + AND NOT ("posthog_datawarehousejoin"."deleted" + AND "posthog_datawarehousejoin"."deleted" IS NOT NULL)) + ''' +# --- +>>>>>>> c835d19e29 (Update query snapshots) +# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.64 + ''' + SELECT "posthog_grouptypemapping"."id", + "posthog_grouptypemapping"."team_id", + "posthog_grouptypemapping"."project_id", + "posthog_grouptypemapping"."group_type", + "posthog_grouptypemapping"."group_type_index", + "posthog_grouptypemapping"."name_singular", + "posthog_grouptypemapping"."name_plural" + FROM "posthog_grouptypemapping" + WHERE "posthog_grouptypemapping"."team_id" = 99999 + ''' +# --- +# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.65 + ''' + SELECT "posthog_datawarehousesavedquery"."created_by_id", + "posthog_datawarehousesavedquery"."created_at", + "posthog_datawarehousesavedquery"."deleted", + "posthog_datawarehousesavedquery"."deleted_at", + "posthog_datawarehousesavedquery"."id", + "posthog_datawarehousesavedquery"."name", + "posthog_datawarehousesavedquery"."team_id", + "posthog_datawarehousesavedquery"."columns", + "posthog_datawarehousesavedquery"."external_tables", + "posthog_datawarehousesavedquery"."query", + "posthog_datawarehousesavedquery"."status", + "posthog_datawarehousesavedquery"."last_run_at", + "posthog_datawarehousesavedquery"."table_id" + FROM "posthog_datawarehousesavedquery" + WHERE ("posthog_datawarehousesavedquery"."team_id" = 99999 + AND NOT ("posthog_datawarehousesavedquery"."deleted" + AND "posthog_datawarehousesavedquery"."deleted" IS NOT NULL)) + ''' +# --- +# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.66 + ''' + SELECT "posthog_datawarehousetable"."created_by_id", + "posthog_datawarehousetable"."created_at", + "posthog_datawarehousetable"."updated_at", + "posthog_datawarehousetable"."deleted", + "posthog_datawarehousetable"."deleted_at", + "posthog_datawarehousetable"."id", + "posthog_datawarehousetable"."name", + "posthog_datawarehousetable"."format", + "posthog_datawarehousetable"."team_id", + "posthog_datawarehousetable"."url_pattern", + "posthog_datawarehousetable"."credential_id", + "posthog_datawarehousetable"."external_data_source_id", + "posthog_datawarehousetable"."columns", + "posthog_datawarehousetable"."row_count", + "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"."temporary_token", + "posthog_user"."distinct_id", + "posthog_user"."is_email_verified", + "posthog_user"."requested_password_reset_at", + "posthog_user"."has_seen_product_intro_for", + "posthog_user"."strapi_id", + "posthog_user"."is_active", + "posthog_user"."theme_mode", + "posthog_user"."partial_notification_settings", + "posthog_user"."anonymize_data", + "posthog_user"."toolbar_mode", + "posthog_user"."hedgehog_config", + "posthog_user"."events_column_config", + "posthog_user"."email_opt_in", + "posthog_datawarehousecredential"."created_by_id", + "posthog_datawarehousecredential"."created_at", + "posthog_datawarehousecredential"."id", + "posthog_datawarehousecredential"."access_key", + "posthog_datawarehousecredential"."access_secret", + "posthog_datawarehousecredential"."team_id", + "posthog_externaldatasource"."created_by_id", + "posthog_externaldatasource"."created_at", + "posthog_externaldatasource"."updated_at", + "posthog_externaldatasource"."deleted", + "posthog_externaldatasource"."deleted_at", + "posthog_externaldatasource"."id", + "posthog_externaldatasource"."source_id", + "posthog_externaldatasource"."connection_id", + "posthog_externaldatasource"."destination_id", + "posthog_externaldatasource"."team_id", + "posthog_externaldatasource"."sync_frequency", + "posthog_externaldatasource"."status", + "posthog_externaldatasource"."source_type", + "posthog_externaldatasource"."job_inputs", + "posthog_externaldatasource"."are_tables_created", + "posthog_externaldatasource"."prefix" + FROM "posthog_datawarehousetable" + LEFT OUTER JOIN "posthog_user" ON ("posthog_datawarehousetable"."created_by_id" = "posthog_user"."id") + LEFT OUTER JOIN "posthog_datawarehousecredential" ON ("posthog_datawarehousetable"."credential_id" = "posthog_datawarehousecredential"."id") + LEFT OUTER JOIN "posthog_externaldatasource" ON ("posthog_datawarehousetable"."external_data_source_id" = "posthog_externaldatasource"."id") + WHERE ("posthog_datawarehousetable"."team_id" = 99999 + AND NOT ("posthog_datawarehousetable"."deleted" + AND "posthog_datawarehousetable"."deleted" IS NOT NULL)) + ''' +# --- +# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.67 + ''' + SELECT "posthog_datawarehousejoin"."created_by_id", + "posthog_datawarehousejoin"."created_at", + "posthog_datawarehousejoin"."deleted", + "posthog_datawarehousejoin"."deleted_at", + "posthog_datawarehousejoin"."id", + "posthog_datawarehousejoin"."team_id", + "posthog_datawarehousejoin"."source_table_name", + "posthog_datawarehousejoin"."source_table_key", + "posthog_datawarehousejoin"."joining_table_name", + "posthog_datawarehousejoin"."joining_table_key", + "posthog_datawarehousejoin"."field_name" + FROM "posthog_datawarehousejoin" + WHERE ("posthog_datawarehousejoin"."team_id" = 99999 + AND NOT ("posthog_datawarehousejoin"."deleted" + AND "posthog_datawarehousejoin"."deleted" IS NOT NULL)) + ''' +# --- +# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.68 + ''' + SELECT "posthog_grouptypemapping"."id", + "posthog_grouptypemapping"."team_id", + "posthog_grouptypemapping"."project_id", + "posthog_grouptypemapping"."group_type", + "posthog_grouptypemapping"."group_type_index", + "posthog_grouptypemapping"."name_singular", + "posthog_grouptypemapping"."name_plural" + FROM "posthog_grouptypemapping" + WHERE "posthog_grouptypemapping"."team_id" = 99999 + ''' +# --- +# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.69 + ''' + SELECT "posthog_datawarehousesavedquery"."created_by_id", + "posthog_datawarehousesavedquery"."created_at", + "posthog_datawarehousesavedquery"."deleted", + "posthog_datawarehousesavedquery"."deleted_at", + "posthog_datawarehousesavedquery"."id", + "posthog_datawarehousesavedquery"."name", + "posthog_datawarehousesavedquery"."team_id", + "posthog_datawarehousesavedquery"."columns", + "posthog_datawarehousesavedquery"."external_tables", + "posthog_datawarehousesavedquery"."query", + "posthog_datawarehousesavedquery"."status", + "posthog_datawarehousesavedquery"."last_run_at", + "posthog_datawarehousesavedquery"."table_id" + FROM "posthog_datawarehousesavedquery" + WHERE ("posthog_datawarehousesavedquery"."team_id" = 99999 + AND NOT ("posthog_datawarehousesavedquery"."deleted" + AND "posthog_datawarehousesavedquery"."deleted" IS NOT NULL)) + ''' +# --- +# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.7 + ''' + SELECT "posthog_datawarehousesavedquery"."created_by_id", + "posthog_datawarehousesavedquery"."created_at", + "posthog_datawarehousesavedquery"."deleted", + "posthog_datawarehousesavedquery"."deleted_at", + "posthog_datawarehousesavedquery"."id", + "posthog_datawarehousesavedquery"."name", + "posthog_datawarehousesavedquery"."team_id", + "posthog_datawarehousesavedquery"."columns", + "posthog_datawarehousesavedquery"."external_tables", + "posthog_datawarehousesavedquery"."query", + "posthog_datawarehousesavedquery"."status", + "posthog_datawarehousesavedquery"."last_run_at", + "posthog_datawarehousesavedquery"."table_id" + FROM "posthog_datawarehousesavedquery" + WHERE ("posthog_datawarehousesavedquery"."team_id" = 99999 + AND NOT ("posthog_datawarehousesavedquery"."deleted" + AND "posthog_datawarehousesavedquery"."deleted" IS NOT NULL)) + ''' +# --- +# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.70 + ''' + SELECT "posthog_datawarehousetable"."created_by_id", + "posthog_datawarehousetable"."created_at", + "posthog_datawarehousetable"."updated_at", + "posthog_datawarehousetable"."deleted", + "posthog_datawarehousetable"."deleted_at", + "posthog_datawarehousetable"."id", + "posthog_datawarehousetable"."name", + "posthog_datawarehousetable"."format", + "posthog_datawarehousetable"."team_id", + "posthog_datawarehousetable"."url_pattern", + "posthog_datawarehousetable"."credential_id", + "posthog_datawarehousetable"."external_data_source_id", + "posthog_datawarehousetable"."columns", + "posthog_datawarehousetable"."row_count", + "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"."temporary_token", + "posthog_user"."distinct_id", + "posthog_user"."is_email_verified", + "posthog_user"."requested_password_reset_at", + "posthog_user"."has_seen_product_intro_for", + "posthog_user"."strapi_id", + "posthog_user"."is_active", + "posthog_user"."theme_mode", + "posthog_user"."partial_notification_settings", + "posthog_user"."anonymize_data", + "posthog_user"."toolbar_mode", + "posthog_user"."hedgehog_config", + "posthog_user"."events_column_config", + "posthog_user"."email_opt_in", + "posthog_datawarehousecredential"."created_by_id", + "posthog_datawarehousecredential"."created_at", + "posthog_datawarehousecredential"."id", + "posthog_datawarehousecredential"."access_key", + "posthog_datawarehousecredential"."access_secret", + "posthog_datawarehousecredential"."team_id", + "posthog_externaldatasource"."created_by_id", + "posthog_externaldatasource"."created_at", + "posthog_externaldatasource"."updated_at", + "posthog_externaldatasource"."deleted", + "posthog_externaldatasource"."deleted_at", + "posthog_externaldatasource"."id", + "posthog_externaldatasource"."source_id", + "posthog_externaldatasource"."connection_id", + "posthog_externaldatasource"."destination_id", + "posthog_externaldatasource"."team_id", + "posthog_externaldatasource"."sync_frequency", + "posthog_externaldatasource"."status", + "posthog_externaldatasource"."source_type", + "posthog_externaldatasource"."job_inputs", + "posthog_externaldatasource"."are_tables_created", + "posthog_externaldatasource"."prefix" + FROM "posthog_datawarehousetable" + LEFT OUTER JOIN "posthog_user" ON ("posthog_datawarehousetable"."created_by_id" = "posthog_user"."id") + LEFT OUTER JOIN "posthog_datawarehousecredential" ON ("posthog_datawarehousetable"."credential_id" = "posthog_datawarehousecredential"."id") + LEFT OUTER JOIN "posthog_externaldatasource" ON ("posthog_datawarehousetable"."external_data_source_id" = "posthog_externaldatasource"."id") + WHERE ("posthog_datawarehousetable"."team_id" = 99999 + AND NOT ("posthog_datawarehousetable"."deleted" + AND "posthog_datawarehousetable"."deleted" IS NOT NULL)) + ''' +# --- +# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.71 + ''' + SELECT "posthog_datawarehousejoin"."created_by_id", + "posthog_datawarehousejoin"."created_at", + "posthog_datawarehousejoin"."deleted", + "posthog_datawarehousejoin"."deleted_at", + "posthog_datawarehousejoin"."id", + "posthog_datawarehousejoin"."team_id", + "posthog_datawarehousejoin"."source_table_name", + "posthog_datawarehousejoin"."source_table_key", + "posthog_datawarehousejoin"."joining_table_name", + "posthog_datawarehousejoin"."joining_table_key", + "posthog_datawarehousejoin"."field_name" + FROM "posthog_datawarehousejoin" + WHERE ("posthog_datawarehousejoin"."team_id" = 99999 + AND NOT ("posthog_datawarehousejoin"."deleted" + AND "posthog_datawarehousejoin"."deleted" IS NOT NULL)) + ''' +# --- +# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.72 + ''' + SELECT "posthog_sessionrecording"."id", + "posthog_sessionrecording"."session_id", + "posthog_sessionrecording"."team_id", + "posthog_sessionrecording"."created_at", + "posthog_sessionrecording"."deleted", + "posthog_sessionrecording"."object_storage_path", + "posthog_sessionrecording"."distinct_id", + "posthog_sessionrecording"."duration", + "posthog_sessionrecording"."active_seconds", + "posthog_sessionrecording"."inactive_seconds", + "posthog_sessionrecording"."start_time", + "posthog_sessionrecording"."end_time", + "posthog_sessionrecording"."click_count", + "posthog_sessionrecording"."keypress_count", + "posthog_sessionrecording"."mouse_activity_count", + "posthog_sessionrecording"."console_log_count", + "posthog_sessionrecording"."console_warn_count", + "posthog_sessionrecording"."console_error_count", + "posthog_sessionrecording"."start_url", + "posthog_sessionrecording"."storage_version" + FROM "posthog_sessionrecording" + WHERE ("posthog_sessionrecording"."session_id" IN ('1', + '2', + '3') + AND "posthog_sessionrecording"."team_id" = 99999) + ''' +# --- +# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.73 + ''' + SELECT "posthog_sessionrecordingviewed"."session_id" + FROM "posthog_sessionrecordingviewed" + WHERE ("posthog_sessionrecordingviewed"."team_id" = 99999 + AND "posthog_sessionrecordingviewed"."user_id" = 99999) + ''' +# --- +# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.74 + ''' + SELECT "posthog_persondistinctid"."id", + "posthog_persondistinctid"."team_id", + "posthog_persondistinctid"."person_id", + "posthog_persondistinctid"."distinct_id", + "posthog_persondistinctid"."version", + "posthog_person"."id", + "posthog_person"."created_at", + "posthog_person"."properties_last_updated_at", + "posthog_person"."properties_last_operation", + "posthog_person"."team_id", + "posthog_person"."properties", + "posthog_person"."is_user_id", + "posthog_person"."is_identified", + "posthog_person"."uuid", + "posthog_person"."version" + FROM "posthog_persondistinctid" + INNER JOIN "posthog_person" ON ("posthog_persondistinctid"."person_id" = "posthog_person"."id") + WHERE ("posthog_persondistinctid"."distinct_id" IN ('user1', + 'user2', + 'user3') + AND "posthog_persondistinctid"."team_id" = 99999) + ''' +# --- +# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.75 + ''' + SELECT "posthog_team"."id", + "posthog_team"."uuid", + "posthog_team"."organization_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"."ingested_event", + "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"."person_processing_opt_out", + "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_url_trigger_config", + "posthog_team"."session_recording_url_blocklist_config", + "posthog_team"."session_recording_event_trigger_config", + "posthog_team"."session_replay_config", + "posthog_team"."survey_config", + "posthog_team"."capture_console_log_opt_in", + "posthog_team"."capture_performance_opt_in", + "posthog_team"."capture_dead_clicks", + "posthog_team"."surveys_opt_in", + "posthog_team"."heatmaps_opt_in", + "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"."primary_dashboard_id", + "posthog_team"."extra_settings", + "posthog_team"."modifiers", + "posthog_team"."correlation_config", + "posthog_team"."session_recording_retention_period_days", + "posthog_team"."plugins_opt_in", + "posthog_team"."opt_out_capture", + "posthog_team"."event_names", + "posthog_team"."event_names_with_usage", + "posthog_team"."event_properties", + "posthog_team"."event_properties_with_usage", + "posthog_team"."event_properties_numerical", + "posthog_team"."external_data_workspace_id", + "posthog_team"."external_data_workspace_last_synced_at" + FROM "posthog_team" + WHERE "posthog_team"."id" = 99999 + LIMIT 21 + ''' +# --- +# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.76 + ''' + SELECT "posthog_person"."id", + "posthog_person"."created_at", + "posthog_person"."properties_last_updated_at", + "posthog_person"."properties_last_operation", + "posthog_person"."team_id", + "posthog_person"."properties", + "posthog_person"."is_user_id", + "posthog_person"."is_identified", + "posthog_person"."uuid", + "posthog_person"."version" + FROM "posthog_person" + INNER JOIN "posthog_persondistinctid" ON ("posthog_person"."id" = "posthog_persondistinctid"."person_id") + WHERE ("posthog_persondistinctid"."distinct_id" = 'user4' + AND "posthog_persondistinctid"."team_id" = 99999) + LIMIT 21 + ''' +# --- +# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.77 + ''' + SELECT "posthog_person"."id", + "posthog_person"."created_at", + "posthog_person"."properties_last_updated_at", + "posthog_person"."properties_last_operation", + "posthog_person"."team_id", + "posthog_person"."properties", + "posthog_person"."is_user_id", + "posthog_person"."is_identified", + "posthog_person"."uuid", + "posthog_person"."version" + FROM "posthog_person" + INNER JOIN "posthog_persondistinctid" ON ("posthog_person"."id" = "posthog_persondistinctid"."person_id") + WHERE ("posthog_persondistinctid"."distinct_id" = 'user4' + AND "posthog_persondistinctid"."team_id" = 99999) + LIMIT 21 + ''' +# --- +<<<<<<< HEAD +# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.78 +======= +# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.7 + ''' + SELECT "posthog_datawarehousejoin"."created_by_id", + "posthog_datawarehousejoin"."created_at", + "posthog_datawarehousejoin"."deleted", + "posthog_datawarehousejoin"."deleted_at", + "posthog_datawarehousejoin"."id", + "posthog_datawarehousejoin"."team_id", + "posthog_datawarehousejoin"."source_table_name", + "posthog_datawarehousejoin"."source_table_key", + "posthog_datawarehousejoin"."joining_table_name", + "posthog_datawarehousejoin"."joining_table_key", + "posthog_datawarehousejoin"."field_name", + "posthog_datawarehousejoin"."configuration" + FROM "posthog_datawarehousejoin" + WHERE ("posthog_datawarehousejoin"."team_id" = 99999 + AND NOT ("posthog_datawarehousejoin"."deleted" + AND "posthog_datawarehousejoin"."deleted" IS NOT NULL)) + ''' +# --- +# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.70 +>>>>>>> c835d19e29 (Update query snapshots) + ''' + 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"."temporary_token", + "posthog_user"."distinct_id", + "posthog_user"."is_email_verified", + "posthog_user"."has_seen_product_intro_for", + "posthog_user"."strapi_id", + "posthog_user"."is_active", + "posthog_user"."theme_mode", + "posthog_user"."partial_notification_settings", + "posthog_user"."anonymize_data", + "posthog_user"."toolbar_mode", + "posthog_user"."hedgehog_config", + "posthog_user"."events_column_config", + "posthog_user"."email_opt_in" + FROM "posthog_user" + WHERE "posthog_user"."id" = 99999 + LIMIT 21 + ''' +# --- +# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.79 + ''' + SELECT "posthog_team"."id", + "posthog_team"."uuid", + "posthog_team"."organization_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"."ingested_event", + "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"."person_processing_opt_out", + "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_url_trigger_config", + "posthog_team"."session_recording_url_blocklist_config", + "posthog_team"."session_recording_event_trigger_config", + "posthog_team"."session_replay_config", + "posthog_team"."survey_config", + "posthog_team"."capture_console_log_opt_in", + "posthog_team"."capture_performance_opt_in", + "posthog_team"."capture_dead_clicks", + "posthog_team"."surveys_opt_in", + "posthog_team"."heatmaps_opt_in", + "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"."primary_dashboard_id", + "posthog_team"."extra_settings", + "posthog_team"."modifiers", + "posthog_team"."correlation_config", + "posthog_team"."session_recording_retention_period_days", + "posthog_team"."external_data_workspace_id", + "posthog_team"."external_data_workspace_last_synced_at" + FROM "posthog_team" + WHERE "posthog_team"."id" = 99999 + LIMIT 21 + ''' +# --- +# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.8 + ''' + SELECT "posthog_datawarehousetable"."created_by_id", + "posthog_datawarehousetable"."created_at", + "posthog_datawarehousetable"."updated_at", + "posthog_datawarehousetable"."deleted", + "posthog_datawarehousetable"."deleted_at", + "posthog_datawarehousetable"."id", + "posthog_datawarehousetable"."name", + "posthog_datawarehousetable"."format", + "posthog_datawarehousetable"."team_id", + "posthog_datawarehousetable"."url_pattern", + "posthog_datawarehousetable"."credential_id", + "posthog_datawarehousetable"."external_data_source_id", + "posthog_datawarehousetable"."columns", + "posthog_datawarehousetable"."row_count", + "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"."temporary_token", + "posthog_user"."distinct_id", + "posthog_user"."is_email_verified", + "posthog_user"."requested_password_reset_at", + "posthog_user"."has_seen_product_intro_for", + "posthog_user"."strapi_id", + "posthog_user"."is_active", + "posthog_user"."theme_mode", + "posthog_user"."partial_notification_settings", + "posthog_user"."anonymize_data", + "posthog_user"."toolbar_mode", + "posthog_user"."hedgehog_config", + "posthog_user"."events_column_config", + "posthog_user"."email_opt_in", + "posthog_datawarehousecredential"."created_by_id", + "posthog_datawarehousecredential"."created_at", + "posthog_datawarehousecredential"."id", + "posthog_datawarehousecredential"."access_key", + "posthog_datawarehousecredential"."access_secret", + "posthog_datawarehousecredential"."team_id", + "posthog_externaldatasource"."created_by_id", + "posthog_externaldatasource"."created_at", + "posthog_externaldatasource"."updated_at", + "posthog_externaldatasource"."deleted", + "posthog_externaldatasource"."deleted_at", + "posthog_externaldatasource"."id", + "posthog_externaldatasource"."source_id", + "posthog_externaldatasource"."connection_id", + "posthog_externaldatasource"."destination_id", + "posthog_externaldatasource"."team_id", + "posthog_externaldatasource"."sync_frequency", + "posthog_externaldatasource"."status", + "posthog_externaldatasource"."source_type", + "posthog_externaldatasource"."job_inputs", + "posthog_externaldatasource"."are_tables_created", + "posthog_externaldatasource"."prefix" + FROM "posthog_datawarehousetable" + LEFT OUTER JOIN "posthog_user" ON ("posthog_datawarehousetable"."created_by_id" = "posthog_user"."id") + LEFT OUTER JOIN "posthog_datawarehousecredential" ON ("posthog_datawarehousetable"."credential_id" = "posthog_datawarehousecredential"."id") + LEFT OUTER JOIN "posthog_externaldatasource" ON ("posthog_datawarehousetable"."external_data_source_id" = "posthog_externaldatasource"."id") + WHERE ("posthog_datawarehousetable"."team_id" = 99999 + AND NOT ("posthog_datawarehousetable"."deleted" + AND "posthog_datawarehousetable"."deleted" IS NOT NULL)) + ''' +# --- +# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.80 + ''' + SELECT "posthog_organizationmembership"."id", + "posthog_organizationmembership"."organization_id", + "posthog_organizationmembership"."user_id", + "posthog_organizationmembership"."level", + "posthog_organizationmembership"."joined_at", + "posthog_organizationmembership"."updated_at", + "posthog_organization"."id", + "posthog_organization"."name", + "posthog_organization"."slug", + "posthog_organization"."logo_media_id", + "posthog_organization"."created_at", + "posthog_organization"."updated_at", + "posthog_organization"."plugins_access_level", + "posthog_organization"."for_internal_metrics", + "posthog_organization"."is_member_join_email_enabled", + "posthog_organization"."enforce_2fa", + "posthog_organization"."is_hipaa", + "posthog_organization"."customer_id", + "posthog_organization"."available_product_features", + "posthog_organization"."usage", + "posthog_organization"."never_drop_data", + "posthog_organization"."customer_trust_scores", + "posthog_organization"."setup_section_2_completed", + "posthog_organization"."personalization", + "posthog_organization"."domain_whitelist" + 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: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.81 + ''' + 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"."resource" = 'project' + AND "ee_accesscontrol"."resource_id" = '444' + AND "ee_accesscontrol"."role_id" IS NULL + AND "ee_accesscontrol"."team_id" = 99999) + OR ("posthog_organizationmembership"."user_id" = 99999 + AND "ee_accesscontrol"."resource" = 'project' + AND "ee_accesscontrol"."resource_id" = '444' + AND "ee_accesscontrol"."role_id" IS NULL + AND "ee_accesscontrol"."team_id" = 99999) + OR ("ee_accesscontrol"."organization_member_id" IS NULL + AND "ee_accesscontrol"."resource" = 'session_recording' + AND "ee_accesscontrol"."resource_id" IS NULL + AND "ee_accesscontrol"."role_id" IS NULL + AND "ee_accesscontrol"."team_id" = 99999) + OR ("posthog_organizationmembership"."user_id" = 99999 + AND "ee_accesscontrol"."resource" = 'session_recording' + AND "ee_accesscontrol"."resource_id" IS NULL + AND "ee_accesscontrol"."role_id" IS NULL + AND "ee_accesscontrol"."team_id" = 99999) + OR ("ee_accesscontrol"."organization_member_id" IS NULL + AND "ee_accesscontrol"."resource" = 'session_recording' + AND "ee_accesscontrol"."resource_id" IS NOT NULL + AND "ee_accesscontrol"."role_id" IS NULL + AND "ee_accesscontrol"."team_id" = 99999) + OR ("posthog_organizationmembership"."user_id" = 99999 + AND "ee_accesscontrol"."resource" = 'session_recording' + AND "ee_accesscontrol"."resource_id" IS NOT NULL + AND "ee_accesscontrol"."role_id" IS NULL + AND "ee_accesscontrol"."team_id" = 99999)) + ''' +# --- +# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.82 + ''' + SELECT "posthog_organizationmembership"."id", + "posthog_organizationmembership"."organization_id", + "posthog_organizationmembership"."user_id", + "posthog_organizationmembership"."level", + "posthog_organizationmembership"."joined_at", + "posthog_organizationmembership"."updated_at", + "posthog_organization"."id", + "posthog_organization"."name", + "posthog_organization"."slug", + "posthog_organization"."logo_media_id", + "posthog_organization"."created_at", + "posthog_organization"."updated_at", + "posthog_organization"."plugins_access_level", + "posthog_organization"."for_internal_metrics", + "posthog_organization"."is_member_join_email_enabled", + "posthog_organization"."enforce_2fa", + "posthog_organization"."is_hipaa", + "posthog_organization"."customer_id", + "posthog_organization"."available_product_features", + "posthog_organization"."usage", + "posthog_organization"."never_drop_data", + "posthog_organization"."customer_trust_scores", + "posthog_organization"."setup_section_2_completed", + "posthog_organization"."personalization", + "posthog_organization"."domain_whitelist" + FROM "posthog_organizationmembership" + INNER JOIN "posthog_organization" ON ("posthog_organizationmembership"."organization_id" = "posthog_organization"."id") + WHERE "posthog_organizationmembership"."user_id" = 99999 + ''' +# --- +# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.83 + ''' + 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"."plugins_access_level", + "posthog_organization"."for_internal_metrics", + "posthog_organization"."is_member_join_email_enabled", + "posthog_organization"."enforce_2fa", + "posthog_organization"."is_hipaa", + "posthog_organization"."customer_id", + "posthog_organization"."available_product_features", + "posthog_organization"."usage", + "posthog_organization"."never_drop_data", + "posthog_organization"."customer_trust_scores", + "posthog_organization"."setup_section_2_completed", + "posthog_organization"."personalization", + "posthog_organization"."domain_whitelist" + FROM "posthog_organization" + WHERE "posthog_organization"."id" = '00000000-0000-0000-0000-000000000000'::uuid + LIMIT 21 + ''' +# --- +# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.84 + ''' + SELECT "posthog_grouptypemapping"."id", + "posthog_grouptypemapping"."team_id", + "posthog_grouptypemapping"."project_id", + "posthog_grouptypemapping"."group_type", + "posthog_grouptypemapping"."group_type_index", + "posthog_grouptypemapping"."name_singular", + "posthog_grouptypemapping"."name_plural" + FROM "posthog_grouptypemapping" + WHERE "posthog_grouptypemapping"."team_id" = 99999 + ''' +# --- +# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.85 + ''' + SELECT "posthog_datawarehousesavedquery"."created_by_id", + "posthog_datawarehousesavedquery"."created_at", + "posthog_datawarehousesavedquery"."deleted", + "posthog_datawarehousesavedquery"."deleted_at", + "posthog_datawarehousesavedquery"."id", + "posthog_datawarehousesavedquery"."name", + "posthog_datawarehousesavedquery"."team_id", + "posthog_datawarehousesavedquery"."columns", + "posthog_datawarehousesavedquery"."external_tables", + "posthog_datawarehousesavedquery"."query", + "posthog_datawarehousesavedquery"."status", + "posthog_datawarehousesavedquery"."last_run_at", + "posthog_datawarehousesavedquery"."table_id" + FROM "posthog_datawarehousesavedquery" + WHERE ("posthog_datawarehousesavedquery"."team_id" = 99999 + AND NOT ("posthog_datawarehousesavedquery"."deleted" + AND "posthog_datawarehousesavedquery"."deleted" IS NOT NULL)) + ''' +# --- +# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.86 + ''' + SELECT "posthog_datawarehousetable"."created_by_id", + "posthog_datawarehousetable"."created_at", + "posthog_datawarehousetable"."updated_at", + "posthog_datawarehousetable"."deleted", + "posthog_datawarehousetable"."deleted_at", + "posthog_datawarehousetable"."id", + "posthog_datawarehousetable"."name", + "posthog_datawarehousetable"."format", + "posthog_datawarehousetable"."team_id", + "posthog_datawarehousetable"."url_pattern", + "posthog_datawarehousetable"."credential_id", + "posthog_datawarehousetable"."external_data_source_id", + "posthog_datawarehousetable"."columns", + "posthog_datawarehousetable"."row_count", + "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"."temporary_token", + "posthog_user"."distinct_id", + "posthog_user"."is_email_verified", + "posthog_user"."requested_password_reset_at", + "posthog_user"."has_seen_product_intro_for", + "posthog_user"."strapi_id", + "posthog_user"."is_active", + "posthog_user"."theme_mode", + "posthog_user"."partial_notification_settings", + "posthog_user"."anonymize_data", + "posthog_user"."toolbar_mode", + "posthog_user"."hedgehog_config", + "posthog_user"."events_column_config", + "posthog_user"."email_opt_in", + "posthog_datawarehousecredential"."created_by_id", + "posthog_datawarehousecredential"."created_at", + "posthog_datawarehousecredential"."id", + "posthog_datawarehousecredential"."access_key", + "posthog_datawarehousecredential"."access_secret", + "posthog_datawarehousecredential"."team_id", + "posthog_externaldatasource"."created_by_id", + "posthog_externaldatasource"."created_at", + "posthog_externaldatasource"."updated_at", + "posthog_externaldatasource"."deleted", + "posthog_externaldatasource"."deleted_at", + "posthog_externaldatasource"."id", + "posthog_externaldatasource"."source_id", + "posthog_externaldatasource"."connection_id", + "posthog_externaldatasource"."destination_id", + "posthog_externaldatasource"."team_id", + "posthog_externaldatasource"."sync_frequency", + "posthog_externaldatasource"."status", + "posthog_externaldatasource"."source_type", + "posthog_externaldatasource"."job_inputs", + "posthog_externaldatasource"."are_tables_created", + "posthog_externaldatasource"."prefix" + FROM "posthog_datawarehousetable" + LEFT OUTER JOIN "posthog_user" ON ("posthog_datawarehousetable"."created_by_id" = "posthog_user"."id") + LEFT OUTER JOIN "posthog_datawarehousecredential" ON ("posthog_datawarehousetable"."credential_id" = "posthog_datawarehousecredential"."id") + LEFT OUTER JOIN "posthog_externaldatasource" ON ("posthog_datawarehousetable"."external_data_source_id" = "posthog_externaldatasource"."id") + WHERE ("posthog_datawarehousetable"."team_id" = 99999 + AND NOT ("posthog_datawarehousetable"."deleted" + AND "posthog_datawarehousetable"."deleted" IS NOT NULL)) + ''' +# --- +# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.87 + ''' + SELECT "posthog_datawarehousejoin"."created_by_id", + "posthog_datawarehousejoin"."created_at", + "posthog_datawarehousejoin"."deleted", + "posthog_datawarehousejoin"."deleted_at", + "posthog_datawarehousejoin"."id", + "posthog_datawarehousejoin"."team_id", + "posthog_datawarehousejoin"."source_table_name", + "posthog_datawarehousejoin"."source_table_key", + "posthog_datawarehousejoin"."joining_table_name", + "posthog_datawarehousejoin"."joining_table_key", + "posthog_datawarehousejoin"."field_name", + "posthog_datawarehousejoin"."configuration" + FROM "posthog_datawarehousejoin" + WHERE ("posthog_datawarehousejoin"."team_id" = 99999 + AND NOT ("posthog_datawarehousejoin"."deleted" + AND "posthog_datawarehousejoin"."deleted" IS NOT NULL)) + ''' +# --- +# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.88 + ''' + SELECT "posthog_grouptypemapping"."id", + "posthog_grouptypemapping"."team_id", + "posthog_grouptypemapping"."project_id", + "posthog_grouptypemapping"."group_type", + "posthog_grouptypemapping"."group_type_index", + "posthog_grouptypemapping"."name_singular", + "posthog_grouptypemapping"."name_plural" + FROM "posthog_grouptypemapping" + WHERE "posthog_grouptypemapping"."team_id" = 99999 + ''' +# --- +# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.89 + ''' + SELECT "posthog_datawarehousesavedquery"."created_by_id", + "posthog_datawarehousesavedquery"."created_at", + "posthog_datawarehousesavedquery"."deleted", + "posthog_datawarehousesavedquery"."deleted_at", + "posthog_datawarehousesavedquery"."id", + "posthog_datawarehousesavedquery"."name", + "posthog_datawarehousesavedquery"."team_id", + "posthog_datawarehousesavedquery"."columns", + "posthog_datawarehousesavedquery"."external_tables", + "posthog_datawarehousesavedquery"."query", + "posthog_datawarehousesavedquery"."status", + "posthog_datawarehousesavedquery"."last_run_at", + "posthog_datawarehousesavedquery"."table_id" + FROM "posthog_datawarehousesavedquery" + WHERE ("posthog_datawarehousesavedquery"."team_id" = 99999 + AND NOT ("posthog_datawarehousesavedquery"."deleted" + AND "posthog_datawarehousesavedquery"."deleted" IS NOT NULL)) + ''' +# --- +# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.9 + ''' + SELECT "posthog_datawarehousejoin"."created_by_id", + "posthog_datawarehousejoin"."created_at", + "posthog_datawarehousejoin"."deleted", + "posthog_datawarehousejoin"."deleted_at", + "posthog_datawarehousejoin"."id", + "posthog_datawarehousejoin"."team_id", + "posthog_datawarehousejoin"."source_table_name", + "posthog_datawarehousejoin"."source_table_key", + "posthog_datawarehousejoin"."joining_table_name", + "posthog_datawarehousejoin"."joining_table_key", + "posthog_datawarehousejoin"."field_name" + FROM "posthog_datawarehousejoin" + WHERE ("posthog_datawarehousejoin"."team_id" = 99999 + AND NOT ("posthog_datawarehousejoin"."deleted" + AND "posthog_datawarehousejoin"."deleted" IS NOT NULL)) + ''' +# --- +# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.90 + ''' + SELECT "posthog_datawarehousetable"."created_by_id", + "posthog_datawarehousetable"."created_at", + "posthog_datawarehousetable"."updated_at", + "posthog_datawarehousetable"."deleted", + "posthog_datawarehousetable"."deleted_at", + "posthog_datawarehousetable"."id", + "posthog_datawarehousetable"."name", + "posthog_datawarehousetable"."format", + "posthog_datawarehousetable"."team_id", + "posthog_datawarehousetable"."url_pattern", + "posthog_datawarehousetable"."credential_id", + "posthog_datawarehousetable"."external_data_source_id", + "posthog_datawarehousetable"."columns", + "posthog_datawarehousetable"."row_count", + "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"."temporary_token", + "posthog_user"."distinct_id", + "posthog_user"."is_email_verified", + "posthog_user"."requested_password_reset_at", + "posthog_user"."has_seen_product_intro_for", + "posthog_user"."strapi_id", + "posthog_user"."is_active", + "posthog_user"."theme_mode", + "posthog_user"."partial_notification_settings", + "posthog_user"."anonymize_data", + "posthog_user"."toolbar_mode", + "posthog_user"."hedgehog_config", + "posthog_user"."events_column_config", + "posthog_user"."email_opt_in", + "posthog_datawarehousecredential"."created_by_id", + "posthog_datawarehousecredential"."created_at", + "posthog_datawarehousecredential"."id", + "posthog_datawarehousecredential"."access_key", + "posthog_datawarehousecredential"."access_secret", + "posthog_datawarehousecredential"."team_id", + "posthog_externaldatasource"."created_by_id", + "posthog_externaldatasource"."created_at", + "posthog_externaldatasource"."updated_at", + "posthog_externaldatasource"."deleted", + "posthog_externaldatasource"."deleted_at", + "posthog_externaldatasource"."id", + "posthog_externaldatasource"."source_id", + "posthog_externaldatasource"."connection_id", + "posthog_externaldatasource"."destination_id", + "posthog_externaldatasource"."team_id", + "posthog_externaldatasource"."sync_frequency", + "posthog_externaldatasource"."status", + "posthog_externaldatasource"."source_type", + "posthog_externaldatasource"."job_inputs", + "posthog_externaldatasource"."are_tables_created", + "posthog_externaldatasource"."prefix" + FROM "posthog_datawarehousetable" + LEFT OUTER JOIN "posthog_user" ON ("posthog_datawarehousetable"."created_by_id" = "posthog_user"."id") + LEFT OUTER JOIN "posthog_datawarehousecredential" ON ("posthog_datawarehousetable"."credential_id" = "posthog_datawarehousecredential"."id") + LEFT OUTER JOIN "posthog_externaldatasource" ON ("posthog_datawarehousetable"."external_data_source_id" = "posthog_externaldatasource"."id") + WHERE ("posthog_datawarehousetable"."team_id" = 99999 + AND NOT ("posthog_datawarehousetable"."deleted" + AND "posthog_datawarehousetable"."deleted" IS NOT NULL)) + ''' +# --- +# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.91 + ''' + SELECT "posthog_datawarehousejoin"."created_by_id", + "posthog_datawarehousejoin"."created_at", + "posthog_datawarehousejoin"."deleted", + "posthog_datawarehousejoin"."deleted_at", + "posthog_datawarehousejoin"."id", + "posthog_datawarehousejoin"."team_id", + "posthog_datawarehousejoin"."source_table_name", + "posthog_datawarehousejoin"."source_table_key", + "posthog_datawarehousejoin"."joining_table_name", + "posthog_datawarehousejoin"."joining_table_key", + "posthog_datawarehousejoin"."field_name", + "posthog_datawarehousejoin"."configuration" + FROM "posthog_datawarehousejoin" + WHERE ("posthog_datawarehousejoin"."team_id" = 99999 + AND NOT ("posthog_datawarehousejoin"."deleted" + AND "posthog_datawarehousejoin"."deleted" IS NOT NULL)) + ''' +# --- +# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.92 + ''' + SELECT "posthog_sessionrecording"."id", + "posthog_sessionrecording"."session_id", + "posthog_sessionrecording"."team_id", + "posthog_sessionrecording"."created_at", + "posthog_sessionrecording"."deleted", + "posthog_sessionrecording"."object_storage_path", + "posthog_sessionrecording"."distinct_id", + "posthog_sessionrecording"."duration", + "posthog_sessionrecording"."active_seconds", + "posthog_sessionrecording"."inactive_seconds", + "posthog_sessionrecording"."start_time", + "posthog_sessionrecording"."end_time", + "posthog_sessionrecording"."click_count", + "posthog_sessionrecording"."keypress_count", + "posthog_sessionrecording"."mouse_activity_count", + "posthog_sessionrecording"."console_log_count", + "posthog_sessionrecording"."console_warn_count", + "posthog_sessionrecording"."console_error_count", + "posthog_sessionrecording"."start_url", + "posthog_sessionrecording"."storage_version" + FROM "posthog_sessionrecording" + WHERE ("posthog_sessionrecording"."session_id" IN ('1', + '2', + '3', + '4') + AND "posthog_sessionrecording"."team_id" = 99999) + ''' +# --- +# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.93 + ''' + SELECT "posthog_sessionrecordingviewed"."session_id" + FROM "posthog_sessionrecordingviewed" + WHERE ("posthog_sessionrecordingviewed"."team_id" = 99999 + AND "posthog_sessionrecordingviewed"."user_id" = 99999) + ''' +# --- +# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.94 + ''' + SELECT "posthog_persondistinctid"."id", + "posthog_persondistinctid"."team_id", + "posthog_persondistinctid"."person_id", + "posthog_persondistinctid"."distinct_id", + "posthog_persondistinctid"."version", + "posthog_person"."id", + "posthog_person"."created_at", + "posthog_person"."properties_last_updated_at", + "posthog_person"."properties_last_operation", + "posthog_person"."team_id", + "posthog_person"."properties", + "posthog_person"."is_user_id", + "posthog_person"."is_identified", + "posthog_person"."uuid", + "posthog_person"."version" + FROM "posthog_persondistinctid" + INNER JOIN "posthog_person" ON ("posthog_persondistinctid"."person_id" = "posthog_person"."id") + WHERE ("posthog_persondistinctid"."distinct_id" IN ('user1', + 'user2', + 'user3', + 'user4') + AND "posthog_persondistinctid"."team_id" = 99999) + ''' +# --- +# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.95 + ''' + SELECT "posthog_team"."id", + "posthog_team"."uuid", + "posthog_team"."organization_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"."ingested_event", + "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"."person_processing_opt_out", + "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_url_trigger_config", + "posthog_team"."session_recording_url_blocklist_config", + "posthog_team"."session_recording_event_trigger_config", + "posthog_team"."session_replay_config", + "posthog_team"."survey_config", + "posthog_team"."capture_console_log_opt_in", + "posthog_team"."capture_performance_opt_in", + "posthog_team"."capture_dead_clicks", + "posthog_team"."surveys_opt_in", + "posthog_team"."heatmaps_opt_in", + "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"."primary_dashboard_id", + "posthog_team"."extra_settings", + "posthog_team"."modifiers", + "posthog_team"."correlation_config", + "posthog_team"."session_recording_retention_period_days", + "posthog_team"."plugins_opt_in", + "posthog_team"."opt_out_capture", + "posthog_team"."event_names", + "posthog_team"."event_names_with_usage", + "posthog_team"."event_properties", + "posthog_team"."event_properties_with_usage", + "posthog_team"."event_properties_numerical", + "posthog_team"."external_data_workspace_id", + "posthog_team"."external_data_workspace_last_synced_at" + FROM "posthog_team" + WHERE "posthog_team"."id" = 99999 + LIMIT 21 + ''' +# --- +# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.96 + ''' + SELECT "posthog_person"."id", + "posthog_person"."created_at", + "posthog_person"."properties_last_updated_at", + "posthog_person"."properties_last_operation", + "posthog_person"."team_id", + "posthog_person"."properties", + "posthog_person"."is_user_id", + "posthog_person"."is_identified", + "posthog_person"."uuid", + "posthog_person"."version" + FROM "posthog_person" + INNER JOIN "posthog_persondistinctid" ON ("posthog_person"."id" = "posthog_persondistinctid"."person_id") + WHERE ("posthog_persondistinctid"."distinct_id" = 'user5' + AND "posthog_persondistinctid"."team_id" = 99999) + LIMIT 21 + ''' +# --- +# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.97 + ''' + SELECT "posthog_person"."id", + "posthog_person"."created_at", + "posthog_person"."properties_last_updated_at", + "posthog_person"."properties_last_operation", + "posthog_person"."team_id", + "posthog_person"."properties", + "posthog_person"."is_user_id", + "posthog_person"."is_identified", + "posthog_person"."uuid", + "posthog_person"."version" + FROM "posthog_person" + INNER JOIN "posthog_persondistinctid" ON ("posthog_person"."id" = "posthog_persondistinctid"."person_id") + WHERE ("posthog_persondistinctid"."distinct_id" = 'user5' + AND "posthog_persondistinctid"."team_id" = 99999) + LIMIT 21 + ''' +# --- +# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.98 + ''' + 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"."temporary_token", + "posthog_user"."distinct_id", + "posthog_user"."is_email_verified", + "posthog_user"."has_seen_product_intro_for", + "posthog_user"."strapi_id", + "posthog_user"."is_active", + "posthog_user"."theme_mode", + "posthog_user"."partial_notification_settings", + "posthog_user"."anonymize_data", + "posthog_user"."toolbar_mode", + "posthog_user"."hedgehog_config", + "posthog_user"."events_column_config", + "posthog_user"."email_opt_in" + FROM "posthog_user" + WHERE "posthog_user"."id" = 99999 + LIMIT 21 + ''' +# --- +# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.99 + ''' + SELECT "posthog_team"."id", + "posthog_team"."uuid", + "posthog_team"."organization_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"."ingested_event", + "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"."person_processing_opt_out", + "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_url_trigger_config", + "posthog_team"."session_recording_url_blocklist_config", + "posthog_team"."session_recording_event_trigger_config", + "posthog_team"."session_replay_config", + "posthog_team"."survey_config", + "posthog_team"."capture_console_log_opt_in", + "posthog_team"."capture_performance_opt_in", + "posthog_team"."capture_dead_clicks", + "posthog_team"."surveys_opt_in", + "posthog_team"."heatmaps_opt_in", + "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"."primary_dashboard_id", + "posthog_team"."extra_settings", + "posthog_team"."modifiers", + "posthog_team"."correlation_config", + "posthog_team"."session_recording_retention_period_days", + "posthog_team"."external_data_workspace_id", + "posthog_team"."external_data_workspace_last_synced_at" + FROM "posthog_team" + WHERE "posthog_team"."id" = 99999 + LIMIT 21 + ''' +# --- +<<<<<<< HEAD +======= +# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.9 + ''' + SELECT "posthog_datawarehousesavedquery"."created_by_id", + "posthog_datawarehousesavedquery"."created_at", + "posthog_datawarehousesavedquery"."deleted", + "posthog_datawarehousesavedquery"."deleted_at", + "posthog_datawarehousesavedquery"."id", + "posthog_datawarehousesavedquery"."name", + "posthog_datawarehousesavedquery"."team_id", + "posthog_datawarehousesavedquery"."columns", + "posthog_datawarehousesavedquery"."external_tables", + "posthog_datawarehousesavedquery"."query", + "posthog_datawarehousesavedquery"."status", + "posthog_datawarehousesavedquery"."last_run_at", + "posthog_datawarehousesavedquery"."table_id" + FROM "posthog_datawarehousesavedquery" + WHERE ("posthog_datawarehousesavedquery"."team_id" = 99999 + AND NOT ("posthog_datawarehousesavedquery"."deleted" + AND "posthog_datawarehousesavedquery"."deleted" IS NOT NULL)) + ''' +# --- +# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.90 + ''' + SELECT "posthog_organizationmembership"."id", + "posthog_organizationmembership"."organization_id", + "posthog_organizationmembership"."user_id", + "posthog_organizationmembership"."level", + "posthog_organizationmembership"."joined_at", + "posthog_organizationmembership"."updated_at", + "posthog_organization"."id", + "posthog_organization"."name", + "posthog_organization"."slug", + "posthog_organization"."logo_media_id", + "posthog_organization"."created_at", + "posthog_organization"."updated_at", + "posthog_organization"."plugins_access_level", + "posthog_organization"."for_internal_metrics", + "posthog_organization"."is_member_join_email_enabled", + "posthog_organization"."enforce_2fa", + "posthog_organization"."is_hipaa", + "posthog_organization"."customer_id", + "posthog_organization"."available_product_features", + "posthog_organization"."usage", + "posthog_organization"."never_drop_data", + "posthog_organization"."customer_trust_scores", + "posthog_organization"."setup_section_2_completed", + "posthog_organization"."personalization", + "posthog_organization"."domain_whitelist" + FROM "posthog_organizationmembership" + INNER JOIN "posthog_organization" ON ("posthog_organizationmembership"."organization_id" = "posthog_organization"."id") + WHERE "posthog_organizationmembership"."user_id" = 99999 + ''' +# --- +# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.91 + ''' + SELECT "posthog_organization"."id", + "posthog_organization"."name", + "posthog_organization"."slug", + "posthog_organization"."logo_media_id", + "posthog_organization"."created_at", + "posthog_organization"."updated_at", + "posthog_organization"."plugins_access_level", + "posthog_organization"."for_internal_metrics", + "posthog_organization"."is_member_join_email_enabled", + "posthog_organization"."enforce_2fa", + "posthog_organization"."is_hipaa", + "posthog_organization"."customer_id", + "posthog_organization"."available_product_features", + "posthog_organization"."usage", + "posthog_organization"."never_drop_data", + "posthog_organization"."customer_trust_scores", + "posthog_organization"."setup_section_2_completed", + "posthog_organization"."personalization", + "posthog_organization"."domain_whitelist" + FROM "posthog_organization" + WHERE "posthog_organization"."id" = '00000000-0000-0000-0000-000000000000'::uuid + LIMIT 21 + ''' +# --- +# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.92 + ''' + SELECT "posthog_grouptypemapping"."id", + "posthog_grouptypemapping"."team_id", + "posthog_grouptypemapping"."project_id", + "posthog_grouptypemapping"."group_type", + "posthog_grouptypemapping"."group_type_index", + "posthog_grouptypemapping"."name_singular", + "posthog_grouptypemapping"."name_plural" + FROM "posthog_grouptypemapping" + WHERE "posthog_grouptypemapping"."team_id" = 99999 + ''' +# --- +# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.93 + ''' + SELECT "posthog_datawarehousesavedquery"."created_by_id", + "posthog_datawarehousesavedquery"."created_at", + "posthog_datawarehousesavedquery"."deleted", + "posthog_datawarehousesavedquery"."deleted_at", + "posthog_datawarehousesavedquery"."id", + "posthog_datawarehousesavedquery"."name", + "posthog_datawarehousesavedquery"."team_id", + "posthog_datawarehousesavedquery"."columns", + "posthog_datawarehousesavedquery"."external_tables", + "posthog_datawarehousesavedquery"."query", + "posthog_datawarehousesavedquery"."status", + "posthog_datawarehousesavedquery"."last_run_at", + "posthog_datawarehousesavedquery"."table_id" + FROM "posthog_datawarehousesavedquery" + WHERE ("posthog_datawarehousesavedquery"."team_id" = 99999 + AND NOT ("posthog_datawarehousesavedquery"."deleted" + AND "posthog_datawarehousesavedquery"."deleted" IS NOT NULL)) + ''' +# --- +# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.94 + ''' + SELECT "posthog_datawarehousetable"."created_by_id", + "posthog_datawarehousetable"."created_at", + "posthog_datawarehousetable"."updated_at", + "posthog_datawarehousetable"."deleted", + "posthog_datawarehousetable"."deleted_at", + "posthog_datawarehousetable"."id", + "posthog_datawarehousetable"."name", + "posthog_datawarehousetable"."format", + "posthog_datawarehousetable"."team_id", + "posthog_datawarehousetable"."url_pattern", + "posthog_datawarehousetable"."credential_id", + "posthog_datawarehousetable"."external_data_source_id", + "posthog_datawarehousetable"."columns", + "posthog_datawarehousetable"."row_count", + "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"."temporary_token", + "posthog_user"."distinct_id", + "posthog_user"."is_email_verified", + "posthog_user"."requested_password_reset_at", + "posthog_user"."has_seen_product_intro_for", + "posthog_user"."strapi_id", + "posthog_user"."is_active", + "posthog_user"."theme_mode", + "posthog_user"."partial_notification_settings", + "posthog_user"."anonymize_data", + "posthog_user"."toolbar_mode", + "posthog_user"."hedgehog_config", + "posthog_user"."events_column_config", + "posthog_user"."email_opt_in", + "posthog_datawarehousecredential"."created_by_id", + "posthog_datawarehousecredential"."created_at", + "posthog_datawarehousecredential"."id", + "posthog_datawarehousecredential"."access_key", + "posthog_datawarehousecredential"."access_secret", + "posthog_datawarehousecredential"."team_id", + "posthog_externaldatasource"."created_by_id", + "posthog_externaldatasource"."created_at", + "posthog_externaldatasource"."updated_at", + "posthog_externaldatasource"."deleted", + "posthog_externaldatasource"."deleted_at", + "posthog_externaldatasource"."id", + "posthog_externaldatasource"."source_id", + "posthog_externaldatasource"."connection_id", + "posthog_externaldatasource"."destination_id", + "posthog_externaldatasource"."team_id", + "posthog_externaldatasource"."sync_frequency", + "posthog_externaldatasource"."status", + "posthog_externaldatasource"."source_type", + "posthog_externaldatasource"."job_inputs", + "posthog_externaldatasource"."are_tables_created", + "posthog_externaldatasource"."prefix" + FROM "posthog_datawarehousetable" + LEFT OUTER JOIN "posthog_user" ON ("posthog_datawarehousetable"."created_by_id" = "posthog_user"."id") + LEFT OUTER JOIN "posthog_datawarehousecredential" ON ("posthog_datawarehousetable"."credential_id" = "posthog_datawarehousecredential"."id") + LEFT OUTER JOIN "posthog_externaldatasource" ON ("posthog_datawarehousetable"."external_data_source_id" = "posthog_externaldatasource"."id") + WHERE ("posthog_datawarehousetable"."team_id" = 99999 + AND NOT ("posthog_datawarehousetable"."deleted" + AND "posthog_datawarehousetable"."deleted" IS NOT NULL)) + ''' +# --- +# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.95 + ''' + SELECT "posthog_datawarehousejoin"."created_by_id", + "posthog_datawarehousejoin"."created_at", + "posthog_datawarehousejoin"."deleted", + "posthog_datawarehousejoin"."deleted_at", + "posthog_datawarehousejoin"."id", + "posthog_datawarehousejoin"."team_id", + "posthog_datawarehousejoin"."source_table_name", + "posthog_datawarehousejoin"."source_table_key", + "posthog_datawarehousejoin"."joining_table_name", + "posthog_datawarehousejoin"."joining_table_key", + "posthog_datawarehousejoin"."field_name", + "posthog_datawarehousejoin"."configuration" + FROM "posthog_datawarehousejoin" + WHERE ("posthog_datawarehousejoin"."team_id" = 99999 + AND NOT ("posthog_datawarehousejoin"."deleted" + AND "posthog_datawarehousejoin"."deleted" IS NOT NULL)) + ''' +# --- +# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.96 + ''' + SELECT "posthog_grouptypemapping"."id", + "posthog_grouptypemapping"."team_id", + "posthog_grouptypemapping"."project_id", + "posthog_grouptypemapping"."group_type", + "posthog_grouptypemapping"."group_type_index", + "posthog_grouptypemapping"."name_singular", + "posthog_grouptypemapping"."name_plural" + FROM "posthog_grouptypemapping" + WHERE "posthog_grouptypemapping"."team_id" = 99999 + ''' +# --- +# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.97 + ''' + SELECT "posthog_datawarehousesavedquery"."created_by_id", + "posthog_datawarehousesavedquery"."created_at", + "posthog_datawarehousesavedquery"."deleted", + "posthog_datawarehousesavedquery"."deleted_at", + "posthog_datawarehousesavedquery"."id", + "posthog_datawarehousesavedquery"."name", + "posthog_datawarehousesavedquery"."team_id", + "posthog_datawarehousesavedquery"."columns", + "posthog_datawarehousesavedquery"."external_tables", + "posthog_datawarehousesavedquery"."query", + "posthog_datawarehousesavedquery"."status", + "posthog_datawarehousesavedquery"."last_run_at", + "posthog_datawarehousesavedquery"."table_id" + FROM "posthog_datawarehousesavedquery" + WHERE ("posthog_datawarehousesavedquery"."team_id" = 99999 + AND NOT ("posthog_datawarehousesavedquery"."deleted" + AND "posthog_datawarehousesavedquery"."deleted" IS NOT NULL)) + ''' +# --- +# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.98 + ''' + SELECT "posthog_datawarehousetable"."created_by_id", + "posthog_datawarehousetable"."created_at", + "posthog_datawarehousetable"."updated_at", + "posthog_datawarehousetable"."deleted", + "posthog_datawarehousetable"."deleted_at", + "posthog_datawarehousetable"."id", + "posthog_datawarehousetable"."name", + "posthog_datawarehousetable"."format", + "posthog_datawarehousetable"."team_id", + "posthog_datawarehousetable"."url_pattern", + "posthog_datawarehousetable"."credential_id", + "posthog_datawarehousetable"."external_data_source_id", + "posthog_datawarehousetable"."columns", + "posthog_datawarehousetable"."row_count", + "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"."temporary_token", + "posthog_user"."distinct_id", + "posthog_user"."is_email_verified", + "posthog_user"."requested_password_reset_at", + "posthog_user"."has_seen_product_intro_for", + "posthog_user"."strapi_id", + "posthog_user"."is_active", + "posthog_user"."theme_mode", + "posthog_user"."partial_notification_settings", + "posthog_user"."anonymize_data", + "posthog_user"."toolbar_mode", + "posthog_user"."hedgehog_config", + "posthog_user"."events_column_config", + "posthog_user"."email_opt_in", + "posthog_datawarehousecredential"."created_by_id", + "posthog_datawarehousecredential"."created_at", + "posthog_datawarehousecredential"."id", + "posthog_datawarehousecredential"."access_key", + "posthog_datawarehousecredential"."access_secret", + "posthog_datawarehousecredential"."team_id", + "posthog_externaldatasource"."created_by_id", + "posthog_externaldatasource"."created_at", + "posthog_externaldatasource"."updated_at", + "posthog_externaldatasource"."deleted", + "posthog_externaldatasource"."deleted_at", + "posthog_externaldatasource"."id", + "posthog_externaldatasource"."source_id", + "posthog_externaldatasource"."connection_id", + "posthog_externaldatasource"."destination_id", + "posthog_externaldatasource"."team_id", + "posthog_externaldatasource"."sync_frequency", + "posthog_externaldatasource"."status", + "posthog_externaldatasource"."source_type", + "posthog_externaldatasource"."job_inputs", + "posthog_externaldatasource"."are_tables_created", + "posthog_externaldatasource"."prefix" + FROM "posthog_datawarehousetable" + LEFT OUTER JOIN "posthog_user" ON ("posthog_datawarehousetable"."created_by_id" = "posthog_user"."id") + LEFT OUTER JOIN "posthog_datawarehousecredential" ON ("posthog_datawarehousetable"."credential_id" = "posthog_datawarehousecredential"."id") + LEFT OUTER JOIN "posthog_externaldatasource" ON ("posthog_datawarehousetable"."external_data_source_id" = "posthog_externaldatasource"."id") + WHERE ("posthog_datawarehousetable"."team_id" = 99999 + AND NOT ("posthog_datawarehousetable"."deleted" + AND "posthog_datawarehousetable"."deleted" IS NOT NULL)) + ''' +# --- +# name: TestSessionRecordings.test_listing_recordings_is_not_nplus1_for_persons.99 + ''' + SELECT "posthog_datawarehousejoin"."created_by_id", + "posthog_datawarehousejoin"."created_at", + "posthog_datawarehousejoin"."deleted", + "posthog_datawarehousejoin"."deleted_at", + "posthog_datawarehousejoin"."id", + "posthog_datawarehousejoin"."team_id", + "posthog_datawarehousejoin"."source_table_name", + "posthog_datawarehousejoin"."source_table_key", + "posthog_datawarehousejoin"."joining_table_name", + "posthog_datawarehousejoin"."joining_table_key", + "posthog_datawarehousejoin"."field_name", + "posthog_datawarehousejoin"."configuration" + FROM "posthog_datawarehousejoin" + WHERE ("posthog_datawarehousejoin"."team_id" = 99999 + AND NOT ("posthog_datawarehousejoin"."deleted" + AND "posthog_datawarehousejoin"."deleted" IS NOT NULL)) + ''' +# --- +>>>>>>> c835d19e29 (Update query snapshots)