diff --git a/posthog/migrations/0546_remove_featureflaghashkeyoverride_unique_hash_key_for_a_user_team_feature_flag_combo_and_more.py b/posthog/migrations/0546_remove_featureflaghashkeyoverride_unique_hash_key_for_a_user_team_feature_flag_combo_and_more.py new file mode 100644 index 0000000000000..da6a8565ca1a3 --- /dev/null +++ b/posthog/migrations/0546_remove_featureflaghashkeyoverride_unique_hash_key_for_a_user_team_feature_flag_combo_and_more.py @@ -0,0 +1,31 @@ +# Generated by Django 4.2.15 on 2025-01-17 01:29 + +from django.db import migrations +from django.db.migrations.operations.special import SeparateDatabaseAndState + + +class Migration(migrations.Migration): + dependencies = [ + ("posthog", "0545_insight_filters_to_query"), + ] + + operations = [ + SeparateDatabaseAndState( + database_operations=[ + migrations.RunSQL( + """ + ALTER TABLE posthog_person DROP CONSTRAINT IF EXISTS posthog_person_team_id_fkey; + ALTER TABLE posthog_person DROP CONSTRAINT IF EXISTS posthog_person_is_user_id_fkey; + ALTER TABLE posthog_persondistinctid DROP CONSTRAINT IF EXISTS posthog_persondistinctid_team_id_fkey; + ALTER TABLE posthog_personlessdistinctid DROP CONSTRAINT IF EXISTS posthog_personlessdistinctid_team_id_fkey; + ALTER TABLE posthog_featureflaghashkeyoverride DROP CONSTRAINT IF EXISTS posthog_featureflaghashkeyoverride_team_id_fkey; + ALTER TABLE posthog_cohortpeople DROP CONSTRAINT IF EXISTS posthog_cohortpeople_cohort_id_fkey; + """, + """ + -- No reverse SQL needed since we're dropping constraints that will be recreated in a different form + """, + ) + ], + state_operations=[], + ), + ] diff --git a/posthog/migrations/max_migration.txt b/posthog/migrations/max_migration.txt index 529a460c7e225..13a880e84eb0d 100644 --- a/posthog/migrations/max_migration.txt +++ b/posthog/migrations/max_migration.txt @@ -1 +1 @@ -0545_insight_filters_to_query \ No newline at end of file +0546_remove_featureflaghashkeyoverride_unique_hash_key_for_a_user_team_feature_flag_combo_and_more