diff --git a/latest_migrations.manifest b/latest_migrations.manifest index 233b3d446d5cb..0f95d248d4675 100644 --- a/latest_migrations.manifest +++ b/latest_migrations.manifest @@ -5,7 +5,7 @@ contenttypes: 0002_remove_content_type_name ee: 0015_add_verified_properties otp_static: 0002_throttling otp_totp: 0002_auto_20190420_0723 -posthog: 0350_add_notebook_text_content +posthog: 0351_team_surveys_opt_in sessions: 0001_initial social_django: 0010_uid_db_index two_factor: 0007_auto_20201201_1019 diff --git a/posthog/api/test/__snapshots__/test_action.ambr b/posthog/api/test/__snapshots__/test_action.ambr index 7bdd2eaad7cfb..e158a0baaf2da 100644 --- a/posthog/api/test/__snapshots__/test_action.ambr +++ b/posthog/api/test/__snapshots__/test_action.ambr @@ -48,6 +48,7 @@ "posthog_team"."session_recording_opt_in", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", + "posthog_team"."surveys_opt_in", "posthog_team"."session_recording_version", "posthog_team"."signup_token", "posthog_team"."is_demo", @@ -197,6 +198,7 @@ "posthog_team"."session_recording_opt_in", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", + "posthog_team"."surveys_opt_in", "posthog_team"."session_recording_version", "posthog_team"."signup_token", "posthog_team"."is_demo", @@ -513,6 +515,7 @@ "posthog_team"."session_recording_opt_in", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", + "posthog_team"."surveys_opt_in", "posthog_team"."session_recording_version", "posthog_team"."signup_token", "posthog_team"."is_demo", diff --git a/posthog/api/test/__snapshots__/test_annotation.ambr b/posthog/api/test/__snapshots__/test_annotation.ambr index eceea7ffb0ead..23060eec170ac 100644 --- a/posthog/api/test/__snapshots__/test_annotation.ambr +++ b/posthog/api/test/__snapshots__/test_annotation.ambr @@ -48,6 +48,7 @@ "posthog_team"."session_recording_opt_in", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", + "posthog_team"."surveys_opt_in", "posthog_team"."session_recording_version", "posthog_team"."signup_token", "posthog_team"."is_demo", @@ -121,6 +122,7 @@ "posthog_team"."session_recording_opt_in", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", + "posthog_team"."surveys_opt_in", "posthog_team"."session_recording_version", "posthog_team"."signup_token", "posthog_team"."is_demo", @@ -437,6 +439,7 @@ "posthog_team"."session_recording_opt_in", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", + "posthog_team"."surveys_opt_in", "posthog_team"."session_recording_version", "posthog_team"."signup_token", "posthog_team"."is_demo", diff --git a/posthog/api/test/__snapshots__/test_decide.ambr b/posthog/api/test/__snapshots__/test_decide.ambr index ae9901067c7d0..43b1197657722 100644 --- a/posthog/api/test/__snapshots__/test_decide.ambr +++ b/posthog/api/test/__snapshots__/test_decide.ambr @@ -48,6 +48,7 @@ "posthog_team"."session_recording_opt_in", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", + "posthog_team"."surveys_opt_in", "posthog_team"."session_recording_version", "posthog_team"."signup_token", "posthog_team"."is_demo", @@ -282,6 +283,7 @@ "posthog_team"."session_recording_opt_in", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", + "posthog_team"."surveys_opt_in", "posthog_team"."session_recording_version", "posthog_team"."signup_token", "posthog_team"."is_demo", @@ -431,6 +433,7 @@ "posthog_team"."session_recording_opt_in", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", + "posthog_team"."surveys_opt_in", "posthog_team"."session_recording_version", "posthog_team"."signup_token", "posthog_team"."is_demo", @@ -575,6 +578,7 @@ "posthog_team"."session_recording_opt_in", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", + "posthog_team"."surveys_opt_in", "posthog_team"."session_recording_version", "posthog_team"."signup_token", "posthog_team"."is_demo", diff --git a/posthog/api/test/__snapshots__/test_early_access_feature.ambr b/posthog/api/test/__snapshots__/test_early_access_feature.ambr index f5b0252c90b0e..f9cfe83157dc4 100644 --- a/posthog/api/test/__snapshots__/test_early_access_feature.ambr +++ b/posthog/api/test/__snapshots__/test_early_access_feature.ambr @@ -19,6 +19,7 @@ "posthog_team"."session_recording_opt_in", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", + "posthog_team"."surveys_opt_in", "posthog_team"."session_recording_version", "posthog_team"."signup_token", "posthog_team"."is_demo", @@ -145,6 +146,7 @@ "posthog_team"."session_recording_opt_in", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", + "posthog_team"."surveys_opt_in", "posthog_team"."session_recording_version", "posthog_team"."signup_token", "posthog_team"."is_demo", diff --git a/posthog/api/test/__snapshots__/test_element.ambr b/posthog/api/test/__snapshots__/test_element.ambr index 943571f635436..8b1ea3b9ebfc4 100644 --- a/posthog/api/test/__snapshots__/test_element.ambr +++ b/posthog/api/test/__snapshots__/test_element.ambr @@ -48,6 +48,7 @@ "posthog_team"."session_recording_opt_in", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", + "posthog_team"."surveys_opt_in", "posthog_team"."session_recording_version", "posthog_team"."signup_token", "posthog_team"."is_demo", diff --git a/posthog/api/test/__snapshots__/test_insight.ambr b/posthog/api/test/__snapshots__/test_insight.ambr index 0e921f83f3f37..f9015d5d9b82c 100644 --- a/posthog/api/test/__snapshots__/test_insight.ambr +++ b/posthog/api/test/__snapshots__/test_insight.ambr @@ -646,6 +646,7 @@ "posthog_team"."session_recording_opt_in", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", + "posthog_team"."surveys_opt_in", "posthog_team"."session_recording_version", "posthog_team"."signup_token", "posthog_team"."is_demo", @@ -690,6 +691,7 @@ "posthog_team"."session_recording_opt_in", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", + "posthog_team"."surveys_opt_in", "posthog_team"."session_recording_version", "posthog_team"."signup_token", "posthog_team"."is_demo", @@ -810,6 +812,7 @@ "posthog_team"."session_recording_opt_in", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", + "posthog_team"."surveys_opt_in", "posthog_team"."session_recording_version", "posthog_team"."signup_token", "posthog_team"."is_demo", @@ -1032,6 +1035,7 @@ "posthog_team"."session_recording_opt_in", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", + "posthog_team"."surveys_opt_in", "posthog_team"."session_recording_version", "posthog_team"."signup_token", "posthog_team"."is_demo", @@ -1166,6 +1170,7 @@ "posthog_team"."session_recording_opt_in", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", + "posthog_team"."surveys_opt_in", "posthog_team"."session_recording_version", "posthog_team"."signup_token", "posthog_team"."is_demo", @@ -1287,6 +1292,7 @@ "posthog_team"."session_recording_opt_in", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", + "posthog_team"."surveys_opt_in", "posthog_team"."session_recording_version", "posthog_team"."signup_token", "posthog_team"."is_demo", @@ -1388,6 +1394,7 @@ "posthog_team"."session_recording_opt_in", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", + "posthog_team"."surveys_opt_in", "posthog_team"."session_recording_version", "posthog_team"."signup_token", "posthog_team"."is_demo", @@ -1524,6 +1531,7 @@ "posthog_team"."session_recording_opt_in", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", + "posthog_team"."surveys_opt_in", "posthog_team"."session_recording_version", "posthog_team"."signup_token", "posthog_team"."is_demo", @@ -1603,6 +1611,7 @@ "posthog_team"."session_recording_opt_in", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", + "posthog_team"."surveys_opt_in", "posthog_team"."session_recording_version", "posthog_team"."signup_token", "posthog_team"."is_demo", @@ -1681,6 +1690,7 @@ "posthog_team"."session_recording_opt_in", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", + "posthog_team"."surveys_opt_in", "posthog_team"."session_recording_version", "posthog_team"."signup_token", "posthog_team"."is_demo", @@ -1732,6 +1742,7 @@ "posthog_team"."session_recording_opt_in", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", + "posthog_team"."surveys_opt_in", "posthog_team"."session_recording_version", "posthog_team"."signup_token", "posthog_team"."is_demo", diff --git a/posthog/api/test/__snapshots__/test_preflight.ambr b/posthog/api/test/__snapshots__/test_preflight.ambr index 19a504d23eb28..6981b2f9afe16 100644 --- a/posthog/api/test/__snapshots__/test_preflight.ambr +++ b/posthog/api/test/__snapshots__/test_preflight.ambr @@ -59,6 +59,7 @@ "posthog_team"."session_recording_opt_in", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", + "posthog_team"."surveys_opt_in", "posthog_team"."session_recording_version", "posthog_team"."signup_token", "posthog_team"."is_demo", diff --git a/posthog/api/test/__snapshots__/test_survey.ambr b/posthog/api/test/__snapshots__/test_survey.ambr index f076ff00feeda..dacdb0ebc8550 100644 --- a/posthog/api/test/__snapshots__/test_survey.ambr +++ b/posthog/api/test/__snapshots__/test_survey.ambr @@ -94,6 +94,7 @@ "posthog_team"."session_recording_opt_in", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", + "posthog_team"."surveys_opt_in", "posthog_team"."session_recording_version", "posthog_team"."signup_token", "posthog_team"."is_demo", diff --git a/posthog/migrations/0351_team_surveys_opt_in.py b/posthog/migrations/0351_team_surveys_opt_in.py new file mode 100644 index 0000000000000..c1722b7a11000 --- /dev/null +++ b/posthog/migrations/0351_team_surveys_opt_in.py @@ -0,0 +1,18 @@ +# Generated by Django 3.2.19 on 2023-09-20 14:40 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ("posthog", "0350_add_notebook_text_content"), + ] + + operations = [ + migrations.AddField( + model_name="team", + name="surveys_opt_in", + field=models.BooleanField(blank=True, null=True), + ), + ] diff --git a/posthog/models/team/team.py b/posthog/models/team/team.py index 5b3ceb039519f..73f1231d33bb0 100644 --- a/posthog/models/team/team.py +++ b/posthog/models/team/team.py @@ -150,6 +150,7 @@ class Team(UUIDClassicModel): session_recording_opt_in: models.BooleanField = models.BooleanField(default=False) capture_console_log_opt_in: models.BooleanField = models.BooleanField(null=True, blank=True) capture_performance_opt_in: models.BooleanField = models.BooleanField(null=True, blank=True) + surveys_opt_in: models.BooleanField = models.BooleanField(null=True, blank=True) session_recording_version: models.CharField = models.CharField(null=True, blank=True, max_length=24) signup_token: models.CharField = models.CharField(max_length=200, null=True, blank=True) is_demo: models.BooleanField = models.BooleanField(default=False) diff --git a/posthog/test/__snapshots__/test_feature_flag.ambr b/posthog/test/__snapshots__/test_feature_flag.ambr index d9ed15e4f2cdc..84422798972fb 100644 --- a/posthog/test/__snapshots__/test_feature_flag.ambr +++ b/posthog/test/__snapshots__/test_feature_flag.ambr @@ -19,6 +19,7 @@ "posthog_team"."session_recording_opt_in", "posthog_team"."capture_console_log_opt_in", "posthog_team"."capture_performance_opt_in", + "posthog_team"."surveys_opt_in", "posthog_team"."session_recording_version", "posthog_team"."signup_token", "posthog_team"."is_demo",