Change Database Information on multiple tables best practice
Posted on 2014-01-06
I have a database that manages our communication with clients.
When I built it, i setup the group ID field to just auto-increment from 1. So my groupIDs are 1, 2, 3, ... etc.
Now that we've grown, I want to use an ID that is less "Guessable". I'd like to change it to some random variation of an MD5 field. Probably take the first 5 characters or something like that.
I can easily change the group IDs and start inserting new from here forward.
However, my question is about updating the info records that are currently tied to the old client ID. What would be the best practice for that? Perhaps create an Archive Client ID field in the table to keep the connection or run an UPDATE command of the field to change ids from old to new?