0
0
mirror of https://github.com/PostHog/posthog.git synced 2024-11-24 18:07:17 +01:00
posthog/latest_migrations.manifest

10 lines
328 B
Plaintext
Raw Normal View History

2020-04-16 11:14:04 +02:00
admin: 0003_logentry_add_action_flag_choices
auth: 0011_update_proxy_permissions
axes: 0006_remove_accesslog_trusted
2020-04-16 11:14:04 +02:00
contenttypes: 0002_remove_content_type_name
Personal API keys and Zapier integration (#1281) * Add missing migration * Add generate_random_token() model util * Move PublicTokenAuthentication to utils * Make use of generate_random_token * Add User.personal_access_token field * Add PersonalAccessTokenAuthentication * Fix PublicTokenAuthentication * Fix migration and auth import * Add personal_access_token to user API * Update Setup.js * Support trailing slash in API * Improve PAT auth quality * Add django-rest-hooks requirement * Update settings.py for rest_hooks * Fix django-rest-hooks requirement * Bring back API routes with no double trailing slash * Rename posthog.api.team to team_user * Add API TODO * Ad PAT auth with X-PAT HTTP header * Replace User.personal_access_token with PersonalAPIKey model * Fix PersonalAPIKey max_lengths * Describe posthog.models.utils.generate_random_token better * Add personal_api_key to API * Add authenticate_header to PersonalAPIKeyAuthentication * Add hook API endpoint * Use django.utils.timezone in place of datetime.datetime * Add Personal API Keys to Setup * Sort personal_api_keys in ORM * Add Action.on_perform() * Remove requirements.txt comment * Add a * Add REST hook tasks * Optimize PersonalAPIKeyAuthentication query * Add a trailing slash version of /e endpoint * Add team field to PersonalAPIKey model * Add personal API key support to capture endpoint, get_cached_from_token * Reject personal API keys from inactive users * Add extra_properties_json field to /capture * Improve PAK auth header regex * Use custom hook model * Deliver hooks * Handle action.on_perform * Consolidate userLogic in userLogic.tsx * Update PersonalAPIKeys.js * Make PersonalAPIKey foreign keys read-only * Update requirements/dev.txt * Make PersonalAPIKeys TSX * Fix conflict * Fix migration * Fix minor mishaps * Update and fix tests * Use CharField of random 32 bits as hook.id * Fix conflicting migrations * Fix ValidationError in HookSerializer.validate_event * Use query param in /api/event/actions ID filtering * Rename endpoint `hook` to `hooks` * Satisfy mypy * Add tests * Use DRF serialization in action_defined and annotation_created triggers * Update migration leafs * Make mypy ignore rest_hooks * Update Django signal receiver names * Update TS dependencies * Revert "Update TS dependencies" This reverts commit 7fc26fefcdc16e630e1c8fd2c510fd323d97169f. * Add field user to Hook model * Update migration leafs * Fix circular import * Fix some code * Install git before running pip install in Dockerfiles * Improve personal API keys UI * Satisfy mypy * Reword key label placeholder * Add personal API key support to /api/user/* Unfortunately these endpoints are still limited by CSRF protections at the moment, so not accessible outside PostHog itself. * Improve PersonalAPIKeyAuthentication and add CsrfOrKeyViewMiddleware * Run collectstatic before test * Don't install dev dependencies in CI * Update dependency installation order in CI * Fix bug and describe PersonalAPIKeyAuthentication * Fix CI issues * Fix typing issues * Fix more typing issues * Use /api/personal_api_keys to list keys * Move REST hooks (and therefore Zapier) to ee/ * Refactor personal API logic with kea-loaders * Add "More about API authentication in PostHog docs." * Update PersonalAPIKeys.tsx * Use TestMixin * Fix "Authentication" that should've been "Authorization" * Add option to skip self.client.force_login in API tests * Include team_id and user_id in personal API key serialization * Update test_hooks.py * Add personal API key tests * Remove leftover * Make ee.settings override posthog.settings * Don't directly import from models * Remove unused imports * Fix mypy issues * Fix HOOK_DELIVERER * Use decorator for /api/user PAK auth * Don't fire REST hook if user doesn't have "zapier" feature * Import Optional * Reword to "premium Zapier" * Make mypy happy * Fix test_delete_personal_api_key * Fix misclick * Fix and test /capture with personal API key * Make mypy happy * Remove extra_properties_json * Resolve migrations * Remove apt-utils * Optimize and test PAK user.is_active filtering * Replace DEBUG true with 1 * Remove unused instance_id * Improve typing * Fix deletion toast * Refactor CopyToClipboard and use it in PAKs * Use toast.success * Update migrations * Fix migration * Fix migrations * Complete merge Co-authored-by: Tim Glaser <tim@glsr.nl>
2020-08-26 10:34:57 +02:00
ee: 0002_hook
Index session recording events by team_id, timestamp (#2853) * Index session recording events by team_id, timestamp This speeds main session recording query up significantly. Solves #2739 ---- Measurements Tested this on a semi-large self-hosted instance. Pre-index: ``` | QUERY PLAN | |---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | Subquery Scan on p (cost=207673.55..207673.60 rows=1 width=97) (actual time=22200.985..22200.985 rows=0 loops=1) | | -> GroupAggregate (cost=207673.55..207673.59 rows=1 width=105) (actual time=22200.984..22200.984 rows=0 loops=1) | | Group Key: posthog_sessionrecordingevent.distinct_id, posthog_sessionrecordingevent.session_id | | Filter: (count(*) FILTER (WHERE ((posthog_sessionrecordingevent.snapshot_data ->> 'type'::text) = '2'::text)) > 0) | | Rows Removed by Filter: 20 | | -> Sort (cost=207673.55..207673.56 rows=1 width=468) (actual time=22185.713..22186.010 rows=4937 loops=1) | | Sort Key: posthog_sessionrecordingevent.distinct_id, posthog_sessionrecordingevent.session_id | | Sort Method: quicksort Memory: 2932kB | | -> Index Scan using posthog_ses_team_id_46392f_idx21 on posthog_sessionrecordingevent (cost=0.56..207673.54 rows=1 width=468) (actual time=127.291..22181.190 rows=4937 loops=1) | | Index Cond: ((team_id = 1) AND ("timestamp" >= '2020-12-01 10:37:21.726776+00'::timestamp with time zone) AND ("timestamp" <= '2021-01-05 11:30:47.010794+00'::timestamp with time zone)) | | Planning Time: 0.195 ms | | Execution Time: 22201.031 ms | +---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ ``` After index: ``` +---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | QUERY PLAN | |---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | Subquery Scan on p (cost=8.46..8.51 rows=1 width=97) (actual time=20.420..20.420 rows=0 loops=1) | | -> GroupAggregate (cost=8.46..8.50 rows=1 width=105) (actual time=20.419..20.419 rows=0 loops=1) | | Group Key: posthog_sessionrecordingevent.distinct_id, posthog_sessionrecordingevent.session_id | | Filter: (count(*) FILTER (WHERE ((posthog_sessionrecordingevent.snapshot_data ->> 'type'::text) = '2'::text)) > 0) | | Rows Removed by Filter: 20 | | -> Sort (cost=8.46..8.47 rows=1 width=468) (actual time=13.695..14.078 rows=4937 loops=1) | | Sort Key: posthog_sessionrecordingevent.distinct_id, posthog_sessionrecordingevent.session_id | | Sort Method: quicksort Memory: 2921kB | | -> Index Scan using posthog_ses_team_id_46392f_idx24 on posthog_sessionrecordingevent (cost=0.43..8.45 rows=1 width=468) (actual time=0.020..2.295 rows=4937 loops=1) | | Index Cond: ((team_id = 1) AND ("timestamp" >= '2020-12-01 10:37:21.726776+00'::timestamp with time zone) AND ("timestamp" <= '2021-01-05 11:30:47.010794+00'::timestamp with time zone)) | | Planning Time: 15.432 ms | | Execution Time: 22.521 ms | +---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ ``` * make linter happy
2021-01-05 16:10:21 +01:00
posthog: 0110_sessionrecordingeventbyteamandtimestamp
Personal API keys and Zapier integration (#1281) * Add missing migration * Add generate_random_token() model util * Move PublicTokenAuthentication to utils * Make use of generate_random_token * Add User.personal_access_token field * Add PersonalAccessTokenAuthentication * Fix PublicTokenAuthentication * Fix migration and auth import * Add personal_access_token to user API * Update Setup.js * Support trailing slash in API * Improve PAT auth quality * Add django-rest-hooks requirement * Update settings.py for rest_hooks * Fix django-rest-hooks requirement * Bring back API routes with no double trailing slash * Rename posthog.api.team to team_user * Add API TODO * Ad PAT auth with X-PAT HTTP header * Replace User.personal_access_token with PersonalAPIKey model * Fix PersonalAPIKey max_lengths * Describe posthog.models.utils.generate_random_token better * Add personal_api_key to API * Add authenticate_header to PersonalAPIKeyAuthentication * Add hook API endpoint * Use django.utils.timezone in place of datetime.datetime * Add Personal API Keys to Setup * Sort personal_api_keys in ORM * Add Action.on_perform() * Remove requirements.txt comment * Add a * Add REST hook tasks * Optimize PersonalAPIKeyAuthentication query * Add a trailing slash version of /e endpoint * Add team field to PersonalAPIKey model * Add personal API key support to capture endpoint, get_cached_from_token * Reject personal API keys from inactive users * Add extra_properties_json field to /capture * Improve PAK auth header regex * Use custom hook model * Deliver hooks * Handle action.on_perform * Consolidate userLogic in userLogic.tsx * Update PersonalAPIKeys.js * Make PersonalAPIKey foreign keys read-only * Update requirements/dev.txt * Make PersonalAPIKeys TSX * Fix conflict * Fix migration * Fix minor mishaps * Update and fix tests * Use CharField of random 32 bits as hook.id * Fix conflicting migrations * Fix ValidationError in HookSerializer.validate_event * Use query param in /api/event/actions ID filtering * Rename endpoint `hook` to `hooks` * Satisfy mypy * Add tests * Use DRF serialization in action_defined and annotation_created triggers * Update migration leafs * Make mypy ignore rest_hooks * Update Django signal receiver names * Update TS dependencies * Revert "Update TS dependencies" This reverts commit 7fc26fefcdc16e630e1c8fd2c510fd323d97169f. * Add field user to Hook model * Update migration leafs * Fix circular import * Fix some code * Install git before running pip install in Dockerfiles * Improve personal API keys UI * Satisfy mypy * Reword key label placeholder * Add personal API key support to /api/user/* Unfortunately these endpoints are still limited by CSRF protections at the moment, so not accessible outside PostHog itself. * Improve PersonalAPIKeyAuthentication and add CsrfOrKeyViewMiddleware * Run collectstatic before test * Don't install dev dependencies in CI * Update dependency installation order in CI * Fix bug and describe PersonalAPIKeyAuthentication * Fix CI issues * Fix typing issues * Fix more typing issues * Use /api/personal_api_keys to list keys * Move REST hooks (and therefore Zapier) to ee/ * Refactor personal API logic with kea-loaders * Add "More about API authentication in PostHog docs." * Update PersonalAPIKeys.tsx * Use TestMixin * Fix "Authentication" that should've been "Authorization" * Add option to skip self.client.force_login in API tests * Include team_id and user_id in personal API key serialization * Update test_hooks.py * Add personal API key tests * Remove leftover * Make ee.settings override posthog.settings * Don't directly import from models * Remove unused imports * Fix mypy issues * Fix HOOK_DELIVERER * Use decorator for /api/user PAK auth * Don't fire REST hook if user doesn't have "zapier" feature * Import Optional * Reword to "premium Zapier" * Make mypy happy * Fix test_delete_personal_api_key * Fix misclick * Fix and test /capture with personal API key * Make mypy happy * Remove extra_properties_json * Resolve migrations * Remove apt-utils * Optimize and test PAK user.is_active filtering * Replace DEBUG true with 1 * Remove unused instance_id * Improve typing * Fix deletion toast * Refactor CopyToClipboard and use it in PAKs * Use toast.success * Update migrations * Fix migration * Fix migrations * Complete merge Co-authored-by: Tim Glaser <tim@glsr.nl>
2020-08-26 10:34:57 +02:00
rest_hooks: 0002_swappable_hook_model
2020-04-16 11:14:04 +02:00
sessions: 0001_initial
social_django: 0008_partial_timestamp