Skip to content

Commit

Permalink
Fix e2e tests (#520)
Browse files Browse the repository at this point in the history
added a migration to kill waffle tables causing unmanaged postgres
dependencies
  • Loading branch information
marcelkornblum authored Nov 24, 2023
1 parent 51c1b2d commit 9e0b582
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions src/core/migrations/0005_fix_waffle_truncate_issue.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
from django.db import migrations


class Migration(migrations.Migration):
"""
Migration for issue: cannot truncate a table referenced in a foreign key constraint: Table "waffle_flag_groups" references "auth_group".
See more: https://github.com/django-waffle/django-waffle/issues/317#issuecomment-488398832
"""

dependencies = [
("core", "0004_featureflag"),
("waffle", "__latest__"),
]

operations = [
migrations.RunSQL("DROP TABLE IF EXISTS waffle_flag_groups"),
migrations.RunSQL("DROP TABLE IF EXISTS waffle_flag_users"),
]

0 comments on commit 9e0b582

Please sign in to comment.