diff --git a/latest_migrations.manifest b/latest_migrations.manifest index ecf943914d814..351281b32f664 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: 0401_alter_propertydefinition_type +posthog: 0402_remove_propertydefinition_property_type_is_valid_and_more sessions: 0001_initial social_django: 0010_uid_db_index two_factor: 0007_auto_20201201_1019 diff --git a/posthog/migrations/0402_remove_propertydefinition_property_type_is_valid_and_more.py b/posthog/migrations/0402_remove_propertydefinition_property_type_is_valid_and_more.py new file mode 100644 index 0000000000000..842cce078c4df --- /dev/null +++ b/posthog/migrations/0402_remove_propertydefinition_property_type_is_valid_and_more.py @@ -0,0 +1,39 @@ +# Generated by Django 4.2.11 on 2024-04-16 21:32 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + dependencies = [ + ("posthog", "0401_alter_propertydefinition_type"), + ] + + operations = [ + migrations.RemoveConstraint( + model_name="propertydefinition", + name="property_type_is_valid", + ), + migrations.AlterField( + model_name="propertydefinition", + name="property_type", + field=models.CharField( + blank=True, + choices=[ + ("DateTime", "DateTime"), + ("String", "String"), + ("Numeric", "Numeric"), + ("Boolean", "Boolean"), + ("Duration", "Duration"), + ], + max_length=50, + null=True, + ), + ), + migrations.AddConstraint( + model_name="propertydefinition", + constraint=models.CheckConstraint( + check=models.Q(("property_type__in", ["DateTime", "String", "Numeric", "Boolean", "Duration"])), + name="property_type_is_valid", + ), + ), + ]