Closed shaunagm closed 3 years ago
Note - I missed a step when removing the Item/Resource state changes. In addition to removing those permissions in the database, we also need to remove actions taken through those permissions. There was only one I could find, removed via this command:
from django.db import connection
def my_custom_sql():
with connection.cursor() as cursor:
command = "DELETE FROM actions_action WHERE LOWER(change) LIKE 'removeitemstatechange';"
cursor.execute(command)
row = cursor.fetchone()
return row
This is mostly creating filter conditions & attendant migrations, but there's also a bit of clean up involved, particularly the removal of the resource & item model + state changes.