mirror of
https://github.com/BillyOutlast/posthog.git
synced 2026-02-04 03:01:23 +01:00
chore(deps): Upgrade to Django 4.2 (#18653)
* Upgrade dependencies * Fix middleware error Among https://docs.djangoproject.com/en/4.2/releases/4.0/#features-removed-in-4-0 * Upgrade psycopg We need to be on >= 3.1.8 Locally there is an additional problem that somehow psycopg2 seemingly overshadows psycopg, making it appear that 3.1 works. Had to install pip install "psycopg[binary,pool]==3.1.2" to recreate the problem. * Go to Django 4.1 because of problems with psycopg3 We use custom SQL that somehow doesn't get formatted in the right way using server or client side cursors. * Update query snapshots * Update query snapshots * Update query snapshots * Update query snapshots * Switch TaggedItem tests to assert ValidationError Because full_clean validates since Django 4.1, see https://docs.djangoproject.com/en/4.2/releases/4.1/#validation-of-constraints * Remove type: ignore comments Come up as error: Unused "type: ignore" comment * Update query snapshots * Figure out psycopg problem and try Django 4.2 again * Update query snapshots * Fix other IN errors * Fix getting status * Fix psycopg3 issues * Fix psycopg issues * Update query snapshots * Update query snapshots * Update query snapshots * Update query snapshots * Update deps * Update query snapshots * Update query snapshots * Update query snapshots * Update query snapshots * Fix more tests * Adjust baseline * Remove sqlcommenter (should be PostgresQL only anyways) * Fix file * Update query snapshots * Update query snapshots * Update query snapshots * Fix queries * Fix query * Revert * Update requirements.in * Remove restore-virtualenv Because not maintained anymore * Revert "Remove restore-virtualenv" This reverts commit c2a7ef8a1e293cc6bfd9e213f564a812a7831063. * mypy * Adjust num queries * Adjust num queries * Adjust num queries * Update query snapshots * Add to updated_fields --------- Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Neil Kakkar <neilkakkar@gmail.com>
This commit is contained in:
@@ -27,7 +27,7 @@
|
||||
"posthog_user"."events_column_config"
|
||||
FROM "posthog_user"
|
||||
WHERE "posthog_user"."id" = 2
|
||||
LIMIT 21 /**/
|
||||
LIMIT 21
|
||||
'''
|
||||
# ---
|
||||
# name: TestOrganizationResourceAccessAPI.test_list_organization_resource_access_is_not_nplus1.1
|
||||
@@ -53,7 +53,7 @@
|
||||
"posthog_organization"."available_features"
|
||||
FROM "posthog_organization"
|
||||
WHERE "posthog_organization"."id" = '00000000-0000-0000-0000-000000000000'::uuid
|
||||
LIMIT 21 /*controller='organization_resource_access-list',route='api/organizations/%28%3FP%3Cparent_lookup_organization_id%3E%5B%5E/.%5D%2B%29/resource_access/%3F%24'*/
|
||||
LIMIT 21
|
||||
'''
|
||||
# ---
|
||||
# name: TestOrganizationResourceAccessAPI.test_list_organization_resource_access_is_not_nplus1.10
|
||||
@@ -79,7 +79,7 @@
|
||||
"posthog_organization"."available_features"
|
||||
FROM "posthog_organization"
|
||||
WHERE "posthog_organization"."id" = '00000000-0000-0000-0000-000000000000'::uuid
|
||||
LIMIT 21 /*controller='organization_resource_access-list',route='api/organizations/%28%3FP%3Cparent_lookup_organization_id%3E%5B%5E/.%5D%2B%29/resource_access/%3F%24'*/
|
||||
LIMIT 21
|
||||
'''
|
||||
# ---
|
||||
# name: TestOrganizationResourceAccessAPI.test_list_organization_resource_access_is_not_nplus1.11
|
||||
@@ -88,7 +88,7 @@
|
||||
FROM "posthog_organizationmembership"
|
||||
WHERE ("posthog_organizationmembership"."organization_id" = '00000000-0000-0000-0000-000000000000'::uuid
|
||||
AND "posthog_organizationmembership"."user_id" = 2)
|
||||
LIMIT 1 /*controller='organization_resource_access-list',route='api/organizations/%28%3FP%3Cparent_lookup_organization_id%3E%5B%5E/.%5D%2B%29/resource_access/%3F%24'*/
|
||||
LIMIT 1
|
||||
'''
|
||||
# ---
|
||||
# name: TestOrganizationResourceAccessAPI.test_list_organization_resource_access_is_not_nplus1.12
|
||||
@@ -102,14 +102,14 @@
|
||||
FROM "posthog_organizationmembership"
|
||||
WHERE ("posthog_organizationmembership"."organization_id" = '00000000-0000-0000-0000-000000000000'::uuid
|
||||
AND "posthog_organizationmembership"."user_id" = 2)
|
||||
LIMIT 21 /*controller='organization_resource_access-list',route='api/organizations/%28%3FP%3Cparent_lookup_organization_id%3E%5B%5E/.%5D%2B%29/resource_access/%3F%24'*/
|
||||
LIMIT 21
|
||||
'''
|
||||
# ---
|
||||
# name: TestOrganizationResourceAccessAPI.test_list_organization_resource_access_is_not_nplus1.13
|
||||
'''
|
||||
SELECT COUNT(*) AS "__count"
|
||||
FROM "ee_organizationresourceaccess"
|
||||
WHERE "ee_organizationresourceaccess"."organization_id" = '00000000-0000-0000-0000-000000000000'::uuid /*controller='organization_resource_access-list',route='api/organizations/%28%3FP%3Cparent_lookup_organization_id%3E%5B%5E/.%5D%2B%29/resource_access/%3F%24'*/
|
||||
WHERE "ee_organizationresourceaccess"."organization_id" = '00000000-0000-0000-0000-000000000000'::uuid
|
||||
'''
|
||||
# ---
|
||||
# name: TestOrganizationResourceAccessAPI.test_list_organization_resource_access_is_not_nplus1.14
|
||||
@@ -123,7 +123,7 @@
|
||||
"ee_organizationresourceaccess"."updated_at"
|
||||
FROM "ee_organizationresourceaccess"
|
||||
WHERE "ee_organizationresourceaccess"."organization_id" = '00000000-0000-0000-0000-000000000000'::uuid
|
||||
LIMIT 100 /*controller='organization_resource_access-list',route='api/organizations/%28%3FP%3Cparent_lookup_organization_id%3E%5B%5E/.%5D%2B%29/resource_access/%3F%24'*/
|
||||
LIMIT 100
|
||||
'''
|
||||
# ---
|
||||
# name: TestOrganizationResourceAccessAPI.test_list_organization_resource_access_is_not_nplus1.2
|
||||
@@ -149,7 +149,7 @@
|
||||
"posthog_organization"."available_features"
|
||||
FROM "posthog_organization"
|
||||
WHERE "posthog_organization"."id" = '00000000-0000-0000-0000-000000000000'::uuid
|
||||
LIMIT 21 /*controller='organization_resource_access-list',route='api/organizations/%28%3FP%3Cparent_lookup_organization_id%3E%5B%5E/.%5D%2B%29/resource_access/%3F%24'*/
|
||||
LIMIT 21
|
||||
'''
|
||||
# ---
|
||||
# name: TestOrganizationResourceAccessAPI.test_list_organization_resource_access_is_not_nplus1.3
|
||||
@@ -158,7 +158,7 @@
|
||||
FROM "posthog_organizationmembership"
|
||||
WHERE ("posthog_organizationmembership"."organization_id" = '00000000-0000-0000-0000-000000000000'::uuid
|
||||
AND "posthog_organizationmembership"."user_id" = 2)
|
||||
LIMIT 1 /*controller='organization_resource_access-list',route='api/organizations/%28%3FP%3Cparent_lookup_organization_id%3E%5B%5E/.%5D%2B%29/resource_access/%3F%24'*/
|
||||
LIMIT 1
|
||||
'''
|
||||
# ---
|
||||
# name: TestOrganizationResourceAccessAPI.test_list_organization_resource_access_is_not_nplus1.4
|
||||
@@ -172,7 +172,7 @@
|
||||
FROM "posthog_organizationmembership"
|
||||
WHERE ("posthog_organizationmembership"."organization_id" = '00000000-0000-0000-0000-000000000000'::uuid
|
||||
AND "posthog_organizationmembership"."user_id" = 2)
|
||||
LIMIT 21 /*controller='organization_resource_access-list',route='api/organizations/%28%3FP%3Cparent_lookup_organization_id%3E%5B%5E/.%5D%2B%29/resource_access/%3F%24'*/
|
||||
LIMIT 21
|
||||
'''
|
||||
# ---
|
||||
# name: TestOrganizationResourceAccessAPI.test_list_organization_resource_access_is_not_nplus1.5
|
||||
@@ -183,14 +183,14 @@
|
||||
FROM "posthog_instancesetting"
|
||||
WHERE "posthog_instancesetting"."key" = 'constance:posthog:RATE_LIMIT_ENABLED'
|
||||
ORDER BY "posthog_instancesetting"."id" ASC
|
||||
LIMIT 1 /*controller='organization_resource_access-list',route='api/organizations/%28%3FP%3Cparent_lookup_organization_id%3E%5B%5E/.%5D%2B%29/resource_access/%3F%24'*/
|
||||
LIMIT 1
|
||||
'''
|
||||
# ---
|
||||
# name: TestOrganizationResourceAccessAPI.test_list_organization_resource_access_is_not_nplus1.6
|
||||
'''
|
||||
SELECT COUNT(*) AS "__count"
|
||||
FROM "ee_organizationresourceaccess"
|
||||
WHERE "ee_organizationresourceaccess"."organization_id" = '00000000-0000-0000-0000-000000000000'::uuid /*controller='organization_resource_access-list',route='api/organizations/%28%3FP%3Cparent_lookup_organization_id%3E%5B%5E/.%5D%2B%29/resource_access/%3F%24'*/
|
||||
WHERE "ee_organizationresourceaccess"."organization_id" = '00000000-0000-0000-0000-000000000000'::uuid
|
||||
'''
|
||||
# ---
|
||||
# name: TestOrganizationResourceAccessAPI.test_list_organization_resource_access_is_not_nplus1.7
|
||||
@@ -204,7 +204,7 @@
|
||||
"ee_organizationresourceaccess"."updated_at"
|
||||
FROM "ee_organizationresourceaccess"
|
||||
WHERE "ee_organizationresourceaccess"."organization_id" = '00000000-0000-0000-0000-000000000000'::uuid
|
||||
LIMIT 100 /*controller='organization_resource_access-list',route='api/organizations/%28%3FP%3Cparent_lookup_organization_id%3E%5B%5E/.%5D%2B%29/resource_access/%3F%24'*/
|
||||
LIMIT 100
|
||||
'''
|
||||
# ---
|
||||
# name: TestOrganizationResourceAccessAPI.test_list_organization_resource_access_is_not_nplus1.8
|
||||
@@ -235,7 +235,7 @@
|
||||
"posthog_user"."events_column_config"
|
||||
FROM "posthog_user"
|
||||
WHERE "posthog_user"."id" = 2
|
||||
LIMIT 21 /**/
|
||||
LIMIT 21
|
||||
'''
|
||||
# ---
|
||||
# name: TestOrganizationResourceAccessAPI.test_list_organization_resource_access_is_not_nplus1.9
|
||||
@@ -261,6 +261,6 @@
|
||||
"posthog_organization"."available_features"
|
||||
FROM "posthog_organization"
|
||||
WHERE "posthog_organization"."id" = '00000000-0000-0000-0000-000000000000'::uuid
|
||||
LIMIT 21 /*controller='organization_resource_access-list',route='api/organizations/%28%3FP%3Cparent_lookup_organization_id%3E%5B%5E/.%5D%2B%29/resource_access/%3F%24'*/
|
||||
LIMIT 21
|
||||
'''
|
||||
# ---
|
||||
|
||||
@@ -94,7 +94,7 @@ class InstanceStatusViewSet(viewsets.ViewSet):
|
||||
}
|
||||
)
|
||||
if postgres_alive:
|
||||
postgres_version = connection.cursor().connection.server_version
|
||||
postgres_version = connection.cursor().connection.info.server_version
|
||||
metrics.append(
|
||||
{
|
||||
"key": "pg_version",
|
||||
|
||||
@@ -131,8 +131,8 @@ class QueryContext:
|
||||
if properties_to_filter:
|
||||
return dataclasses.replace(
|
||||
self,
|
||||
name_filter="AND name IN %(names)s",
|
||||
params={**self.params, "names": tuple(properties_to_filter.split(","))},
|
||||
name_filter="AND name = ANY(%(names)s)",
|
||||
params={**self.params, "names": properties_to_filter.split(",")},
|
||||
)
|
||||
else:
|
||||
return self
|
||||
@@ -141,7 +141,7 @@ class QueryContext:
|
||||
if is_numerical:
|
||||
return dataclasses.replace(
|
||||
self,
|
||||
numerical_filter="AND is_numerical = true AND name NOT IN ('distinct_id', 'timestamp')",
|
||||
numerical_filter="AND is_numerical = true AND NOT name = ANY(ARRAY['distinct_id', 'timestamp'])",
|
||||
)
|
||||
else:
|
||||
return self
|
||||
@@ -207,7 +207,7 @@ class QueryContext:
|
||||
|
||||
if event_names and len(event_names) > 0:
|
||||
event_property_field = f"{self.posthog_eventproperty_table_join_alias}.property is not null"
|
||||
event_name_join_filter = "AND event in %(event_names)s"
|
||||
event_name_join_filter = "AND event = ANY(%(event_names)s)"
|
||||
|
||||
return dataclasses.replace(
|
||||
self,
|
||||
@@ -216,7 +216,7 @@ class QueryContext:
|
||||
event_name_join_filter=event_name_join_filter,
|
||||
event_name_filter=event_name_filter,
|
||||
event_property_join_type="INNER JOIN" if filter_by_event_names else "LEFT JOIN",
|
||||
params={**self.params, "event_names": tuple(event_names or [])},
|
||||
params={**self.params, "event_names": event_names or []},
|
||||
)
|
||||
|
||||
def with_search(self, search_query: str, search_kwargs: Dict) -> "QueryContext":
|
||||
@@ -230,7 +230,7 @@ class QueryContext:
|
||||
if excluded_properties:
|
||||
excluded_properties = json.loads(excluded_properties)
|
||||
|
||||
excluded_list = tuple(
|
||||
excluded_list = list(
|
||||
set.union(
|
||||
set(excluded_properties or []),
|
||||
EVENTS_HIDDEN_PROPERTY_DEFINITIONS if type == "event" else [],
|
||||
@@ -239,7 +239,7 @@ class QueryContext:
|
||||
return dataclasses.replace(
|
||||
self,
|
||||
excluded_properties_filter=(
|
||||
f"AND {self.property_definition_table}.name NOT IN %(excluded_properties)s"
|
||||
f"AND NOT {self.property_definition_table}.name = ANY(%(excluded_properties)s)"
|
||||
if len(excluded_list) > 0
|
||||
else ""
|
||||
),
|
||||
@@ -350,7 +350,7 @@ def add_name_alias_to_search_query(search_term: str):
|
||||
|
||||
if not entries:
|
||||
return ""
|
||||
return f"""OR name IN ({", ".join(entries)})"""
|
||||
return f"""OR name = ANY(ARRAY[{", ".join(entries)}])"""
|
||||
|
||||
|
||||
def add_latest_means_not_initial(search_term: str):
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
"posthog_user"."events_column_config"
|
||||
FROM "posthog_user"
|
||||
WHERE "posthog_user"."id" = 2
|
||||
LIMIT 21 /**/
|
||||
LIMIT 21
|
||||
'''
|
||||
# ---
|
||||
# name: TestActionApi.test_listing_actions_is_not_nplus1.1
|
||||
@@ -80,7 +80,7 @@
|
||||
"posthog_team"."external_data_workspace_last_synced_at"
|
||||
FROM "posthog_team"
|
||||
WHERE "posthog_team"."id" = 2
|
||||
LIMIT 21 /*controller='project_actions-list',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/actions/%3F%24'*/
|
||||
LIMIT 21
|
||||
'''
|
||||
# ---
|
||||
# name: TestActionApi.test_listing_actions_is_not_nplus1.10
|
||||
@@ -134,7 +134,7 @@
|
||||
GROUP BY "posthog_action"."id",
|
||||
"posthog_user"."id"
|
||||
ORDER BY "posthog_action"."last_calculated_at" DESC,
|
||||
"posthog_action"."name" ASC /*controller='project_actions-list',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/actions/%3F%24'*/
|
||||
"posthog_action"."name" ASC
|
||||
'''
|
||||
# ---
|
||||
# name: TestActionApi.test_listing_actions_is_not_nplus1.11
|
||||
@@ -158,7 +158,7 @@
|
||||
3,
|
||||
4,
|
||||
5 /* ... */)
|
||||
ORDER BY "posthog_actionstep"."id" ASC /*controller='project_actions-list',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/actions/%3F%24'*/
|
||||
ORDER BY "posthog_actionstep"."id" ASC
|
||||
'''
|
||||
# ---
|
||||
# name: TestActionApi.test_listing_actions_is_not_nplus1.12
|
||||
@@ -189,7 +189,7 @@
|
||||
"posthog_user"."events_column_config"
|
||||
FROM "posthog_user"
|
||||
WHERE "posthog_user"."id" = 2
|
||||
LIMIT 21 /**/
|
||||
LIMIT 21
|
||||
'''
|
||||
# ---
|
||||
# name: TestActionApi.test_listing_actions_is_not_nplus1.13
|
||||
@@ -242,7 +242,7 @@
|
||||
"posthog_team"."external_data_workspace_last_synced_at"
|
||||
FROM "posthog_team"
|
||||
WHERE "posthog_team"."id" = 2
|
||||
LIMIT 21 /*controller='project_actions-list',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/actions/%3F%24'*/
|
||||
LIMIT 21
|
||||
'''
|
||||
# ---
|
||||
# name: TestActionApi.test_listing_actions_is_not_nplus1.14
|
||||
@@ -274,7 +274,7 @@
|
||||
"posthog_organization"."available_features"
|
||||
FROM "posthog_organizationmembership"
|
||||
INNER JOIN "posthog_organization" ON ("posthog_organizationmembership"."organization_id" = "posthog_organization"."id")
|
||||
WHERE "posthog_organizationmembership"."user_id" = 2 /*controller='project_actions-list',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/actions/%3F%24'*/
|
||||
WHERE "posthog_organizationmembership"."user_id" = 2
|
||||
'''
|
||||
# ---
|
||||
# name: TestActionApi.test_listing_actions_is_not_nplus1.15
|
||||
@@ -300,7 +300,7 @@
|
||||
"posthog_organization"."available_features"
|
||||
FROM "posthog_organization"
|
||||
WHERE "posthog_organization"."id" = '00000000-0000-0000-0000-000000000000'::uuid
|
||||
LIMIT 21 /*controller='project_actions-list',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/actions/%3F%24'*/
|
||||
LIMIT 21
|
||||
'''
|
||||
# ---
|
||||
# name: TestActionApi.test_listing_actions_is_not_nplus1.16
|
||||
@@ -354,7 +354,7 @@
|
||||
GROUP BY "posthog_action"."id",
|
||||
"posthog_user"."id"
|
||||
ORDER BY "posthog_action"."last_calculated_at" DESC,
|
||||
"posthog_action"."name" ASC /*controller='project_actions-list',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/actions/%3F%24'*/
|
||||
"posthog_action"."name" ASC
|
||||
'''
|
||||
# ---
|
||||
# name: TestActionApi.test_listing_actions_is_not_nplus1.17
|
||||
@@ -378,7 +378,7 @@
|
||||
3,
|
||||
4,
|
||||
5 /* ... */)
|
||||
ORDER BY "posthog_actionstep"."id" ASC /*controller='project_actions-list',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/actions/%3F%24'*/
|
||||
ORDER BY "posthog_actionstep"."id" ASC
|
||||
'''
|
||||
# ---
|
||||
# name: TestActionApi.test_listing_actions_is_not_nplus1.2
|
||||
@@ -410,7 +410,7 @@
|
||||
"posthog_organization"."available_features"
|
||||
FROM "posthog_organizationmembership"
|
||||
INNER JOIN "posthog_organization" ON ("posthog_organizationmembership"."organization_id" = "posthog_organization"."id")
|
||||
WHERE "posthog_organizationmembership"."user_id" = 2 /*controller='project_actions-list',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/actions/%3F%24'*/
|
||||
WHERE "posthog_organizationmembership"."user_id" = 2
|
||||
'''
|
||||
# ---
|
||||
# name: TestActionApi.test_listing_actions_is_not_nplus1.3
|
||||
@@ -421,7 +421,7 @@
|
||||
FROM "posthog_instancesetting"
|
||||
WHERE "posthog_instancesetting"."key" = 'constance:posthog:RATE_LIMIT_ENABLED'
|
||||
ORDER BY "posthog_instancesetting"."id" ASC
|
||||
LIMIT 1 /*controller='project_actions-list',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/actions/%3F%24'*/
|
||||
LIMIT 1
|
||||
'''
|
||||
# ---
|
||||
# name: TestActionApi.test_listing_actions_is_not_nplus1.4
|
||||
@@ -447,7 +447,7 @@
|
||||
"posthog_organization"."available_features"
|
||||
FROM "posthog_organization"
|
||||
WHERE "posthog_organization"."id" = '00000000-0000-0000-0000-000000000000'::uuid
|
||||
LIMIT 21 /*controller='project_actions-list',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/actions/%3F%24'*/
|
||||
LIMIT 21
|
||||
'''
|
||||
# ---
|
||||
# name: TestActionApi.test_listing_actions_is_not_nplus1.5
|
||||
@@ -501,7 +501,7 @@
|
||||
GROUP BY "posthog_action"."id",
|
||||
"posthog_user"."id"
|
||||
ORDER BY "posthog_action"."last_calculated_at" DESC,
|
||||
"posthog_action"."name" ASC /*controller='project_actions-list',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/actions/%3F%24'*/
|
||||
"posthog_action"."name" ASC
|
||||
'''
|
||||
# ---
|
||||
# name: TestActionApi.test_listing_actions_is_not_nplus1.6
|
||||
@@ -532,7 +532,7 @@
|
||||
"posthog_user"."events_column_config"
|
||||
FROM "posthog_user"
|
||||
WHERE "posthog_user"."id" = 2
|
||||
LIMIT 21 /**/
|
||||
LIMIT 21
|
||||
'''
|
||||
# ---
|
||||
# name: TestActionApi.test_listing_actions_is_not_nplus1.7
|
||||
@@ -585,7 +585,7 @@
|
||||
"posthog_team"."external_data_workspace_last_synced_at"
|
||||
FROM "posthog_team"
|
||||
WHERE "posthog_team"."id" = 2
|
||||
LIMIT 21 /*controller='project_actions-list',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/actions/%3F%24'*/
|
||||
LIMIT 21
|
||||
'''
|
||||
# ---
|
||||
# name: TestActionApi.test_listing_actions_is_not_nplus1.8
|
||||
@@ -617,7 +617,7 @@
|
||||
"posthog_organization"."available_features"
|
||||
FROM "posthog_organizationmembership"
|
||||
INNER JOIN "posthog_organization" ON ("posthog_organizationmembership"."organization_id" = "posthog_organization"."id")
|
||||
WHERE "posthog_organizationmembership"."user_id" = 2 /*controller='project_actions-list',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/actions/%3F%24'*/
|
||||
WHERE "posthog_organizationmembership"."user_id" = 2
|
||||
'''
|
||||
# ---
|
||||
# name: TestActionApi.test_listing_actions_is_not_nplus1.9
|
||||
@@ -643,6 +643,6 @@
|
||||
"posthog_organization"."available_features"
|
||||
FROM "posthog_organization"
|
||||
WHERE "posthog_organization"."id" = '00000000-0000-0000-0000-000000000000'::uuid
|
||||
LIMIT 21 /*controller='project_actions-list',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/actions/%3F%24'*/
|
||||
LIMIT 21
|
||||
'''
|
||||
# ---
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
"posthog_user"."events_column_config"
|
||||
FROM "posthog_user"
|
||||
WHERE "posthog_user"."id" = 2
|
||||
LIMIT 21 /**/
|
||||
LIMIT 21
|
||||
'''
|
||||
# ---
|
||||
# name: TestAnnotation.test_retrieving_annotation_is_not_n_plus_1.1
|
||||
@@ -80,7 +80,7 @@
|
||||
"posthog_team"."external_data_workspace_last_synced_at"
|
||||
FROM "posthog_team"
|
||||
WHERE "posthog_team"."id" = 2
|
||||
LIMIT 21 /*controller='project_annotations-list',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/annotations/%3F%24'*/
|
||||
LIMIT 21
|
||||
'''
|
||||
# ---
|
||||
# name: TestAnnotation.test_retrieving_annotation_is_not_n_plus_1.10
|
||||
@@ -111,7 +111,7 @@
|
||||
"posthog_user"."events_column_config"
|
||||
FROM "posthog_user"
|
||||
WHERE "posthog_user"."id" = 2
|
||||
LIMIT 21 /**/
|
||||
LIMIT 21
|
||||
'''
|
||||
# ---
|
||||
# name: TestAnnotation.test_retrieving_annotation_is_not_n_plus_1.11
|
||||
@@ -164,7 +164,7 @@
|
||||
"posthog_team"."external_data_workspace_last_synced_at"
|
||||
FROM "posthog_team"
|
||||
WHERE "posthog_team"."id" = 2
|
||||
LIMIT 21 /*controller='project_annotations-list',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/annotations/%3F%24'*/
|
||||
LIMIT 21
|
||||
'''
|
||||
# ---
|
||||
# name: TestAnnotation.test_retrieving_annotation_is_not_n_plus_1.12
|
||||
@@ -196,7 +196,7 @@
|
||||
"posthog_organization"."available_features"
|
||||
FROM "posthog_organizationmembership"
|
||||
INNER JOIN "posthog_organization" ON ("posthog_organizationmembership"."organization_id" = "posthog_organization"."id")
|
||||
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'*/
|
||||
WHERE "posthog_organizationmembership"."user_id" = 2
|
||||
'''
|
||||
# ---
|
||||
# name: TestAnnotation.test_retrieving_annotation_is_not_n_plus_1.13
|
||||
@@ -206,7 +206,7 @@
|
||||
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")
|
||||
'''
|
||||
# ---
|
||||
# name: TestAnnotation.test_retrieving_annotation_is_not_n_plus_1.14
|
||||
@@ -285,7 +285,7 @@
|
||||
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'*/
|
||||
LIMIT 1000
|
||||
'''
|
||||
# ---
|
||||
# name: TestAnnotation.test_retrieving_annotation_is_not_n_plus_1.15
|
||||
@@ -396,7 +396,7 @@
|
||||
"posthog_organization"."available_features"
|
||||
FROM "posthog_organizationmembership"
|
||||
INNER JOIN "posthog_organization" ON ("posthog_organizationmembership"."organization_id" = "posthog_organization"."id")
|
||||
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'*/
|
||||
WHERE "posthog_organizationmembership"."user_id" = 2
|
||||
'''
|
||||
# ---
|
||||
# name: TestAnnotation.test_retrieving_annotation_is_not_n_plus_1.3
|
||||
@@ -407,7 +407,7 @@
|
||||
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'*/
|
||||
LIMIT 1
|
||||
'''
|
||||
# ---
|
||||
# name: TestAnnotation.test_retrieving_annotation_is_not_n_plus_1.4
|
||||
@@ -417,7 +417,7 @@
|
||||
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")
|
||||
'''
|
||||
# ---
|
||||
# name: TestAnnotation.test_retrieving_annotation_is_not_n_plus_1.5
|
||||
@@ -448,7 +448,7 @@
|
||||
"posthog_user"."events_column_config"
|
||||
FROM "posthog_user"
|
||||
WHERE "posthog_user"."id" = 2
|
||||
LIMIT 21 /**/
|
||||
LIMIT 21
|
||||
'''
|
||||
# ---
|
||||
# name: TestAnnotation.test_retrieving_annotation_is_not_n_plus_1.6
|
||||
@@ -501,7 +501,7 @@
|
||||
"posthog_team"."external_data_workspace_last_synced_at"
|
||||
FROM "posthog_team"
|
||||
WHERE "posthog_team"."id" = 2
|
||||
LIMIT 21 /*controller='project_annotations-list',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/annotations/%3F%24'*/
|
||||
LIMIT 21
|
||||
'''
|
||||
# ---
|
||||
# name: TestAnnotation.test_retrieving_annotation_is_not_n_plus_1.7
|
||||
@@ -533,7 +533,7 @@
|
||||
"posthog_organization"."available_features"
|
||||
FROM "posthog_organizationmembership"
|
||||
INNER JOIN "posthog_organization" ON ("posthog_organizationmembership"."organization_id" = "posthog_organization"."id")
|
||||
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'*/
|
||||
WHERE "posthog_organizationmembership"."user_id" = 2
|
||||
'''
|
||||
# ---
|
||||
# name: TestAnnotation.test_retrieving_annotation_is_not_n_plus_1.8
|
||||
@@ -543,7 +543,7 @@
|
||||
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")
|
||||
'''
|
||||
# ---
|
||||
# name: TestAnnotation.test_retrieving_annotation_is_not_n_plus_1.9
|
||||
@@ -622,6 +622,6 @@
|
||||
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'*/
|
||||
LIMIT 1000
|
||||
'''
|
||||
# ---
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
"posthog_user"."events_column_config"
|
||||
FROM "posthog_user"
|
||||
WHERE "posthog_user"."id" = 2
|
||||
LIMIT 21 /**/
|
||||
LIMIT 21
|
||||
'''
|
||||
# ---
|
||||
# name: TestDecide.test_decide_doesnt_error_out_when_database_is_down.1
|
||||
@@ -90,7 +90,7 @@
|
||||
"posthog_team"."external_data_workspace_last_synced_at"
|
||||
FROM "posthog_team"
|
||||
WHERE "posthog_team"."id" = 2
|
||||
LIMIT 21 /*controller='team-detail',route='api/projects/%28%3FP%3Cid%3E%5B%5E/.%5D%2B%29/%3F%24'*/
|
||||
LIMIT 21
|
||||
'''
|
||||
# ---
|
||||
# name: TestDecide.test_decide_doesnt_error_out_when_database_is_down.10
|
||||
@@ -138,7 +138,7 @@
|
||||
"posthog_organization"."available_features"
|
||||
FROM "posthog_organizationmembership"
|
||||
INNER JOIN "posthog_organization" ON ("posthog_organizationmembership"."organization_id" = "posthog_organization"."id")
|
||||
WHERE "posthog_organizationmembership"."user_id" = 2 /*controller='team-detail',route='api/projects/%28%3FP%3Cid%3E%5B%5E/.%5D%2B%29/%3F%24'*/
|
||||
WHERE "posthog_organizationmembership"."user_id" = 2
|
||||
'''
|
||||
# ---
|
||||
# name: TestDecide.test_decide_doesnt_error_out_when_database_is_down.3
|
||||
@@ -146,7 +146,7 @@
|
||||
SELECT 1 AS "a"
|
||||
FROM "posthog_grouptypemapping"
|
||||
WHERE "posthog_grouptypemapping"."team_id" = 2
|
||||
LIMIT 1 /*controller='team-detail',route='api/projects/%28%3FP%3Cid%3E%5B%5E/.%5D%2B%29/%3F%24'*/
|
||||
LIMIT 1
|
||||
'''
|
||||
# ---
|
||||
# name: TestDecide.test_decide_doesnt_error_out_when_database_is_down.4
|
||||
@@ -157,7 +157,7 @@
|
||||
FROM "posthog_instancesetting"
|
||||
WHERE "posthog_instancesetting"."key" = 'constance:posthog:PERSON_ON_EVENTS_V2_ENABLED'
|
||||
ORDER BY "posthog_instancesetting"."id" ASC
|
||||
LIMIT 1 /*controller='team-detail',route='api/projects/%28%3FP%3Cid%3E%5B%5E/.%5D%2B%29/%3F%24'*/
|
||||
LIMIT 1
|
||||
'''
|
||||
# ---
|
||||
# name: TestDecide.test_decide_doesnt_error_out_when_database_is_down.5
|
||||
@@ -168,7 +168,7 @@
|
||||
FROM "posthog_instancesetting"
|
||||
WHERE "posthog_instancesetting"."key" = 'constance:posthog:PERSON_ON_EVENTS_ENABLED'
|
||||
ORDER BY "posthog_instancesetting"."id" ASC
|
||||
LIMIT 1 /*controller='team-detail',route='api/projects/%28%3FP%3Cid%3E%5B%5E/.%5D%2B%29/%3F%24'*/
|
||||
LIMIT 1
|
||||
'''
|
||||
# ---
|
||||
# name: TestDecide.test_decide_doesnt_error_out_when_database_is_down.6
|
||||
@@ -179,7 +179,7 @@
|
||||
FROM "posthog_instancesetting"
|
||||
WHERE "posthog_instancesetting"."key" = 'constance:posthog:GROUPS_ON_EVENTS_ENABLED'
|
||||
ORDER BY "posthog_instancesetting"."id" ASC
|
||||
LIMIT 1 /*controller='team-detail',route='api/projects/%28%3FP%3Cid%3E%5B%5E/.%5D%2B%29/%3F%24'*/
|
||||
LIMIT 1
|
||||
'''
|
||||
# ---
|
||||
# name: TestDecide.test_decide_doesnt_error_out_when_database_is_down.7
|
||||
@@ -554,9 +554,9 @@
|
||||
# ---
|
||||
# name: TestDecide.test_flag_with_regular_cohorts.4
|
||||
'''
|
||||
SELECT (("posthog_person"."properties" -> '$some_prop_1') = '"something_1"'
|
||||
SELECT (("posthog_person"."properties" -> '$some_prop_1') = '"something_1"'::jsonb
|
||||
AND "posthog_person"."properties" ? '$some_prop_1'
|
||||
AND NOT (("posthog_person"."properties" -> '$some_prop_1') = 'null')) AS "flag_X_condition_0"
|
||||
AND NOT (("posthog_person"."properties" -> '$some_prop_1') = 'null'::jsonb)) AS "flag_X_condition_0"
|
||||
FROM "posthog_person"
|
||||
INNER JOIN "posthog_persondistinctid" ON ("posthog_person"."id" = "posthog_persondistinctid"."person_id")
|
||||
WHERE ("posthog_persondistinctid"."distinct_id" = 'example_id_1'
|
||||
@@ -590,9 +590,9 @@
|
||||
# ---
|
||||
# name: TestDecide.test_flag_with_regular_cohorts.6
|
||||
'''
|
||||
SELECT (("posthog_person"."properties" -> '$some_prop_1') = '"something_1"'
|
||||
SELECT (("posthog_person"."properties" -> '$some_prop_1') = '"something_1"'::jsonb
|
||||
AND "posthog_person"."properties" ? '$some_prop_1'
|
||||
AND NOT (("posthog_person"."properties" -> '$some_prop_1') = 'null')) AS "flag_X_condition_0"
|
||||
AND NOT (("posthog_person"."properties" -> '$some_prop_1') = 'null'::jsonb)) AS "flag_X_condition_0"
|
||||
FROM "posthog_person"
|
||||
INNER JOIN "posthog_persondistinctid" ON ("posthog_person"."id" = "posthog_persondistinctid"."person_id")
|
||||
WHERE ("posthog_persondistinctid"."distinct_id" = 'another_id'
|
||||
|
||||
@@ -186,7 +186,7 @@
|
||||
"posthog_team"."external_data_workspace_last_synced_at"
|
||||
FROM "posthog_team"
|
||||
WHERE "posthog_team"."api_token" = 'token123'
|
||||
LIMIT 21 /*controller='posthog.api.early_access_feature.early_access_features',route='%5Eapi/early_access_features/%3F%28%3F%3A%5B%3F%23%5D.%2A%29%3F%24'*/
|
||||
LIMIT 21
|
||||
'''
|
||||
# ---
|
||||
# name: TestPreviewList.test_early_access_features.5
|
||||
@@ -217,6 +217,6 @@
|
||||
FROM "posthog_earlyaccessfeature"
|
||||
LEFT OUTER JOIN "posthog_featureflag" ON ("posthog_earlyaccessfeature"."feature_flag_id" = "posthog_featureflag"."id")
|
||||
WHERE ("posthog_earlyaccessfeature"."stage" = 'beta'
|
||||
AND "posthog_earlyaccessfeature"."team_id" = 2) /*controller='posthog.api.early_access_feature.early_access_features',route='%5Eapi/early_access_features/%3F%28%3F%3A%5B%3F%23%5D.%2A%29%3F%24'*/
|
||||
AND "posthog_earlyaccessfeature"."team_id" = 2)
|
||||
'''
|
||||
# ---
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
"posthog_user"."events_column_config"
|
||||
FROM "posthog_user"
|
||||
WHERE "posthog_user"."id" = 2
|
||||
LIMIT 21 /**/
|
||||
LIMIT 21
|
||||
'''
|
||||
# ---
|
||||
# name: TestElement.test_element_stats_postgres_queries_are_as_expected.1
|
||||
@@ -87,7 +87,7 @@
|
||||
"posthog_team"."external_data_workspace_last_synced_at"
|
||||
FROM "posthog_team"
|
||||
WHERE "posthog_team"."id" = 2
|
||||
LIMIT 21 /*controller='element-stats',route='api/element/stats/%3F%24'*/
|
||||
LIMIT 21
|
||||
'''
|
||||
# ---
|
||||
# name: TestElement.test_element_stats_postgres_queries_are_as_expected.2
|
||||
@@ -119,7 +119,7 @@
|
||||
"posthog_organization"."available_features"
|
||||
FROM "posthog_organizationmembership"
|
||||
INNER JOIN "posthog_organization" ON ("posthog_organizationmembership"."organization_id" = "posthog_organization"."id")
|
||||
WHERE "posthog_organizationmembership"."user_id" = 2 /*controller='element-stats',route='api/element/stats/%3F%24'*/
|
||||
WHERE "posthog_organizationmembership"."user_id" = 2
|
||||
'''
|
||||
# ---
|
||||
# name: TestElement.test_element_stats_postgres_queries_are_as_expected.3
|
||||
@@ -130,7 +130,7 @@
|
||||
FROM "posthog_instancesetting"
|
||||
WHERE "posthog_instancesetting"."key" = 'constance:posthog:RATE_LIMIT_ENABLED'
|
||||
ORDER BY "posthog_instancesetting"."id" ASC
|
||||
LIMIT 1 /*controller='element-stats',route='api/element/stats/%3F%24'*/
|
||||
LIMIT 1
|
||||
'''
|
||||
# ---
|
||||
# name: TestElement.test_element_stats_postgres_queries_are_as_expected.4
|
||||
@@ -141,6 +141,6 @@
|
||||
FROM "posthog_instancesetting"
|
||||
WHERE "posthog_instancesetting"."key" = 'constance:posthog:HEATMAP_SAMPLE_N'
|
||||
ORDER BY "posthog_instancesetting"."id" ASC
|
||||
LIMIT 1 /*controller='element-stats',route='api/element/stats/%3F%24'*/
|
||||
LIMIT 1
|
||||
'''
|
||||
# ---
|
||||
|
||||
@@ -397,9 +397,9 @@
|
||||
"posthog_person"."version"
|
||||
FROM "posthog_person"
|
||||
WHERE ("posthog_person"."team_id" = 2
|
||||
AND ("posthog_person"."properties" -> 'key') = '"value"'
|
||||
AND ("posthog_person"."properties" -> 'key') = '"value"'::jsonb
|
||||
AND "posthog_person"."properties" ? 'key'
|
||||
AND NOT (("posthog_person"."properties" -> 'key') = 'null'))
|
||||
AND NOT (("posthog_person"."properties" -> 'key') = 'null'::jsonb))
|
||||
ORDER BY "posthog_person"."id" ASC
|
||||
LIMIT 2
|
||||
'''
|
||||
@@ -429,8 +429,8 @@
|
||||
SELECT "posthog_person"."uuid"
|
||||
FROM "posthog_person"
|
||||
WHERE ("posthog_person"."team_id" = 2
|
||||
AND "posthog_person"."uuid" IN ('00000000-0000-0000-0000-000000000000'::uuid,
|
||||
'00000000-0000-0000-0000-000000000001'::uuid /* ... */)
|
||||
AND "posthog_person"."uuid" IN ('00000000000040008000000000000000'::uuid,
|
||||
'00000000000040008000000000000001'::uuid)
|
||||
AND NOT (EXISTS
|
||||
(SELECT 1 AS "a"
|
||||
FROM "posthog_cohortpeople" U1
|
||||
@@ -513,9 +513,9 @@
|
||||
"posthog_person"."version"
|
||||
FROM "posthog_person"
|
||||
WHERE ("posthog_person"."team_id" = 2
|
||||
AND ("posthog_person"."properties" -> 'key') = '"value"'
|
||||
AND ("posthog_person"."properties" -> 'key') = '"value"'::jsonb
|
||||
AND "posthog_person"."properties" ? 'key'
|
||||
AND NOT (("posthog_person"."properties" -> 'key') = 'null'))
|
||||
AND NOT (("posthog_person"."properties" -> 'key') = 'null'::jsonb))
|
||||
ORDER BY "posthog_person"."id" ASC
|
||||
LIMIT 2
|
||||
OFFSET 2
|
||||
@@ -555,9 +555,9 @@
|
||||
"posthog_person"."version"
|
||||
FROM "posthog_person"
|
||||
WHERE ("posthog_person"."team_id" = 2
|
||||
AND ("posthog_person"."properties" -> 'key') = '"value"'
|
||||
AND ("posthog_person"."properties" -> 'key') = '"value"'::jsonb
|
||||
AND "posthog_person"."properties" ? 'key'
|
||||
AND NOT (("posthog_person"."properties" -> 'key') = 'null'))
|
||||
AND NOT (("posthog_person"."properties" -> 'key') = 'null'::jsonb))
|
||||
ORDER BY "posthog_person"."id" ASC
|
||||
LIMIT 2
|
||||
OFFSET 4
|
||||
@@ -568,8 +568,7 @@
|
||||
SELECT "posthog_person"."uuid"
|
||||
FROM "posthog_person"
|
||||
WHERE ("posthog_person"."team_id" = 2
|
||||
AND "posthog_person"."uuid" IN ('00000000-0000-0000-0000-000000000000'::uuid,
|
||||
'00000000-0000-0000-0000-000000000001'::uuid /* ... */)
|
||||
AND "posthog_person"."uuid" IN ('00000000000040008000000000000002'::uuid)
|
||||
AND NOT (EXISTS
|
||||
(SELECT 1 AS "a"
|
||||
FROM "posthog_cohortpeople" U1
|
||||
@@ -631,8 +630,10 @@
|
||||
SELECT "posthog_person"."uuid"
|
||||
FROM "posthog_person"
|
||||
WHERE ("posthog_person"."team_id" = 2
|
||||
AND "posthog_person"."uuid" IN ('00000000-0000-0000-0000-000000000000'::uuid,
|
||||
'00000000-0000-0000-0000-000000000001'::uuid /* ... */)
|
||||
AND "posthog_person"."uuid" IN ('00000000000040008000000000000000'::uuid,
|
||||
'00000000000040008000000000000001'::uuid,
|
||||
'00000000000040008000000000000002'::uuid,
|
||||
'00000000000040008000000000000003'::uuid)
|
||||
AND NOT (EXISTS
|
||||
(SELECT 1 AS "a"
|
||||
FROM "posthog_cohortpeople" U1
|
||||
@@ -739,14 +740,14 @@
|
||||
"posthog_person"."version"
|
||||
FROM "posthog_person"
|
||||
WHERE ("posthog_person"."team_id" = 2
|
||||
AND ((("posthog_person"."properties" -> 'group') = '"none"'
|
||||
AND ((("posthog_person"."properties" -> 'group') = '"none"'::jsonb
|
||||
AND "posthog_person"."properties" ? 'group'
|
||||
AND NOT (("posthog_person"."properties" -> 'group') = 'null'))
|
||||
OR (("posthog_person"."properties" -> 'group2') IN ('1',
|
||||
'2',
|
||||
'3')
|
||||
AND NOT (("posthog_person"."properties" -> 'group') = 'null'::jsonb))
|
||||
OR (("posthog_person"."properties" -> 'group2') IN ('1'::jsonb,
|
||||
'2'::jsonb,
|
||||
'3'::jsonb)
|
||||
AND "posthog_person"."properties" ? 'group2'
|
||||
AND NOT (("posthog_person"."properties" -> 'group2') = 'null'))
|
||||
AND NOT (("posthog_person"."properties" -> 'group2') = 'null'::jsonb))
|
||||
OR EXISTS
|
||||
(SELECT 1 AS "a"
|
||||
FROM "posthog_cohortpeople" U0
|
||||
@@ -754,12 +755,12 @@
|
||||
AND U0."cohort_id" = 2
|
||||
AND U0."person_id" = ("posthog_person"."id"))
|
||||
LIMIT 1)
|
||||
OR (("posthog_person"."properties" -> 'does-not-exist') = '"none"'
|
||||
OR (("posthog_person"."properties" -> 'does-not-exist') = '"none"'::jsonb
|
||||
AND "posthog_person"."properties" ? 'does-not-exist'
|
||||
AND NOT (("posthog_person"."properties" -> 'does-not-exist') = 'null'))
|
||||
OR (("posthog_person"."properties" -> 'key') = '"value"'
|
||||
AND NOT (("posthog_person"."properties" -> 'does-not-exist') = 'null'::jsonb))
|
||||
OR (("posthog_person"."properties" -> 'key') = '"value"'::jsonb
|
||||
AND "posthog_person"."properties" ? 'key'
|
||||
AND NOT (("posthog_person"."properties" -> 'key') = 'null'))))
|
||||
AND NOT (("posthog_person"."properties" -> 'key') = 'null'::jsonb))))
|
||||
ORDER BY "posthog_person"."id" ASC
|
||||
LIMIT 1000
|
||||
'''
|
||||
@@ -874,14 +875,14 @@
|
||||
"posthog_person"."version"
|
||||
FROM "posthog_person"
|
||||
WHERE ("posthog_person"."team_id" = 2
|
||||
AND ((("posthog_person"."properties" -> 'group') = '"none"'
|
||||
AND ((("posthog_person"."properties" -> 'group') = '"none"'::jsonb
|
||||
AND "posthog_person"."properties" ? 'group'
|
||||
AND NOT (("posthog_person"."properties" -> 'group') = 'null'))
|
||||
OR (("posthog_person"."properties" -> 'group2') IN ('1',
|
||||
'2',
|
||||
'3')
|
||||
AND NOT (("posthog_person"."properties" -> 'group') = 'null'::jsonb))
|
||||
OR (("posthog_person"."properties" -> 'group2') IN ('1'::jsonb,
|
||||
'2'::jsonb,
|
||||
'3'::jsonb)
|
||||
AND "posthog_person"."properties" ? 'group2'
|
||||
AND NOT (("posthog_person"."properties" -> 'group2') = 'null'))
|
||||
AND NOT (("posthog_person"."properties" -> 'group2') = 'null'::jsonb))
|
||||
OR EXISTS
|
||||
(SELECT 1 AS "a"
|
||||
FROM "posthog_cohortpeople" U0
|
||||
@@ -889,12 +890,12 @@
|
||||
AND U0."cohort_id" = 2
|
||||
AND U0."person_id" = ("posthog_person"."id"))
|
||||
LIMIT 1)
|
||||
OR (("posthog_person"."properties" -> 'does-not-exist') = '"none"'
|
||||
OR (("posthog_person"."properties" -> 'does-not-exist') = '"none"'::jsonb
|
||||
AND "posthog_person"."properties" ? 'does-not-exist'
|
||||
AND NOT (("posthog_person"."properties" -> 'does-not-exist') = 'null'))
|
||||
OR (("posthog_person"."properties" -> 'key') = '"value"'
|
||||
AND NOT (("posthog_person"."properties" -> 'does-not-exist') = 'null'::jsonb))
|
||||
OR (("posthog_person"."properties" -> 'key') = '"value"'::jsonb
|
||||
AND "posthog_person"."properties" ? 'key'
|
||||
AND NOT (("posthog_person"."properties" -> 'key') = 'null'))))
|
||||
AND NOT (("posthog_person"."properties" -> 'key') = 'null'::jsonb))))
|
||||
ORDER BY "posthog_person"."id" ASC
|
||||
LIMIT 1000
|
||||
OFFSET 1000
|
||||
@@ -993,8 +994,8 @@
|
||||
SELECT "posthog_person"."uuid"
|
||||
FROM "posthog_person"
|
||||
WHERE ("posthog_person"."team_id" = 2
|
||||
AND "posthog_person"."uuid" IN ('00000000-0000-0000-0000-000000000000'::uuid,
|
||||
'00000000-0000-0000-0000-000000000001'::uuid /* ... */)
|
||||
AND "posthog_person"."uuid" IN ('00000000000040008000000000000000'::uuid,
|
||||
'00000000000040008000000000000001'::uuid)
|
||||
AND NOT (EXISTS
|
||||
(SELECT 1 AS "a"
|
||||
FROM "posthog_cohortpeople" U1
|
||||
@@ -1079,7 +1080,7 @@
|
||||
WHERE ("posthog_person"."team_id" = 2
|
||||
AND UPPER(("posthog_person"."properties" ->> 'key')::text) LIKE UPPER('%value%')
|
||||
AND "posthog_person"."properties" ? 'key'
|
||||
AND NOT (("posthog_person"."properties" -> 'key') = 'null'))
|
||||
AND NOT (("posthog_person"."properties" -> 'key') = 'null'::jsonb))
|
||||
ORDER BY "posthog_person"."id" ASC
|
||||
LIMIT 1000
|
||||
'''
|
||||
@@ -1120,7 +1121,7 @@
|
||||
WHERE ("posthog_person"."team_id" = 2
|
||||
AND UPPER(("posthog_person"."properties" ->> 'key')::text) LIKE UPPER('%value%')
|
||||
AND "posthog_person"."properties" ? 'key'
|
||||
AND NOT (("posthog_person"."properties" -> 'key') = 'null'))
|
||||
AND NOT (("posthog_person"."properties" -> 'key') = 'null'::jsonb))
|
||||
ORDER BY "posthog_person"."id" ASC
|
||||
LIMIT 1000
|
||||
OFFSET 1000
|
||||
@@ -1131,8 +1132,7 @@
|
||||
SELECT "posthog_person"."uuid"
|
||||
FROM "posthog_person"
|
||||
WHERE ("posthog_person"."team_id" = 2
|
||||
AND "posthog_person"."uuid" IN ('00000000-0000-0000-0000-000000000000'::uuid,
|
||||
'00000000-0000-0000-0000-000000000001'::uuid /* ... */)
|
||||
AND "posthog_person"."uuid" IN ('00000000000040008000000000000000'::uuid)
|
||||
AND NOT (EXISTS
|
||||
(SELECT 1 AS "a"
|
||||
FROM "posthog_cohortpeople" U1
|
||||
@@ -1330,9 +1330,9 @@
|
||||
"posthog_person"."version"
|
||||
FROM "posthog_person"
|
||||
WHERE ("posthog_person"."team_id" = 2
|
||||
AND ("posthog_person"."properties" -> 'key') = '"value"'
|
||||
AND ("posthog_person"."properties" -> 'key') = '"value"'::jsonb
|
||||
AND "posthog_person"."properties" ? 'key'
|
||||
AND NOT (("posthog_person"."properties" -> 'key') = 'null'))
|
||||
AND NOT (("posthog_person"."properties" -> 'key') = 'null'::jsonb))
|
||||
ORDER BY "posthog_person"."id" ASC
|
||||
LIMIT 1000
|
||||
'''
|
||||
@@ -1413,9 +1413,9 @@
|
||||
"posthog_person"."version"
|
||||
FROM "posthog_person"
|
||||
WHERE ("posthog_person"."team_id" = 2
|
||||
AND ("posthog_person"."properties" -> 'key') = '"value"'
|
||||
AND ("posthog_person"."properties" -> 'key') = '"value"'::jsonb
|
||||
AND "posthog_person"."properties" ? 'key'
|
||||
AND NOT (("posthog_person"."properties" -> 'key') = 'null'))
|
||||
AND NOT (("posthog_person"."properties" -> 'key') = 'null'::jsonb))
|
||||
ORDER BY "posthog_person"."id" ASC
|
||||
LIMIT 1000
|
||||
OFFSET 1000
|
||||
@@ -1426,8 +1426,7 @@
|
||||
SELECT "posthog_person"."uuid"
|
||||
FROM "posthog_person"
|
||||
WHERE ("posthog_person"."team_id" = 2
|
||||
AND "posthog_person"."uuid" IN ('00000000-0000-0000-0000-000000000000'::uuid,
|
||||
'00000000-0000-0000-0000-000000000001'::uuid /* ... */)
|
||||
AND "posthog_person"."uuid" IN ('00000000000040008000000000000002'::uuid)
|
||||
AND NOT (EXISTS
|
||||
(SELECT 1 AS "a"
|
||||
FROM "posthog_cohortpeople" U1
|
||||
@@ -1524,7 +1523,7 @@
|
||||
"posthog_user"."events_column_config"
|
||||
FROM "posthog_user"
|
||||
WHERE "posthog_user"."id" = 2
|
||||
LIMIT 21 /**/
|
||||
LIMIT 21
|
||||
'''
|
||||
# ---
|
||||
# name: TestFeatureFlag.test_creating_static_cohort.1
|
||||
@@ -1577,7 +1576,7 @@
|
||||
"posthog_team"."external_data_workspace_last_synced_at"
|
||||
FROM "posthog_team"
|
||||
WHERE "posthog_team"."id" = 2
|
||||
LIMIT 21 /*controller='project_feature_flags-create-static-cohort-for-flag',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/feature_flags/%28%3FP%3Cpk%3E%5B%5E/.%5D%2B%29/create_static_cohort_for_flag/%3F%24'*/
|
||||
LIMIT 21
|
||||
'''
|
||||
# ---
|
||||
# name: TestFeatureFlag.test_creating_static_cohort.10
|
||||
@@ -1594,12 +1593,12 @@
|
||||
"posthog_person"."version"
|
||||
FROM "posthog_person"
|
||||
WHERE ("posthog_person"."team_id" = 2
|
||||
AND ("posthog_person"."properties" -> 'key') = '"value"'
|
||||
AND ("posthog_person"."properties" -> 'key') = '"value"'::jsonb
|
||||
AND "posthog_person"."properties" ? 'key'
|
||||
AND NOT (("posthog_person"."properties" -> 'key') = 'null'))
|
||||
AND NOT (("posthog_person"."properties" -> 'key') = 'null'::jsonb))
|
||||
ORDER BY "posthog_person"."id" ASC
|
||||
LIMIT 10000
|
||||
OFFSET 10000 /*controller='project_feature_flags-create-static-cohort-for-flag',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/feature_flags/%28%3FP%3Cpk%3E%5B%5E/.%5D%2B%29/create_static_cohort_for_flag/%3F%24'*/
|
||||
OFFSET 10000
|
||||
'''
|
||||
# ---
|
||||
# name: TestFeatureFlag.test_creating_static_cohort.11
|
||||
@@ -1607,14 +1606,13 @@
|
||||
SELECT "posthog_person"."uuid"
|
||||
FROM "posthog_person"
|
||||
WHERE ("posthog_person"."team_id" = 2
|
||||
AND "posthog_person"."uuid" IN ('00000000-0000-0000-0000-000000000000'::uuid,
|
||||
'00000000-0000-0000-0000-000000000001'::uuid /* ... */)
|
||||
AND "posthog_person"."uuid" IN ('00000000000040008000000000000000'::uuid)
|
||||
AND NOT (EXISTS
|
||||
(SELECT 1 AS "a"
|
||||
FROM "posthog_cohortpeople" U1
|
||||
WHERE (U1."cohort_id" = 2
|
||||
AND U1."person_id" = ("posthog_person"."id"))
|
||||
LIMIT 1))) /*controller='project_feature_flags-create-static-cohort-for-flag',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/feature_flags/%28%3FP%3Cpk%3E%5B%5E/.%5D%2B%29/create_static_cohort_for_flag/%3F%24'*/
|
||||
LIMIT 1)))
|
||||
'''
|
||||
# ---
|
||||
# name: TestFeatureFlag.test_creating_static_cohort.12
|
||||
@@ -1674,7 +1672,7 @@
|
||||
"posthog_team"."external_data_workspace_last_synced_at"
|
||||
FROM "posthog_team"
|
||||
WHERE "posthog_team"."id" = 2
|
||||
LIMIT 21 /*controller='project_feature_flags-create-static-cohort-for-flag',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/feature_flags/%28%3FP%3Cpk%3E%5B%5E/.%5D%2B%29/create_static_cohort_for_flag/%3F%24'*/
|
||||
LIMIT 21
|
||||
'''
|
||||
# ---
|
||||
# name: TestFeatureFlag.test_creating_static_cohort.13
|
||||
@@ -1734,7 +1732,7 @@
|
||||
"posthog_team"."external_data_workspace_last_synced_at"
|
||||
FROM "posthog_team"
|
||||
WHERE "posthog_team"."id" = 2
|
||||
LIMIT 21 /*controller='project_feature_flags-create-static-cohort-for-flag',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/feature_flags/%28%3FP%3Cpk%3E%5B%5E/.%5D%2B%29/create_static_cohort_for_flag/%3F%24'*/
|
||||
LIMIT 21
|
||||
'''
|
||||
# ---
|
||||
# name: TestFeatureFlag.test_creating_static_cohort.14
|
||||
@@ -1795,7 +1793,7 @@
|
||||
"posthog_organization"."available_features"
|
||||
FROM "posthog_organizationmembership"
|
||||
INNER JOIN "posthog_organization" ON ("posthog_organizationmembership"."organization_id" = "posthog_organization"."id")
|
||||
WHERE "posthog_organizationmembership"."user_id" = 2 /*controller='project_feature_flags-create-static-cohort-for-flag',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/feature_flags/%28%3FP%3Cpk%3E%5B%5E/.%5D%2B%29/create_static_cohort_for_flag/%3F%24'*/
|
||||
WHERE "posthog_organizationmembership"."user_id" = 2
|
||||
'''
|
||||
# ---
|
||||
# name: TestFeatureFlag.test_creating_static_cohort.3
|
||||
@@ -1806,7 +1804,7 @@
|
||||
FROM "posthog_instancesetting"
|
||||
WHERE "posthog_instancesetting"."key" = 'constance:posthog:RATE_LIMIT_ENABLED'
|
||||
ORDER BY "posthog_instancesetting"."id" ASC
|
||||
LIMIT 1 /*controller='project_feature_flags-create-static-cohort-for-flag',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/feature_flags/%28%3FP%3Cpk%3E%5B%5E/.%5D%2B%29/create_static_cohort_for_flag/%3F%24'*/
|
||||
LIMIT 1
|
||||
'''
|
||||
# ---
|
||||
# name: TestFeatureFlag.test_creating_static_cohort.4
|
||||
@@ -1832,7 +1830,7 @@
|
||||
"posthog_organization"."available_features"
|
||||
FROM "posthog_organization"
|
||||
WHERE "posthog_organization"."id" = '00000000-0000-0000-0000-000000000000'::uuid
|
||||
LIMIT 21 /*controller='project_feature_flags-create-static-cohort-for-flag',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/feature_flags/%28%3FP%3Cpk%3E%5B%5E/.%5D%2B%29/create_static_cohort_for_flag/%3F%24'*/
|
||||
LIMIT 21
|
||||
'''
|
||||
# ---
|
||||
# name: TestFeatureFlag.test_creating_static_cohort.5
|
||||
@@ -1881,7 +1879,7 @@
|
||||
LEFT OUTER JOIN "posthog_user" ON ("posthog_featureflag"."created_by_id" = "posthog_user"."id")
|
||||
WHERE ("posthog_featureflag"."team_id" = 2
|
||||
AND "posthog_featureflag"."id" = 2)
|
||||
LIMIT 21 /*controller='project_feature_flags-create-static-cohort-for-flag',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/feature_flags/%28%3FP%3Cpk%3E%5B%5E/.%5D%2B%29/create_static_cohort_for_flag/%3F%24'*/
|
||||
LIMIT 21
|
||||
'''
|
||||
# ---
|
||||
# name: TestFeatureFlag.test_creating_static_cohort.6
|
||||
@@ -1904,7 +1902,7 @@
|
||||
FROM "posthog_featureflag"
|
||||
WHERE ("posthog_featureflag"."key" = 'some-feature'
|
||||
AND "posthog_featureflag"."team_id" = 2)
|
||||
LIMIT 21 /*controller='project_feature_flags-create-static-cohort-for-flag',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/feature_flags/%28%3FP%3Cpk%3E%5B%5E/.%5D%2B%29/create_static_cohort_for_flag/%3F%24'*/
|
||||
LIMIT 21
|
||||
'''
|
||||
# ---
|
||||
# name: TestFeatureFlag.test_creating_static_cohort.7
|
||||
@@ -1929,7 +1927,7 @@
|
||||
FROM "posthog_cohort"
|
||||
WHERE ("posthog_cohort"."id" = 2
|
||||
AND "posthog_cohort"."team_id" = 2)
|
||||
LIMIT 21 /*controller='project_feature_flags-create-static-cohort-for-flag',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/feature_flags/%28%3FP%3Cpk%3E%5B%5E/.%5D%2B%29/create_static_cohort_for_flag/%3F%24'*/
|
||||
LIMIT 21
|
||||
'''
|
||||
# ---
|
||||
# name: TestFeatureFlag.test_creating_static_cohort.8
|
||||
@@ -1946,11 +1944,11 @@
|
||||
"posthog_person"."version"
|
||||
FROM "posthog_person"
|
||||
WHERE ("posthog_person"."team_id" = 2
|
||||
AND ("posthog_person"."properties" -> 'key') = '"value"'
|
||||
AND ("posthog_person"."properties" -> 'key') = '"value"'::jsonb
|
||||
AND "posthog_person"."properties" ? 'key'
|
||||
AND NOT (("posthog_person"."properties" -> 'key') = 'null'))
|
||||
AND NOT (("posthog_person"."properties" -> 'key') = 'null'::jsonb))
|
||||
ORDER BY "posthog_person"."id" ASC
|
||||
LIMIT 10000 /*controller='project_feature_flags-create-static-cohort-for-flag',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/feature_flags/%28%3FP%3Cpk%3E%5B%5E/.%5D%2B%29/create_static_cohort_for_flag/%3F%24'*/
|
||||
LIMIT 10000
|
||||
'''
|
||||
# ---
|
||||
# name: TestFeatureFlag.test_creating_static_cohort.9
|
||||
@@ -1970,7 +1968,7 @@
|
||||
2,
|
||||
3,
|
||||
4,
|
||||
5 /* ... */)) /*controller='project_feature_flags-create-static-cohort-for-flag',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/feature_flags/%28%3FP%3Cpk%3E%5B%5E/.%5D%2B%29/create_static_cohort_for_flag/%3F%24'*/
|
||||
5 /* ... */))
|
||||
'''
|
||||
# ---
|
||||
# name: TestResiliency.test_feature_flags_v3_with_experience_continuity_working_slow_db
|
||||
@@ -1980,8 +1978,7 @@
|
||||
person_id
|
||||
FROM posthog_persondistinctid
|
||||
WHERE team_id = 2
|
||||
AND distinct_id IN ('example_id',
|
||||
'random') ),
|
||||
AND distinct_id = ANY('{example_id,random}') ),
|
||||
existing_overrides AS
|
||||
(SELECT team_id,
|
||||
person_id,
|
||||
@@ -2010,8 +2007,7 @@
|
||||
person_id
|
||||
FROM posthog_persondistinctid
|
||||
WHERE team_id = 2
|
||||
AND distinct_id IN ('example_id',
|
||||
'random') ),
|
||||
AND distinct_id = ANY('{example_id,random}') ),
|
||||
existing_overrides AS
|
||||
(SELECT team_id,
|
||||
person_id,
|
||||
@@ -2072,9 +2068,9 @@
|
||||
# ---
|
||||
# name: TestResiliency.test_feature_flags_v3_with_experience_continuity_working_slow_db.4
|
||||
'''
|
||||
SELECT (("posthog_person"."properties" -> 'email') = '"tim@posthog.com"'
|
||||
SELECT (("posthog_person"."properties" -> 'email') = '"tim@posthog.com"'::jsonb
|
||||
AND "posthog_person"."properties" ? 'email'
|
||||
AND NOT (("posthog_person"."properties" -> 'email') = 'null')) AS "flag_X_condition_0",
|
||||
AND NOT (("posthog_person"."properties" -> 'email') = 'null'::jsonb)) AS "flag_X_condition_0",
|
||||
(true) AS "flag_X_condition_0"
|
||||
FROM "posthog_person"
|
||||
INNER JOIN "posthog_persondistinctid" ON ("posthog_person"."id" = "posthog_persondistinctid"."person_id")
|
||||
@@ -2085,15 +2081,12 @@
|
||||
# ---
|
||||
# name: TestResiliency.test_feature_flags_v3_with_experience_continuity_working_slow_db.5
|
||||
'''
|
||||
SELECT pg_sleep(1);
|
||||
|
||||
WITH target_person_ids AS
|
||||
(SELECT team_id,
|
||||
person_id
|
||||
FROM posthog_persondistinctid
|
||||
WHERE team_id = 2
|
||||
AND distinct_id IN ('example_id',
|
||||
'random') ),
|
||||
AND distinct_id = ANY('{example_id,random}') ),
|
||||
existing_overrides AS
|
||||
(SELECT team_id,
|
||||
person_id,
|
||||
@@ -2117,8 +2110,6 @@
|
||||
# ---
|
||||
# name: TestResiliency.test_feature_flags_v3_with_experience_continuity_working_slow_db.6
|
||||
'''
|
||||
SELECT pg_sleep(1);
|
||||
|
||||
SELECT "posthog_persondistinctid"."person_id",
|
||||
"posthog_persondistinctid"."distinct_id"
|
||||
FROM "posthog_persondistinctid"
|
||||
@@ -2129,8 +2120,6 @@
|
||||
# ---
|
||||
# name: TestResiliency.test_feature_flags_v3_with_experience_continuity_working_slow_db.7
|
||||
'''
|
||||
SELECT pg_sleep(1);
|
||||
|
||||
SELECT "posthog_persondistinctid"."person_id",
|
||||
"posthog_persondistinctid"."distinct_id"
|
||||
FROM "posthog_persondistinctid"
|
||||
@@ -2140,8 +2129,6 @@
|
||||
# ---
|
||||
# name: TestResiliency.test_feature_flags_v3_with_group_properties_and_slow_db
|
||||
'''
|
||||
SELECT pg_sleep(1);
|
||||
|
||||
SELECT "posthog_grouptypemapping"."id",
|
||||
"posthog_grouptypemapping"."team_id",
|
||||
"posthog_grouptypemapping"."group_type",
|
||||
@@ -2154,8 +2141,6 @@
|
||||
# ---
|
||||
# name: TestResiliency.test_feature_flags_v3_with_group_properties_and_slow_db.1
|
||||
'''
|
||||
SELECT pg_sleep(1);
|
||||
|
||||
SELECT "posthog_grouptypemapping"."id",
|
||||
"posthog_grouptypemapping"."team_id",
|
||||
"posthog_grouptypemapping"."group_type",
|
||||
@@ -2168,8 +2153,6 @@
|
||||
# ---
|
||||
# name: TestResiliency.test_feature_flags_v3_with_group_properties_and_slow_db.2
|
||||
'''
|
||||
SELECT pg_sleep(1);
|
||||
|
||||
SELECT "posthog_grouptypemapping"."id",
|
||||
"posthog_grouptypemapping"."team_id",
|
||||
"posthog_grouptypemapping"."group_type",
|
||||
@@ -2182,14 +2165,12 @@
|
||||
# ---
|
||||
# name: TestResiliency.test_feature_flags_v3_with_slow_db_doesnt_try_to_compute_conditions_again
|
||||
'''
|
||||
SELECT pg_sleep(1);
|
||||
|
||||
SELECT (("posthog_person"."properties" -> 'email') = '"tim@posthog.com"'
|
||||
SELECT (("posthog_person"."properties" -> 'email') = '"tim@posthog.com"'::jsonb
|
||||
AND "posthog_person"."properties" ? 'email'
|
||||
AND NOT (("posthog_person"."properties" -> 'email') = 'null')) AS "flag_X_condition_0",
|
||||
(("posthog_person"."properties" -> 'email') = '"tim@posthog.com"'
|
||||
AND NOT (("posthog_person"."properties" -> 'email') = 'null'::jsonb)) AS "flag_X_condition_0",
|
||||
(("posthog_person"."properties" -> 'email') = '"tim@posthog.com"'::jsonb
|
||||
AND "posthog_person"."properties" ? 'email'
|
||||
AND NOT (("posthog_person"."properties" -> 'email') = 'null')) AS "flag_X_condition_0",
|
||||
AND NOT (("posthog_person"."properties" -> 'email') = 'null'::jsonb)) AS "flag_X_condition_0",
|
||||
(true) AS "flag_X_condition_0"
|
||||
FROM "posthog_person"
|
||||
INNER JOIN "posthog_persondistinctid" ON ("posthog_person"."id" = "posthog_persondistinctid"."person_id")
|
||||
|
||||
@@ -666,7 +666,7 @@
|
||||
"posthog_user"."events_column_config"
|
||||
FROM "posthog_user"
|
||||
WHERE "posthog_user"."id" = 2
|
||||
LIMIT 21 /**/
|
||||
LIMIT 21
|
||||
'''
|
||||
# ---
|
||||
# name: TestInsight.test_listing_insights_does_not_nplus1.1
|
||||
@@ -719,7 +719,7 @@
|
||||
"posthog_team"."external_data_workspace_last_synced_at"
|
||||
FROM "posthog_team"
|
||||
WHERE "posthog_team"."id" = 2
|
||||
LIMIT 21 /*controller='project_insights-list',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/insights/%3F%24'*/
|
||||
LIMIT 21
|
||||
'''
|
||||
# ---
|
||||
# name: TestInsight.test_listing_insights_does_not_nplus1.10
|
||||
@@ -772,7 +772,7 @@
|
||||
"posthog_team"."external_data_workspace_last_synced_at"
|
||||
FROM "posthog_team"
|
||||
WHERE "posthog_team"."id" = 2
|
||||
LIMIT 21 /*controller='project_insights-list',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/insights/%3F%24'*/
|
||||
LIMIT 21
|
||||
'''
|
||||
# ---
|
||||
# name: TestInsight.test_listing_insights_does_not_nplus1.11
|
||||
@@ -790,7 +790,7 @@
|
||||
"posthog_dashboardtile"."deleted"
|
||||
FROM "posthog_dashboardtile"
|
||||
WHERE "posthog_dashboardtile"."id" = 2
|
||||
LIMIT 21 /*controller='project_insights-list',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/insights/%3F%24'*/
|
||||
LIMIT 21
|
||||
'''
|
||||
# ---
|
||||
# name: TestInsight.test_listing_insights_does_not_nplus1.12
|
||||
@@ -825,7 +825,7 @@
|
||||
"posthog_dashboarditem"."tags"
|
||||
FROM "posthog_dashboarditem"
|
||||
WHERE "posthog_dashboarditem"."id" = 2
|
||||
LIMIT 21 /*controller='project_insights-list',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/insights/%3F%24'*/
|
||||
LIMIT 21
|
||||
'''
|
||||
# ---
|
||||
# name: TestInsight.test_listing_insights_does_not_nplus1.13
|
||||
@@ -848,7 +848,7 @@
|
||||
"posthog_dashboard"."is_shared"
|
||||
FROM "posthog_dashboard"
|
||||
WHERE "posthog_dashboard"."id" = 2
|
||||
LIMIT 21 /*controller='project_insights-list',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/insights/%3F%24'*/
|
||||
LIMIT 21
|
||||
'''
|
||||
# ---
|
||||
# name: TestInsight.test_listing_insights_does_not_nplus1.14
|
||||
@@ -908,7 +908,7 @@
|
||||
"posthog_team"."external_data_workspace_last_synced_at"
|
||||
FROM "posthog_team"
|
||||
WHERE "posthog_team"."id" = 2
|
||||
LIMIT 21 /*controller='project_insights-list',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/insights/%3F%24'*/
|
||||
LIMIT 21
|
||||
'''
|
||||
# ---
|
||||
# name: TestInsight.test_listing_insights_does_not_nplus1.15
|
||||
@@ -934,7 +934,7 @@
|
||||
"posthog_organization"."available_features"
|
||||
FROM "posthog_organization"
|
||||
WHERE "posthog_organization"."id" = '00000000-0000-0000-0000-000000000000'::uuid
|
||||
LIMIT 21 /*controller='project_insights-list',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/insights/%3F%24'*/
|
||||
LIMIT 21
|
||||
'''
|
||||
# ---
|
||||
# name: TestInsight.test_listing_insights_does_not_nplus1.16
|
||||
@@ -958,7 +958,7 @@
|
||||
FROM "posthog_dashboard"
|
||||
INNER JOIN "posthog_dashboardtile" ON ("posthog_dashboard"."id" = "posthog_dashboardtile"."dashboard_id")
|
||||
WHERE (NOT ("posthog_dashboard"."deleted")
|
||||
AND "posthog_dashboardtile"."insight_id" = 2) /*controller='project_insights-list',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/insights/%3F%24'*/
|
||||
AND "posthog_dashboardtile"."insight_id" = 2)
|
||||
'''
|
||||
# ---
|
||||
# name: TestInsight.test_listing_insights_does_not_nplus1.17
|
||||
@@ -979,7 +979,7 @@
|
||||
WHERE (NOT ("posthog_dashboardtile"."deleted"
|
||||
AND "posthog_dashboardtile"."deleted" IS NOT NULL)
|
||||
AND NOT ("posthog_dashboard"."deleted")
|
||||
AND "posthog_dashboardtile"."insight_id" = 2) /*controller='project_insights-list',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/insights/%3F%24'*/
|
||||
AND "posthog_dashboardtile"."insight_id" = 2)
|
||||
'''
|
||||
# ---
|
||||
# name: TestInsight.test_listing_insights_does_not_nplus1.18
|
||||
@@ -990,7 +990,7 @@
|
||||
WHERE (NOT ("posthog_dashboardtile"."deleted"
|
||||
AND "posthog_dashboardtile"."deleted" IS NOT NULL)
|
||||
AND NOT ("posthog_dashboard"."deleted")
|
||||
AND "posthog_dashboardtile"."insight_id" = 2) /*controller='project_insights-list',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/insights/%3F%24'*/
|
||||
AND "posthog_dashboardtile"."insight_id" = 2)
|
||||
'''
|
||||
# ---
|
||||
# name: TestInsight.test_listing_insights_does_not_nplus1.19
|
||||
@@ -1017,7 +1017,7 @@
|
||||
2,
|
||||
3,
|
||||
4,
|
||||
5 /* ... */)) /*controller='project_insights-list',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/insights/%3F%24'*/
|
||||
5 /* ... */))
|
||||
'''
|
||||
# ---
|
||||
# name: TestInsight.test_listing_insights_does_not_nplus1.2
|
||||
@@ -1049,7 +1049,7 @@
|
||||
"posthog_organization"."available_features"
|
||||
FROM "posthog_organizationmembership"
|
||||
INNER JOIN "posthog_organization" ON ("posthog_organizationmembership"."organization_id" = "posthog_organization"."id")
|
||||
WHERE "posthog_organizationmembership"."user_id" = 2 /*controller='project_insights-list',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/insights/%3F%24'*/
|
||||
WHERE "posthog_organizationmembership"."user_id" = 2
|
||||
'''
|
||||
# ---
|
||||
# name: TestInsight.test_listing_insights_does_not_nplus1.20
|
||||
@@ -1087,7 +1087,7 @@
|
||||
"posthog_user"."events_column_config"
|
||||
FROM "posthog_user"
|
||||
WHERE "posthog_user"."id" = 2
|
||||
LIMIT 21 /**/
|
||||
LIMIT 21
|
||||
'''
|
||||
# ---
|
||||
# name: TestInsight.test_listing_insights_does_not_nplus1.22
|
||||
@@ -1140,7 +1140,7 @@
|
||||
"posthog_team"."external_data_workspace_last_synced_at"
|
||||
FROM "posthog_team"
|
||||
WHERE "posthog_team"."id" = 2
|
||||
LIMIT 21 /*controller='project_insights-list',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/insights/%3F%24'*/
|
||||
LIMIT 21
|
||||
'''
|
||||
# ---
|
||||
# name: TestInsight.test_listing_insights_does_not_nplus1.23
|
||||
@@ -1172,7 +1172,7 @@
|
||||
"posthog_organization"."available_features"
|
||||
FROM "posthog_organizationmembership"
|
||||
INNER JOIN "posthog_organization" ON ("posthog_organizationmembership"."organization_id" = "posthog_organization"."id")
|
||||
WHERE "posthog_organizationmembership"."user_id" = 2 /*controller='project_insights-list',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/insights/%3F%24'*/
|
||||
WHERE "posthog_organizationmembership"."user_id" = 2
|
||||
'''
|
||||
# ---
|
||||
# name: TestInsight.test_listing_insights_does_not_nplus1.24
|
||||
@@ -1198,7 +1198,7 @@
|
||||
"posthog_organization"."available_features"
|
||||
FROM "posthog_organization"
|
||||
WHERE "posthog_organization"."id" = '00000000-0000-0000-0000-000000000000'::uuid
|
||||
LIMIT 21 /*controller='project_insights-list',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/insights/%3F%24'*/
|
||||
LIMIT 21
|
||||
'''
|
||||
# ---
|
||||
# name: TestInsight.test_listing_insights_does_not_nplus1.25
|
||||
@@ -1207,8 +1207,8 @@
|
||||
FROM "posthog_dashboarditem"
|
||||
WHERE (NOT ("posthog_dashboarditem"."deleted")
|
||||
AND "posthog_dashboarditem"."team_id" = 2
|
||||
AND NOT ("posthog_dashboarditem"."filters" = '{}'
|
||||
AND "posthog_dashboarditem"."query" IS NOT NULL)) /*controller='project_insights-list',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/insights/%3F%24'*/
|
||||
AND NOT ("posthog_dashboarditem"."filters" = '{}'::jsonb
|
||||
AND "posthog_dashboarditem"."query" IS NOT NULL))
|
||||
'''
|
||||
# ---
|
||||
# name: TestInsight.test_listing_insights_does_not_nplus1.26
|
||||
@@ -1350,10 +1350,10 @@
|
||||
LEFT OUTER JOIN "posthog_user" T4 ON ("posthog_dashboarditem"."last_modified_by_id" = T4."id")
|
||||
WHERE (NOT ("posthog_dashboarditem"."deleted")
|
||||
AND "posthog_dashboarditem"."team_id" = 2
|
||||
AND NOT ("posthog_dashboarditem"."filters" = '{}'
|
||||
AND NOT ("posthog_dashboarditem"."filters" = '{}'::jsonb
|
||||
AND "posthog_dashboarditem"."query" IS NOT NULL))
|
||||
ORDER BY "posthog_dashboarditem"."order" ASC
|
||||
LIMIT 100 /*controller='project_insights-list',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/insights/%3F%24'*/
|
||||
LIMIT 100
|
||||
'''
|
||||
# ---
|
||||
# name: TestInsight.test_listing_insights_does_not_nplus1.27
|
||||
@@ -1456,7 +1456,7 @@
|
||||
2,
|
||||
3,
|
||||
4,
|
||||
5 /* ... */)) /*controller='project_insights-list',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/insights/%3F%24'*/
|
||||
5 /* ... */))
|
||||
'''
|
||||
# ---
|
||||
# name: TestInsight.test_listing_insights_does_not_nplus1.28
|
||||
@@ -1571,7 +1571,7 @@
|
||||
2,
|
||||
3,
|
||||
4,
|
||||
5 /* ... */)) /*controller='project_insights-list',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/insights/%3F%24'*/
|
||||
5 /* ... */))
|
||||
'''
|
||||
# ---
|
||||
# name: TestInsight.test_listing_insights_does_not_nplus1.29
|
||||
@@ -1589,7 +1589,7 @@
|
||||
2,
|
||||
3,
|
||||
4,
|
||||
5 /* ... */) /*controller='project_insights-list',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/insights/%3F%24'*/
|
||||
5 /* ... */)
|
||||
'''
|
||||
# ---
|
||||
# name: TestInsight.test_listing_insights_does_not_nplus1.3
|
||||
@@ -1613,7 +1613,7 @@
|
||||
FROM "posthog_dashboard"
|
||||
WHERE (NOT ("posthog_dashboard"."deleted")
|
||||
AND "posthog_dashboard"."id" = 2)
|
||||
LIMIT 21 /*controller='project_insights-list',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/insights/%3F%24'*/
|
||||
LIMIT 21
|
||||
'''
|
||||
# ---
|
||||
# name: TestInsight.test_listing_insights_does_not_nplus1.4
|
||||
@@ -1666,7 +1666,7 @@
|
||||
"posthog_team"."external_data_workspace_last_synced_at"
|
||||
FROM "posthog_team"
|
||||
WHERE "posthog_team"."id" = 2
|
||||
LIMIT 21 /*controller='project_insights-list',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/insights/%3F%24'*/
|
||||
LIMIT 21
|
||||
'''
|
||||
# ---
|
||||
# name: TestInsight.test_listing_insights_does_not_nplus1.5
|
||||
@@ -1701,7 +1701,7 @@
|
||||
"posthog_dashboarditem"."tags"
|
||||
FROM "posthog_dashboarditem"
|
||||
WHERE "posthog_dashboarditem"."id" = 2
|
||||
LIMIT 21 /*controller='project_insights-list',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/insights/%3F%24'*/
|
||||
LIMIT 21
|
||||
'''
|
||||
# ---
|
||||
# name: TestInsight.test_listing_insights_does_not_nplus1.6
|
||||
@@ -1761,7 +1761,7 @@
|
||||
"posthog_team"."external_data_workspace_last_synced_at"
|
||||
FROM "posthog_team"
|
||||
WHERE "posthog_team"."id" = 2
|
||||
LIMIT 21 /*controller='project_insights-list',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/insights/%3F%24'*/
|
||||
LIMIT 21
|
||||
'''
|
||||
# ---
|
||||
# name: TestInsight.test_listing_insights_does_not_nplus1.7
|
||||
@@ -1788,7 +1788,7 @@
|
||||
2,
|
||||
3,
|
||||
4,
|
||||
5 /* ... */)) /*controller='project_insights-list',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/insights/%3F%24'*/
|
||||
5 /* ... */))
|
||||
'''
|
||||
# ---
|
||||
# name: TestInsight.test_listing_insights_does_not_nplus1.8
|
||||
@@ -1848,7 +1848,7 @@
|
||||
"posthog_team"."external_data_workspace_last_synced_at"
|
||||
FROM "posthog_team"
|
||||
WHERE "posthog_team"."id" = 2
|
||||
LIMIT 21 /*controller='project_insights-list',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/insights/%3F%24'*/
|
||||
LIMIT 21
|
||||
'''
|
||||
# ---
|
||||
# name: TestInsight.test_listing_insights_does_not_nplus1.9
|
||||
@@ -1908,6 +1908,6 @@
|
||||
"posthog_team"."external_data_workspace_last_synced_at"
|
||||
FROM "posthog_team"
|
||||
WHERE "posthog_team"."id" = 2
|
||||
LIMIT 21 /*controller='project_insights-list',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/insights/%3F%24'*/
|
||||
LIMIT 21
|
||||
'''
|
||||
# ---
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
"posthog_user"."events_column_config"
|
||||
FROM "posthog_user"
|
||||
WHERE "posthog_user"."id" = 2
|
||||
LIMIT 21 /**/
|
||||
LIMIT 21
|
||||
'''
|
||||
# ---
|
||||
# name: TestOrganizationFeatureFlagCopy.test_copy_feature_flag_create_new.1
|
||||
@@ -53,7 +53,7 @@
|
||||
"posthog_organization"."available_features"
|
||||
FROM "posthog_organization"
|
||||
WHERE "posthog_organization"."id" = '00000000-0000-0000-0000-000000000000'::uuid
|
||||
LIMIT 21 /*controller='organization_feature_flags-copy-flags',route='api/organizations/%28%3FP%3Cparent_lookup_organization_id%3E%5B%5E/.%5D%2B%29/feature_flags/copy_flags/%3F%24'*/
|
||||
LIMIT 21
|
||||
'''
|
||||
# ---
|
||||
# name: TestOrganizationFeatureFlagCopy.test_copy_feature_flag_create_new.10
|
||||
@@ -76,7 +76,7 @@
|
||||
FROM "posthog_featureflag"
|
||||
WHERE ("posthog_featureflag"."active"
|
||||
AND NOT "posthog_featureflag"."deleted"
|
||||
AND "posthog_featureflag"."team_id" = 2) /*controller='organization_feature_flags-copy-flags',route='api/organizations/%28%3FP%3Cparent_lookup_organization_id%3E%5B%5E/.%5D%2B%29/feature_flags/copy_flags/%3F%24'*/
|
||||
AND "posthog_featureflag"."team_id" = 2)
|
||||
'''
|
||||
# ---
|
||||
# name: TestOrganizationFeatureFlagCopy.test_copy_feature_flag_create_new.11
|
||||
@@ -136,7 +136,7 @@
|
||||
"posthog_team"."external_data_workspace_last_synced_at"
|
||||
FROM "posthog_team"
|
||||
WHERE "posthog_team"."id" = 2
|
||||
LIMIT 21 /*controller='organization_feature_flags-copy-flags',route='api/organizations/%28%3FP%3Cparent_lookup_organization_id%3E%5B%5E/.%5D%2B%29/feature_flags/copy_flags/%3F%24'*/
|
||||
LIMIT 21
|
||||
'''
|
||||
# ---
|
||||
# name: TestOrganizationFeatureFlagCopy.test_copy_feature_flag_create_new.12
|
||||
@@ -147,7 +147,7 @@
|
||||
WHERE (NOT ("posthog_dashboardtile"."deleted"
|
||||
AND "posthog_dashboardtile"."deleted" IS NOT NULL)
|
||||
AND NOT ("posthog_dashboard"."deleted")
|
||||
AND "posthog_dashboardtile"."dashboard_id" = 2) /*controller='organization_feature_flags-copy-flags',route='api/organizations/%28%3FP%3Cparent_lookup_organization_id%3E%5B%5E/.%5D%2B%29/feature_flags/copy_flags/%3F%24'*/
|
||||
AND "posthog_dashboardtile"."dashboard_id" = 2)
|
||||
'''
|
||||
# ---
|
||||
# name: TestOrganizationFeatureFlagCopy.test_copy_feature_flag_create_new.13
|
||||
@@ -173,7 +173,7 @@
|
||||
"posthog_organization"."available_features"
|
||||
FROM "posthog_organization"
|
||||
WHERE "posthog_organization"."id" = '00000000-0000-0000-0000-000000000000'::uuid
|
||||
LIMIT 21 /*controller='organization_feature_flags-copy-flags',route='api/organizations/%28%3FP%3Cparent_lookup_organization_id%3E%5B%5E/.%5D%2B%29/feature_flags/copy_flags/%3F%24'*/
|
||||
LIMIT 21
|
||||
'''
|
||||
# ---
|
||||
# name: TestOrganizationFeatureFlagCopy.test_copy_feature_flag_create_new.14
|
||||
@@ -184,7 +184,7 @@
|
||||
WHERE (NOT ("posthog_dashboardtile"."deleted"
|
||||
AND "posthog_dashboardtile"."deleted" IS NOT NULL)
|
||||
AND NOT ("posthog_dashboard"."deleted")
|
||||
AND "posthog_dashboardtile"."dashboard_id" = 2) /*controller='organization_feature_flags-copy-flags',route='api/organizations/%28%3FP%3Cparent_lookup_organization_id%3E%5B%5E/.%5D%2B%29/feature_flags/copy_flags/%3F%24'*/
|
||||
AND "posthog_dashboardtile"."dashboard_id" = 2)
|
||||
'''
|
||||
# ---
|
||||
# name: TestOrganizationFeatureFlagCopy.test_copy_feature_flag_create_new.15
|
||||
@@ -237,7 +237,7 @@
|
||||
"posthog_team"."external_data_workspace_last_synced_at"
|
||||
FROM "posthog_team"
|
||||
WHERE "posthog_team"."id" = 2
|
||||
LIMIT 21 /*controller='organization_feature_flags-copy-flags',route='api/organizations/%28%3FP%3Cparent_lookup_organization_id%3E%5B%5E/.%5D%2B%29/feature_flags/copy_flags/%3F%24'*/
|
||||
LIMIT 21
|
||||
'''
|
||||
# ---
|
||||
# name: TestOrganizationFeatureFlagCopy.test_copy_feature_flag_create_new.16
|
||||
@@ -272,7 +272,7 @@
|
||||
"posthog_dashboarditem"."tags"
|
||||
FROM "posthog_dashboarditem"
|
||||
WHERE "posthog_dashboarditem"."id" = 2
|
||||
LIMIT 21 /*controller='organization_feature_flags-copy-flags',route='api/organizations/%28%3FP%3Cparent_lookup_organization_id%3E%5B%5E/.%5D%2B%29/feature_flags/copy_flags/%3F%24'*/
|
||||
LIMIT 21
|
||||
'''
|
||||
# ---
|
||||
# name: TestOrganizationFeatureFlagCopy.test_copy_feature_flag_create_new.17
|
||||
@@ -332,7 +332,7 @@
|
||||
"posthog_team"."external_data_workspace_last_synced_at"
|
||||
FROM "posthog_team"
|
||||
WHERE "posthog_team"."id" = 2
|
||||
LIMIT 21 /*controller='organization_feature_flags-copy-flags',route='api/organizations/%28%3FP%3Cparent_lookup_organization_id%3E%5B%5E/.%5D%2B%29/feature_flags/copy_flags/%3F%24'*/
|
||||
LIMIT 21
|
||||
'''
|
||||
# ---
|
||||
# name: TestOrganizationFeatureFlagCopy.test_copy_feature_flag_create_new.18
|
||||
@@ -343,7 +343,7 @@
|
||||
FROM "posthog_instancesetting"
|
||||
WHERE "posthog_instancesetting"."key" = 'constance:posthog:PERSON_ON_EVENTS_V2_ENABLED'
|
||||
ORDER BY "posthog_instancesetting"."id" ASC
|
||||
LIMIT 1 /*controller='organization_feature_flags-copy-flags',route='api/organizations/%28%3FP%3Cparent_lookup_organization_id%3E%5B%5E/.%5D%2B%29/feature_flags/copy_flags/%3F%24'*/
|
||||
LIMIT 1
|
||||
'''
|
||||
# ---
|
||||
# name: TestOrganizationFeatureFlagCopy.test_copy_feature_flag_create_new.19
|
||||
@@ -354,7 +354,7 @@
|
||||
FROM "posthog_instancesetting"
|
||||
WHERE "posthog_instancesetting"."key" = 'constance:posthog:PERSON_ON_EVENTS_ENABLED'
|
||||
ORDER BY "posthog_instancesetting"."id" ASC
|
||||
LIMIT 1 /*controller='organization_feature_flags-copy-flags',route='api/organizations/%28%3FP%3Cparent_lookup_organization_id%3E%5B%5E/.%5D%2B%29/feature_flags/copy_flags/%3F%24'*/
|
||||
LIMIT 1
|
||||
'''
|
||||
# ---
|
||||
# name: TestOrganizationFeatureFlagCopy.test_copy_feature_flag_create_new.2
|
||||
@@ -363,7 +363,7 @@
|
||||
FROM "posthog_organizationmembership"
|
||||
WHERE ("posthog_organizationmembership"."organization_id" = '00000000-0000-0000-0000-000000000000'::uuid
|
||||
AND "posthog_organizationmembership"."user_id" = 2)
|
||||
LIMIT 1 /*controller='organization_feature_flags-copy-flags',route='api/organizations/%28%3FP%3Cparent_lookup_organization_id%3E%5B%5E/.%5D%2B%29/feature_flags/copy_flags/%3F%24'*/
|
||||
LIMIT 1
|
||||
'''
|
||||
# ---
|
||||
# name: TestOrganizationFeatureFlagCopy.test_copy_feature_flag_create_new.20
|
||||
@@ -374,7 +374,7 @@
|
||||
FROM "posthog_instancesetting"
|
||||
WHERE "posthog_instancesetting"."key" = 'constance:posthog:PERSON_ON_EVENTS_V2_ENABLED'
|
||||
ORDER BY "posthog_instancesetting"."id" ASC
|
||||
LIMIT 1 /*controller='organization_feature_flags-copy-flags',route='api/organizations/%28%3FP%3Cparent_lookup_organization_id%3E%5B%5E/.%5D%2B%29/feature_flags/copy_flags/%3F%24'*/
|
||||
LIMIT 1
|
||||
'''
|
||||
# ---
|
||||
# name: TestOrganizationFeatureFlagCopy.test_copy_feature_flag_create_new.21
|
||||
@@ -385,7 +385,7 @@
|
||||
FROM "posthog_instancesetting"
|
||||
WHERE "posthog_instancesetting"."key" = 'constance:posthog:PERSON_ON_EVENTS_ENABLED'
|
||||
ORDER BY "posthog_instancesetting"."id" ASC
|
||||
LIMIT 1 /*controller='organization_feature_flags-copy-flags',route='api/organizations/%28%3FP%3Cparent_lookup_organization_id%3E%5B%5E/.%5D%2B%29/feature_flags/copy_flags/%3F%24'*/
|
||||
LIMIT 1
|
||||
'''
|
||||
# ---
|
||||
# name: TestOrganizationFeatureFlagCopy.test_copy_feature_flag_create_new.22
|
||||
@@ -396,7 +396,7 @@
|
||||
FROM "posthog_instancesetting"
|
||||
WHERE "posthog_instancesetting"."key" = 'constance:posthog:PERSON_ON_EVENTS_V2_ENABLED'
|
||||
ORDER BY "posthog_instancesetting"."id" ASC
|
||||
LIMIT 1 /*controller='organization_feature_flags-copy-flags',route='api/organizations/%28%3FP%3Cparent_lookup_organization_id%3E%5B%5E/.%5D%2B%29/feature_flags/copy_flags/%3F%24'*/
|
||||
LIMIT 1
|
||||
'''
|
||||
# ---
|
||||
# name: TestOrganizationFeatureFlagCopy.test_copy_feature_flag_create_new.23
|
||||
@@ -407,7 +407,7 @@
|
||||
FROM "posthog_instancesetting"
|
||||
WHERE "posthog_instancesetting"."key" = 'constance:posthog:PERSON_ON_EVENTS_ENABLED'
|
||||
ORDER BY "posthog_instancesetting"."id" ASC
|
||||
LIMIT 1 /*controller='organization_feature_flags-copy-flags',route='api/organizations/%28%3FP%3Cparent_lookup_organization_id%3E%5B%5E/.%5D%2B%29/feature_flags/copy_flags/%3F%24'*/
|
||||
LIMIT 1
|
||||
'''
|
||||
# ---
|
||||
# name: TestOrganizationFeatureFlagCopy.test_copy_feature_flag_create_new.24
|
||||
@@ -418,7 +418,7 @@
|
||||
FROM "posthog_instancesetting"
|
||||
WHERE "posthog_instancesetting"."key" = 'constance:posthog:PERSON_ON_EVENTS_V2_ENABLED'
|
||||
ORDER BY "posthog_instancesetting"."id" ASC
|
||||
LIMIT 1 /*controller='organization_feature_flags-copy-flags',route='api/organizations/%28%3FP%3Cparent_lookup_organization_id%3E%5B%5E/.%5D%2B%29/feature_flags/copy_flags/%3F%24'*/
|
||||
LIMIT 1
|
||||
'''
|
||||
# ---
|
||||
# name: TestOrganizationFeatureFlagCopy.test_copy_feature_flag_create_new.25
|
||||
@@ -429,7 +429,7 @@
|
||||
FROM "posthog_instancesetting"
|
||||
WHERE "posthog_instancesetting"."key" = 'constance:posthog:PERSON_ON_EVENTS_ENABLED'
|
||||
ORDER BY "posthog_instancesetting"."id" ASC
|
||||
LIMIT 1 /*controller='organization_feature_flags-copy-flags',route='api/organizations/%28%3FP%3Cparent_lookup_organization_id%3E%5B%5E/.%5D%2B%29/feature_flags/copy_flags/%3F%24'*/
|
||||
LIMIT 1
|
||||
'''
|
||||
# ---
|
||||
# name: TestOrganizationFeatureFlagCopy.test_copy_feature_flag_create_new.26
|
||||
@@ -440,7 +440,7 @@
|
||||
FROM "posthog_instancesetting"
|
||||
WHERE "posthog_instancesetting"."key" = 'constance:posthog:PERSON_ON_EVENTS_V2_ENABLED'
|
||||
ORDER BY "posthog_instancesetting"."id" ASC
|
||||
LIMIT 1 /*controller='organization_feature_flags-copy-flags',route='api/organizations/%28%3FP%3Cparent_lookup_organization_id%3E%5B%5E/.%5D%2B%29/feature_flags/copy_flags/%3F%24'*/
|
||||
LIMIT 1
|
||||
'''
|
||||
# ---
|
||||
# name: TestOrganizationFeatureFlagCopy.test_copy_feature_flag_create_new.27
|
||||
@@ -451,7 +451,7 @@
|
||||
FROM "posthog_instancesetting"
|
||||
WHERE "posthog_instancesetting"."key" = 'constance:posthog:PERSON_ON_EVENTS_ENABLED'
|
||||
ORDER BY "posthog_instancesetting"."id" ASC
|
||||
LIMIT 1 /*controller='organization_feature_flags-copy-flags',route='api/organizations/%28%3FP%3Cparent_lookup_organization_id%3E%5B%5E/.%5D%2B%29/feature_flags/copy_flags/%3F%24'*/
|
||||
LIMIT 1
|
||||
'''
|
||||
# ---
|
||||
# name: TestOrganizationFeatureFlagCopy.test_copy_feature_flag_create_new.28
|
||||
@@ -462,7 +462,7 @@
|
||||
FROM "posthog_instancesetting"
|
||||
WHERE "posthog_instancesetting"."key" = 'constance:posthog:PERSON_ON_EVENTS_V2_ENABLED'
|
||||
ORDER BY "posthog_instancesetting"."id" ASC
|
||||
LIMIT 1 /*controller='organization_feature_flags-copy-flags',route='api/organizations/%28%3FP%3Cparent_lookup_organization_id%3E%5B%5E/.%5D%2B%29/feature_flags/copy_flags/%3F%24'*/
|
||||
LIMIT 1
|
||||
'''
|
||||
# ---
|
||||
# name: TestOrganizationFeatureFlagCopy.test_copy_feature_flag_create_new.29
|
||||
@@ -473,7 +473,7 @@
|
||||
FROM "posthog_instancesetting"
|
||||
WHERE "posthog_instancesetting"."key" = 'constance:posthog:PERSON_ON_EVENTS_ENABLED'
|
||||
ORDER BY "posthog_instancesetting"."id" ASC
|
||||
LIMIT 1 /*controller='organization_feature_flags-copy-flags',route='api/organizations/%28%3FP%3Cparent_lookup_organization_id%3E%5B%5E/.%5D%2B%29/feature_flags/copy_flags/%3F%24'*/
|
||||
LIMIT 1
|
||||
'''
|
||||
# ---
|
||||
# name: TestOrganizationFeatureFlagCopy.test_copy_feature_flag_create_new.3
|
||||
@@ -484,7 +484,7 @@
|
||||
FROM "posthog_instancesetting"
|
||||
WHERE "posthog_instancesetting"."key" = 'constance:posthog:RATE_LIMIT_ENABLED'
|
||||
ORDER BY "posthog_instancesetting"."id" ASC
|
||||
LIMIT 1 /*controller='organization_feature_flags-copy-flags',route='api/organizations/%28%3FP%3Cparent_lookup_organization_id%3E%5B%5E/.%5D%2B%29/feature_flags/copy_flags/%3F%24'*/
|
||||
LIMIT 1
|
||||
'''
|
||||
# ---
|
||||
# name: TestOrganizationFeatureFlagCopy.test_copy_feature_flag_create_new.30
|
||||
@@ -537,7 +537,7 @@
|
||||
"posthog_team"."external_data_workspace_last_synced_at"
|
||||
FROM "posthog_team"
|
||||
WHERE "posthog_team"."id" = 2
|
||||
LIMIT 21 /*controller='organization_feature_flags-copy-flags',route='api/organizations/%28%3FP%3Cparent_lookup_organization_id%3E%5B%5E/.%5D%2B%29/feature_flags/copy_flags/%3F%24'*/
|
||||
LIMIT 21
|
||||
'''
|
||||
# ---
|
||||
# name: TestOrganizationFeatureFlagCopy.test_copy_feature_flag_create_new.31
|
||||
@@ -555,7 +555,7 @@
|
||||
"posthog_dashboardtile"."deleted"
|
||||
FROM "posthog_dashboardtile"
|
||||
WHERE "posthog_dashboardtile"."id" = 2
|
||||
LIMIT 21 /*controller='organization_feature_flags-copy-flags',route='api/organizations/%28%3FP%3Cparent_lookup_organization_id%3E%5B%5E/.%5D%2B%29/feature_flags/copy_flags/%3F%24'*/
|
||||
LIMIT 21
|
||||
'''
|
||||
# ---
|
||||
# name: TestOrganizationFeatureFlagCopy.test_copy_feature_flag_create_new.32
|
||||
@@ -590,7 +590,7 @@
|
||||
"posthog_dashboarditem"."tags"
|
||||
FROM "posthog_dashboarditem"
|
||||
WHERE "posthog_dashboarditem"."id" = 2
|
||||
LIMIT 21 /*controller='organization_feature_flags-copy-flags',route='api/organizations/%28%3FP%3Cparent_lookup_organization_id%3E%5B%5E/.%5D%2B%29/feature_flags/copy_flags/%3F%24'*/
|
||||
LIMIT 21
|
||||
'''
|
||||
# ---
|
||||
# name: TestOrganizationFeatureFlagCopy.test_copy_feature_flag_create_new.33
|
||||
@@ -613,7 +613,7 @@
|
||||
"posthog_dashboard"."is_shared"
|
||||
FROM "posthog_dashboard"
|
||||
WHERE "posthog_dashboard"."id" = 2
|
||||
LIMIT 21 /*controller='organization_feature_flags-copy-flags',route='api/organizations/%28%3FP%3Cparent_lookup_organization_id%3E%5B%5E/.%5D%2B%29/feature_flags/copy_flags/%3F%24'*/
|
||||
LIMIT 21
|
||||
'''
|
||||
# ---
|
||||
# name: TestOrganizationFeatureFlagCopy.test_copy_feature_flag_create_new.34
|
||||
@@ -673,7 +673,7 @@
|
||||
"posthog_team"."external_data_workspace_last_synced_at"
|
||||
FROM "posthog_team"
|
||||
WHERE "posthog_team"."id" = 2
|
||||
LIMIT 21 /*controller='organization_feature_flags-copy-flags',route='api/organizations/%28%3FP%3Cparent_lookup_organization_id%3E%5B%5E/.%5D%2B%29/feature_flags/copy_flags/%3F%24'*/
|
||||
LIMIT 21
|
||||
'''
|
||||
# ---
|
||||
# name: TestOrganizationFeatureFlagCopy.test_copy_feature_flag_create_new.35
|
||||
@@ -684,7 +684,7 @@
|
||||
FROM "posthog_instancesetting"
|
||||
WHERE "posthog_instancesetting"."key" = 'constance:posthog:PERSON_ON_EVENTS_V2_ENABLED'
|
||||
ORDER BY "posthog_instancesetting"."id" ASC
|
||||
LIMIT 1 /*controller='organization_feature_flags-copy-flags',route='api/organizations/%28%3FP%3Cparent_lookup_organization_id%3E%5B%5E/.%5D%2B%29/feature_flags/copy_flags/%3F%24'*/
|
||||
LIMIT 1
|
||||
'''
|
||||
# ---
|
||||
# name: TestOrganizationFeatureFlagCopy.test_copy_feature_flag_create_new.36
|
||||
@@ -695,7 +695,7 @@
|
||||
FROM "posthog_instancesetting"
|
||||
WHERE "posthog_instancesetting"."key" = 'constance:posthog:PERSON_ON_EVENTS_ENABLED'
|
||||
ORDER BY "posthog_instancesetting"."id" ASC
|
||||
LIMIT 1 /*controller='organization_feature_flags-copy-flags',route='api/organizations/%28%3FP%3Cparent_lookup_organization_id%3E%5B%5E/.%5D%2B%29/feature_flags/copy_flags/%3F%24'*/
|
||||
LIMIT 1
|
||||
'''
|
||||
# ---
|
||||
# name: TestOrganizationFeatureFlagCopy.test_copy_feature_flag_create_new.37
|
||||
@@ -706,7 +706,7 @@
|
||||
FROM "posthog_instancesetting"
|
||||
WHERE "posthog_instancesetting"."key" = 'constance:posthog:PERSON_ON_EVENTS_V2_ENABLED'
|
||||
ORDER BY "posthog_instancesetting"."id" ASC
|
||||
LIMIT 1 /*controller='organization_feature_flags-copy-flags',route='api/organizations/%28%3FP%3Cparent_lookup_organization_id%3E%5B%5E/.%5D%2B%29/feature_flags/copy_flags/%3F%24'*/
|
||||
LIMIT 1
|
||||
'''
|
||||
# ---
|
||||
# name: TestOrganizationFeatureFlagCopy.test_copy_feature_flag_create_new.38
|
||||
@@ -717,7 +717,7 @@
|
||||
FROM "posthog_instancesetting"
|
||||
WHERE "posthog_instancesetting"."key" = 'constance:posthog:PERSON_ON_EVENTS_ENABLED'
|
||||
ORDER BY "posthog_instancesetting"."id" ASC
|
||||
LIMIT 1 /*controller='organization_feature_flags-copy-flags',route='api/organizations/%28%3FP%3Cparent_lookup_organization_id%3E%5B%5E/.%5D%2B%29/feature_flags/copy_flags/%3F%24'*/
|
||||
LIMIT 1
|
||||
'''
|
||||
# ---
|
||||
# name: TestOrganizationFeatureFlagCopy.test_copy_feature_flag_create_new.39
|
||||
@@ -728,7 +728,7 @@
|
||||
FROM "posthog_instancesetting"
|
||||
WHERE "posthog_instancesetting"."key" = 'constance:posthog:PERSON_ON_EVENTS_V2_ENABLED'
|
||||
ORDER BY "posthog_instancesetting"."id" ASC
|
||||
LIMIT 1 /*controller='organization_feature_flags-copy-flags',route='api/organizations/%28%3FP%3Cparent_lookup_organization_id%3E%5B%5E/.%5D%2B%29/feature_flags/copy_flags/%3F%24'*/
|
||||
LIMIT 1
|
||||
'''
|
||||
# ---
|
||||
# name: TestOrganizationFeatureFlagCopy.test_copy_feature_flag_create_new.4
|
||||
@@ -751,7 +751,7 @@
|
||||
FROM "posthog_featureflag"
|
||||
WHERE ("posthog_featureflag"."key" = 'copied-flag-key'
|
||||
AND "posthog_featureflag"."team_id" = 2)
|
||||
LIMIT 21 /*controller='organization_feature_flags-copy-flags',route='api/organizations/%28%3FP%3Cparent_lookup_organization_id%3E%5B%5E/.%5D%2B%29/feature_flags/copy_flags/%3F%24'*/
|
||||
LIMIT 21
|
||||
'''
|
||||
# ---
|
||||
# name: TestOrganizationFeatureFlagCopy.test_copy_feature_flag_create_new.40
|
||||
@@ -762,7 +762,7 @@
|
||||
FROM "posthog_instancesetting"
|
||||
WHERE "posthog_instancesetting"."key" = 'constance:posthog:PERSON_ON_EVENTS_ENABLED'
|
||||
ORDER BY "posthog_instancesetting"."id" ASC
|
||||
LIMIT 1 /*controller='organization_feature_flags-copy-flags',route='api/organizations/%28%3FP%3Cparent_lookup_organization_id%3E%5B%5E/.%5D%2B%29/feature_flags/copy_flags/%3F%24'*/
|
||||
LIMIT 1
|
||||
'''
|
||||
# ---
|
||||
# name: TestOrganizationFeatureFlagCopy.test_copy_feature_flag_create_new.41
|
||||
@@ -815,7 +815,7 @@
|
||||
"posthog_team"."external_data_workspace_last_synced_at"
|
||||
FROM "posthog_team"
|
||||
WHERE "posthog_team"."id" = 2
|
||||
LIMIT 21 /*controller='organization_feature_flags-copy-flags',route='api/organizations/%28%3FP%3Cparent_lookup_organization_id%3E%5B%5E/.%5D%2B%29/feature_flags/copy_flags/%3F%24'*/
|
||||
LIMIT 21
|
||||
'''
|
||||
# ---
|
||||
# name: TestOrganizationFeatureFlagCopy.test_copy_feature_flag_create_new.42
|
||||
@@ -850,7 +850,7 @@
|
||||
"posthog_dashboarditem"."tags"
|
||||
FROM "posthog_dashboarditem"
|
||||
WHERE "posthog_dashboarditem"."id" = 2
|
||||
LIMIT 21 /*controller='organization_feature_flags-copy-flags',route='api/organizations/%28%3FP%3Cparent_lookup_organization_id%3E%5B%5E/.%5D%2B%29/feature_flags/copy_flags/%3F%24'*/
|
||||
LIMIT 21
|
||||
'''
|
||||
# ---
|
||||
# name: TestOrganizationFeatureFlagCopy.test_copy_feature_flag_create_new.43
|
||||
@@ -910,7 +910,7 @@
|
||||
"posthog_team"."external_data_workspace_last_synced_at"
|
||||
FROM "posthog_team"
|
||||
WHERE "posthog_team"."id" = 2
|
||||
LIMIT 21 /*controller='organization_feature_flags-copy-flags',route='api/organizations/%28%3FP%3Cparent_lookup_organization_id%3E%5B%5E/.%5D%2B%29/feature_flags/copy_flags/%3F%24'*/
|
||||
LIMIT 21
|
||||
'''
|
||||
# ---
|
||||
# name: TestOrganizationFeatureFlagCopy.test_copy_feature_flag_create_new.44
|
||||
@@ -921,7 +921,7 @@
|
||||
FROM "posthog_instancesetting"
|
||||
WHERE "posthog_instancesetting"."key" = 'constance:posthog:PERSON_ON_EVENTS_V2_ENABLED'
|
||||
ORDER BY "posthog_instancesetting"."id" ASC
|
||||
LIMIT 1 /*controller='organization_feature_flags-copy-flags',route='api/organizations/%28%3FP%3Cparent_lookup_organization_id%3E%5B%5E/.%5D%2B%29/feature_flags/copy_flags/%3F%24'*/
|
||||
LIMIT 1
|
||||
'''
|
||||
# ---
|
||||
# name: TestOrganizationFeatureFlagCopy.test_copy_feature_flag_create_new.45
|
||||
@@ -932,7 +932,7 @@
|
||||
FROM "posthog_instancesetting"
|
||||
WHERE "posthog_instancesetting"."key" = 'constance:posthog:PERSON_ON_EVENTS_ENABLED'
|
||||
ORDER BY "posthog_instancesetting"."id" ASC
|
||||
LIMIT 1 /*controller='organization_feature_flags-copy-flags',route='api/organizations/%28%3FP%3Cparent_lookup_organization_id%3E%5B%5E/.%5D%2B%29/feature_flags/copy_flags/%3F%24'*/
|
||||
LIMIT 1
|
||||
'''
|
||||
# ---
|
||||
# name: TestOrganizationFeatureFlagCopy.test_copy_feature_flag_create_new.46
|
||||
@@ -943,7 +943,7 @@
|
||||
FROM "posthog_instancesetting"
|
||||
WHERE "posthog_instancesetting"."key" = 'constance:posthog:PERSON_ON_EVENTS_V2_ENABLED'
|
||||
ORDER BY "posthog_instancesetting"."id" ASC
|
||||
LIMIT 1 /*controller='organization_feature_flags-copy-flags',route='api/organizations/%28%3FP%3Cparent_lookup_organization_id%3E%5B%5E/.%5D%2B%29/feature_flags/copy_flags/%3F%24'*/
|
||||
LIMIT 1
|
||||
'''
|
||||
# ---
|
||||
# name: TestOrganizationFeatureFlagCopy.test_copy_feature_flag_create_new.47
|
||||
@@ -954,7 +954,7 @@
|
||||
FROM "posthog_instancesetting"
|
||||
WHERE "posthog_instancesetting"."key" = 'constance:posthog:PERSON_ON_EVENTS_ENABLED'
|
||||
ORDER BY "posthog_instancesetting"."id" ASC
|
||||
LIMIT 1 /*controller='organization_feature_flags-copy-flags',route='api/organizations/%28%3FP%3Cparent_lookup_organization_id%3E%5B%5E/.%5D%2B%29/feature_flags/copy_flags/%3F%24'*/
|
||||
LIMIT 1
|
||||
'''
|
||||
# ---
|
||||
# name: TestOrganizationFeatureFlagCopy.test_copy_feature_flag_create_new.48
|
||||
@@ -965,7 +965,7 @@
|
||||
FROM "posthog_instancesetting"
|
||||
WHERE "posthog_instancesetting"."key" = 'constance:posthog:PERSON_ON_EVENTS_V2_ENABLED'
|
||||
ORDER BY "posthog_instancesetting"."id" ASC
|
||||
LIMIT 1 /*controller='organization_feature_flags-copy-flags',route='api/organizations/%28%3FP%3Cparent_lookup_organization_id%3E%5B%5E/.%5D%2B%29/feature_flags/copy_flags/%3F%24'*/
|
||||
LIMIT 1
|
||||
'''
|
||||
# ---
|
||||
# name: TestOrganizationFeatureFlagCopy.test_copy_feature_flag_create_new.49
|
||||
@@ -976,7 +976,7 @@
|
||||
FROM "posthog_instancesetting"
|
||||
WHERE "posthog_instancesetting"."key" = 'constance:posthog:PERSON_ON_EVENTS_ENABLED'
|
||||
ORDER BY "posthog_instancesetting"."id" ASC
|
||||
LIMIT 1 /*controller='organization_feature_flags-copy-flags',route='api/organizations/%28%3FP%3Cparent_lookup_organization_id%3E%5B%5E/.%5D%2B%29/feature_flags/copy_flags/%3F%24'*/
|
||||
LIMIT 1
|
||||
'''
|
||||
# ---
|
||||
# name: TestOrganizationFeatureFlagCopy.test_copy_feature_flag_create_new.5
|
||||
@@ -1002,7 +1002,7 @@
|
||||
"posthog_organization"."available_features"
|
||||
FROM "posthog_organization"
|
||||
WHERE "posthog_organization"."id" = '00000000-0000-0000-0000-000000000000'::uuid
|
||||
LIMIT 21 /*controller='organization_feature_flags-copy-flags',route='api/organizations/%28%3FP%3Cparent_lookup_organization_id%3E%5B%5E/.%5D%2B%29/feature_flags/copy_flags/%3F%24'*/
|
||||
LIMIT 21
|
||||
'''
|
||||
# ---
|
||||
# name: TestOrganizationFeatureFlagCopy.test_copy_feature_flag_create_new.50
|
||||
@@ -1013,7 +1013,7 @@
|
||||
FROM "posthog_instancesetting"
|
||||
WHERE "posthog_instancesetting"."key" = 'constance:posthog:PERSON_ON_EVENTS_V2_ENABLED'
|
||||
ORDER BY "posthog_instancesetting"."id" ASC
|
||||
LIMIT 1 /*controller='organization_feature_flags-copy-flags',route='api/organizations/%28%3FP%3Cparent_lookup_organization_id%3E%5B%5E/.%5D%2B%29/feature_flags/copy_flags/%3F%24'*/
|
||||
LIMIT 1
|
||||
'''
|
||||
# ---
|
||||
# name: TestOrganizationFeatureFlagCopy.test_copy_feature_flag_create_new.51
|
||||
@@ -1024,7 +1024,7 @@
|
||||
FROM "posthog_instancesetting"
|
||||
WHERE "posthog_instancesetting"."key" = 'constance:posthog:PERSON_ON_EVENTS_ENABLED'
|
||||
ORDER BY "posthog_instancesetting"."id" ASC
|
||||
LIMIT 1 /*controller='organization_feature_flags-copy-flags',route='api/organizations/%28%3FP%3Cparent_lookup_organization_id%3E%5B%5E/.%5D%2B%29/feature_flags/copy_flags/%3F%24'*/
|
||||
LIMIT 1
|
||||
'''
|
||||
# ---
|
||||
# name: TestOrganizationFeatureFlagCopy.test_copy_feature_flag_create_new.52
|
||||
@@ -1035,7 +1035,7 @@
|
||||
FROM "posthog_instancesetting"
|
||||
WHERE "posthog_instancesetting"."key" = 'constance:posthog:PERSON_ON_EVENTS_V2_ENABLED'
|
||||
ORDER BY "posthog_instancesetting"."id" ASC
|
||||
LIMIT 1 /*controller='organization_feature_flags-copy-flags',route='api/organizations/%28%3FP%3Cparent_lookup_organization_id%3E%5B%5E/.%5D%2B%29/feature_flags/copy_flags/%3F%24'*/
|
||||
LIMIT 1
|
||||
'''
|
||||
# ---
|
||||
# name: TestOrganizationFeatureFlagCopy.test_copy_feature_flag_create_new.53
|
||||
@@ -1046,7 +1046,7 @@
|
||||
FROM "posthog_instancesetting"
|
||||
WHERE "posthog_instancesetting"."key" = 'constance:posthog:PERSON_ON_EVENTS_ENABLED'
|
||||
ORDER BY "posthog_instancesetting"."id" ASC
|
||||
LIMIT 1 /*controller='organization_feature_flags-copy-flags',route='api/organizations/%28%3FP%3Cparent_lookup_organization_id%3E%5B%5E/.%5D%2B%29/feature_flags/copy_flags/%3F%24'*/
|
||||
LIMIT 1
|
||||
'''
|
||||
# ---
|
||||
# name: TestOrganizationFeatureFlagCopy.test_copy_feature_flag_create_new.54
|
||||
@@ -1057,7 +1057,7 @@
|
||||
FROM "posthog_instancesetting"
|
||||
WHERE "posthog_instancesetting"."key" = 'constance:posthog:PERSON_ON_EVENTS_V2_ENABLED'
|
||||
ORDER BY "posthog_instancesetting"."id" ASC
|
||||
LIMIT 1 /*controller='organization_feature_flags-copy-flags',route='api/organizations/%28%3FP%3Cparent_lookup_organization_id%3E%5B%5E/.%5D%2B%29/feature_flags/copy_flags/%3F%24'*/
|
||||
LIMIT 1
|
||||
'''
|
||||
# ---
|
||||
# name: TestOrganizationFeatureFlagCopy.test_copy_feature_flag_create_new.55
|
||||
@@ -1068,7 +1068,7 @@
|
||||
FROM "posthog_instancesetting"
|
||||
WHERE "posthog_instancesetting"."key" = 'constance:posthog:PERSON_ON_EVENTS_ENABLED'
|
||||
ORDER BY "posthog_instancesetting"."id" ASC
|
||||
LIMIT 1 /*controller='organization_feature_flags-copy-flags',route='api/organizations/%28%3FP%3Cparent_lookup_organization_id%3E%5B%5E/.%5D%2B%29/feature_flags/copy_flags/%3F%24'*/
|
||||
LIMIT 1
|
||||
'''
|
||||
# ---
|
||||
# name: TestOrganizationFeatureFlagCopy.test_copy_feature_flag_create_new.56
|
||||
@@ -1121,7 +1121,7 @@
|
||||
"posthog_team"."external_data_workspace_last_synced_at"
|
||||
FROM "posthog_team"
|
||||
WHERE "posthog_team"."id" = 2
|
||||
LIMIT 21 /*controller='organization_feature_flags-copy-flags',route='api/organizations/%28%3FP%3Cparent_lookup_organization_id%3E%5B%5E/.%5D%2B%29/feature_flags/copy_flags/%3F%24'*/
|
||||
LIMIT 21
|
||||
'''
|
||||
# ---
|
||||
# name: TestOrganizationFeatureFlagCopy.test_copy_feature_flag_create_new.57
|
||||
@@ -1139,7 +1139,7 @@
|
||||
"posthog_dashboardtile"."deleted"
|
||||
FROM "posthog_dashboardtile"
|
||||
WHERE "posthog_dashboardtile"."id" = 2
|
||||
LIMIT 21 /*controller='organization_feature_flags-copy-flags',route='api/organizations/%28%3FP%3Cparent_lookup_organization_id%3E%5B%5E/.%5D%2B%29/feature_flags/copy_flags/%3F%24'*/
|
||||
LIMIT 21
|
||||
'''
|
||||
# ---
|
||||
# name: TestOrganizationFeatureFlagCopy.test_copy_feature_flag_create_new.58
|
||||
@@ -1174,7 +1174,7 @@
|
||||
"posthog_dashboarditem"."tags"
|
||||
FROM "posthog_dashboarditem"
|
||||
WHERE "posthog_dashboarditem"."id" = 2
|
||||
LIMIT 21 /*controller='organization_feature_flags-copy-flags',route='api/organizations/%28%3FP%3Cparent_lookup_organization_id%3E%5B%5E/.%5D%2B%29/feature_flags/copy_flags/%3F%24'*/
|
||||
LIMIT 21
|
||||
'''
|
||||
# ---
|
||||
# name: TestOrganizationFeatureFlagCopy.test_copy_feature_flag_create_new.59
|
||||
@@ -1197,7 +1197,7 @@
|
||||
"posthog_dashboard"."is_shared"
|
||||
FROM "posthog_dashboard"
|
||||
WHERE "posthog_dashboard"."id" = 2
|
||||
LIMIT 21 /*controller='organization_feature_flags-copy-flags',route='api/organizations/%28%3FP%3Cparent_lookup_organization_id%3E%5B%5E/.%5D%2B%29/feature_flags/copy_flags/%3F%24'*/
|
||||
LIMIT 21
|
||||
'''
|
||||
# ---
|
||||
# name: TestOrganizationFeatureFlagCopy.test_copy_feature_flag_create_new.6
|
||||
@@ -1250,7 +1250,7 @@
|
||||
"posthog_team"."external_data_workspace_last_synced_at"
|
||||
FROM "posthog_team"
|
||||
WHERE "posthog_team"."id" = 2
|
||||
LIMIT 21 /*controller='organization_feature_flags-copy-flags',route='api/organizations/%28%3FP%3Cparent_lookup_organization_id%3E%5B%5E/.%5D%2B%29/feature_flags/copy_flags/%3F%24'*/
|
||||
LIMIT 21
|
||||
'''
|
||||
# ---
|
||||
# name: TestOrganizationFeatureFlagCopy.test_copy_feature_flag_create_new.60
|
||||
@@ -1310,7 +1310,7 @@
|
||||
"posthog_team"."external_data_workspace_last_synced_at"
|
||||
FROM "posthog_team"
|
||||
WHERE "posthog_team"."id" = 2
|
||||
LIMIT 21 /*controller='organization_feature_flags-copy-flags',route='api/organizations/%28%3FP%3Cparent_lookup_organization_id%3E%5B%5E/.%5D%2B%29/feature_flags/copy_flags/%3F%24'*/
|
||||
LIMIT 21
|
||||
'''
|
||||
# ---
|
||||
# name: TestOrganizationFeatureFlagCopy.test_copy_feature_flag_create_new.61
|
||||
@@ -1321,7 +1321,7 @@
|
||||
FROM "posthog_instancesetting"
|
||||
WHERE "posthog_instancesetting"."key" = 'constance:posthog:PERSON_ON_EVENTS_V2_ENABLED'
|
||||
ORDER BY "posthog_instancesetting"."id" ASC
|
||||
LIMIT 1 /*controller='organization_feature_flags-copy-flags',route='api/organizations/%28%3FP%3Cparent_lookup_organization_id%3E%5B%5E/.%5D%2B%29/feature_flags/copy_flags/%3F%24'*/
|
||||
LIMIT 1
|
||||
'''
|
||||
# ---
|
||||
# name: TestOrganizationFeatureFlagCopy.test_copy_feature_flag_create_new.62
|
||||
@@ -1332,7 +1332,7 @@
|
||||
FROM "posthog_instancesetting"
|
||||
WHERE "posthog_instancesetting"."key" = 'constance:posthog:PERSON_ON_EVENTS_ENABLED'
|
||||
ORDER BY "posthog_instancesetting"."id" ASC
|
||||
LIMIT 1 /*controller='organization_feature_flags-copy-flags',route='api/organizations/%28%3FP%3Cparent_lookup_organization_id%3E%5B%5E/.%5D%2B%29/feature_flags/copy_flags/%3F%24'*/
|
||||
LIMIT 1
|
||||
'''
|
||||
# ---
|
||||
# name: TestOrganizationFeatureFlagCopy.test_copy_feature_flag_create_new.63
|
||||
@@ -1343,7 +1343,7 @@
|
||||
FROM "posthog_instancesetting"
|
||||
WHERE "posthog_instancesetting"."key" = 'constance:posthog:PERSON_ON_EVENTS_V2_ENABLED'
|
||||
ORDER BY "posthog_instancesetting"."id" ASC
|
||||
LIMIT 1 /*controller='organization_feature_flags-copy-flags',route='api/organizations/%28%3FP%3Cparent_lookup_organization_id%3E%5B%5E/.%5D%2B%29/feature_flags/copy_flags/%3F%24'*/
|
||||
LIMIT 1
|
||||
'''
|
||||
# ---
|
||||
# name: TestOrganizationFeatureFlagCopy.test_copy_feature_flag_create_new.64
|
||||
@@ -1354,7 +1354,7 @@
|
||||
FROM "posthog_instancesetting"
|
||||
WHERE "posthog_instancesetting"."key" = 'constance:posthog:PERSON_ON_EVENTS_ENABLED'
|
||||
ORDER BY "posthog_instancesetting"."id" ASC
|
||||
LIMIT 1 /*controller='organization_feature_flags-copy-flags',route='api/organizations/%28%3FP%3Cparent_lookup_organization_id%3E%5B%5E/.%5D%2B%29/feature_flags/copy_flags/%3F%24'*/
|
||||
LIMIT 1
|
||||
'''
|
||||
# ---
|
||||
# name: TestOrganizationFeatureFlagCopy.test_copy_feature_flag_create_new.65
|
||||
@@ -1365,7 +1365,7 @@
|
||||
FROM "posthog_instancesetting"
|
||||
WHERE "posthog_instancesetting"."key" = 'constance:posthog:PERSON_ON_EVENTS_V2_ENABLED'
|
||||
ORDER BY "posthog_instancesetting"."id" ASC
|
||||
LIMIT 1 /*controller='organization_feature_flags-copy-flags',route='api/organizations/%28%3FP%3Cparent_lookup_organization_id%3E%5B%5E/.%5D%2B%29/feature_flags/copy_flags/%3F%24'*/
|
||||
LIMIT 1
|
||||
'''
|
||||
# ---
|
||||
# name: TestOrganizationFeatureFlagCopy.test_copy_feature_flag_create_new.66
|
||||
@@ -1376,7 +1376,7 @@
|
||||
FROM "posthog_instancesetting"
|
||||
WHERE "posthog_instancesetting"."key" = 'constance:posthog:PERSON_ON_EVENTS_ENABLED'
|
||||
ORDER BY "posthog_instancesetting"."id" ASC
|
||||
LIMIT 1 /*controller='organization_feature_flags-copy-flags',route='api/organizations/%28%3FP%3Cparent_lookup_organization_id%3E%5B%5E/.%5D%2B%29/feature_flags/copy_flags/%3F%24'*/
|
||||
LIMIT 1
|
||||
'''
|
||||
# ---
|
||||
# name: TestOrganizationFeatureFlagCopy.test_copy_feature_flag_create_new.67
|
||||
@@ -1399,7 +1399,7 @@
|
||||
FROM "posthog_featureflag"
|
||||
WHERE ("posthog_featureflag"."active"
|
||||
AND NOT "posthog_featureflag"."deleted"
|
||||
AND "posthog_featureflag"."team_id" = 2) /*controller='organization_feature_flags-copy-flags',route='api/organizations/%28%3FP%3Cparent_lookup_organization_id%3E%5B%5E/.%5D%2B%29/feature_flags/copy_flags/%3F%24'*/
|
||||
AND "posthog_featureflag"."team_id" = 2)
|
||||
'''
|
||||
# ---
|
||||
# name: TestOrganizationFeatureFlagCopy.test_copy_feature_flag_create_new.68
|
||||
@@ -1459,7 +1459,7 @@
|
||||
"posthog_team"."external_data_workspace_last_synced_at"
|
||||
FROM "posthog_team"
|
||||
WHERE "posthog_team"."id" = 2
|
||||
LIMIT 21 /*controller='organization_feature_flags-copy-flags',route='api/organizations/%28%3FP%3Cparent_lookup_organization_id%3E%5B%5E/.%5D%2B%29/feature_flags/copy_flags/%3F%24'*/
|
||||
LIMIT 21
|
||||
'''
|
||||
# ---
|
||||
# name: TestOrganizationFeatureFlagCopy.test_copy_feature_flag_create_new.69
|
||||
@@ -1479,7 +1479,7 @@
|
||||
"posthog_experiment"."updated_at",
|
||||
"posthog_experiment"."archived"
|
||||
FROM "posthog_experiment"
|
||||
WHERE "posthog_experiment"."feature_flag_id" = 2 /*controller='organization_feature_flags-copy-flags',route='api/organizations/%28%3FP%3Cparent_lookup_organization_id%3E%5B%5E/.%5D%2B%29/feature_flags/copy_flags/%3F%24'*/
|
||||
WHERE "posthog_experiment"."feature_flag_id" = 2
|
||||
'''
|
||||
# ---
|
||||
# name: TestOrganizationFeatureFlagCopy.test_copy_feature_flag_create_new.7
|
||||
@@ -1504,7 +1504,7 @@
|
||||
AND "posthog_featureflag"."key" = 'copied-flag-key'
|
||||
AND "posthog_featureflag"."team_id" = 2)
|
||||
ORDER BY "posthog_featureflag"."id" ASC
|
||||
LIMIT 1 /*controller='organization_feature_flags-copy-flags',route='api/organizations/%28%3FP%3Cparent_lookup_organization_id%3E%5B%5E/.%5D%2B%29/feature_flags/copy_flags/%3F%24'*/
|
||||
LIMIT 1
|
||||
'''
|
||||
# ---
|
||||
# name: TestOrganizationFeatureFlagCopy.test_copy_feature_flag_create_new.70
|
||||
@@ -1526,7 +1526,7 @@
|
||||
"posthog_survey"."updated_at",
|
||||
"posthog_survey"."archived"
|
||||
FROM "posthog_survey"
|
||||
WHERE "posthog_survey"."linked_flag_id" = 2 /*controller='organization_feature_flags-copy-flags',route='api/organizations/%28%3FP%3Cparent_lookup_organization_id%3E%5B%5E/.%5D%2B%29/feature_flags/copy_flags/%3F%24'*/
|
||||
WHERE "posthog_survey"."linked_flag_id" = 2
|
||||
'''
|
||||
# ---
|
||||
# name: TestOrganizationFeatureFlagCopy.test_copy_feature_flag_create_new.71
|
||||
@@ -1540,7 +1540,7 @@
|
||||
"posthog_earlyaccessfeature"."documentation_url",
|
||||
"posthog_earlyaccessfeature"."created_at"
|
||||
FROM "posthog_earlyaccessfeature"
|
||||
WHERE "posthog_earlyaccessfeature"."feature_flag_id" = 2 /*controller='organization_feature_flags-copy-flags',route='api/organizations/%28%3FP%3Cparent_lookup_organization_id%3E%5B%5E/.%5D%2B%29/feature_flags/copy_flags/%3F%24'*/
|
||||
WHERE "posthog_earlyaccessfeature"."feature_flag_id" = 2
|
||||
'''
|
||||
# ---
|
||||
# name: TestOrganizationFeatureFlagCopy.test_copy_feature_flag_create_new.72
|
||||
@@ -1564,7 +1564,7 @@
|
||||
FROM "posthog_dashboard"
|
||||
INNER JOIN "posthog_featureflagdashboards" ON ("posthog_dashboard"."id" = "posthog_featureflagdashboards"."dashboard_id")
|
||||
WHERE (NOT ("posthog_dashboard"."deleted")
|
||||
AND "posthog_featureflagdashboards"."feature_flag_id" = 2) /*controller='organization_feature_flags-copy-flags',route='api/organizations/%28%3FP%3Cparent_lookup_organization_id%3E%5B%5E/.%5D%2B%29/feature_flags/copy_flags/%3F%24'*/
|
||||
AND "posthog_featureflagdashboards"."feature_flag_id" = 2)
|
||||
'''
|
||||
# ---
|
||||
# name: TestOrganizationFeatureFlagCopy.test_copy_feature_flag_create_new.8
|
||||
@@ -1574,7 +1574,7 @@
|
||||
WHERE (NOT "posthog_featureflag"."deleted"
|
||||
AND "posthog_featureflag"."key" = 'copied-flag-key'
|
||||
AND "posthog_featureflag"."team_id" = 2)
|
||||
LIMIT 1 /*controller='organization_feature_flags-copy-flags',route='api/organizations/%28%3FP%3Cparent_lookup_organization_id%3E%5B%5E/.%5D%2B%29/feature_flags/copy_flags/%3F%24'*/
|
||||
LIMIT 1
|
||||
'''
|
||||
# ---
|
||||
# name: TestOrganizationFeatureFlagCopy.test_copy_feature_flag_create_new.9
|
||||
@@ -1597,7 +1597,7 @@
|
||||
FROM "posthog_featureflag"
|
||||
WHERE ("posthog_featureflag"."deleted"
|
||||
AND "posthog_featureflag"."key" = 'copied-flag-key'
|
||||
AND "posthog_featureflag"."team_id" = 2) /*controller='organization_feature_flags-copy-flags',route='api/organizations/%28%3FP%3Cparent_lookup_organization_id%3E%5B%5E/.%5D%2B%29/feature_flags/copy_flags/%3F%24'*/
|
||||
AND "posthog_featureflag"."team_id" = 2)
|
||||
'''
|
||||
# ---
|
||||
# name: TestOrganizationFeatureFlagGet.test_get_feature_flag_success
|
||||
@@ -1628,7 +1628,7 @@
|
||||
"posthog_user"."events_column_config"
|
||||
FROM "posthog_user"
|
||||
WHERE "posthog_user"."id" = 2
|
||||
LIMIT 21 /**/
|
||||
LIMIT 21
|
||||
'''
|
||||
# ---
|
||||
# name: TestOrganizationFeatureFlagGet.test_get_feature_flag_success.1
|
||||
@@ -1654,7 +1654,7 @@
|
||||
"posthog_organization"."available_features"
|
||||
FROM "posthog_organization"
|
||||
WHERE "posthog_organization"."id" = '00000000-0000-0000-0000-000000000000'::uuid
|
||||
LIMIT 21 /*controller='organization_feature_flags-detail',route='api/organizations/%28%3FP%3Cparent_lookup_organization_id%3E%5B%5E/.%5D%2B%29/feature_flags/%28%3FP%3Cfeature_flag_key%3E%5B%5E/.%5D%2B%29/%3F%24'*/
|
||||
LIMIT 21
|
||||
'''
|
||||
# ---
|
||||
# name: TestOrganizationFeatureFlagGet.test_get_feature_flag_success.2
|
||||
@@ -1663,7 +1663,7 @@
|
||||
FROM "posthog_organizationmembership"
|
||||
WHERE ("posthog_organizationmembership"."organization_id" = '00000000-0000-0000-0000-000000000000'::uuid
|
||||
AND "posthog_organizationmembership"."user_id" = 2)
|
||||
LIMIT 1 /*controller='organization_feature_flags-detail',route='api/organizations/%28%3FP%3Cparent_lookup_organization_id%3E%5B%5E/.%5D%2B%29/feature_flags/%28%3FP%3Cfeature_flag_key%3E%5B%5E/.%5D%2B%29/%3F%24'*/
|
||||
LIMIT 1
|
||||
'''
|
||||
# ---
|
||||
# name: TestOrganizationFeatureFlagGet.test_get_feature_flag_success.3
|
||||
@@ -1674,7 +1674,7 @@
|
||||
FROM "posthog_instancesetting"
|
||||
WHERE "posthog_instancesetting"."key" = 'constance:posthog:RATE_LIMIT_ENABLED'
|
||||
ORDER BY "posthog_instancesetting"."id" ASC
|
||||
LIMIT 1 /*controller='organization_feature_flags-detail',route='api/organizations/%28%3FP%3Cparent_lookup_organization_id%3E%5B%5E/.%5D%2B%29/feature_flags/%28%3FP%3Cfeature_flag_key%3E%5B%5E/.%5D%2B%29/%3F%24'*/
|
||||
LIMIT 1
|
||||
'''
|
||||
# ---
|
||||
# name: TestOrganizationFeatureFlagGet.test_get_feature_flag_success.4
|
||||
@@ -1726,7 +1726,7 @@
|
||||
"posthog_team"."external_data_workspace_id",
|
||||
"posthog_team"."external_data_workspace_last_synced_at"
|
||||
FROM "posthog_team"
|
||||
WHERE "posthog_team"."organization_id" = '00000000-0000-0000-0000-000000000000'::uuid /*controller='organization_feature_flags-detail',route='api/organizations/%28%3FP%3Cparent_lookup_organization_id%3E%5B%5E/.%5D%2B%29/feature_flags/%28%3FP%3Cfeature_flag_key%3E%5B%5E/.%5D%2B%29/%3F%24'*/
|
||||
WHERE "posthog_team"."organization_id" = '00000000-0000-0000-0000-000000000000'::uuid
|
||||
'''
|
||||
# ---
|
||||
# name: TestOrganizationFeatureFlagGet.test_get_feature_flag_success.5
|
||||
@@ -1753,7 +1753,7 @@
|
||||
2,
|
||||
3,
|
||||
4,
|
||||
5 /* ... */)) /*controller='organization_feature_flags-detail',route='api/organizations/%28%3FP%3Cparent_lookup_organization_id%3E%5B%5E/.%5D%2B%29/feature_flags/%28%3FP%3Cfeature_flag_key%3E%5B%5E/.%5D%2B%29/%3F%24'*/
|
||||
5 /* ... */))
|
||||
'''
|
||||
# ---
|
||||
# name: TestOrganizationFeatureFlagGet.test_get_feature_flag_success.6
|
||||
@@ -1785,7 +1785,7 @@
|
||||
"posthog_user"."events_column_config"
|
||||
FROM "posthog_user"
|
||||
WHERE "posthog_user"."id" = 2
|
||||
LIMIT 21 /*controller='organization_feature_flags-detail',route='api/organizations/%28%3FP%3Cparent_lookup_organization_id%3E%5B%5E/.%5D%2B%29/feature_flags/%28%3FP%3Cfeature_flag_key%3E%5B%5E/.%5D%2B%29/%3F%24'*/
|
||||
LIMIT 21
|
||||
'''
|
||||
# ---
|
||||
# name: TestOrganizationFeatureFlagGet.test_get_feature_flag_success.7
|
||||
@@ -1817,6 +1817,6 @@
|
||||
"posthog_user"."events_column_config"
|
||||
FROM "posthog_user"
|
||||
WHERE "posthog_user"."id" = 2
|
||||
LIMIT 21 /*controller='organization_feature_flags-detail',route='api/organizations/%28%3FP%3Cparent_lookup_organization_id%3E%5B%5E/.%5D%2B%29/feature_flags/%28%3FP%3Cfeature_flag_key%3E%5B%5E/.%5D%2B%29/%3F%24'*/
|
||||
LIMIT 21
|
||||
'''
|
||||
# ---
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
"posthog_user"."events_column_config"
|
||||
FROM "posthog_user"
|
||||
WHERE "posthog_user"."id" = 2
|
||||
LIMIT 21 /**/
|
||||
LIMIT 21
|
||||
'''
|
||||
# ---
|
||||
# name: TestPluginAPI.test_listing_plugins_is_not_nplus1.1
|
||||
@@ -53,7 +53,7 @@
|
||||
"posthog_organization"."available_features"
|
||||
FROM "posthog_organization"
|
||||
WHERE "posthog_organization"."id" = '00000000-0000-0000-0000-000000000000'::uuid
|
||||
LIMIT 21 /*controller='organization_plugins-list',route='api/organizations/%28%3FP%3Cparent_lookup_organization_id%3E%5B%5E/.%5D%2B%29/plugins/%3F%24'*/
|
||||
LIMIT 21
|
||||
'''
|
||||
# ---
|
||||
# name: TestPluginAPI.test_listing_plugins_is_not_nplus1.10
|
||||
@@ -67,7 +67,7 @@
|
||||
FROM "posthog_pluginconfig" U0
|
||||
INNER JOIN "posthog_team" U1 ON (U0."team_id" = U1."id")
|
||||
WHERE (NOT U0."deleted"
|
||||
AND U1."organization_id" = '00000000-0000-0000-0000-000000000000'::uuid))) /*controller='organization_plugins-list',route='api/organizations/%28%3FP%3Cparent_lookup_organization_id%3E%5B%5E/.%5D%2B%29/plugins/%3F%24'*/
|
||||
AND U1."organization_id" = '00000000-0000-0000-0000-000000000000'::uuid)))
|
||||
'''
|
||||
# ---
|
||||
# name: TestPluginAPI.test_listing_plugins_is_not_nplus1.11
|
||||
@@ -126,7 +126,7 @@
|
||||
INNER JOIN "posthog_team" U1 ON (U0."team_id" = U1."id")
|
||||
WHERE (NOT U0."deleted"
|
||||
AND U1."organization_id" = '00000000-0000-0000-0000-000000000000'::uuid)))
|
||||
LIMIT 100 /*controller='organization_plugins-list',route='api/organizations/%28%3FP%3Cparent_lookup_organization_id%3E%5B%5E/.%5D%2B%29/plugins/%3F%24'*/
|
||||
LIMIT 100
|
||||
'''
|
||||
# ---
|
||||
# name: TestPluginAPI.test_listing_plugins_is_not_nplus1.12
|
||||
@@ -157,7 +157,7 @@
|
||||
"posthog_user"."events_column_config"
|
||||
FROM "posthog_user"
|
||||
WHERE "posthog_user"."id" = 2
|
||||
LIMIT 21 /**/
|
||||
LIMIT 21
|
||||
'''
|
||||
# ---
|
||||
# name: TestPluginAPI.test_listing_plugins_is_not_nplus1.13
|
||||
@@ -183,7 +183,7 @@
|
||||
"posthog_organization"."available_features"
|
||||
FROM "posthog_organization"
|
||||
WHERE "posthog_organization"."id" = '00000000-0000-0000-0000-000000000000'::uuid
|
||||
LIMIT 21 /*controller='organization_plugins-list',route='api/organizations/%28%3FP%3Cparent_lookup_organization_id%3E%5B%5E/.%5D%2B%29/plugins/%3F%24'*/
|
||||
LIMIT 21
|
||||
'''
|
||||
# ---
|
||||
# name: TestPluginAPI.test_listing_plugins_is_not_nplus1.14
|
||||
@@ -209,7 +209,7 @@
|
||||
"posthog_organization"."available_features"
|
||||
FROM "posthog_organization"
|
||||
WHERE "posthog_organization"."id" = '00000000-0000-0000-0000-000000000000'::uuid
|
||||
LIMIT 21 /*controller='organization_plugins-list',route='api/organizations/%28%3FP%3Cparent_lookup_organization_id%3E%5B%5E/.%5D%2B%29/plugins/%3F%24'*/
|
||||
LIMIT 21
|
||||
'''
|
||||
# ---
|
||||
# name: TestPluginAPI.test_listing_plugins_is_not_nplus1.15
|
||||
@@ -218,7 +218,7 @@
|
||||
FROM "posthog_organizationmembership"
|
||||
WHERE ("posthog_organizationmembership"."organization_id" = '00000000-0000-0000-0000-000000000000'::uuid
|
||||
AND "posthog_organizationmembership"."user_id" = 2)
|
||||
LIMIT 1 /*controller='organization_plugins-list',route='api/organizations/%28%3FP%3Cparent_lookup_organization_id%3E%5B%5E/.%5D%2B%29/plugins/%3F%24'*/
|
||||
LIMIT 1
|
||||
'''
|
||||
# ---
|
||||
# name: TestPluginAPI.test_listing_plugins_is_not_nplus1.16
|
||||
@@ -232,7 +232,7 @@
|
||||
FROM "posthog_pluginconfig" U0
|
||||
INNER JOIN "posthog_team" U1 ON (U0."team_id" = U1."id")
|
||||
WHERE (NOT U0."deleted"
|
||||
AND U1."organization_id" = '00000000-0000-0000-0000-000000000000'::uuid))) /*controller='organization_plugins-list',route='api/organizations/%28%3FP%3Cparent_lookup_organization_id%3E%5B%5E/.%5D%2B%29/plugins/%3F%24'*/
|
||||
AND U1."organization_id" = '00000000-0000-0000-0000-000000000000'::uuid)))
|
||||
'''
|
||||
# ---
|
||||
# name: TestPluginAPI.test_listing_plugins_is_not_nplus1.17
|
||||
@@ -291,7 +291,7 @@
|
||||
INNER JOIN "posthog_team" U1 ON (U0."team_id" = U1."id")
|
||||
WHERE (NOT U0."deleted"
|
||||
AND U1."organization_id" = '00000000-0000-0000-0000-000000000000'::uuid)))
|
||||
LIMIT 100 /*controller='organization_plugins-list',route='api/organizations/%28%3FP%3Cparent_lookup_organization_id%3E%5B%5E/.%5D%2B%29/plugins/%3F%24'*/
|
||||
LIMIT 100
|
||||
'''
|
||||
# ---
|
||||
# name: TestPluginAPI.test_listing_plugins_is_not_nplus1.18
|
||||
@@ -322,7 +322,7 @@
|
||||
"posthog_user"."events_column_config"
|
||||
FROM "posthog_user"
|
||||
WHERE "posthog_user"."id" = 2
|
||||
LIMIT 21 /**/
|
||||
LIMIT 21
|
||||
'''
|
||||
# ---
|
||||
# name: TestPluginAPI.test_listing_plugins_is_not_nplus1.19
|
||||
@@ -348,7 +348,7 @@
|
||||
"posthog_organization"."available_features"
|
||||
FROM "posthog_organization"
|
||||
WHERE "posthog_organization"."id" = '00000000-0000-0000-0000-000000000000'::uuid
|
||||
LIMIT 21 /*controller='organization_plugins-list',route='api/organizations/%28%3FP%3Cparent_lookup_organization_id%3E%5B%5E/.%5D%2B%29/plugins/%3F%24'*/
|
||||
LIMIT 21
|
||||
'''
|
||||
# ---
|
||||
# name: TestPluginAPI.test_listing_plugins_is_not_nplus1.2
|
||||
@@ -374,7 +374,7 @@
|
||||
"posthog_organization"."available_features"
|
||||
FROM "posthog_organization"
|
||||
WHERE "posthog_organization"."id" = '00000000-0000-0000-0000-000000000000'::uuid
|
||||
LIMIT 21 /*controller='organization_plugins-list',route='api/organizations/%28%3FP%3Cparent_lookup_organization_id%3E%5B%5E/.%5D%2B%29/plugins/%3F%24'*/
|
||||
LIMIT 21
|
||||
'''
|
||||
# ---
|
||||
# name: TestPluginAPI.test_listing_plugins_is_not_nplus1.20
|
||||
@@ -400,7 +400,7 @@
|
||||
"posthog_organization"."available_features"
|
||||
FROM "posthog_organization"
|
||||
WHERE "posthog_organization"."id" = '00000000-0000-0000-0000-000000000000'::uuid
|
||||
LIMIT 21 /*controller='organization_plugins-list',route='api/organizations/%28%3FP%3Cparent_lookup_organization_id%3E%5B%5E/.%5D%2B%29/plugins/%3F%24'*/
|
||||
LIMIT 21
|
||||
'''
|
||||
# ---
|
||||
# name: TestPluginAPI.test_listing_plugins_is_not_nplus1.21
|
||||
@@ -409,7 +409,7 @@
|
||||
FROM "posthog_organizationmembership"
|
||||
WHERE ("posthog_organizationmembership"."organization_id" = '00000000-0000-0000-0000-000000000000'::uuid
|
||||
AND "posthog_organizationmembership"."user_id" = 2)
|
||||
LIMIT 1 /*controller='organization_plugins-list',route='api/organizations/%28%3FP%3Cparent_lookup_organization_id%3E%5B%5E/.%5D%2B%29/plugins/%3F%24'*/
|
||||
LIMIT 1
|
||||
'''
|
||||
# ---
|
||||
# name: TestPluginAPI.test_listing_plugins_is_not_nplus1.22
|
||||
@@ -423,7 +423,7 @@
|
||||
FROM "posthog_pluginconfig" U0
|
||||
INNER JOIN "posthog_team" U1 ON (U0."team_id" = U1."id")
|
||||
WHERE (NOT U0."deleted"
|
||||
AND U1."organization_id" = '00000000-0000-0000-0000-000000000000'::uuid))) /*controller='organization_plugins-list',route='api/organizations/%28%3FP%3Cparent_lookup_organization_id%3E%5B%5E/.%5D%2B%29/plugins/%3F%24'*/
|
||||
AND U1."organization_id" = '00000000-0000-0000-0000-000000000000'::uuid)))
|
||||
'''
|
||||
# ---
|
||||
# name: TestPluginAPI.test_listing_plugins_is_not_nplus1.23
|
||||
@@ -482,7 +482,7 @@
|
||||
INNER JOIN "posthog_team" U1 ON (U0."team_id" = U1."id")
|
||||
WHERE (NOT U0."deleted"
|
||||
AND U1."organization_id" = '00000000-0000-0000-0000-000000000000'::uuid)))
|
||||
LIMIT 100 /*controller='organization_plugins-list',route='api/organizations/%28%3FP%3Cparent_lookup_organization_id%3E%5B%5E/.%5D%2B%29/plugins/%3F%24'*/
|
||||
LIMIT 100
|
||||
'''
|
||||
# ---
|
||||
# name: TestPluginAPI.test_listing_plugins_is_not_nplus1.3
|
||||
@@ -491,7 +491,7 @@
|
||||
FROM "posthog_organizationmembership"
|
||||
WHERE ("posthog_organizationmembership"."organization_id" = '00000000-0000-0000-0000-000000000000'::uuid
|
||||
AND "posthog_organizationmembership"."user_id" = 2)
|
||||
LIMIT 1 /*controller='organization_plugins-list',route='api/organizations/%28%3FP%3Cparent_lookup_organization_id%3E%5B%5E/.%5D%2B%29/plugins/%3F%24'*/
|
||||
LIMIT 1
|
||||
'''
|
||||
# ---
|
||||
# name: TestPluginAPI.test_listing_plugins_is_not_nplus1.4
|
||||
@@ -502,7 +502,7 @@
|
||||
FROM "posthog_instancesetting"
|
||||
WHERE "posthog_instancesetting"."key" = 'constance:posthog:RATE_LIMIT_ENABLED'
|
||||
ORDER BY "posthog_instancesetting"."id" ASC
|
||||
LIMIT 1 /*controller='organization_plugins-list',route='api/organizations/%28%3FP%3Cparent_lookup_organization_id%3E%5B%5E/.%5D%2B%29/plugins/%3F%24'*/
|
||||
LIMIT 1
|
||||
'''
|
||||
# ---
|
||||
# name: TestPluginAPI.test_listing_plugins_is_not_nplus1.5
|
||||
@@ -516,7 +516,7 @@
|
||||
FROM "posthog_pluginconfig" U0
|
||||
INNER JOIN "posthog_team" U1 ON (U0."team_id" = U1."id")
|
||||
WHERE (NOT U0."deleted"
|
||||
AND U1."organization_id" = '00000000-0000-0000-0000-000000000000'::uuid))) /*controller='organization_plugins-list',route='api/organizations/%28%3FP%3Cparent_lookup_organization_id%3E%5B%5E/.%5D%2B%29/plugins/%3F%24'*/
|
||||
AND U1."organization_id" = '00000000-0000-0000-0000-000000000000'::uuid)))
|
||||
'''
|
||||
# ---
|
||||
# name: TestPluginAPI.test_listing_plugins_is_not_nplus1.6
|
||||
@@ -547,7 +547,7 @@
|
||||
"posthog_user"."events_column_config"
|
||||
FROM "posthog_user"
|
||||
WHERE "posthog_user"."id" = 2
|
||||
LIMIT 21 /**/
|
||||
LIMIT 21
|
||||
'''
|
||||
# ---
|
||||
# name: TestPluginAPI.test_listing_plugins_is_not_nplus1.7
|
||||
@@ -573,7 +573,7 @@
|
||||
"posthog_organization"."available_features"
|
||||
FROM "posthog_organization"
|
||||
WHERE "posthog_organization"."id" = '00000000-0000-0000-0000-000000000000'::uuid
|
||||
LIMIT 21 /*controller='organization_plugins-list',route='api/organizations/%28%3FP%3Cparent_lookup_organization_id%3E%5B%5E/.%5D%2B%29/plugins/%3F%24'*/
|
||||
LIMIT 21
|
||||
'''
|
||||
# ---
|
||||
# name: TestPluginAPI.test_listing_plugins_is_not_nplus1.8
|
||||
@@ -599,7 +599,7 @@
|
||||
"posthog_organization"."available_features"
|
||||
FROM "posthog_organization"
|
||||
WHERE "posthog_organization"."id" = '00000000-0000-0000-0000-000000000000'::uuid
|
||||
LIMIT 21 /*controller='organization_plugins-list',route='api/organizations/%28%3FP%3Cparent_lookup_organization_id%3E%5B%5E/.%5D%2B%29/plugins/%3F%24'*/
|
||||
LIMIT 21
|
||||
'''
|
||||
# ---
|
||||
# name: TestPluginAPI.test_listing_plugins_is_not_nplus1.9
|
||||
@@ -608,6 +608,6 @@
|
||||
FROM "posthog_organizationmembership"
|
||||
WHERE ("posthog_organizationmembership"."organization_id" = '00000000-0000-0000-0000-000000000000'::uuid
|
||||
AND "posthog_organizationmembership"."user_id" = 2)
|
||||
LIMIT 1 /*controller='organization_plugins-list',route='api/organizations/%28%3FP%3Cparent_lookup_organization_id%3E%5B%5E/.%5D%2B%29/plugins/%3F%24'*/
|
||||
LIMIT 1
|
||||
'''
|
||||
# ---
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
"posthog_user"."events_column_config"
|
||||
FROM "posthog_user"
|
||||
WHERE "posthog_user"."id" = 2
|
||||
LIMIT 21 /**/
|
||||
LIMIT 21
|
||||
'''
|
||||
# ---
|
||||
# name: TestPreflight.test_cloud_preflight_limited_db_queries.1
|
||||
@@ -38,7 +38,7 @@
|
||||
FROM "posthog_instancesetting"
|
||||
WHERE "posthog_instancesetting"."key" IN ('constance:posthog:SLACK_APP_CLIENT_ID',
|
||||
'constance:posthog:SLACK_APP_CLIENT_SECRET',
|
||||
'constance:posthog:SLACK_APP_SIGNING_SECRET') /*controller='posthog.views.preflight_check',route='%5E_preflight/%3F%28%3F%3A%5B%3F%23%5D.%2A%29%3F%24'*/
|
||||
'constance:posthog:SLACK_APP_SIGNING_SECRET')
|
||||
'''
|
||||
# ---
|
||||
# name: TestPreflight.test_cloud_preflight_limited_db_queries.2
|
||||
@@ -98,6 +98,6 @@
|
||||
"posthog_team"."external_data_workspace_last_synced_at"
|
||||
FROM "posthog_team"
|
||||
WHERE "posthog_team"."id" = 2
|
||||
LIMIT 21 /*controller='posthog.views.preflight_check',route='%5E_preflight/%3F%28%3F%3A%5B%3F%23%5D.%2A%29%3F%24'*/
|
||||
LIMIT 21
|
||||
'''
|
||||
# ---
|
||||
|
||||
@@ -159,7 +159,7 @@
|
||||
"posthog_team"."external_data_workspace_last_synced_at"
|
||||
FROM "posthog_team"
|
||||
WHERE "posthog_team"."api_token" = 'token123'
|
||||
LIMIT 21 /*controller='posthog.api.survey.surveys',route='%5Eapi/surveys/%3F%28%3F%3A%5B%3F%23%5D.%2A%29%3F%24'*/
|
||||
LIMIT 21
|
||||
'''
|
||||
# ---
|
||||
# name: TestSurveysAPIList.test_list_surveys.6
|
||||
@@ -214,6 +214,6 @@
|
||||
LEFT OUTER JOIN "posthog_featureflag" ON ("posthog_survey"."linked_flag_id" = "posthog_featureflag"."id")
|
||||
LEFT OUTER JOIN "posthog_featureflag" T4 ON ("posthog_survey"."targeting_flag_id" = T4."id")
|
||||
WHERE ("posthog_survey"."team_id" = 2
|
||||
AND NOT ("posthog_survey"."archived")) /*controller='posthog.api.survey.surveys',route='%5Eapi/surveys/%3F%28%3F%3A%5B%3F%23%5D.%2A%29%3F%24'*/
|
||||
AND NOT ("posthog_survey"."archived"))
|
||||
'''
|
||||
# ---
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -27,7 +27,7 @@
|
||||
"posthog_user"."events_column_config"
|
||||
FROM "posthog_user"
|
||||
WHERE "posthog_user"."id" = 2
|
||||
LIMIT 21 /**/
|
||||
LIMIT 21
|
||||
'''
|
||||
# ---
|
||||
# name: TestNotebooks.test_updates_notebook.1
|
||||
@@ -80,7 +80,7 @@
|
||||
"posthog_team"."external_data_workspace_last_synced_at"
|
||||
FROM "posthog_team"
|
||||
WHERE "posthog_team"."id" = 2
|
||||
LIMIT 21 /*controller='project_notebooks-list',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/notebooks/%3F%24'*/
|
||||
LIMIT 21
|
||||
'''
|
||||
# ---
|
||||
# name: TestNotebooks.test_updates_notebook.10
|
||||
@@ -101,7 +101,7 @@
|
||||
WHERE "posthog_notebook"."id" = '00000000-0000-0000-0000-000000000000'::uuid
|
||||
LIMIT 21
|
||||
FOR
|
||||
UPDATE /*controller='project_notebooks-detail',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/notebooks/%28%3FP%3Cshort_id%3E%5B%5E/.%5D%2B%29/%3F%24'*/
|
||||
UPDATE
|
||||
'''
|
||||
# ---
|
||||
# name: TestNotebooks.test_updates_notebook.11
|
||||
@@ -133,7 +133,7 @@
|
||||
"posthog_user"."events_column_config"
|
||||
FROM "posthog_user"
|
||||
WHERE "posthog_user"."id" = 2
|
||||
LIMIT 21 /*controller='project_notebooks-detail',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/notebooks/%28%3FP%3Cshort_id%3E%5B%5E/.%5D%2B%29/%3F%24'*/
|
||||
LIMIT 21
|
||||
'''
|
||||
# ---
|
||||
# name: TestNotebooks.test_updates_notebook.12
|
||||
@@ -164,7 +164,7 @@
|
||||
"posthog_user"."events_column_config"
|
||||
FROM "posthog_user"
|
||||
WHERE "posthog_user"."id" = 2
|
||||
LIMIT 21 /**/
|
||||
LIMIT 21
|
||||
'''
|
||||
# ---
|
||||
# name: TestNotebooks.test_updates_notebook.13
|
||||
@@ -217,7 +217,7 @@
|
||||
"posthog_team"."external_data_workspace_last_synced_at"
|
||||
FROM "posthog_team"
|
||||
WHERE "posthog_team"."id" = 2
|
||||
LIMIT 21 /*controller='project_notebooks-all-activity',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/notebooks/activity/%3F%24'*/
|
||||
LIMIT 21
|
||||
'''
|
||||
# ---
|
||||
# name: TestNotebooks.test_updates_notebook.14
|
||||
@@ -249,7 +249,7 @@
|
||||
"posthog_organization"."available_features"
|
||||
FROM "posthog_organizationmembership"
|
||||
INNER JOIN "posthog_organization" ON ("posthog_organizationmembership"."organization_id" = "posthog_organization"."id")
|
||||
WHERE "posthog_organizationmembership"."user_id" = 2 /*controller='project_notebooks-all-activity',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/notebooks/activity/%3F%24'*/
|
||||
WHERE "posthog_organizationmembership"."user_id" = 2
|
||||
'''
|
||||
# ---
|
||||
# name: TestNotebooks.test_updates_notebook.15
|
||||
@@ -260,7 +260,7 @@
|
||||
FROM "posthog_instancesetting"
|
||||
WHERE "posthog_instancesetting"."key" = 'constance:posthog:RATE_LIMIT_ENABLED'
|
||||
ORDER BY "posthog_instancesetting"."id" ASC
|
||||
LIMIT 1 /*controller='project_notebooks-all-activity',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/notebooks/activity/%3F%24'*/
|
||||
LIMIT 1
|
||||
'''
|
||||
# ---
|
||||
# name: TestNotebooks.test_updates_notebook.16
|
||||
@@ -268,7 +268,7 @@
|
||||
SELECT COUNT(*) AS "__count"
|
||||
FROM "posthog_activitylog"
|
||||
WHERE ("posthog_activitylog"."scope" = 'Notebook'
|
||||
AND "posthog_activitylog"."team_id" = 2) /*controller='project_notebooks-all-activity',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/notebooks/activity/%3F%24'*/
|
||||
AND "posthog_activitylog"."team_id" = 2)
|
||||
'''
|
||||
# ---
|
||||
# name: TestNotebooks.test_updates_notebook.17
|
||||
@@ -314,7 +314,7 @@
|
||||
WHERE ("posthog_activitylog"."scope" = 'Notebook'
|
||||
AND "posthog_activitylog"."team_id" = 2)
|
||||
ORDER BY "posthog_activitylog"."created_at" DESC
|
||||
LIMIT 2 /*controller='project_notebooks-all-activity',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/notebooks/activity/%3F%24'*/
|
||||
LIMIT 2
|
||||
'''
|
||||
# ---
|
||||
# name: TestNotebooks.test_updates_notebook.2
|
||||
@@ -346,7 +346,7 @@
|
||||
"posthog_organization"."available_features"
|
||||
FROM "posthog_organizationmembership"
|
||||
INNER JOIN "posthog_organization" ON ("posthog_organizationmembership"."organization_id" = "posthog_organization"."id")
|
||||
WHERE "posthog_organizationmembership"."user_id" = 2 /*controller='project_notebooks-list',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/notebooks/%3F%24'*/
|
||||
WHERE "posthog_organizationmembership"."user_id" = 2
|
||||
'''
|
||||
# ---
|
||||
# name: TestNotebooks.test_updates_notebook.3
|
||||
@@ -357,7 +357,7 @@
|
||||
FROM "posthog_instancesetting"
|
||||
WHERE "posthog_instancesetting"."key" = 'constance:posthog:RATE_LIMIT_ENABLED'
|
||||
ORDER BY "posthog_instancesetting"."id" ASC
|
||||
LIMIT 1 /*controller='project_notebooks-list',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/notebooks/%3F%24'*/
|
||||
LIMIT 1
|
||||
'''
|
||||
# ---
|
||||
# name: TestNotebooks.test_updates_notebook.4
|
||||
@@ -388,7 +388,7 @@
|
||||
"posthog_user"."events_column_config"
|
||||
FROM "posthog_user"
|
||||
WHERE "posthog_user"."id" = 2
|
||||
LIMIT 21 /**/
|
||||
LIMIT 21
|
||||
'''
|
||||
# ---
|
||||
# name: TestNotebooks.test_updates_notebook.5
|
||||
@@ -441,7 +441,7 @@
|
||||
"posthog_team"."external_data_workspace_last_synced_at"
|
||||
FROM "posthog_team"
|
||||
WHERE "posthog_team"."id" = 2
|
||||
LIMIT 21 /*controller='project_notebooks-detail',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/notebooks/%28%3FP%3Cshort_id%3E%5B%5E/.%5D%2B%29/%3F%24'*/
|
||||
LIMIT 21
|
||||
'''
|
||||
# ---
|
||||
# name: TestNotebooks.test_updates_notebook.6
|
||||
@@ -473,7 +473,7 @@
|
||||
"posthog_organization"."available_features"
|
||||
FROM "posthog_organizationmembership"
|
||||
INNER JOIN "posthog_organization" ON ("posthog_organizationmembership"."organization_id" = "posthog_organization"."id")
|
||||
WHERE "posthog_organizationmembership"."user_id" = 2 /*controller='project_notebooks-detail',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/notebooks/%28%3FP%3Cshort_id%3E%5B%5E/.%5D%2B%29/%3F%24'*/
|
||||
WHERE "posthog_organizationmembership"."user_id" = 2
|
||||
'''
|
||||
# ---
|
||||
# name: TestNotebooks.test_updates_notebook.7
|
||||
@@ -484,7 +484,7 @@
|
||||
FROM "posthog_instancesetting"
|
||||
WHERE "posthog_instancesetting"."key" = 'constance:posthog:RATE_LIMIT_ENABLED'
|
||||
ORDER BY "posthog_instancesetting"."id" ASC
|
||||
LIMIT 1 /*controller='project_notebooks-detail',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/notebooks/%28%3FP%3Cshort_id%3E%5B%5E/.%5D%2B%29/%3F%24'*/
|
||||
LIMIT 1
|
||||
'''
|
||||
# ---
|
||||
# name: TestNotebooks.test_updates_notebook.8
|
||||
@@ -610,7 +610,7 @@
|
||||
LEFT OUTER JOIN "posthog_user" T4 ON ("posthog_notebook"."last_modified_by_id" = T4."id")
|
||||
WHERE ("posthog_notebook"."team_id" = 2
|
||||
AND "posthog_notebook"."short_id" = '00000000')
|
||||
LIMIT 21 /*controller='project_notebooks-detail',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/notebooks/%28%3FP%3Cshort_id%3E%5B%5E/.%5D%2B%29/%3F%24'*/
|
||||
LIMIT 21
|
||||
'''
|
||||
# ---
|
||||
# name: TestNotebooks.test_updates_notebook.9
|
||||
@@ -629,6 +629,6 @@
|
||||
"posthog_notebook"."last_modified_by_id"
|
||||
FROM "posthog_notebook"
|
||||
WHERE "posthog_notebook"."id" = '00000000-0000-0000-0000-000000000000'::uuid
|
||||
LIMIT 21 /*controller='project_notebooks-detail',route='api/projects/%28%3FP%3Cparent_lookup_team_id%3E%5B%5E/.%5D%2B%29/notebooks/%28%3FP%3Cshort_id%3E%5B%5E/.%5D%2B%29/%3F%24'*/
|
||||
LIMIT 21
|
||||
'''
|
||||
# ---
|
||||
|
||||
@@ -3656,7 +3656,7 @@ class TestDecideUsesReadReplica(TransactionTestCase):
|
||||
# make sure we have the flags in cache
|
||||
response = self._post_decide(api_version=3)
|
||||
|
||||
with self.assertNumQueries(2, using="replica"), self.assertNumQueries(0, using="default"):
|
||||
with self.assertNumQueries(4, using="replica"), self.assertNumQueries(0, using="default"):
|
||||
response = self._post_decide(api_version=3)
|
||||
# Replica queries:
|
||||
# E 1. SET LOCAL statement_timeout = 600
|
||||
@@ -3833,7 +3833,7 @@ class TestDecideUsesReadReplica(TransactionTestCase):
|
||||
# make sure we have the flags in cache
|
||||
response = self._post_decide(api_version=3)
|
||||
|
||||
with self.assertNumQueries(3, using="replica"), self.assertNumQueries(0, using="default"):
|
||||
with self.assertNumQueries(5, using="replica"), self.assertNumQueries(0, using="default"):
|
||||
response = self._post_decide(api_version=3, distinct_id="cohort_founder")
|
||||
# Replica queries:
|
||||
# E 1. SET LOCAL statement_timeout = 600
|
||||
@@ -3851,7 +3851,7 @@ class TestDecideUsesReadReplica(TransactionTestCase):
|
||||
},
|
||||
)
|
||||
|
||||
with self.assertNumQueries(3, using="replica"), self.assertNumQueries(0, using="default"):
|
||||
with self.assertNumQueries(5, using="replica"), self.assertNumQueries(0, using="default"):
|
||||
response = self._post_decide(api_version=3, distinct_id="example_id")
|
||||
# Replica queries:
|
||||
# E 1. SET LOCAL statement_timeout = 600
|
||||
@@ -3869,7 +3869,7 @@ class TestDecideUsesReadReplica(TransactionTestCase):
|
||||
},
|
||||
)
|
||||
|
||||
with self.assertNumQueries(3, using="replica"), self.assertNumQueries(0, using="default"):
|
||||
with self.assertNumQueries(5, using="replica"), self.assertNumQueries(0, using="default"):
|
||||
response = self._post_decide(api_version=3, distinct_id="cohort_secondary")
|
||||
# Replica queries:
|
||||
# E 1. SET LOCAL statement_timeout = 600
|
||||
@@ -3962,7 +3962,7 @@ class TestDecideUsesReadReplica(TransactionTestCase):
|
||||
# make sure caches are populated
|
||||
response = self._post_decide()
|
||||
|
||||
with self.assertNumQueries(5, using="replica"), self.assertNumQueries(0, using="default"):
|
||||
with self.assertNumQueries(9, using="replica"), self.assertNumQueries(0, using="default"):
|
||||
# E 1. SET LOCAL statement_timeout = 300
|
||||
# E 2. SELECT "posthog_persondistinctid"."person_id", "posthog_persondistinctid"."distinct_id" FROM "posthog_persondistinctid"
|
||||
# WHERE ("posthog_persondistinctid"."distinct_id" IN ('example_id') AND "posthog_persondistinctid"."team_id" = 1)
|
||||
@@ -3995,7 +3995,7 @@ class TestDecideUsesReadReplica(TransactionTestCase):
|
||||
)
|
||||
|
||||
# new request with hash key overrides but not writes should not go to main database
|
||||
with self.assertNumQueries(7, using="replica"), self.assertNumQueries(0, using="default"):
|
||||
with self.assertNumQueries(13, using="replica"), self.assertNumQueries(0, using="default"):
|
||||
# Replica queries:
|
||||
# E 1. SET LOCAL statement_timeout = 300
|
||||
# E 2. WITH some CTEs,
|
||||
@@ -4024,7 +4024,7 @@ class TestDecideUsesReadReplica(TransactionTestCase):
|
||||
# now main database is down, but does not affect replica
|
||||
|
||||
with connections["default"].execute_wrapper(QueryTimeoutWrapper()), self.assertNumQueries(
|
||||
7, using="replica"
|
||||
13, using="replica"
|
||||
), self.assertNumQueries(0, using="default"):
|
||||
# Replica queries:
|
||||
# E 1. SET LOCAL statement_timeout = 300
|
||||
@@ -4134,7 +4134,7 @@ class TestDecideUsesReadReplica(TransactionTestCase):
|
||||
# make sure caches are populated
|
||||
response = self._post_decide(api_version=3)
|
||||
|
||||
with self.assertNumQueries(5, using="replica"), self.assertNumQueries(0, using="default"):
|
||||
with self.assertNumQueries(9, using="replica"), self.assertNumQueries(0, using="default"):
|
||||
# E 1. SET LOCAL statement_timeout = 300
|
||||
# E 2. SELECT "posthog_persondistinctid"."person_id", "posthog_persondistinctid"."distinct_id" FROM "posthog_persondistinctid"
|
||||
# WHERE ("posthog_persondistinctid"."distinct_id" IN ('example_id') AND "posthog_persondistinctid"."team_id" = 1)
|
||||
@@ -4153,7 +4153,7 @@ class TestDecideUsesReadReplica(TransactionTestCase):
|
||||
PersonDistinctId.objects.using("default").create(person=person, distinct_id="other_id", team=self.team)
|
||||
|
||||
# request with hash key overrides and _new_ writes should go to main database
|
||||
with self.assertNumQueries(4, using="replica"), self.assertNumQueries(5, using="default"):
|
||||
with self.assertNumQueries(8, using="replica"), self.assertNumQueries(9, using="default"):
|
||||
# Replica queries:
|
||||
# E 1. SET LOCAL statement_timeout = 300
|
||||
# E 2. WITH some CTEs,
|
||||
@@ -4244,7 +4244,7 @@ class TestDecideUsesReadReplica(TransactionTestCase):
|
||||
version=0,
|
||||
)
|
||||
|
||||
with self.assertNumQueries(2, using="replica"), self.assertNumQueries(0, using="default"):
|
||||
with self.assertNumQueries(4, using="replica"), self.assertNumQueries(0, using="default"):
|
||||
# E 1. SET LOCAL statement_timeout = 300
|
||||
# E 2. SELECT "posthog_grouptypemapping"."id", -- a.k.a. get group type mappings
|
||||
response = self._post_decide(distinct_id="example_id")
|
||||
@@ -4254,7 +4254,7 @@ class TestDecideUsesReadReplica(TransactionTestCase):
|
||||
)
|
||||
self.assertFalse(response.json()["errorsWhileComputingFlags"])
|
||||
|
||||
with self.assertNumQueries(5, using="replica"), self.assertNumQueries(0, using="default"):
|
||||
with self.assertNumQueries(9, using="replica"), self.assertNumQueries(0, using="default"):
|
||||
# E 1. SET LOCAL statement_timeout = 300
|
||||
# E 2. SELECT "posthog_grouptypemapping"."id", "posthog_grouptypemapping"."team_id", -- a.k.a get group type mappings
|
||||
|
||||
@@ -4271,7 +4271,7 @@ class TestDecideUsesReadReplica(TransactionTestCase):
|
||||
)
|
||||
self.assertFalse(response.json()["errorsWhileComputingFlags"])
|
||||
|
||||
with self.assertNumQueries(5, using="replica"), self.assertNumQueries(0, using="default"):
|
||||
with self.assertNumQueries(9, using="replica"), self.assertNumQueries(0, using="default"):
|
||||
# E 2. SET LOCAL statement_timeout = 300
|
||||
# E 3. SELECT "posthog_grouptypemapping"."id", "posthog_grouptypemapping"."team_id", -- a.k.a get group type mappings
|
||||
|
||||
@@ -4317,7 +4317,7 @@ class TestDecideUsesReadReplica(TransactionTestCase):
|
||||
# update caches
|
||||
self._post_decide(api_version=3)
|
||||
|
||||
with self.assertNumQueries(2, using="replica"), self.assertNumQueries(0, using="default"):
|
||||
with self.assertNumQueries(4, using="replica"), self.assertNumQueries(0, using="default"):
|
||||
response = self._post_decide(api_version=3)
|
||||
self.assertEqual(response.status_code, status.HTTP_200_OK)
|
||||
injected = response.json()["siteApps"]
|
||||
@@ -4420,7 +4420,7 @@ class TestDecideUsesReadReplica(TransactionTestCase):
|
||||
response = self.client.get(f"/api/feature_flag/local_evaluation")
|
||||
self.assertEqual(response.status_code, status.HTTP_401_UNAUTHORIZED)
|
||||
|
||||
with self.assertNumQueries(3, using="replica"), self.assertNumQueries(3, using="default"):
|
||||
with self.assertNumQueries(3, using="replica"), self.assertNumQueries(5, using="default"):
|
||||
# Captured queries for write DB:
|
||||
# E 1. UPDATE "posthog_personalapikey" SET "last_used_at" = '2023-08-01T11:26:50.728057+00:00'
|
||||
# E 2. SELECT "posthog_team"."id", "posthog_team"."uuid", "posthog_team"."organization_id"
|
||||
@@ -4661,7 +4661,7 @@ class TestDecideUsesReadReplica(TransactionTestCase):
|
||||
PersonalAPIKey.objects.create(label="X", user=self.user, secure_value=hash_key_value(personal_api_key))
|
||||
cache.clear()
|
||||
|
||||
with self.assertNumQueries(4, using="replica"), self.assertNumQueries(3, using="default"):
|
||||
with self.assertNumQueries(4, using="replica"), self.assertNumQueries(5, using="default"):
|
||||
# Captured queries for write DB:
|
||||
# E 1. UPDATE "posthog_personalapikey" SET "last_used_at" = '2023-08-01T11:26:50.728057+00:00'
|
||||
# E 2. SELECT "posthog_team"."id", "posthog_team"."uuid", "posthog_team"."organization_id"
|
||||
@@ -4931,7 +4931,7 @@ class TestDecideUsesReadReplica(TransactionTestCase):
|
||||
client.logout()
|
||||
self.client.logout()
|
||||
|
||||
with self.assertNumQueries(4, using="replica"), self.assertNumQueries(3, using="default"):
|
||||
with self.assertNumQueries(4, using="replica"), self.assertNumQueries(5, using="default"):
|
||||
# Captured queries for write DB:
|
||||
# E 1. UPDATE "posthog_personalapikey" SET "last_used_at" = '2023-08-01T11:26:50.728057+00:00'
|
||||
# E 2. SELECT "posthog_team"."id", "posthog_team"."uuid", "posthog_team"."organization_id"
|
||||
|
||||
@@ -4962,7 +4962,7 @@ class TestResiliency(TransactionTestCase, QueryMatchingTest):
|
||||
self.assertTrue(serialized_data.is_valid())
|
||||
serialized_data.save()
|
||||
|
||||
with self.assertNumQueries(4):
|
||||
with self.assertNumQueries(8):
|
||||
# one query to get group type mappings, another to get group properties
|
||||
# 2 to set statement timeout
|
||||
all_flags, _, _, errors = get_all_feature_flags(team_id, "example_id", groups={"organization": "org:1"})
|
||||
@@ -4972,7 +4972,7 @@ class TestResiliency(TransactionTestCase, QueryMatchingTest):
|
||||
|
||||
# now db is down
|
||||
with snapshot_postgres_queries_context(self), connection.execute_wrapper(QueryTimeoutWrapper()):
|
||||
with self.assertNumQueries(1):
|
||||
with self.assertNumQueries(3):
|
||||
all_flags, _, _, errors = get_all_feature_flags(team_id, "example_id", groups={"organization": "org:1"})
|
||||
|
||||
self.assertTrue("group-flag" not in all_flags)
|
||||
@@ -4981,7 +4981,7 @@ class TestResiliency(TransactionTestCase, QueryMatchingTest):
|
||||
self.assertTrue(errors)
|
||||
|
||||
# # now db is down, but decide was sent correct group property overrides
|
||||
with self.assertNumQueries(1):
|
||||
with self.assertNumQueries(3):
|
||||
all_flags, _, _, errors = get_all_feature_flags(
|
||||
team_id,
|
||||
"random",
|
||||
@@ -4994,7 +4994,7 @@ class TestResiliency(TransactionTestCase, QueryMatchingTest):
|
||||
self.assertTrue(errors)
|
||||
|
||||
# # now db is down, but decide was sent different group property overrides
|
||||
with self.assertNumQueries(1):
|
||||
with self.assertNumQueries(3):
|
||||
all_flags, _, _, errors = get_all_feature_flags(
|
||||
team_id,
|
||||
"exam",
|
||||
@@ -5060,7 +5060,7 @@ class TestResiliency(TransactionTestCase, QueryMatchingTest):
|
||||
self.assertTrue(serialized_data.is_valid())
|
||||
serialized_data.save()
|
||||
|
||||
with self.assertNumQueries(2):
|
||||
with self.assertNumQueries(4):
|
||||
# 1 query to get person properties
|
||||
# 1 to set statement timeout
|
||||
all_flags, _, _, errors = get_all_feature_flags(team_id, "example_id")
|
||||
@@ -5158,7 +5158,7 @@ class TestResiliency(TransactionTestCase, QueryMatchingTest):
|
||||
self.assertTrue(serialized_data.is_valid())
|
||||
serialized_data.save()
|
||||
|
||||
with self.assertNumQueries(2):
|
||||
with self.assertNumQueries(4):
|
||||
# 1 query to set statement timeout
|
||||
# 1 query to get person properties
|
||||
all_flags, _, _, errors = get_all_feature_flags(team_id, "example_id")
|
||||
@@ -5366,7 +5366,7 @@ class TestResiliency(TransactionTestCase, QueryMatchingTest):
|
||||
created_by=self.user,
|
||||
)
|
||||
|
||||
with self.assertNumQueries(2):
|
||||
with self.assertNumQueries(4):
|
||||
# 1 query to get person properties
|
||||
# 1 query to set statement timeout
|
||||
all_flags, _, _, errors = get_all_feature_flags(team_id, "example_id")
|
||||
@@ -5379,7 +5379,7 @@ class TestResiliency(TransactionTestCase, QueryMatchingTest):
|
||||
with snapshot_postgres_queries_context(self), connection.execute_wrapper(slow_query), patch(
|
||||
"posthog.models.feature_flag.flag_matching.FLAG_MATCHING_QUERY_TIMEOUT_MS",
|
||||
500,
|
||||
), self.assertNumQueries(2):
|
||||
), self.assertNumQueries(4):
|
||||
# no extra queries to get person properties for the second flag after first one failed
|
||||
all_flags, _, _, errors = get_all_feature_flags(team_id, "example_id")
|
||||
|
||||
@@ -5458,7 +5458,7 @@ class TestResiliency(TransactionTestCase, QueryMatchingTest):
|
||||
self.assertTrue(serialized_data.is_valid())
|
||||
serialized_data.save()
|
||||
|
||||
with self.assertNumQueries(4):
|
||||
with self.assertNumQueries(8):
|
||||
# one query to get group type mappings, another to get group properties
|
||||
# 2 queries to set statement timeout
|
||||
all_flags, _, _, errors = get_all_feature_flags(team_id, "example_id", groups={"organization": "org:1"})
|
||||
@@ -5471,7 +5471,7 @@ class TestResiliency(TransactionTestCase, QueryMatchingTest):
|
||||
"posthog.models.feature_flag.flag_matching.FLAG_MATCHING_QUERY_TIMEOUT_MS",
|
||||
500,
|
||||
):
|
||||
with self.assertNumQueries(2):
|
||||
with self.assertNumQueries(4):
|
||||
all_flags, _, _, errors = get_all_feature_flags(team_id, "example_id", groups={"organization": "org:1"})
|
||||
|
||||
self.assertTrue("group-flag" not in all_flags)
|
||||
@@ -5480,7 +5480,7 @@ class TestResiliency(TransactionTestCase, QueryMatchingTest):
|
||||
self.assertTrue(errors)
|
||||
|
||||
# # now db is slow, but decide was sent correct group property overrides
|
||||
with self.assertNumQueries(2):
|
||||
with self.assertNumQueries(4):
|
||||
all_flags, _, _, errors = get_all_feature_flags(
|
||||
team_id,
|
||||
"random",
|
||||
@@ -5502,7 +5502,7 @@ class TestResiliency(TransactionTestCase, QueryMatchingTest):
|
||||
)
|
||||
|
||||
# # now db is down, but decide was sent different group property overrides
|
||||
with self.assertNumQueries(2):
|
||||
with self.assertNumQueries(4):
|
||||
all_flags, _, _, errors = get_all_feature_flags(
|
||||
team_id,
|
||||
"exam",
|
||||
@@ -5569,7 +5569,7 @@ class TestResiliency(TransactionTestCase, QueryMatchingTest):
|
||||
self.assertTrue(serialized_data.is_valid())
|
||||
serialized_data.save()
|
||||
|
||||
with snapshot_postgres_queries_context(self), self.assertNumQueries(9):
|
||||
with snapshot_postgres_queries_context(self), self.assertNumQueries(17):
|
||||
all_flags, _, _, errors = get_all_feature_flags(team_id, "example_id", hash_key_override="random")
|
||||
|
||||
self.assertTrue(all_flags["property-flag"])
|
||||
@@ -5589,7 +5589,7 @@ class TestResiliency(TransactionTestCase, QueryMatchingTest):
|
||||
|
||||
# # now db is slow, but decide was sent email parameter with correct email
|
||||
# still need to get hash key override from db, so should time out
|
||||
with self.assertNumQueries(2):
|
||||
with self.assertNumQueries(4):
|
||||
all_flags, _, _, errors = get_all_feature_flags(
|
||||
team_id,
|
||||
"random",
|
||||
@@ -5661,7 +5661,7 @@ class TestResiliency(TransactionTestCase, QueryMatchingTest):
|
||||
self.assertTrue(serialized_data.is_valid())
|
||||
serialized_data.save()
|
||||
|
||||
with self.assertNumQueries(5), self.settings(DECIDE_SKIP_HASH_KEY_OVERRIDE_WRITES=True):
|
||||
with self.assertNumQueries(9), self.settings(DECIDE_SKIP_HASH_KEY_OVERRIDE_WRITES=True):
|
||||
all_flags, _, _, errors = get_all_feature_flags(team_id, "example_id", hash_key_override="random")
|
||||
|
||||
self.assertTrue(all_flags["property-flag"])
|
||||
|
||||
@@ -109,6 +109,9 @@ class DashboardTile(models.Model):
|
||||
if has_no_filters_hash and self.insight.filters != {}:
|
||||
self.filters_hash = generate_insight_cache_key(self.insight, self.dashboard)
|
||||
|
||||
if "update_fields" in kwargs:
|
||||
kwargs["update_fields"].append("filters_hash")
|
||||
|
||||
super(DashboardTile, self).save(*args, **kwargs)
|
||||
|
||||
def copy_to_dashboard(self, dashboard: Dashboard) -> None:
|
||||
|
||||
@@ -790,7 +790,8 @@ def get_all_feature_flags(
|
||||
distinct_ids = [distinct_id, str(hash_key_override)]
|
||||
query = """
|
||||
WITH target_person_ids AS (
|
||||
SELECT team_id, person_id FROM posthog_persondistinctid WHERE team_id = %(team_id)s AND distinct_id IN %(distinct_ids)s
|
||||
SELECT team_id, person_id FROM posthog_persondistinctid WHERE team_id = %(team_id)s AND
|
||||
distinct_id = ANY(%(distinct_ids)s)
|
||||
),
|
||||
existing_overrides AS (
|
||||
SELECT team_id, person_id, feature_flag_key, hash_key FROM posthog_featureflaghashkeyoverride
|
||||
@@ -801,7 +802,7 @@ def get_all_feature_flags(
|
||||
"""
|
||||
cursor.execute(
|
||||
query,
|
||||
{"team_id": team_id, "distinct_ids": tuple(distinct_ids)}, # type: ignore
|
||||
{"team_id": team_id, "distinct_ids": distinct_ids}, # type: ignore
|
||||
)
|
||||
flags_with_no_overrides = [row[0] for row in cursor.fetchall()]
|
||||
should_write_hash_key_override = len(flags_with_no_overrides) > 0
|
||||
@@ -902,7 +903,8 @@ def set_feature_flag_hash_key_overrides(team_id: int, distinct_ids: List[str], h
|
||||
with execute_with_timeout(FLAG_MATCHING_QUERY_TIMEOUT_MS) as cursor:
|
||||
query = """
|
||||
WITH target_person_ids AS (
|
||||
SELECT team_id, person_id FROM posthog_persondistinctid WHERE team_id = %(team_id)s AND distinct_id IN %(distinct_ids)s
|
||||
SELECT team_id, person_id FROM posthog_persondistinctid WHERE team_id = %(team_id)s AND
|
||||
distinct_id = ANY(%(distinct_ids)s)
|
||||
),
|
||||
existing_overrides AS (
|
||||
SELECT team_id, person_id, feature_flag_key, hash_key FROM posthog_featureflaghashkeyoverride
|
||||
@@ -931,7 +933,7 @@ def set_feature_flag_hash_key_overrides(team_id: int, distinct_ids: List[str], h
|
||||
query,
|
||||
{
|
||||
"team_id": team_id,
|
||||
"distinct_ids": tuple(distinct_ids), # type: ignore
|
||||
"distinct_ids": distinct_ids, # type: ignore
|
||||
"hash_key_override": hash_key_override,
|
||||
},
|
||||
)
|
||||
|
||||
@@ -314,7 +314,7 @@
|
||||
FROM "posthog_person"
|
||||
WHERE (UPPER(("posthog_person"."properties" ->> 'urls')::text) LIKE UPPER('%["abcd"]%')
|
||||
AND "posthog_person"."properties" ? 'urls'
|
||||
AND NOT (("posthog_person"."properties" -> 'urls') = 'null')
|
||||
AND NOT (("posthog_person"."properties" -> 'urls') = 'null'::jsonb)
|
||||
AND "posthog_person"."team_id" = 2)
|
||||
'''
|
||||
# ---
|
||||
@@ -333,7 +333,7 @@
|
||||
FROM "posthog_person"
|
||||
WHERE (UPPER(("posthog_person"."properties" ->> '$key')::text) LIKE UPPER('%[''red'']%')
|
||||
AND "posthog_person"."properties" ? '$key'
|
||||
AND NOT (("posthog_person"."properties" -> '$key') = 'null')
|
||||
AND NOT (("posthog_person"."properties" -> '$key') = 'null'::jsonb)
|
||||
AND "posthog_person"."team_id" = 2)
|
||||
'''
|
||||
# ---
|
||||
@@ -343,7 +343,7 @@
|
||||
FROM "posthog_person"
|
||||
WHERE (UPPER(("posthog_person"."properties" ->> '$key')::text) LIKE UPPER('%red%')
|
||||
AND "posthog_person"."properties" ? '$key'
|
||||
AND NOT (("posthog_person"."properties" -> '$key') = 'null')
|
||||
AND NOT (("posthog_person"."properties" -> '$key') = 'null'::jsonb)
|
||||
AND "posthog_person"."team_id" = 2)
|
||||
'''
|
||||
# ---
|
||||
@@ -351,9 +351,9 @@
|
||||
'''
|
||||
SELECT "posthog_person"."uuid"
|
||||
FROM "posthog_person"
|
||||
WHERE (("posthog_person"."properties" -> '$key') > '["2"]'
|
||||
WHERE (("posthog_person"."properties" -> '$key') > '["2"]'::jsonb
|
||||
AND "posthog_person"."properties" ? '$key'
|
||||
AND NOT (("posthog_person"."properties" -> '$key') = 'null')
|
||||
AND NOT (("posthog_person"."properties" -> '$key') = 'null'::jsonb)
|
||||
AND "posthog_person"."team_id" = 2)
|
||||
'''
|
||||
# ---
|
||||
@@ -364,7 +364,7 @@
|
||||
INNER JOIN "posthog_persondistinctid" ON ("posthog_person"."id" = "posthog_persondistinctid"."person_id")
|
||||
WHERE ("posthog_persondistinctid"."distinct_id" = 'example_id'
|
||||
AND "posthog_person"."team_id" = 2
|
||||
AND ("posthog_person"."properties" -> 'created_at') > '["2m", "3d"]')
|
||||
AND ("posthog_person"."properties" -> 'created_at') > '["2m", "3d"]'::jsonb)
|
||||
LIMIT 1
|
||||
'''
|
||||
# ---
|
||||
@@ -375,7 +375,7 @@
|
||||
INNER JOIN "posthog_persondistinctid" ON ("posthog_person"."id" = "posthog_persondistinctid"."person_id")
|
||||
WHERE ("posthog_persondistinctid"."distinct_id" = 'example_id'
|
||||
AND "posthog_person"."team_id" = 2
|
||||
AND ("posthog_person"."properties" -> 'created_at') > '"bazinga"')
|
||||
AND ("posthog_person"."properties" -> 'created_at') > '"bazinga"'::jsonb)
|
||||
LIMIT 1
|
||||
'''
|
||||
# ---
|
||||
@@ -419,21 +419,21 @@
|
||||
"posthog_person"."uuid",
|
||||
"posthog_person"."version"
|
||||
FROM "posthog_person"
|
||||
WHERE (((("posthog_person"."properties" -> 'url') = '"https://whatever.com"'
|
||||
WHERE (((("posthog_person"."properties" -> 'url') = '"https://whatever.com"'::jsonb
|
||||
AND "posthog_person"."properties" ? 'url'
|
||||
AND NOT (("posthog_person"."properties" -> 'url') = 'null')
|
||||
AND ("posthog_person"."properties" -> 'bla') = '1'
|
||||
AND NOT (("posthog_person"."properties" -> 'url') = 'null'::jsonb)
|
||||
AND ("posthog_person"."properties" -> 'bla') = '1'::jsonb
|
||||
AND "posthog_person"."properties" ? 'bla'
|
||||
AND NOT (("posthog_person"."properties" -> 'bla') = 'null')
|
||||
AND ((("posthog_person"."properties" -> 'bla') = '1'
|
||||
AND NOT (("posthog_person"."properties" -> 'bla') = 'null'::jsonb)
|
||||
AND ((("posthog_person"."properties" -> 'bla') = '1'::jsonb
|
||||
AND "posthog_person"."properties" ? 'bla'
|
||||
AND NOT (("posthog_person"."properties" -> 'bla') = 'null'))
|
||||
OR (("posthog_person"."properties" -> 'bla') = '2'
|
||||
AND NOT (("posthog_person"."properties" -> 'bla') = 'null'::jsonb))
|
||||
OR (("posthog_person"."properties" -> 'bla') = '2'::jsonb
|
||||
AND "posthog_person"."properties" ? 'bla'
|
||||
AND NOT (("posthog_person"."properties" -> 'bla') = 'null'))))
|
||||
OR (("posthog_person"."properties" -> 'bla') = '3'
|
||||
AND NOT (("posthog_person"."properties" -> 'bla') = 'null'::jsonb))))
|
||||
OR (("posthog_person"."properties" -> 'bla') = '3'::jsonb
|
||||
AND "posthog_person"."properties" ? 'bla'
|
||||
AND NOT (("posthog_person"."properties" -> 'bla') = 'null')))
|
||||
AND NOT (("posthog_person"."properties" -> 'bla') = 'null'::jsonb)))
|
||||
AND "posthog_person"."team_id" = 2)
|
||||
'''
|
||||
# ---
|
||||
@@ -495,21 +495,21 @@
|
||||
"posthog_person"."uuid",
|
||||
"posthog_person"."version"
|
||||
FROM "posthog_person"
|
||||
WHERE (((("posthog_person"."properties" -> 'url') = '"https://whatever.com"'
|
||||
WHERE (((("posthog_person"."properties" -> 'url') = '"https://whatever.com"'::jsonb
|
||||
AND "posthog_person"."properties" ? 'url'
|
||||
AND NOT (("posthog_person"."properties" -> 'url') = 'null')
|
||||
AND ("posthog_person"."properties" -> 'bla') = '1'
|
||||
AND NOT (("posthog_person"."properties" -> 'url') = 'null'::jsonb)
|
||||
AND ("posthog_person"."properties" -> 'bla') = '1'::jsonb
|
||||
AND "posthog_person"."properties" ? 'bla'
|
||||
AND NOT (("posthog_person"."properties" -> 'bla') = 'null')
|
||||
AND ("posthog_person"."properties" -> 'bla') = '1'
|
||||
AND NOT (("posthog_person"."properties" -> 'bla') = 'null'::jsonb)
|
||||
AND ("posthog_person"."properties" -> 'bla') = '1'::jsonb
|
||||
AND "posthog_person"."properties" ? 'bla'
|
||||
AND NOT (("posthog_person"."properties" -> 'bla') = 'null')
|
||||
AND ("posthog_person"."properties" -> 'bla') = '2'
|
||||
AND NOT (("posthog_person"."properties" -> 'bla') = 'null'::jsonb)
|
||||
AND ("posthog_person"."properties" -> 'bla') = '2'::jsonb
|
||||
AND "posthog_person"."properties" ? 'bla'
|
||||
AND NOT (("posthog_person"."properties" -> 'bla') = 'null'))
|
||||
OR (("posthog_person"."properties" -> 'bla') = '3'
|
||||
AND NOT (("posthog_person"."properties" -> 'bla') = 'null'::jsonb))
|
||||
OR (("posthog_person"."properties" -> 'bla') = '3'::jsonb
|
||||
AND "posthog_person"."properties" ? 'bla'
|
||||
AND NOT (("posthog_person"."properties" -> 'bla') = 'null')))
|
||||
AND NOT (("posthog_person"."properties" -> 'bla') = 'null'::jsonb)))
|
||||
AND "posthog_person"."team_id" = 2)
|
||||
'''
|
||||
# ---
|
||||
@@ -643,21 +643,21 @@
|
||||
"posthog_person"."uuid",
|
||||
"posthog_person"."version"
|
||||
FROM "posthog_person"
|
||||
WHERE (NOT (((("posthog_person"."properties" -> 'bla') = '1'
|
||||
AND "posthog_person"."properties" ? 'bla'
|
||||
AND NOT (("posthog_person"."properties" -> 'bla') = 'null'))
|
||||
OR (("posthog_person"."properties" -> 'bla') = '2'
|
||||
WHERE (NOT ((("posthog_person"."properties" -> 'bla') = '1'::jsonb
|
||||
AND "posthog_person"."properties" ? 'bla'
|
||||
AND NOT (("posthog_person"."properties" -> 'bla') = 'null'::jsonb))
|
||||
OR (("posthog_person"."properties" -> 'bla') = '2'::jsonb
|
||||
AND "posthog_person"."properties" ? 'bla'
|
||||
AND NOT (("posthog_person"."properties" -> 'bla') = 'null'::jsonb)))
|
||||
AND NOT ((("posthog_person"."properties" -> 'bla') = '3'::jsonb
|
||||
AND "posthog_person"."properties" ? 'bla'
|
||||
AND NOT (("posthog_person"."properties" -> 'bla') = 'null'))))
|
||||
AND NOT (((("posthog_person"."properties" -> 'bla') = '3'
|
||||
AND "posthog_person"."properties" ? 'bla'
|
||||
AND NOT (("posthog_person"."properties" -> 'bla') = 'null'))
|
||||
OR (("posthog_person"."properties" -> 'bla') = '4'
|
||||
AND "posthog_person"."properties" ? 'bla'
|
||||
AND NOT (("posthog_person"."properties" -> 'bla') = 'null'))))
|
||||
AND ("posthog_person"."properties" -> 'other') = '1'
|
||||
AND NOT (("posthog_person"."properties" -> 'bla') = 'null'::jsonb))
|
||||
OR (("posthog_person"."properties" -> 'bla') = '4'::jsonb
|
||||
AND "posthog_person"."properties" ? 'bla'
|
||||
AND NOT (("posthog_person"."properties" -> 'bla') = 'null'::jsonb)))
|
||||
AND ("posthog_person"."properties" -> 'other') = '1'::jsonb
|
||||
AND "posthog_person"."properties" ? 'other'
|
||||
AND NOT (("posthog_person"."properties" -> 'other') = 'null')
|
||||
AND NOT (("posthog_person"."properties" -> 'other') = 'null'::jsonb)
|
||||
AND "posthog_person"."team_id" = 2)
|
||||
'''
|
||||
# ---
|
||||
|
||||
@@ -68,10 +68,8 @@
|
||||
WHERE ("posthog_activitylog"."activity" IN ('job_triggered',
|
||||
'export_success',
|
||||
'export_fail')
|
||||
AND ("posthog_activitylog"."detail" #> ARRAY['trigger',
|
||||
'job_id']) = '"1234"'
|
||||
AND ("posthog_activitylog"."detail" #> ARRAY['trigger',
|
||||
'job_type']) = '"Export historical events V2"'
|
||||
AND ("posthog_activitylog"."detail" #> '{trigger,job_id}') = '"1234"'::jsonb
|
||||
AND ("posthog_activitylog"."detail" #> '{trigger,job_type}') = '"Export historical events V2"'::jsonb
|
||||
AND "posthog_activitylog"."item_id" = '3'
|
||||
AND "posthog_activitylog"."scope" = 'PluginConfig'
|
||||
AND "posthog_activitylog"."team_id" = 2)
|
||||
@@ -126,8 +124,7 @@
|
||||
WHERE ("posthog_activitylog"."activity" IN ('job_triggered',
|
||||
'export_success',
|
||||
'export_fail')
|
||||
AND ("posthog_activitylog"."detail" #> ARRAY['trigger',
|
||||
'job_type']) = '"Export historical events V2"'
|
||||
AND ("posthog_activitylog"."detail" #> '{trigger,job_type}') = '"Export historical events V2"'::jsonb
|
||||
AND "posthog_activitylog"."item_id" = '3'
|
||||
AND "posthog_activitylog"."scope" = 'PluginConfig'
|
||||
AND "posthog_activitylog"."team_id" = 2)
|
||||
@@ -182,8 +179,7 @@
|
||||
WHERE ("posthog_activitylog"."activity" IN ('job_triggered',
|
||||
'export_success',
|
||||
'export_fail')
|
||||
AND ("posthog_activitylog"."detail" #> ARRAY['trigger',
|
||||
'job_type']) = '"Export historical events V2"'
|
||||
AND ("posthog_activitylog"."detail" #> '{trigger,job_type}') = '"Export historical events V2"'::jsonb
|
||||
AND "posthog_activitylog"."item_id" = '3'
|
||||
AND "posthog_activitylog"."scope" = 'PluginConfig'
|
||||
AND "posthog_activitylog"."team_id" = 2)
|
||||
@@ -238,8 +234,7 @@
|
||||
WHERE ("posthog_activitylog"."activity" IN ('job_triggered',
|
||||
'export_success',
|
||||
'export_fail')
|
||||
AND ("posthog_activitylog"."detail" #> ARRAY['trigger',
|
||||
'job_type']) = '"Export historical events V2"'
|
||||
AND ("posthog_activitylog"."detail" #> '{trigger,job_type}') = '"Export historical events V2"'::jsonb
|
||||
AND "posthog_activitylog"."item_id" = '3'
|
||||
AND "posthog_activitylog"."scope" = 'PluginConfig'
|
||||
AND "posthog_activitylog"."team_id" = 2)
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -90,7 +90,6 @@ MIDDLEWARE = [
|
||||
"posthog.health.healthcheck_middleware",
|
||||
"posthog.middleware.ShortCircuitMiddleware",
|
||||
"posthog.middleware.AllowIPMiddleware",
|
||||
"google.cloud.sqlcommenter.django.middleware.SqlCommenter",
|
||||
"django.contrib.sessions.middleware.SessionMiddleware",
|
||||
"corsheaders.middleware.CorsMiddleware",
|
||||
"django.middleware.common.CommonMiddleware",
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
"posthog_scheduledchange"."updated_at"
|
||||
FROM "posthog_scheduledchange"
|
||||
WHERE ("posthog_scheduledchange"."executed_at" IS NULL
|
||||
AND "posthog_scheduledchange"."scheduled_at" <= '2023-12-21T09:00:00+00:00'::timestamptz)
|
||||
AND "posthog_scheduledchange"."scheduled_at" <= '2023-12-21 09:00:00+00:00'::timestamptz)
|
||||
ORDER BY "posthog_scheduledchange"."scheduled_at" ASC
|
||||
LIMIT 10000
|
||||
FOR
|
||||
|
||||
@@ -23,7 +23,7 @@ from django.conf import settings
|
||||
from django.db import connection
|
||||
from django.db.models import Count, Q
|
||||
from posthoganalytics.client import Client
|
||||
from psycopg2 import sql
|
||||
from psycopg import sql
|
||||
from retry import retry
|
||||
from sentry_sdk import capture_exception
|
||||
|
||||
|
||||
@@ -1,42 +1,42 @@
|
||||
# serializer version: 1
|
||||
# name: TestFeatureFlagMatcher.test_coercion_of_booleans_with_is_not_operator
|
||||
'''
|
||||
SELECT NOT ((("posthog_person"."properties" -> 'disabled') = 'false'
|
||||
OR ("posthog_person"."properties" -> 'disabled') = '"false"')
|
||||
SELECT NOT ((("posthog_person"."properties" -> 'disabled') = 'false'::jsonb
|
||||
OR ("posthog_person"."properties" -> 'disabled') = '"false"'::jsonb)
|
||||
AND "posthog_person"."properties" ? 'disabled'
|
||||
AND NOT (("posthog_person"."properties" -> 'disabled') = 'null')) AS "flag_X_condition_0",
|
||||
NOT ((("posthog_person"."properties" -> 'disabled') = 'false'
|
||||
OR ("posthog_person"."properties" -> 'disabled') = '"false"')
|
||||
AND NOT (("posthog_person"."properties" -> 'disabled') = 'null'::jsonb)) AS "flag_X_condition_0",
|
||||
NOT ((("posthog_person"."properties" -> 'disabled') = 'false'::jsonb
|
||||
OR ("posthog_person"."properties" -> 'disabled') = '"false"'::jsonb)
|
||||
AND "posthog_person"."properties" ? 'disabled'
|
||||
AND NOT (("posthog_person"."properties" -> 'disabled') = 'null')) AS "flag_X_condition_1",
|
||||
NOT ((("posthog_person"."properties" -> 'disabled') = 'false'
|
||||
OR ("posthog_person"."properties" -> 'disabled') = '"false"')
|
||||
AND NOT (("posthog_person"."properties" -> 'disabled') = 'null'::jsonb)) AS "flag_X_condition_1",
|
||||
NOT ((("posthog_person"."properties" -> 'disabled') = 'false'::jsonb
|
||||
OR ("posthog_person"."properties" -> 'disabled') = '"false"'::jsonb)
|
||||
AND "posthog_person"."properties" ? 'disabled'
|
||||
AND NOT (("posthog_person"."properties" -> 'disabled') = 'null')) AS "flag_X_condition_2",
|
||||
NOT ((("posthog_person"."properties" -> 'disabled') = 'false'
|
||||
OR ("posthog_person"."properties" -> 'disabled') = '"false"')
|
||||
AND NOT (("posthog_person"."properties" -> 'disabled') = 'null'::jsonb)) AS "flag_X_condition_2",
|
||||
NOT ((("posthog_person"."properties" -> 'disabled') = 'false'::jsonb
|
||||
OR ("posthog_person"."properties" -> 'disabled') = '"false"'::jsonb)
|
||||
AND "posthog_person"."properties" ? 'disabled'
|
||||
AND NOT (("posthog_person"."properties" -> 'disabled') = 'null')) AS "flag_X_condition_3",
|
||||
NOT ((("posthog_person"."properties" -> 'disabled') = 'false'
|
||||
OR ("posthog_person"."properties" -> 'disabled') = '"false"')
|
||||
AND NOT (("posthog_person"."properties" -> 'disabled') = 'null'::jsonb)) AS "flag_X_condition_3",
|
||||
NOT ((("posthog_person"."properties" -> 'disabled') = 'false'::jsonb
|
||||
OR ("posthog_person"."properties" -> 'disabled') = '"false"'::jsonb)
|
||||
AND "posthog_person"."properties" ? 'disabled'
|
||||
AND NOT (("posthog_person"."properties" -> 'disabled') = 'null')) AS "flag_X_condition_4",
|
||||
NOT ((("posthog_person"."properties" -> 'string_disabled') = 'false'
|
||||
OR ("posthog_person"."properties" -> 'string_disabled') = '"false"')
|
||||
AND NOT (("posthog_person"."properties" -> 'disabled') = 'null'::jsonb)) AS "flag_X_condition_4",
|
||||
NOT ((("posthog_person"."properties" -> 'string_disabled') = 'false'::jsonb
|
||||
OR ("posthog_person"."properties" -> 'string_disabled') = '"false"'::jsonb)
|
||||
AND "posthog_person"."properties" ? 'string_disabled'
|
||||
AND NOT (("posthog_person"."properties" -> 'string_disabled') = 'null')) AS "flag_X_condition_5",
|
||||
NOT ((("posthog_person"."properties" -> 'string_disabled') = 'false'
|
||||
OR ("posthog_person"."properties" -> 'string_disabled') = '"false"')
|
||||
AND NOT (("posthog_person"."properties" -> 'string_disabled') = 'null'::jsonb)) AS "flag_X_condition_5",
|
||||
NOT ((("posthog_person"."properties" -> 'string_disabled') = 'false'::jsonb
|
||||
OR ("posthog_person"."properties" -> 'string_disabled') = '"false"'::jsonb)
|
||||
AND "posthog_person"."properties" ? 'string_disabled'
|
||||
AND NOT (("posthog_person"."properties" -> 'string_disabled') = 'null')) AS "flag_X_condition_6",
|
||||
NOT ((("posthog_person"."properties" -> 'string_disabled') = 'false'
|
||||
OR ("posthog_person"."properties" -> 'string_disabled') = '"false"')
|
||||
AND NOT (("posthog_person"."properties" -> 'string_disabled') = 'null'::jsonb)) AS "flag_X_condition_6",
|
||||
NOT ((("posthog_person"."properties" -> 'string_disabled') = 'false'::jsonb
|
||||
OR ("posthog_person"."properties" -> 'string_disabled') = '"false"'::jsonb)
|
||||
AND "posthog_person"."properties" ? 'string_disabled'
|
||||
AND NOT (("posthog_person"."properties" -> 'string_disabled') = 'null')) AS "flag_X_condition_7",
|
||||
NOT ((("posthog_person"."properties" -> 'string_disabled') = 'false'
|
||||
OR ("posthog_person"."properties" -> 'string_disabled') = '"false"')
|
||||
AND NOT (("posthog_person"."properties" -> 'string_disabled') = 'null'::jsonb)) AS "flag_X_condition_7",
|
||||
NOT ((("posthog_person"."properties" -> 'string_disabled') = 'false'::jsonb
|
||||
OR ("posthog_person"."properties" -> 'string_disabled') = '"false"'::jsonb)
|
||||
AND "posthog_person"."properties" ? 'string_disabled'
|
||||
AND NOT (("posthog_person"."properties" -> 'string_disabled') = 'null')) AS "flag_X_condition_8"
|
||||
AND NOT (("posthog_person"."properties" -> 'string_disabled') = 'null'::jsonb)) AS "flag_X_condition_8"
|
||||
FROM "posthog_person"
|
||||
INNER JOIN "posthog_persondistinctid" ON ("posthog_person"."id" = "posthog_persondistinctid"."person_id")
|
||||
WHERE ("posthog_persondistinctid"."distinct_id" = '307'
|
||||
@@ -46,20 +46,20 @@
|
||||
# ---
|
||||
# name: TestFeatureFlagMatcher.test_coercion_of_strings_and_numbers_with_is_not_operator
|
||||
'''
|
||||
SELECT (NOT ((("posthog_person"."properties" -> 'Organizer Id') IN ('"307"')
|
||||
OR ("posthog_person"."properties" -> 'Organizer Id') IN ('307'))
|
||||
SELECT (NOT ((("posthog_person"."properties" -> 'Organizer Id') IN ('"307"'::jsonb)
|
||||
OR ("posthog_person"."properties" -> 'Organizer Id') IN ('307'::jsonb))
|
||||
AND "posthog_person"."properties" ? 'Organizer Id'
|
||||
AND NOT (("posthog_person"."properties" -> 'Organizer Id') = 'null'))
|
||||
AND NOT (("posthog_person"."properties" -> 'Organizer Id') IN ('307')
|
||||
AND NOT (("posthog_person"."properties" -> 'Organizer Id') = 'null'::jsonb))
|
||||
AND NOT (("posthog_person"."properties" -> 'Organizer Id') IN ('307'::jsonb)
|
||||
AND "posthog_person"."properties" ? 'Organizer Id'
|
||||
AND NOT (("posthog_person"."properties" -> 'Organizer Id') = 'null'))
|
||||
AND NOT ((("posthog_person"."properties" -> 'Organizer Id') = '"307"'
|
||||
OR ("posthog_person"."properties" -> 'Organizer Id') = '307')
|
||||
AND NOT (("posthog_person"."properties" -> 'Organizer Id') = 'null'::jsonb))
|
||||
AND NOT ((("posthog_person"."properties" -> 'Organizer Id') = '"307"'::jsonb
|
||||
OR ("posthog_person"."properties" -> 'Organizer Id') = '307'::jsonb)
|
||||
AND "posthog_person"."properties" ? 'Organizer Id'
|
||||
AND NOT (("posthog_person"."properties" -> 'Organizer Id') = 'null'))
|
||||
AND NOT (("posthog_person"."properties" -> 'Organizer Id') = '307'
|
||||
AND NOT (("posthog_person"."properties" -> 'Organizer Id') = 'null'::jsonb))
|
||||
AND NOT (("posthog_person"."properties" -> 'Organizer Id') = '307'::jsonb
|
||||
AND "posthog_person"."properties" ? 'Organizer Id'
|
||||
AND NOT (("posthog_person"."properties" -> 'Organizer Id') = 'null'))) AS "flag_X_condition_0"
|
||||
AND NOT (("posthog_person"."properties" -> 'Organizer Id') = 'null'::jsonb))) AS "flag_X_condition_0"
|
||||
FROM "posthog_person"
|
||||
INNER JOIN "posthog_persondistinctid" ON ("posthog_person"."id" = "posthog_persondistinctid"."person_id")
|
||||
WHERE ("posthog_persondistinctid"."distinct_id" = '307'
|
||||
@@ -69,20 +69,20 @@
|
||||
# ---
|
||||
# name: TestFeatureFlagMatcher.test_coercion_of_strings_and_numbers_with_is_not_operator.1
|
||||
'''
|
||||
SELECT NOT ((("posthog_person"."properties" -> 'Distinct Id') IN ('"307"')
|
||||
OR ("posthog_person"."properties" -> 'Distinct Id') IN ('307'))
|
||||
SELECT NOT ((("posthog_person"."properties" -> 'Distinct Id') IN ('"307"'::jsonb)
|
||||
OR ("posthog_person"."properties" -> 'Distinct Id') IN ('307'::jsonb))
|
||||
AND "posthog_person"."properties" ? 'Distinct Id'
|
||||
AND NOT (("posthog_person"."properties" -> 'Distinct Id') = 'null')) AS "flag_X_condition_0",
|
||||
NOT (("posthog_person"."properties" -> 'Distinct Id') IN ('307')
|
||||
AND NOT (("posthog_person"."properties" -> 'Distinct Id') = 'null'::jsonb)) AS "flag_X_condition_0",
|
||||
NOT (("posthog_person"."properties" -> 'Distinct Id') IN ('307'::jsonb)
|
||||
AND "posthog_person"."properties" ? 'Distinct Id'
|
||||
AND NOT (("posthog_person"."properties" -> 'Distinct Id') = 'null')) AS "flag_X_condition_1",
|
||||
NOT ((("posthog_person"."properties" -> 'Distinct Id') = '"307"'
|
||||
OR ("posthog_person"."properties" -> 'Distinct Id') = '307')
|
||||
AND NOT (("posthog_person"."properties" -> 'Distinct Id') = 'null'::jsonb)) AS "flag_X_condition_1",
|
||||
NOT ((("posthog_person"."properties" -> 'Distinct Id') = '"307"'::jsonb
|
||||
OR ("posthog_person"."properties" -> 'Distinct Id') = '307'::jsonb)
|
||||
AND "posthog_person"."properties" ? 'Distinct Id'
|
||||
AND NOT (("posthog_person"."properties" -> 'Distinct Id') = 'null')) AS "flag_X_condition_2",
|
||||
NOT (("posthog_person"."properties" -> 'Distinct Id') = '307'
|
||||
AND NOT (("posthog_person"."properties" -> 'Distinct Id') = 'null'::jsonb)) AS "flag_X_condition_2",
|
||||
NOT (("posthog_person"."properties" -> 'Distinct Id') = '307'::jsonb
|
||||
AND "posthog_person"."properties" ? 'Distinct Id'
|
||||
AND NOT (("posthog_person"."properties" -> 'Distinct Id') = 'null')) AS "flag_X_condition_3"
|
||||
AND NOT (("posthog_person"."properties" -> 'Distinct Id') = 'null'::jsonb)) AS "flag_X_condition_3"
|
||||
FROM "posthog_person"
|
||||
INNER JOIN "posthog_persondistinctid" ON ("posthog_person"."id" = "posthog_persondistinctid"."person_id")
|
||||
WHERE ("posthog_persondistinctid"."distinct_id" = '307'
|
||||
@@ -221,10 +221,10 @@
|
||||
# ---
|
||||
# name: TestFeatureFlagMatcher.test_db_matches_independent_of_string_or_number_type.4
|
||||
'''
|
||||
SELECT ((("posthog_person"."properties" -> 'Distinct Id') IN ('"307"')
|
||||
OR ("posthog_person"."properties" -> 'Distinct Id') IN ('307'))
|
||||
SELECT ((("posthog_person"."properties" -> 'Distinct Id') IN ('"307"'::jsonb)
|
||||
OR ("posthog_person"."properties" -> 'Distinct Id') IN ('307'::jsonb))
|
||||
AND "posthog_person"."properties" ? 'Distinct Id'
|
||||
AND NOT (("posthog_person"."properties" -> 'Distinct Id') = 'null')) AS "flag_X_condition_0"
|
||||
AND NOT (("posthog_person"."properties" -> 'Distinct Id') = 'null'::jsonb)) AS "flag_X_condition_0"
|
||||
FROM "posthog_person"
|
||||
INNER JOIN "posthog_persondistinctid" ON ("posthog_person"."id" = "posthog_persondistinctid"."person_id")
|
||||
WHERE ("posthog_persondistinctid"."distinct_id" = '307'
|
||||
@@ -234,9 +234,9 @@
|
||||
# ---
|
||||
# name: TestFeatureFlagMatcher.test_db_matches_independent_of_string_or_number_type.5
|
||||
'''
|
||||
SELECT (("posthog_person"."properties" -> 'Distinct Id') IN ('307')
|
||||
SELECT (("posthog_person"."properties" -> 'Distinct Id') IN ('307'::jsonb)
|
||||
AND "posthog_person"."properties" ? 'Distinct Id'
|
||||
AND NOT (("posthog_person"."properties" -> 'Distinct Id') = 'null')) AS "flag_X_condition_0"
|
||||
AND NOT (("posthog_person"."properties" -> 'Distinct Id') = 'null'::jsonb)) AS "flag_X_condition_0"
|
||||
FROM "posthog_person"
|
||||
INNER JOIN "posthog_persondistinctid" ON ("posthog_person"."id" = "posthog_persondistinctid"."person_id")
|
||||
WHERE ("posthog_persondistinctid"."distinct_id" = '307'
|
||||
@@ -246,9 +246,9 @@
|
||||
# ---
|
||||
# name: TestFeatureFlagMatcher.test_db_matches_independent_of_string_or_number_type.6
|
||||
'''
|
||||
SELECT (("posthog_person"."properties" -> 'Distinct Id') = '307'
|
||||
SELECT (("posthog_person"."properties" -> 'Distinct Id') = '307'::jsonb
|
||||
AND "posthog_person"."properties" ? 'Distinct Id'
|
||||
AND NOT (("posthog_person"."properties" -> 'Distinct Id') = 'null')) AS "flag_X_condition_0"
|
||||
AND NOT (("posthog_person"."properties" -> 'Distinct Id') = 'null'::jsonb)) AS "flag_X_condition_0"
|
||||
FROM "posthog_person"
|
||||
INNER JOIN "posthog_persondistinctid" ON ("posthog_person"."id" = "posthog_persondistinctid"."person_id")
|
||||
WHERE ("posthog_persondistinctid"."distinct_id" = '307'
|
||||
@@ -343,7 +343,7 @@
|
||||
'''
|
||||
SELECT (("posthog_person"."properties" ->> 'email')::text ~ '["neil@x.com"]'
|
||||
AND "posthog_person"."properties" ? 'email'
|
||||
AND NOT (("posthog_person"."properties" -> 'email') = 'null')) AS "flag_X_condition_0"
|
||||
AND NOT (("posthog_person"."properties" -> 'email') = 'null'::jsonb)) AS "flag_X_condition_0"
|
||||
FROM "posthog_person"
|
||||
INNER JOIN "posthog_persondistinctid" ON ("posthog_person"."id" = "posthog_persondistinctid"."person_id")
|
||||
WHERE ("posthog_persondistinctid"."distinct_id" = '307'
|
||||
@@ -355,7 +355,7 @@
|
||||
'''
|
||||
SELECT (("posthog_person"."properties" ->> 'email')::text ~ '["neil@x.com"]'
|
||||
AND "posthog_person"."properties" ? 'email'
|
||||
AND NOT (("posthog_person"."properties" -> 'email') = 'null')) AS "flag_X_condition_0"
|
||||
AND NOT (("posthog_person"."properties" -> 'email') = 'null'::jsonb)) AS "flag_X_condition_0"
|
||||
FROM "posthog_person"
|
||||
INNER JOIN "posthog_persondistinctid" ON ("posthog_person"."id" = "posthog_persondistinctid"."person_id")
|
||||
WHERE ("posthog_persondistinctid"."distinct_id" = 'another_id'
|
||||
@@ -377,9 +377,9 @@
|
||||
# ---
|
||||
# name: TestFeatureFlagMatcher.test_multiple_flags.1
|
||||
'''
|
||||
SELECT (("posthog_person"."properties" -> 'email') = '"test@posthog.com"'
|
||||
SELECT (("posthog_person"."properties" -> 'email') = '"test@posthog.com"'::jsonb
|
||||
AND "posthog_person"."properties" ? 'email'
|
||||
AND NOT (("posthog_person"."properties" -> 'email') = 'null')) AS "flag_X_condition_0",
|
||||
AND NOT (("posthog_person"."properties" -> 'email') = 'null'::jsonb)) AS "flag_X_condition_0",
|
||||
(true) AS "flag_X_condition_1",
|
||||
(true) AS "flag_X_condition_0",
|
||||
(true) AS "flag_X_condition_0",
|
||||
@@ -403,12 +403,12 @@
|
||||
# ---
|
||||
# name: TestFeatureFlagMatcher.test_multiple_flags.3
|
||||
'''
|
||||
SELECT (("posthog_group"."group_properties" -> 'name') IN ('"foo.inc"')
|
||||
SELECT (("posthog_group"."group_properties" -> 'name') IN ('"foo.inc"'::jsonb)
|
||||
AND "posthog_group"."group_properties" ? 'name'
|
||||
AND NOT (("posthog_group"."group_properties" -> 'name') = 'null')) AS "flag_X_condition_0",
|
||||
(("posthog_group"."group_properties" -> 'name') IN ('"foo2.inc"')
|
||||
AND NOT (("posthog_group"."group_properties" -> 'name') = 'null'::jsonb)) AS "flag_X_condition_0",
|
||||
(("posthog_group"."group_properties" -> 'name') IN ('"foo2.inc"'::jsonb)
|
||||
AND "posthog_group"."group_properties" ? 'name'
|
||||
AND NOT (("posthog_group"."group_properties" -> 'name') = 'null')) AS "flag_X_condition_0"
|
||||
AND NOT (("posthog_group"."group_properties" -> 'name') = 'null'::jsonb)) AS "flag_X_condition_0"
|
||||
FROM "posthog_group"
|
||||
WHERE ("posthog_group"."team_id" = 2
|
||||
AND "posthog_group"."group_key" = 'foo'
|
||||
@@ -429,9 +429,9 @@
|
||||
# ---
|
||||
# name: TestFeatureFlagMatcher.test_multiple_flags.5
|
||||
'''
|
||||
SELECT (("posthog_person"."properties" -> 'email') = '"test@posthog.com"'
|
||||
SELECT (("posthog_person"."properties" -> 'email') = '"test@posthog.com"'::jsonb
|
||||
AND "posthog_person"."properties" ? 'email'
|
||||
AND NOT (("posthog_person"."properties" -> 'email') = 'null')) AS "flag_X_condition_0",
|
||||
AND NOT (("posthog_person"."properties" -> 'email') = 'null'::jsonb)) AS "flag_X_condition_0",
|
||||
(true) AS "flag_X_condition_1",
|
||||
(true) AS "flag_X_condition_0",
|
||||
(true) AS "flag_X_condition_0",
|
||||
@@ -445,12 +445,12 @@
|
||||
# ---
|
||||
# name: TestFeatureFlagMatcher.test_multiple_flags.6
|
||||
'''
|
||||
SELECT (("posthog_group"."group_properties" -> 'name') IN ('"foo.inc"')
|
||||
SELECT (("posthog_group"."group_properties" -> 'name') IN ('"foo.inc"'::jsonb)
|
||||
AND "posthog_group"."group_properties" ? 'name'
|
||||
AND NOT (("posthog_group"."group_properties" -> 'name') = 'null')) AS "flag_X_condition_0",
|
||||
(("posthog_group"."group_properties" -> 'name') IN ('"foo2.inc"')
|
||||
AND NOT (("posthog_group"."group_properties" -> 'name') = 'null'::jsonb)) AS "flag_X_condition_0",
|
||||
(("posthog_group"."group_properties" -> 'name') IN ('"foo2.inc"'::jsonb)
|
||||
AND "posthog_group"."group_properties" ? 'name'
|
||||
AND NOT (("posthog_group"."group_properties" -> 'name') = 'null')) AS "flag_X_condition_0"
|
||||
AND NOT (("posthog_group"."group_properties" -> 'name') = 'null'::jsonb)) AS "flag_X_condition_0"
|
||||
FROM "posthog_group"
|
||||
WHERE ("posthog_group"."team_id" = 2
|
||||
AND "posthog_group"."group_key" = 'foo2'
|
||||
@@ -483,30 +483,30 @@
|
||||
# ---
|
||||
# name: TestFeatureFlagMatcher.test_numeric_operator_with_cohorts_and_nested_cohorts.1
|
||||
'''
|
||||
SELECT (((("posthog_person"."properties" -> 'number') > '"100"'
|
||||
SELECT (((("posthog_person"."properties" -> 'number') > '"100"'::jsonb
|
||||
AND JSONB_TYPEOF(("posthog_person"."properties" -> 'number')) = ('string'))
|
||||
OR (("posthog_person"."properties" -> 'number') > '100.0'
|
||||
OR (("posthog_person"."properties" -> 'number') > '100.0'::jsonb
|
||||
AND JSONB_TYPEOF(("posthog_person"."properties" -> 'number')) = ('number')))
|
||||
AND "posthog_person"."properties" ? 'number'
|
||||
AND NOT (("posthog_person"."properties" -> 'number') = 'null')) AS "flag_X_condition_0",
|
||||
(((("posthog_person"."properties" -> 'version') > '"1.05"'
|
||||
AND NOT (("posthog_person"."properties" -> 'number') = 'null'::jsonb)) AS "flag_X_condition_0",
|
||||
(((("posthog_person"."properties" -> 'version') > '"1.05"'::jsonb
|
||||
AND JSONB_TYPEOF(("posthog_person"."properties" -> 'version')) = ('string'))
|
||||
OR (("posthog_person"."properties" -> 'version') > '1.05'
|
||||
OR (("posthog_person"."properties" -> 'version') > '1.05'::jsonb
|
||||
AND JSONB_TYPEOF(("posthog_person"."properties" -> 'version')) = ('number')))
|
||||
AND "posthog_person"."properties" ? 'version'
|
||||
AND NOT (("posthog_person"."properties" -> 'version') = 'null')) AS "flag_X_condition_0",
|
||||
(((("posthog_person"."properties" -> 'number') < '"31"'
|
||||
AND NOT (("posthog_person"."properties" -> 'version') = 'null'::jsonb)) AS "flag_X_condition_0",
|
||||
(((("posthog_person"."properties" -> 'number') < '"31"'::jsonb
|
||||
AND JSONB_TYPEOF(("posthog_person"."properties" -> 'number')) = ('string'))
|
||||
OR (("posthog_person"."properties" -> 'number') < '31.0'
|
||||
OR (("posthog_person"."properties" -> 'number') < '31.0'::jsonb
|
||||
AND JSONB_TYPEOF(("posthog_person"."properties" -> 'number')) = ('number')))
|
||||
AND "posthog_person"."properties" ? 'number'
|
||||
AND NOT (("posthog_person"."properties" -> 'number') = 'null')
|
||||
AND ((("posthog_person"."properties" -> 'nested_prop') > '"20"'
|
||||
AND NOT (("posthog_person"."properties" -> 'number') = 'null'::jsonb)
|
||||
AND ((("posthog_person"."properties" -> 'nested_prop') > '"20"'::jsonb
|
||||
AND JSONB_TYPEOF(("posthog_person"."properties" -> 'nested_prop')) = ('string'))
|
||||
OR (("posthog_person"."properties" -> 'nested_prop') > '20.0'
|
||||
OR (("posthog_person"."properties" -> 'nested_prop') > '20.0'::jsonb
|
||||
AND JSONB_TYPEOF(("posthog_person"."properties" -> 'nested_prop')) = ('number')))
|
||||
AND "posthog_person"."properties" ? 'nested_prop'
|
||||
AND NOT (("posthog_person"."properties" -> 'nested_prop') = 'null')) AS "flag_X_condition_0"
|
||||
AND NOT (("posthog_person"."properties" -> 'nested_prop') = 'null'::jsonb)) AS "flag_X_condition_0"
|
||||
FROM "posthog_person"
|
||||
INNER JOIN "posthog_persondistinctid" ON ("posthog_person"."id" = "posthog_persondistinctid"."person_id")
|
||||
WHERE ("posthog_persondistinctid"."distinct_id" = '307'
|
||||
@@ -561,12 +561,12 @@
|
||||
# ---
|
||||
# name: TestFeatureFlagMatcher.test_numeric_operator_with_groups_and_person_flags.1
|
||||
'''
|
||||
SELECT (((("posthog_person"."properties" -> 'number') >= '"20"'
|
||||
SELECT (((("posthog_person"."properties" -> 'number') >= '"20"'::jsonb
|
||||
AND JSONB_TYPEOF(("posthog_person"."properties" -> 'number')) = ('string'))
|
||||
OR (("posthog_person"."properties" -> 'number') >= '20.0'
|
||||
OR (("posthog_person"."properties" -> 'number') >= '20.0'::jsonb
|
||||
AND JSONB_TYPEOF(("posthog_person"."properties" -> 'number')) = ('number')))
|
||||
AND "posthog_person"."properties" ? 'number'
|
||||
AND NOT (("posthog_person"."properties" -> 'number') = 'null')) AS "flag_X_condition_0"
|
||||
AND NOT (("posthog_person"."properties" -> 'number') = 'null'::jsonb)) AS "flag_X_condition_0"
|
||||
FROM "posthog_person"
|
||||
INNER JOIN "posthog_persondistinctid" ON ("posthog_person"."id" = "posthog_persondistinctid"."person_id")
|
||||
WHERE ("posthog_persondistinctid"."distinct_id" = '307'
|
||||
@@ -576,12 +576,12 @@
|
||||
# ---
|
||||
# name: TestFeatureFlagMatcher.test_numeric_operator_with_groups_and_person_flags.2
|
||||
'''
|
||||
SELECT (((("posthog_group"."group_properties" -> 'number') > '"100"'
|
||||
SELECT (((("posthog_group"."group_properties" -> 'number') > '"100"'::jsonb
|
||||
AND JSONB_TYPEOF(("posthog_group"."group_properties" -> 'number')) = ('string'))
|
||||
OR (("posthog_group"."group_properties" -> 'number') > '100.0'
|
||||
OR (("posthog_group"."group_properties" -> 'number') > '100.0'::jsonb
|
||||
AND JSONB_TYPEOF(("posthog_group"."group_properties" -> 'number')) = ('number')))
|
||||
AND "posthog_group"."group_properties" ? 'number'
|
||||
AND NOT (("posthog_group"."group_properties" -> 'number') = 'null')) AS "flag_X_condition_0"
|
||||
AND NOT (("posthog_group"."group_properties" -> 'number') = 'null'::jsonb)) AS "flag_X_condition_0"
|
||||
FROM "posthog_group"
|
||||
WHERE ("posthog_group"."team_id" = 2
|
||||
AND "posthog_group"."group_key" = 'foo'
|
||||
@@ -590,9 +590,9 @@
|
||||
# ---
|
||||
# name: TestFeatureFlagMatcher.test_numeric_operator_with_groups_and_person_flags.3
|
||||
'''
|
||||
SELECT (("posthog_group"."group_properties" -> 'number') > '"100b2c"'
|
||||
SELECT (("posthog_group"."group_properties" -> 'number') > '"100b2c"'::jsonb
|
||||
AND "posthog_group"."group_properties" ? 'number'
|
||||
AND NOT (("posthog_group"."group_properties" -> 'number') = 'null')) AS "flag_X_condition_0"
|
||||
AND NOT (("posthog_group"."group_properties" -> 'number') = 'null'::jsonb)) AS "flag_X_condition_0"
|
||||
FROM "posthog_group"
|
||||
WHERE ("posthog_group"."team_id" = 2
|
||||
AND "posthog_group"."group_key" = 'foo-project'
|
||||
@@ -601,17 +601,17 @@
|
||||
# ---
|
||||
# name: TestFeatureFlagMatcher.test_super_condition_matches_string
|
||||
'''
|
||||
SELECT ((("posthog_person"."properties" -> 'is_enabled') = 'true'
|
||||
OR ("posthog_person"."properties" -> 'is_enabled') = '"true"')
|
||||
SELECT ((("posthog_person"."properties" -> 'is_enabled') = 'true'::jsonb
|
||||
OR ("posthog_person"."properties" -> 'is_enabled') = '"true"'::jsonb)
|
||||
AND "posthog_person"."properties" ? 'is_enabled'
|
||||
AND NOT (("posthog_person"."properties" -> 'is_enabled') = 'null')) AS "flag_X_super_condition", ("posthog_person"."properties" -> 'is_enabled') IS NOT NULL AS "flag_X_super_condition_is_set",
|
||||
(("posthog_person"."properties" -> 'email') = '"fake@posthog.com"'
|
||||
AND "posthog_person"."properties" ? 'email'
|
||||
AND NOT (("posthog_person"."properties" -> 'email') = 'null')) AS "flag_X_condition_0",
|
||||
(("posthog_person"."properties" -> 'email') = '"test@posthog.com"'
|
||||
AND "posthog_person"."properties" ? 'email'
|
||||
AND NOT (("posthog_person"."properties" -> 'email') = 'null')) AS "flag_X_condition_1",
|
||||
(true) AS "flag_X_condition_2"
|
||||
AND NOT (("posthog_person"."properties" -> 'is_enabled') = 'null'::jsonb)) AS "flag_X_super_condition", ("posthog_person"."properties" -> 'is_enabled') IS NOT NULL AS "flag_X_super_condition_is_set",
|
||||
(("posthog_person"."properties" -> 'email') = '"fake@posthog.com"'::jsonb
|
||||
AND "posthog_person"."properties" ? 'email'
|
||||
AND NOT (("posthog_person"."properties" -> 'email') = 'null'::jsonb)) AS "flag_X_condition_0",
|
||||
(("posthog_person"."properties" -> 'email') = '"test@posthog.com"'::jsonb
|
||||
AND "posthog_person"."properties" ? 'email'
|
||||
AND NOT (("posthog_person"."properties" -> 'email') = 'null'::jsonb)) AS "flag_X_condition_1",
|
||||
(true) AS "flag_X_condition_2"
|
||||
FROM "posthog_person"
|
||||
INNER JOIN "posthog_persondistinctid" ON ("posthog_person"."id" = "posthog_persondistinctid"."person_id")
|
||||
WHERE ("posthog_persondistinctid"."distinct_id" = 'test_id'
|
||||
@@ -748,34 +748,34 @@
|
||||
# ---
|
||||
# name: TestFeatureFlagMatcher.test_with_sql_injection_properties_and_other_aliases.3
|
||||
'''
|
||||
SELECT (((("posthog_person"."properties" -> 'number space') > '"100"'
|
||||
SELECT (((("posthog_person"."properties" -> 'number space') > '"100"'::jsonb
|
||||
AND JSONB_TYPEOF(("posthog_person"."properties" -> 'number space')) = ('string'))
|
||||
OR (("posthog_person"."properties" -> 'number space') > '100.0'
|
||||
OR (("posthog_person"."properties" -> 'number space') > '100.0'::jsonb
|
||||
AND JSONB_TYPEOF(("posthog_person"."properties" -> 'number space')) = ('number')))
|
||||
AND "posthog_person"."properties" ? 'number space'
|
||||
AND NOT (("posthog_person"."properties" -> 'number space') = 'null')
|
||||
AND NOT (("posthog_person"."properties" -> 'number space') = 'null'::jsonb)
|
||||
AND ((JSONB_TYPEOF(("posthog_person"."properties" -> ';''" SELECT 1; DROP TABLE posthog_featureflag;')) = ('string')
|
||||
AND ("posthog_person"."properties" -> ';''" SELECT 1; DROP TABLE posthog_featureflag;') > '"100"')
|
||||
AND ("posthog_person"."properties" -> ';''" SELECT 1; DROP TABLE posthog_featureflag;') > '"100"'::jsonb)
|
||||
OR (JSONB_TYPEOF(("posthog_person"."properties" -> ';''" SELECT 1; DROP TABLE posthog_featureflag;')) = ('number')
|
||||
AND ("posthog_person"."properties" -> ';''" SELECT 1; DROP TABLE posthog_featureflag;') > '100.0'))
|
||||
AND ("posthog_person"."properties" -> ';''" SELECT 1; DROP TABLE posthog_featureflag;') > '100.0'::jsonb))
|
||||
AND "posthog_person"."properties" ? ';''" SELECT 1; DROP TABLE posthog_featureflag;'
|
||||
AND NOT (("posthog_person"."properties" -> ';''" SELECT 1; DROP TABLE posthog_featureflag;') = 'null')) AS "flag_X_condition_0",
|
||||
AND NOT (("posthog_person"."properties" -> ';''" SELECT 1; DROP TABLE posthog_featureflag;') = 'null'::jsonb)) AS "flag_X_condition_0",
|
||||
(((JSONB_TYPEOF(("posthog_person"."properties" -> ';''" SELECT 1; DROP TABLE posthog_featureflag;')) = ('string')
|
||||
AND ("posthog_person"."properties" -> ';''" SELECT 1; DROP TABLE posthog_featureflag;') > '"100"')
|
||||
AND ("posthog_person"."properties" -> ';''" SELECT 1; DROP TABLE posthog_featureflag;') > '"100"'::jsonb)
|
||||
OR (JSONB_TYPEOF(("posthog_person"."properties" -> ';''" SELECT 1; DROP TABLE posthog_featureflag;')) = ('number')
|
||||
AND ("posthog_person"."properties" -> ';''" SELECT 1; DROP TABLE posthog_featureflag;') > '100.0'))
|
||||
AND ("posthog_person"."properties" -> ';''" SELECT 1; DROP TABLE posthog_featureflag;') > '100.0'::jsonb))
|
||||
AND "posthog_person"."properties" ? ';''" SELECT 1; DROP TABLE posthog_featureflag;'
|
||||
AND NOT (("posthog_person"."properties" -> ';''" SELECT 1; DROP TABLE posthog_featureflag;') = 'null')) AS "flag_X_condition_1",
|
||||
(((("posthog_person"."properties" -> 'version!!!') > '"1.05"'
|
||||
AND NOT (("posthog_person"."properties" -> ';''" SELECT 1; DROP TABLE posthog_featureflag;') = 'null'::jsonb)) AS "flag_X_condition_1",
|
||||
(((("posthog_person"."properties" -> 'version!!!') > '"1.05"'::jsonb
|
||||
AND JSONB_TYPEOF(("posthog_person"."properties" -> 'version!!!')) = ('string'))
|
||||
OR (("posthog_person"."properties" -> 'version!!!') > '1.05'
|
||||
OR (("posthog_person"."properties" -> 'version!!!') > '1.05'::jsonb
|
||||
AND JSONB_TYPEOF(("posthog_person"."properties" -> 'version!!!')) = ('number')))
|
||||
AND "posthog_person"."properties" ? 'version!!!'
|
||||
AND NOT (("posthog_person"."properties" -> 'version!!!') = 'null')) AS "flag_X_condition_2",
|
||||
((("posthog_person"."properties" -> 'nested_prop --random #comment //test') = '"21"'
|
||||
OR ("posthog_person"."properties" -> 'nested_prop --random #comment //test') = '21')
|
||||
AND NOT (("posthog_person"."properties" -> 'version!!!') = 'null'::jsonb)) AS "flag_X_condition_2",
|
||||
((("posthog_person"."properties" -> 'nested_prop --random #comment //test') = '"21"'::jsonb
|
||||
OR ("posthog_person"."properties" -> 'nested_prop --random #comment //test') = '21'::jsonb)
|
||||
AND "posthog_person"."properties" ? 'nested_prop --random #comment //test'
|
||||
AND NOT (("posthog_person"."properties" -> 'nested_prop --random #comment //test') = 'null')) AS "flag_X_condition_3"
|
||||
AND NOT (("posthog_person"."properties" -> 'nested_prop --random #comment //test') = 'null'::jsonb)) AS "flag_X_condition_3"
|
||||
FROM "posthog_person"
|
||||
INNER JOIN "posthog_persondistinctid" ON ("posthog_person"."id" = "posthog_persondistinctid"."person_id")
|
||||
WHERE ("posthog_persondistinctid"."distinct_id" = '307'
|
||||
@@ -821,20 +821,103 @@
|
||||
'''
|
||||
# ---
|
||||
# name: TestHashKeyOverridesRaceConditions.test_hash_key_overrides_with_simulated_error_race_conditions_on_person_merging
|
||||
'BEGIN'
|
||||
# ---
|
||||
# name: TestHashKeyOverridesRaceConditions.test_hash_key_overrides_with_simulated_error_race_conditions_on_person_merging.1
|
||||
'''
|
||||
|
||||
SET LOCAL statement_timeout = 2
|
||||
'''
|
||||
# ---
|
||||
# name: TestHashKeyOverridesRaceConditions.test_hash_key_overrides_with_simulated_error_race_conditions_on_person_merging.1
|
||||
# name: TestHashKeyOverridesRaceConditions.test_hash_key_overrides_with_simulated_error_race_conditions_on_person_merging.10
|
||||
'''
|
||||
WITH target_person_ids AS
|
||||
(SELECT team_id,
|
||||
person_id
|
||||
FROM posthog_persondistinctid
|
||||
WHERE team_id = 2
|
||||
AND distinct_id IN ('other_id',
|
||||
'example_id') ),
|
||||
AND distinct_id = ANY('{other_id,example_id}') ),
|
||||
existing_overrides AS
|
||||
(SELECT team_id,
|
||||
person_id,
|
||||
feature_flag_key,
|
||||
hash_key
|
||||
FROM posthog_featureflaghashkeyoverride
|
||||
WHERE team_id = 2
|
||||
AND person_id IN
|
||||
(SELECT person_id
|
||||
FROM target_person_ids) ),
|
||||
flags_to_override AS
|
||||
(SELECT key
|
||||
FROM posthog_featureflag
|
||||
WHERE team_id = 2
|
||||
AND ensure_experience_continuity = TRUE
|
||||
AND active = TRUE
|
||||
AND deleted = FALSE
|
||||
AND key NOT IN
|
||||
(SELECT feature_flag_key
|
||||
FROM existing_overrides) )
|
||||
INSERT INTO posthog_featureflaghashkeyoverride (team_id, person_id, feature_flag_key, hash_key)
|
||||
SELECT team_id,
|
||||
person_id,
|
||||
key,
|
||||
'example_id'
|
||||
FROM flags_to_override,
|
||||
target_person_ids
|
||||
WHERE EXISTS
|
||||
(SELECT 1
|
||||
FROM posthog_person
|
||||
WHERE id = person_id
|
||||
AND team_id = 2) ON CONFLICT DO NOTHING
|
||||
'''
|
||||
# ---
|
||||
# name: TestHashKeyOverridesRaceConditions.test_hash_key_overrides_with_simulated_error_race_conditions_on_person_merging.11
|
||||
'ROLLBACK'
|
||||
# ---
|
||||
# name: TestHashKeyOverridesRaceConditions.test_hash_key_overrides_with_simulated_error_race_conditions_on_person_merging.12
|
||||
'BEGIN'
|
||||
# ---
|
||||
# name: TestHashKeyOverridesRaceConditions.test_hash_key_overrides_with_simulated_error_race_conditions_on_person_merging.13
|
||||
'''
|
||||
|
||||
SET LOCAL statement_timeout = 2
|
||||
'''
|
||||
# ---
|
||||
# name: TestHashKeyOverridesRaceConditions.test_hash_key_overrides_with_simulated_error_race_conditions_on_person_merging.14
|
||||
'''
|
||||
SELECT "posthog_persondistinctid"."person_id",
|
||||
"posthog_persondistinctid"."distinct_id"
|
||||
FROM "posthog_persondistinctid"
|
||||
WHERE ("posthog_persondistinctid"."distinct_id" IN ('other_id',
|
||||
'example_id')
|
||||
AND "posthog_persondistinctid"."team_id" = 2)
|
||||
'''
|
||||
# ---
|
||||
# name: TestHashKeyOverridesRaceConditions.test_hash_key_overrides_with_simulated_error_race_conditions_on_person_merging.15
|
||||
'''
|
||||
SELECT "posthog_featureflaghashkeyoverride"."feature_flag_key",
|
||||
"posthog_featureflaghashkeyoverride"."hash_key",
|
||||
"posthog_featureflaghashkeyoverride"."person_id"
|
||||
FROM "posthog_featureflaghashkeyoverride"
|
||||
WHERE ("posthog_featureflaghashkeyoverride"."person_id" IN (1,
|
||||
2,
|
||||
3,
|
||||
4,
|
||||
5 /* ... */)
|
||||
AND "posthog_featureflaghashkeyoverride"."team_id" = 2)
|
||||
'''
|
||||
# ---
|
||||
# name: TestHashKeyOverridesRaceConditions.test_hash_key_overrides_with_simulated_error_race_conditions_on_person_merging.16
|
||||
'COMMIT'
|
||||
# ---
|
||||
# name: TestHashKeyOverridesRaceConditions.test_hash_key_overrides_with_simulated_error_race_conditions_on_person_merging.2
|
||||
'''
|
||||
WITH target_person_ids AS
|
||||
(SELECT team_id,
|
||||
person_id
|
||||
FROM posthog_persondistinctid
|
||||
WHERE team_id = 2
|
||||
AND distinct_id = ANY('{other_id,example_id}') ),
|
||||
existing_overrides AS
|
||||
(SELECT team_id,
|
||||
person_id,
|
||||
@@ -856,111 +939,136 @@
|
||||
FROM existing_overrides)
|
||||
'''
|
||||
# ---
|
||||
# name: TestHashKeyOverridesRaceConditions.test_hash_key_overrides_with_simulated_error_race_conditions_on_person_merging.2
|
||||
'''
|
||||
|
||||
SET LOCAL statement_timeout = 2
|
||||
'''
|
||||
# ---
|
||||
# name: TestHashKeyOverridesRaceConditions.test_hash_key_overrides_with_simulated_error_race_conditions_on_person_merging.3
|
||||
'''
|
||||
WITH target_person_ids AS
|
||||
(SELECT team_id,
|
||||
person_id
|
||||
FROM posthog_persondistinctid
|
||||
WHERE team_id = 2
|
||||
AND distinct_id IN ('other_id',
|
||||
'example_id') ),
|
||||
existing_overrides AS
|
||||
(SELECT team_id,
|
||||
person_id,
|
||||
feature_flag_key,
|
||||
hash_key
|
||||
FROM posthog_featureflaghashkeyoverride
|
||||
WHERE team_id = 2
|
||||
AND person_id IN
|
||||
(SELECT person_id
|
||||
FROM target_person_ids) ),
|
||||
flags_to_override AS
|
||||
(SELECT key
|
||||
FROM posthog_featureflag
|
||||
WHERE team_id = 2
|
||||
AND ensure_experience_continuity = TRUE
|
||||
AND active = TRUE
|
||||
AND deleted = FALSE
|
||||
AND key NOT IN
|
||||
(SELECT feature_flag_key
|
||||
FROM existing_overrides) )
|
||||
INSERT INTO posthog_featureflaghashkeyoverride (team_id, person_id, feature_flag_key, hash_key)
|
||||
SELECT team_id,
|
||||
person_id,
|
||||
key,
|
||||
'example_id'
|
||||
FROM flags_to_override,
|
||||
target_person_ids
|
||||
WHERE EXISTS
|
||||
(SELECT 1
|
||||
FROM posthog_person
|
||||
WHERE id = person_id
|
||||
AND team_id = 2) ON CONFLICT DO NOTHING
|
||||
'''
|
||||
'COMMIT'
|
||||
# ---
|
||||
# name: TestHashKeyOverridesRaceConditions.test_hash_key_overrides_with_simulated_error_race_conditions_on_person_merging.4
|
||||
'''
|
||||
|
||||
SET LOCAL statement_timeout = 2
|
||||
'''
|
||||
'BEGIN'
|
||||
# ---
|
||||
# name: TestHashKeyOverridesRaceConditions.test_hash_key_overrides_with_simulated_error_race_conditions_on_person_merging.5
|
||||
'''
|
||||
WITH target_person_ids AS
|
||||
(SELECT team_id,
|
||||
person_id
|
||||
FROM posthog_persondistinctid
|
||||
WHERE team_id = 2
|
||||
AND distinct_id IN ('other_id',
|
||||
'example_id') ),
|
||||
existing_overrides AS
|
||||
(SELECT team_id,
|
||||
person_id,
|
||||
feature_flag_key,
|
||||
hash_key
|
||||
FROM posthog_featureflaghashkeyoverride
|
||||
WHERE team_id = 2
|
||||
AND person_id IN
|
||||
(SELECT person_id
|
||||
FROM target_person_ids) ),
|
||||
flags_to_override AS
|
||||
(SELECT key
|
||||
FROM posthog_featureflag
|
||||
WHERE team_id = 2
|
||||
AND ensure_experience_continuity = TRUE
|
||||
AND active = TRUE
|
||||
AND deleted = FALSE
|
||||
AND key NOT IN
|
||||
(SELECT feature_flag_key
|
||||
FROM existing_overrides) )
|
||||
INSERT INTO posthog_featureflaghashkeyoverride (team_id, person_id, feature_flag_key, hash_key)
|
||||
SELECT team_id,
|
||||
person_id,
|
||||
key,
|
||||
'example_id'
|
||||
FROM flags_to_override,
|
||||
target_person_ids
|
||||
WHERE EXISTS
|
||||
(SELECT 1
|
||||
FROM posthog_person
|
||||
WHERE id = person_id
|
||||
AND team_id = 2) ON CONFLICT DO NOTHING
|
||||
|
||||
SET LOCAL statement_timeout = 2
|
||||
'''
|
||||
# ---
|
||||
# name: TestHashKeyOverridesRaceConditions.test_hash_key_overrides_with_simulated_error_race_conditions_on_person_merging.6
|
||||
'''
|
||||
WITH target_person_ids AS
|
||||
(SELECT team_id,
|
||||
person_id
|
||||
FROM posthog_persondistinctid
|
||||
WHERE team_id = 2
|
||||
AND distinct_id = ANY('{other_id,example_id}') ),
|
||||
existing_overrides AS
|
||||
(SELECT team_id,
|
||||
person_id,
|
||||
feature_flag_key,
|
||||
hash_key
|
||||
FROM posthog_featureflaghashkeyoverride
|
||||
WHERE team_id = 2
|
||||
AND person_id IN
|
||||
(SELECT person_id
|
||||
FROM target_person_ids) ),
|
||||
flags_to_override AS
|
||||
(SELECT key
|
||||
FROM posthog_featureflag
|
||||
WHERE team_id = 2
|
||||
AND ensure_experience_continuity = TRUE
|
||||
AND active = TRUE
|
||||
AND deleted = FALSE
|
||||
AND key NOT IN
|
||||
(SELECT feature_flag_key
|
||||
FROM existing_overrides) )
|
||||
INSERT INTO posthog_featureflaghashkeyoverride (team_id, person_id, feature_flag_key, hash_key)
|
||||
SELECT team_id,
|
||||
person_id,
|
||||
key,
|
||||
'example_id'
|
||||
FROM flags_to_override,
|
||||
target_person_ids
|
||||
WHERE EXISTS
|
||||
(SELECT 1
|
||||
FROM posthog_person
|
||||
WHERE id = person_id
|
||||
AND team_id = 2) ON CONFLICT DO NOTHING
|
||||
'''
|
||||
# ---
|
||||
# name: TestHashKeyOverridesRaceConditions.test_hash_key_overrides_with_simulated_error_race_conditions_on_person_merging.7
|
||||
'ROLLBACK'
|
||||
# ---
|
||||
# name: TestHashKeyOverridesRaceConditions.test_hash_key_overrides_with_simulated_error_race_conditions_on_person_merging.8
|
||||
'BEGIN'
|
||||
# ---
|
||||
# name: TestHashKeyOverridesRaceConditions.test_hash_key_overrides_with_simulated_error_race_conditions_on_person_merging.9
|
||||
'''
|
||||
|
||||
SET LOCAL statement_timeout = 2
|
||||
'''
|
||||
# ---
|
||||
# name: TestHashKeyOverridesRaceConditions.test_hash_key_overrides_with_simulated_error_race_conditions_on_person_merging.7
|
||||
# name: TestHashKeyOverridesRaceConditions.test_hash_key_overrides_with_simulated_race_conditions_on_person_merging
|
||||
'BEGIN'
|
||||
# ---
|
||||
# name: TestHashKeyOverridesRaceConditions.test_hash_key_overrides_with_simulated_race_conditions_on_person_merging.1
|
||||
'''
|
||||
|
||||
SET LOCAL statement_timeout = 2
|
||||
'''
|
||||
# ---
|
||||
# name: TestHashKeyOverridesRaceConditions.test_hash_key_overrides_with_simulated_race_conditions_on_person_merging.10
|
||||
'''
|
||||
WITH target_person_ids AS
|
||||
(SELECT team_id,
|
||||
person_id
|
||||
FROM posthog_persondistinctid
|
||||
WHERE team_id = 2
|
||||
AND distinct_id = ANY('{other_id,example_id}') ),
|
||||
existing_overrides AS
|
||||
(SELECT team_id,
|
||||
person_id,
|
||||
feature_flag_key,
|
||||
hash_key
|
||||
FROM posthog_featureflaghashkeyoverride
|
||||
WHERE team_id = 2
|
||||
AND person_id IN
|
||||
(SELECT person_id
|
||||
FROM target_person_ids) ),
|
||||
flags_to_override AS
|
||||
(SELECT key
|
||||
FROM posthog_featureflag
|
||||
WHERE team_id = 2
|
||||
AND ensure_experience_continuity = TRUE
|
||||
AND active = TRUE
|
||||
AND deleted = FALSE
|
||||
AND key NOT IN
|
||||
(SELECT feature_flag_key
|
||||
FROM existing_overrides) )
|
||||
INSERT INTO posthog_featureflaghashkeyoverride (team_id, person_id, feature_flag_key, hash_key)
|
||||
SELECT team_id,
|
||||
person_id,
|
||||
key,
|
||||
'example_id'
|
||||
FROM flags_to_override,
|
||||
target_person_ids
|
||||
WHERE EXISTS
|
||||
(SELECT 1
|
||||
FROM posthog_person
|
||||
WHERE id = person_id
|
||||
AND team_id = 2) ON CONFLICT DO NOTHING
|
||||
'''
|
||||
# ---
|
||||
# name: TestHashKeyOverridesRaceConditions.test_hash_key_overrides_with_simulated_race_conditions_on_person_merging.11
|
||||
'COMMIT'
|
||||
# ---
|
||||
# name: TestHashKeyOverridesRaceConditions.test_hash_key_overrides_with_simulated_race_conditions_on_person_merging.12
|
||||
'BEGIN'
|
||||
# ---
|
||||
# name: TestHashKeyOverridesRaceConditions.test_hash_key_overrides_with_simulated_race_conditions_on_person_merging.13
|
||||
'''
|
||||
|
||||
SET LOCAL statement_timeout = 2
|
||||
'''
|
||||
# ---
|
||||
# name: TestHashKeyOverridesRaceConditions.test_hash_key_overrides_with_simulated_race_conditions_on_person_merging.14
|
||||
'''
|
||||
SELECT "posthog_persondistinctid"."person_id",
|
||||
"posthog_persondistinctid"."distinct_id"
|
||||
@@ -970,7 +1078,7 @@
|
||||
AND "posthog_persondistinctid"."team_id" = 2)
|
||||
'''
|
||||
# ---
|
||||
# name: TestHashKeyOverridesRaceConditions.test_hash_key_overrides_with_simulated_error_race_conditions_on_person_merging.8
|
||||
# name: TestHashKeyOverridesRaceConditions.test_hash_key_overrides_with_simulated_race_conditions_on_person_merging.15
|
||||
'''
|
||||
SELECT "posthog_featureflaghashkeyoverride"."feature_flag_key",
|
||||
"posthog_featureflaghashkeyoverride"."hash_key",
|
||||
@@ -984,21 +1092,17 @@
|
||||
AND "posthog_featureflaghashkeyoverride"."team_id" = 2)
|
||||
'''
|
||||
# ---
|
||||
# name: TestHashKeyOverridesRaceConditions.test_hash_key_overrides_with_simulated_race_conditions_on_person_merging
|
||||
'''
|
||||
|
||||
SET LOCAL statement_timeout = 2
|
||||
'''
|
||||
# name: TestHashKeyOverridesRaceConditions.test_hash_key_overrides_with_simulated_race_conditions_on_person_merging.16
|
||||
'COMMIT'
|
||||
# ---
|
||||
# name: TestHashKeyOverridesRaceConditions.test_hash_key_overrides_with_simulated_race_conditions_on_person_merging.1
|
||||
# name: TestHashKeyOverridesRaceConditions.test_hash_key_overrides_with_simulated_race_conditions_on_person_merging.2
|
||||
'''
|
||||
WITH target_person_ids AS
|
||||
(SELECT team_id,
|
||||
person_id
|
||||
FROM posthog_persondistinctid
|
||||
WHERE team_id = 2
|
||||
AND distinct_id IN ('other_id',
|
||||
'example_id') ),
|
||||
AND distinct_id = ANY('{other_id,example_id}') ),
|
||||
existing_overrides AS
|
||||
(SELECT team_id,
|
||||
person_id,
|
||||
@@ -1020,131 +1124,69 @@
|
||||
FROM existing_overrides)
|
||||
'''
|
||||
# ---
|
||||
# name: TestHashKeyOverridesRaceConditions.test_hash_key_overrides_with_simulated_race_conditions_on_person_merging.2
|
||||
'''
|
||||
|
||||
SET LOCAL statement_timeout = 2
|
||||
'''
|
||||
# ---
|
||||
# name: TestHashKeyOverridesRaceConditions.test_hash_key_overrides_with_simulated_race_conditions_on_person_merging.3
|
||||
'''
|
||||
WITH target_person_ids AS
|
||||
(SELECT team_id,
|
||||
person_id
|
||||
FROM posthog_persondistinctid
|
||||
WHERE team_id = 2
|
||||
AND distinct_id IN ('other_id',
|
||||
'example_id') ),
|
||||
existing_overrides AS
|
||||
(SELECT team_id,
|
||||
person_id,
|
||||
feature_flag_key,
|
||||
hash_key
|
||||
FROM posthog_featureflaghashkeyoverride
|
||||
WHERE team_id = 2
|
||||
AND person_id IN
|
||||
(SELECT person_id
|
||||
FROM target_person_ids) ),
|
||||
flags_to_override AS
|
||||
(SELECT key
|
||||
FROM posthog_featureflag
|
||||
WHERE team_id = 2
|
||||
AND ensure_experience_continuity = TRUE
|
||||
AND active = TRUE
|
||||
AND deleted = FALSE
|
||||
AND key NOT IN
|
||||
(SELECT feature_flag_key
|
||||
FROM existing_overrides) )
|
||||
INSERT INTO posthog_featureflaghashkeyoverride (team_id, person_id, feature_flag_key, hash_key)
|
||||
SELECT team_id,
|
||||
person_id,
|
||||
key,
|
||||
'example_id'
|
||||
FROM flags_to_override,
|
||||
target_person_ids
|
||||
WHERE EXISTS
|
||||
(SELECT 1
|
||||
FROM posthog_person
|
||||
WHERE id = person_id
|
||||
AND team_id = 2) ON CONFLICT DO NOTHING
|
||||
'''
|
||||
'COMMIT'
|
||||
# ---
|
||||
# name: TestHashKeyOverridesRaceConditions.test_hash_key_overrides_with_simulated_race_conditions_on_person_merging.4
|
||||
'''
|
||||
|
||||
SET LOCAL statement_timeout = 2
|
||||
'''
|
||||
'BEGIN'
|
||||
# ---
|
||||
# name: TestHashKeyOverridesRaceConditions.test_hash_key_overrides_with_simulated_race_conditions_on_person_merging.5
|
||||
'''
|
||||
WITH target_person_ids AS
|
||||
(SELECT team_id,
|
||||
person_id
|
||||
FROM posthog_persondistinctid
|
||||
WHERE team_id = 2
|
||||
AND distinct_id IN ('other_id',
|
||||
'example_id') ),
|
||||
existing_overrides AS
|
||||
(SELECT team_id,
|
||||
person_id,
|
||||
feature_flag_key,
|
||||
hash_key
|
||||
FROM posthog_featureflaghashkeyoverride
|
||||
WHERE team_id = 2
|
||||
AND person_id IN
|
||||
(SELECT person_id
|
||||
FROM target_person_ids) ),
|
||||
flags_to_override AS
|
||||
(SELECT key
|
||||
FROM posthog_featureflag
|
||||
WHERE team_id = 2
|
||||
AND ensure_experience_continuity = TRUE
|
||||
AND active = TRUE
|
||||
AND deleted = FALSE
|
||||
AND key NOT IN
|
||||
(SELECT feature_flag_key
|
||||
FROM existing_overrides) )
|
||||
INSERT INTO posthog_featureflaghashkeyoverride (team_id, person_id, feature_flag_key, hash_key)
|
||||
SELECT team_id,
|
||||
person_id,
|
||||
key,
|
||||
'example_id'
|
||||
FROM flags_to_override,
|
||||
target_person_ids
|
||||
WHERE EXISTS
|
||||
(SELECT 1
|
||||
FROM posthog_person
|
||||
WHERE id = person_id
|
||||
AND team_id = 2) ON CONFLICT DO NOTHING
|
||||
|
||||
SET LOCAL statement_timeout = 2
|
||||
'''
|
||||
# ---
|
||||
# name: TestHashKeyOverridesRaceConditions.test_hash_key_overrides_with_simulated_race_conditions_on_person_merging.6
|
||||
'''
|
||||
WITH target_person_ids AS
|
||||
(SELECT team_id,
|
||||
person_id
|
||||
FROM posthog_persondistinctid
|
||||
WHERE team_id = 2
|
||||
AND distinct_id = ANY('{other_id,example_id}') ),
|
||||
existing_overrides AS
|
||||
(SELECT team_id,
|
||||
person_id,
|
||||
feature_flag_key,
|
||||
hash_key
|
||||
FROM posthog_featureflaghashkeyoverride
|
||||
WHERE team_id = 2
|
||||
AND person_id IN
|
||||
(SELECT person_id
|
||||
FROM target_person_ids) ),
|
||||
flags_to_override AS
|
||||
(SELECT key
|
||||
FROM posthog_featureflag
|
||||
WHERE team_id = 2
|
||||
AND ensure_experience_continuity = TRUE
|
||||
AND active = TRUE
|
||||
AND deleted = FALSE
|
||||
AND key NOT IN
|
||||
(SELECT feature_flag_key
|
||||
FROM existing_overrides) )
|
||||
INSERT INTO posthog_featureflaghashkeyoverride (team_id, person_id, feature_flag_key, hash_key)
|
||||
SELECT team_id,
|
||||
person_id,
|
||||
key,
|
||||
'example_id'
|
||||
FROM flags_to_override,
|
||||
target_person_ids
|
||||
WHERE EXISTS
|
||||
(SELECT 1
|
||||
FROM posthog_person
|
||||
WHERE id = person_id
|
||||
AND team_id = 2) ON CONFLICT DO NOTHING
|
||||
'''
|
||||
# ---
|
||||
# name: TestHashKeyOverridesRaceConditions.test_hash_key_overrides_with_simulated_race_conditions_on_person_merging.7
|
||||
'ROLLBACK'
|
||||
# ---
|
||||
# name: TestHashKeyOverridesRaceConditions.test_hash_key_overrides_with_simulated_race_conditions_on_person_merging.8
|
||||
'BEGIN'
|
||||
# ---
|
||||
# name: TestHashKeyOverridesRaceConditions.test_hash_key_overrides_with_simulated_race_conditions_on_person_merging.9
|
||||
'''
|
||||
|
||||
SET LOCAL statement_timeout = 2
|
||||
'''
|
||||
# ---
|
||||
# name: TestHashKeyOverridesRaceConditions.test_hash_key_overrides_with_simulated_race_conditions_on_person_merging.7
|
||||
'''
|
||||
SELECT "posthog_persondistinctid"."person_id",
|
||||
"posthog_persondistinctid"."distinct_id"
|
||||
FROM "posthog_persondistinctid"
|
||||
WHERE ("posthog_persondistinctid"."distinct_id" IN ('other_id',
|
||||
'example_id')
|
||||
AND "posthog_persondistinctid"."team_id" = 2)
|
||||
'''
|
||||
# ---
|
||||
# name: TestHashKeyOverridesRaceConditions.test_hash_key_overrides_with_simulated_race_conditions_on_person_merging.8
|
||||
'''
|
||||
SELECT "posthog_featureflaghashkeyoverride"."feature_flag_key",
|
||||
"posthog_featureflaghashkeyoverride"."hash_key",
|
||||
"posthog_featureflaghashkeyoverride"."person_id"
|
||||
FROM "posthog_featureflaghashkeyoverride"
|
||||
WHERE ("posthog_featureflaghashkeyoverride"."person_id" IN (1,
|
||||
2,
|
||||
3,
|
||||
4,
|
||||
5 /* ... */)
|
||||
AND "posthog_featureflaghashkeyoverride"."team_id" = 2)
|
||||
'''
|
||||
# ---
|
||||
|
||||
@@ -32,6 +32,7 @@ types-pytz==2023.3
|
||||
types-redis==4.3.20
|
||||
types-retry==0.9.9.4
|
||||
types-requests==2.26.1
|
||||
types-tzlocal~=5.1.0.1
|
||||
parameterized==0.9.0
|
||||
pytest==7.4.4
|
||||
pytest-asyncio==0.21.1
|
||||
|
||||
@@ -62,7 +62,7 @@ coverage[toml]==5.5
|
||||
# via pytest-cov
|
||||
datamodel-code-generator==0.25.2
|
||||
# via -r requirements-dev.in
|
||||
django==4.1.13
|
||||
django==4.2.11
|
||||
# via
|
||||
# -c requirements.txt
|
||||
# django-stubs
|
||||
@@ -260,7 +260,9 @@ types-markdown==3.3.9
|
||||
types-python-dateutil==2.8.3
|
||||
# via -r requirements-dev.in
|
||||
types-pytz==2023.3.0.0
|
||||
# via -r requirements-dev.in
|
||||
# via
|
||||
# -r requirements-dev.in
|
||||
# types-tzlocal
|
||||
types-pyyaml==6.0.1
|
||||
# via
|
||||
# -r requirements-dev.in
|
||||
@@ -271,6 +273,8 @@ types-requests==2.26.1
|
||||
# via -r requirements-dev.in
|
||||
types-retry==0.9.9.4
|
||||
# via -r requirements-dev.in
|
||||
types-tzlocal==5.1.0.1
|
||||
# via -r requirements-dev.in
|
||||
typing-extensions==4.7.1
|
||||
# via
|
||||
# -c requirements.txt
|
||||
|
||||
@@ -19,7 +19,7 @@ clickhouse-pool==0.5.3
|
||||
cryptography==37.0.2
|
||||
defusedxml==0.6.0
|
||||
dj-database-url==0.5.0
|
||||
Django==4.1.13
|
||||
Django~=4.2.11
|
||||
django-axes==5.9.0
|
||||
django-cors-headers==3.5.0
|
||||
django-deprecate-fields==0.1.1
|
||||
@@ -44,7 +44,6 @@ drf-spectacular==0.27.1
|
||||
gevent==23.9.1
|
||||
geoip2==4.6.0
|
||||
google-cloud-bigquery==3.11.4
|
||||
google-cloud-sqlcommenter==2.0.0
|
||||
gunicorn==20.1.0
|
||||
idna==2.8
|
||||
importlib-metadata==6.8.0
|
||||
|
||||
@@ -144,7 +144,7 @@ distro==1.9.0
|
||||
# via openai
|
||||
dj-database-url==0.5.0
|
||||
# via -r requirements.in
|
||||
django==4.1.13
|
||||
django==4.2.11
|
||||
# via
|
||||
# -r requirements.in
|
||||
# django-axes
|
||||
@@ -262,8 +262,6 @@ google-cloud-bigquery==3.11.4
|
||||
# via -r requirements.in
|
||||
google-cloud-core==2.3.3
|
||||
# via google-cloud-bigquery
|
||||
google-cloud-sqlcommenter==2.0.0
|
||||
# via -r requirements.in
|
||||
google-crc32c==1.5.0
|
||||
# via google-resumable-media
|
||||
google-resumable-media==2.5.0
|
||||
|
||||
Reference in New Issue
Block a user