4 ms·
Ask HN: DBA's and Devs – How do you move data between DB's and respect FKs?
I'm both curious, and in need of, a way to move data between different databases (think dev, uat, prod) when each have different primary keys for the "same" record across environments. This seems like a common problem, but I have searched for a solution quite a bit.
For instance, I want to move an employee record from dev to uat, but the OrganizationID s are different between dev and uat (Google is id = 1 in dev, but 10 in uat). In this case I need to match based on the name of the Organization, then fill the matched, uat org id into the employee record being migrated from dev.
Are there tools for this?
Not seeking a method that requires storing common data in source control with hard-coded primary keys either.
Thanks HN, hopeful that someone knows a nice solution or tool to use.