From 49bba9bba2b996672d2a3e653038ac05eca6eed6 Mon Sep 17 00:00:00 2001 From: github-actions <41898282+github-actions[bot]@users.noreply.github.com> Date: Mon, 30 Oct 2023 17:01:35 +0000 Subject: [PATCH] Update query snapshots --- .../test/__snapshots__/test_annotation.ambr | 244 +++++++++++------- 1 file changed, 155 insertions(+), 89 deletions(-) diff --git a/posthog/api/test/__snapshots__/test_annotation.ambr b/posthog/api/test/__snapshots__/test_annotation.ambr index c74ebe73d36c53..762469eaa98ff8 100644 --- a/posthog/api/test/__snapshots__/test_annotation.ambr +++ b/posthog/api/test/__snapshots__/test_annotation.ambr @@ -76,83 +76,6 @@ ' --- # name: TestAnnotation.test_retrieving_annotation_is_not_n_plus_1.10 - ' - SELECT "posthog_annotation"."id", - "posthog_annotation"."content", - "posthog_annotation"."created_at", - "posthog_annotation"."updated_at", - "posthog_annotation"."dashboard_item_id", - "posthog_annotation"."team_id", - "posthog_annotation"."organization_id", - "posthog_annotation"."created_by_id", - "posthog_annotation"."scope", - "posthog_annotation"."creation_type", - "posthog_annotation"."date_marker", - "posthog_annotation"."deleted", - "posthog_annotation"."apply_all", - "posthog_dashboarditem"."id", - "posthog_dashboarditem"."name", - "posthog_dashboarditem"."derived_name", - "posthog_dashboarditem"."description", - "posthog_dashboarditem"."team_id", - "posthog_dashboarditem"."filters", - "posthog_dashboarditem"."filters_hash", - "posthog_dashboarditem"."query", - "posthog_dashboarditem"."order", - "posthog_dashboarditem"."deleted", - "posthog_dashboarditem"."saved", - "posthog_dashboarditem"."created_at", - "posthog_dashboarditem"."last_refresh", - "posthog_dashboarditem"."refreshing", - "posthog_dashboarditem"."created_by_id", - "posthog_dashboarditem"."is_sample", - "posthog_dashboarditem"."short_id", - "posthog_dashboarditem"."favorited", - "posthog_dashboarditem"."refresh_attempt", - "posthog_dashboarditem"."last_modified_at", - "posthog_dashboarditem"."last_modified_by_id", - "posthog_dashboarditem"."dashboard_id", - "posthog_dashboarditem"."layouts", - "posthog_dashboarditem"."color", - "posthog_dashboarditem"."dive_dashboard_id", - "posthog_dashboarditem"."updated_at", - "posthog_dashboarditem"."deprecated_tags", - "posthog_dashboarditem"."tags", - "posthog_user"."id", - "posthog_user"."password", - "posthog_user"."last_login", - "posthog_user"."first_name", - "posthog_user"."last_name", - "posthog_user"."is_staff", - "posthog_user"."is_active", - "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"."email_opt_in", - "posthog_user"."partial_notification_settings", - "posthog_user"."anonymize_data", - "posthog_user"."toolbar_mode", - "posthog_user"."events_column_config" - FROM "posthog_annotation" - LEFT OUTER JOIN "posthog_dashboarditem" ON ("posthog_annotation"."dashboard_item_id" = "posthog_dashboarditem"."id") - LEFT OUTER JOIN "posthog_user" ON ("posthog_annotation"."created_by_id" = "posthog_user"."id") - WHERE ((("posthog_annotation"."organization_id" = '00000000-0000-0000-0000-000000000000'::uuid - AND "posthog_annotation"."scope" = 'organization') - OR "posthog_annotation"."team_id" = 2) - AND NOT "posthog_annotation"."deleted") - ORDER BY "posthog_annotation"."date_marker" DESC - LIMIT 1000 /*controller='project_annotations-list',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/annotations/%3F%24'*/ - ' ---- -# name: TestAnnotation.test_retrieving_annotation_is_not_n_plus_1.11 ' SELECT "posthog_user"."id", "posthog_user"."password", @@ -181,7 +104,7 @@ LIMIT 21 /**/ ' --- -# name: TestAnnotation.test_retrieving_annotation_is_not_n_plus_1.12 +# name: TestAnnotation.test_retrieving_annotation_is_not_n_plus_1.11 ' SELECT "posthog_team"."id", "posthog_team"."uuid", @@ -229,7 +152,7 @@ LIMIT 21 /*controller='project_annotations-list',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/annotations/%3F%24'*/ ' --- -# name: TestAnnotation.test_retrieving_annotation_is_not_n_plus_1.13 +# name: TestAnnotation.test_retrieving_annotation_is_not_n_plus_1.12 ' SELECT "posthog_organizationmembership"."id", "posthog_organizationmembership"."organization_id", @@ -259,7 +182,7 @@ WHERE "posthog_organizationmembership"."user_id" = 2 /*controller='project_annotations-list',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/annotations/%3F%24'*/ ' --- -# name: TestAnnotation.test_retrieving_annotation_is_not_n_plus_1.14 +# name: TestAnnotation.test_retrieving_annotation_is_not_n_plus_1.13 ' SELECT COUNT(*) AS "__count" FROM "posthog_annotation" @@ -269,6 +192,83 @@ AND NOT "posthog_annotation"."deleted") /*controller='project_annotations-list',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/annotations/%3F%24'*/ ' --- +# name: TestAnnotation.test_retrieving_annotation_is_not_n_plus_1.14 + ' + SELECT "posthog_annotation"."id", + "posthog_annotation"."content", + "posthog_annotation"."created_at", + "posthog_annotation"."updated_at", + "posthog_annotation"."dashboard_item_id", + "posthog_annotation"."team_id", + "posthog_annotation"."organization_id", + "posthog_annotation"."created_by_id", + "posthog_annotation"."scope", + "posthog_annotation"."creation_type", + "posthog_annotation"."date_marker", + "posthog_annotation"."deleted", + "posthog_annotation"."apply_all", + "posthog_dashboarditem"."id", + "posthog_dashboarditem"."name", + "posthog_dashboarditem"."derived_name", + "posthog_dashboarditem"."description", + "posthog_dashboarditem"."team_id", + "posthog_dashboarditem"."filters", + "posthog_dashboarditem"."filters_hash", + "posthog_dashboarditem"."query", + "posthog_dashboarditem"."order", + "posthog_dashboarditem"."deleted", + "posthog_dashboarditem"."saved", + "posthog_dashboarditem"."created_at", + "posthog_dashboarditem"."last_refresh", + "posthog_dashboarditem"."refreshing", + "posthog_dashboarditem"."created_by_id", + "posthog_dashboarditem"."is_sample", + "posthog_dashboarditem"."short_id", + "posthog_dashboarditem"."favorited", + "posthog_dashboarditem"."refresh_attempt", + "posthog_dashboarditem"."last_modified_at", + "posthog_dashboarditem"."last_modified_by_id", + "posthog_dashboarditem"."dashboard_id", + "posthog_dashboarditem"."layouts", + "posthog_dashboarditem"."color", + "posthog_dashboarditem"."dive_dashboard_id", + "posthog_dashboarditem"."updated_at", + "posthog_dashboarditem"."deprecated_tags", + "posthog_dashboarditem"."tags", + "posthog_user"."id", + "posthog_user"."password", + "posthog_user"."last_login", + "posthog_user"."first_name", + "posthog_user"."last_name", + "posthog_user"."is_staff", + "posthog_user"."is_active", + "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"."email_opt_in", + "posthog_user"."partial_notification_settings", + "posthog_user"."anonymize_data", + "posthog_user"."toolbar_mode", + "posthog_user"."events_column_config" + FROM "posthog_annotation" + LEFT OUTER JOIN "posthog_dashboarditem" ON ("posthog_annotation"."dashboard_item_id" = "posthog_dashboarditem"."id") + LEFT OUTER JOIN "posthog_user" ON ("posthog_annotation"."created_by_id" = "posthog_user"."id") + WHERE ((("posthog_annotation"."organization_id" = '00000000-0000-0000-0000-000000000000'::uuid + AND "posthog_annotation"."scope" = 'organization') + OR "posthog_annotation"."team_id" = 2) + AND NOT "posthog_annotation"."deleted") + ORDER BY "posthog_annotation"."date_marker" DESC + LIMIT 1000 /*controller='project_annotations-list',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/annotations/%3F%24'*/ + ' +--- # name: TestAnnotation.test_retrieving_annotation_is_not_n_plus_1.15 ' SELECT "posthog_annotation"."id", @@ -506,22 +506,88 @@ --- # name: TestAnnotation.test_retrieving_annotation_is_not_n_plus_1.8 ' - SELECT "posthog_instancesetting"."id", - "posthog_instancesetting"."key", - "posthog_instancesetting"."raw_value" - FROM "posthog_instancesetting" - WHERE "posthog_instancesetting"."key" = 'constance:posthog:RATE_LIMIT_ENABLED' - ORDER BY "posthog_instancesetting"."id" ASC - LIMIT 1 /*controller='project_annotations-list',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/annotations/%3F%24'*/ + SELECT COUNT(*) AS "__count" + FROM "posthog_annotation" + WHERE ((("posthog_annotation"."organization_id" = '00000000-0000-0000-0000-000000000000'::uuid + AND "posthog_annotation"."scope" = 'organization') + OR "posthog_annotation"."team_id" = 2) + AND NOT "posthog_annotation"."deleted") /*controller='project_annotations-list',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/annotations/%3F%24'*/ ' --- # name: TestAnnotation.test_retrieving_annotation_is_not_n_plus_1.9 ' - SELECT COUNT(*) AS "__count" + SELECT "posthog_annotation"."id", + "posthog_annotation"."content", + "posthog_annotation"."created_at", + "posthog_annotation"."updated_at", + "posthog_annotation"."dashboard_item_id", + "posthog_annotation"."team_id", + "posthog_annotation"."organization_id", + "posthog_annotation"."created_by_id", + "posthog_annotation"."scope", + "posthog_annotation"."creation_type", + "posthog_annotation"."date_marker", + "posthog_annotation"."deleted", + "posthog_annotation"."apply_all", + "posthog_dashboarditem"."id", + "posthog_dashboarditem"."name", + "posthog_dashboarditem"."derived_name", + "posthog_dashboarditem"."description", + "posthog_dashboarditem"."team_id", + "posthog_dashboarditem"."filters", + "posthog_dashboarditem"."filters_hash", + "posthog_dashboarditem"."query", + "posthog_dashboarditem"."order", + "posthog_dashboarditem"."deleted", + "posthog_dashboarditem"."saved", + "posthog_dashboarditem"."created_at", + "posthog_dashboarditem"."last_refresh", + "posthog_dashboarditem"."refreshing", + "posthog_dashboarditem"."created_by_id", + "posthog_dashboarditem"."is_sample", + "posthog_dashboarditem"."short_id", + "posthog_dashboarditem"."favorited", + "posthog_dashboarditem"."refresh_attempt", + "posthog_dashboarditem"."last_modified_at", + "posthog_dashboarditem"."last_modified_by_id", + "posthog_dashboarditem"."dashboard_id", + "posthog_dashboarditem"."layouts", + "posthog_dashboarditem"."color", + "posthog_dashboarditem"."dive_dashboard_id", + "posthog_dashboarditem"."updated_at", + "posthog_dashboarditem"."deprecated_tags", + "posthog_dashboarditem"."tags", + "posthog_user"."id", + "posthog_user"."password", + "posthog_user"."last_login", + "posthog_user"."first_name", + "posthog_user"."last_name", + "posthog_user"."is_staff", + "posthog_user"."is_active", + "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"."email_opt_in", + "posthog_user"."partial_notification_settings", + "posthog_user"."anonymize_data", + "posthog_user"."toolbar_mode", + "posthog_user"."events_column_config" FROM "posthog_annotation" + LEFT OUTER JOIN "posthog_dashboarditem" ON ("posthog_annotation"."dashboard_item_id" = "posthog_dashboarditem"."id") + LEFT OUTER JOIN "posthog_user" ON ("posthog_annotation"."created_by_id" = "posthog_user"."id") WHERE ((("posthog_annotation"."organization_id" = '00000000-0000-0000-0000-000000000000'::uuid AND "posthog_annotation"."scope" = 'organization') OR "posthog_annotation"."team_id" = 2) - AND NOT "posthog_annotation"."deleted") /*controller='project_annotations-list',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/annotations/%3F%24'*/ + AND NOT "posthog_annotation"."deleted") + ORDER BY "posthog_annotation"."date_marker" DESC + LIMIT 1000 /*controller='project_annotations-list',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/annotations/%3F%24'*/ ' ---