My problem is that I decided to have a Test Database where I put the data I'm testing and where I can play around without any issue. When everything seems ok I migrate the data to the "official" database, where I plan to migrate different Test DBs.
The problem are child tables. I have:
Table1: Table2: Child:
- id -id -idTable1
- name -name -idTable2
- url -type -quantity
To migrate Table1 and Table2 I thought to create a temporaryID on the "official" Database. When I want to migrate the table "Child" the only thing I can think of is to check every single row and update it with the corresponding new ids. Isn't there a better way to do this?
I also thought to simply forget about Test DB and work only with the "official" one, but I am afraid of having to start again from scratch every time I make a mistake.
I think I've seen a couple of examples here on SO, but they seems much more complicated than what I need.