-
Notifications
You must be signed in to change notification settings - Fork 803
Remove wagtail perms and tables #6879
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove wagtail perms and tables #6879
Conversation
smithellis
commented
Aug 27, 2025
- A migration to safely remove wagtail tables and perms
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
r+wc optionally
| ) | ||
|
|
||
| # Find all Wagtail tables dynamically using LIKE pattern | ||
| with connection.cursor() as cursor: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: you can also use introspection here to get the tables
introspection = connection.introspection
qn = connection.ops.quote_name
table_names = introspection.table_names()
wagtail_tables = sorted([t for t in table_names if t.startswith("wagtail")], reverse=True)You can also use introspection.get_constraints for FK relationships.
|
For this PR since we have destructive operations, let's have also @escattone's approval |
|
Is this working locally? |
|
@escattone Added as reviewer.
@akatsoulas I don't have the complete DB locally that includes erroneous WT tables and perms. I have tested with mock data locally without issue. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
From my experiments in production, this PR will fail to remove the Wagtail sequences. We should make sure they're removed via this PR as well.