def remove_document_permissions(apps, schema_editor):
 ContentType = apps.get_model(u'contenttypes.ContentType')
 Permission = apps.get_model(u'auth.Permission')
 document_content_type = ContentType.objects.get(model=u'document', app_label=u'wagtaildocs')
 Permission.objects.filter(content_type=document_content_type, codename__in=(u'add_document', u'change_document', u'delete_document')).delete()

def remove_document_permissions ( apps , schema_editor ) : ContentType = apps . get_model ( u'contenttypes.ContentType' ) Permission = apps . get_model ( u'auth.Permission' ) document_content_type = ContentType . objects . get ( model = u'document' , app_label = u'wagtaildocs' ) Permission . objects . filter ( content_type = document_content_type , codename__in = ( u'add_document' , u'change_document' , u'delete_document' ) ) . delete ( )
reverse the above additions of permissions .