How to restore a deleted user?

Once a user is deleted, how would a root administrator go about restoring the user, even if the videos and comments remain deleted.

Specifically the username, channel name and email address to be restored.

Answer is to run the following in postgresql:

sudo -u postgres psql -c "DELETE FROM actor WHERE "preferredUsername" = '[input-deleted-user-or-channel]' and "serverId" is null;" peertube_prod

Will federation still work after this?

No Idea. I’ve been told that it won’t work, but I’ve never federated this instance.