Restore User

So I’ve had a bit of a nightmare and deleted a managed user from Plex home. I’ve set them back up but they’ve lost their watch history. I performed a restore of the plex folder on synology but that hasn’t brought it back either.

Looking at PlexPY I can see that ‘new’ user has a different userid to the old one. Is there a way to get the old user back?

Thanks

Keep in mind PlexPy is not a plex product but a 3rd party addon, there is no easy way to restore logs in PlexPy, since you deleted the user, your best bet was to go in to plexpy database and change userid from new to old

UPDATE table_name
SET plexpy=REPLACE(column_name,‘old_user_id’,‘new_user_id’);

That should work, no guarantees though

Thanks, I was more interested in the watch history in Plex itself. Is there a similar SQL I can run on the Plex db so that all the TV Shows etc that have been watched and be re-flagged?