diff --git a/service_catalog/migrations/0019_auto_20230804_1516.py b/service_catalog/migrations/0019_auto_20230804_1516.py index 406174b05..fa8df5e2e 100644 --- a/service_catalog/migrations/0019_auto_20230804_1516.py +++ b/service_catalog/migrations/0019_auto_20230804_1516.py @@ -6,12 +6,14 @@ deprecated_permission = ["request_operation_on_instance", "request_support_on_instance", "cancel_request", - "comment_request", "approve_request_approvalstep"] + "comment_request"] +deprecated_permission_model = ["billing_group", "teamrolebinding", "userrolebinding"] def remove_deprecated_permissions(apps, schema_editor): Permission = apps.get_model('profiles', 'Permission') Permission.objects.filter(codename__in=deprecated_permission).delete() + Permission.objects.filter(content_type__model__in=deprecated_permission_model).delete() class Migration(migrations.Migration): @@ -23,6 +25,7 @@ class Migration(migrations.Migration): operations = [ migrations.RunSQL("DROP TABLE IF EXISTS guardian_userobjectpermission"), + migrations.RunSQL("DROP TABLE IF EXISTS guardian_groupobjectpermission"), migrations.RunPython(remove_deprecated_permissions), migrations.AlterModelOptions( name='instance',