Reputation: 549
I have a database that needs migrating into a completely different structure (we're going from a custom CMS to a slightly modified Wordpress DB).
I can pull the individual tables and map them onto the new structure easily enough, but I'm struggling to find a method to preserve the relationships between tables.
For example in the old db I have a customer and basket table joined 1 to many from the customer table. (IE one customer - many baskets). Mapping these to the new db is simple (user, usermeta and a custom table). However the keys in the new db are completely different to the keys in the old db, so I cannot use them to relate the new records together.
How can I re-establish this relationship? (even broad terms will be helpful)
Upvotes: 1
Views: 279
Reputation: 3118
The only thing that occurs to me is keep your old keys in "temporary" columns.
Hope that helps.
Upvotes: 1