-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(Persons): Remove foreign key constraints for all persons models
- Loading branch information
Showing
2 changed files
with
32 additions
and
1 deletion.
There are no files selected for viewing
31 changes: 31 additions & 0 deletions
31
...featureflaghashkeyoverride_unique_hash_key_for_a_user_team_feature_flag_combo_and_more.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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=[], | ||
), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
0545_insight_filters_to_query | ||
0546_remove_featureflaghashkeyoverride_unique_hash_key_for_a_user_team_feature_flag_combo_and_more |