diff --git a/latest_migrations.manifest b/latest_migrations.manifest index ede9b35bf2662..b9d6b3828d50d 100644 --- a/latest_migrations.manifest +++ b/latest_migrations.manifest @@ -5,7 +5,7 @@ contenttypes: 0002_remove_content_type_name ee: 0016_rolemembership_organization_member otp_static: 0002_throttling otp_totp: 0002_auto_20190420_0723 -posthog: 0404_remove_propertydefinition_property_type_is_valid_and_more +posthog: 0405_validate_property_type_is_valid sessions: 0001_initial social_django: 0010_uid_db_index two_factor: 0007_auto_20201201_1019 diff --git a/mypy-baseline.txt b/mypy-baseline.txt index 4945b638768ce..8b3e50bb6cede 100644 --- a/mypy-baseline.txt +++ b/mypy-baseline.txt @@ -386,7 +386,6 @@ posthog/session_recordings/queries/session_recording_list_from_replay_summary.py posthog/session_recordings/queries/session_recording_list_from_replay_summary.py:0: note: If the method is meant to be abstract, use @abc.abstractmethod posthog/session_recordings/queries/session_recording_list_from_replay_summary.py:0: error: Missing return statement [empty-body] posthog/session_recordings/queries/session_recording_list_from_replay_summary.py:0: note: If the method is meant to be abstract, use @abc.abstractmethod -posthog/migrations/0404_remove_propertydefinition_property_type_is_valid_and_more.py:0: error: Module "django.contrib.postgres.operations" has no attribute "AddConstraintNotValid" [attr-defined] posthog/hogql_queries/test/test_query_runner.py:0: error: Variable "TestQueryRunner" is not valid as a type [valid-type] posthog/hogql_queries/test/test_query_runner.py:0: note: See https://mypy.readthedocs.io/en/stable/common_issues.html#variables-vs-type-aliases posthog/hogql_queries/test/test_query_runner.py:0: error: Invalid base class "TestQueryRunner" [misc] @@ -553,6 +552,8 @@ posthog/queries/trends/test/test_person.py:0: error: "str" has no attribute "get posthog/queries/trends/test/test_person.py:0: error: Invalid index type "int" for "HttpResponse"; expected type "str | bytes" [index] posthog/queries/trends/test/test_person.py:0: error: "str" has no attribute "get" [attr-defined] posthog/queries/trends/test/test_person.py:0: error: Invalid index type "int" for "HttpResponse"; expected type "str | bytes" [index] +posthog/migrations/0405_validate_property_type_is_valid.py:0: error: Module "django.contrib.postgres.operations" has no attribute "ValidateConstraint" [attr-defined] +posthog/migrations/0404_remove_propertydefinition_property_type_is_valid_and_more.py:0: error: Module "django.contrib.postgres.operations" has no attribute "AddConstraintNotValid" [attr-defined] posthog/management/commands/migrate_team.py:0: error: Incompatible types in assignment (expression has type "None", variable has type "BatchExport") [assignment] posthog/hogql/test/test_query.py:0: error: Argument 1 to "len" has incompatible type "list[Any] | None"; expected "Sized" [arg-type] posthog/hogql/test/test_query.py:0: error: Value of type "list[QueryTiming] | None" is not indexable [index] diff --git a/posthog/migrations/0405_validate_property_type_is_valid.py b/posthog/migrations/0405_validate_property_type_is_valid.py new file mode 100644 index 0000000000000..a0455d00b0ddc --- /dev/null +++ b/posthog/migrations/0405_validate_property_type_is_valid.py @@ -0,0 +1,12 @@ +from django.contrib.postgres.operations import ValidateConstraint +from django.db import migrations + + +class Migration(migrations.Migration): + dependencies = [ + ("posthog", "0404_remove_propertydefinition_property_type_is_valid_and_more"), + ] + + operations = [ + ValidateConstraint(model_name="propertydefinition", name="property_type_is_valid"), + ]