LogEntry model migration

Mmmmm, I have little problem with LogEntry model:
As you know, django save logs in logentry model: so when user do something, this action will be appear in this model. But when I delete user, all action logs what this user do will disappear; its because ForeignKey field user have on_delete=models.CASCADE in LogEntry model. But this behavior does not suit me at all, I want see all logs even after deleting the user.
So what I need is write simple migration that will set on_delete=models.SET_NULL, this sounds like a very easy migration, but I couldn’t find a way to do it. Maybe can help me? Maybe I need save logs in another model, or is there another way to do this?

As a general principle, it’s better if you never delete users. Mark them as inactive if necessary, but don’t actually delete them. Most apps of any reasonable size end up tying themselves to Users in one or more ways, and deleting users breaks those relationships - like this one.

I’m not sure that settings the User action to Null in the logs is going to be all that useful for any purpose. Yes, you can see what was done, but you’ve destroyed all records of who performed that action - kinda defeats the purpose of keeping a log in the first place.

If the reason for deleting users is GDPR, tools like this one might help you out to anonymize users over deleting them. https://github.com/wildfish/django-gdpr-assist/blob/develop/README.rst