How do I safely change all old customernumbers

I want to change all our old customernumbers who got the prefix. But how do I safely remove them so the orders still got the connection?

Litium version: 6.2.2-patch-1810041453

Connection between orders and the person that placed the order is related to the person SystemId and not the readable Id.

In your case I think you can make an update of all the Person.Id in the database and then restart all the websites and the information should now be updated.