I need to change data in three tables (update some existing rows, add some new, delete some old). I need it to be done in one moment. Problem is that data need to be changed manually and probably it will take some time to get it done. So I'm going to use beta server in order to make the changes. Problem is: how to update production server with data from another database?
My solution : Dump data from beta server and restore it on production.
Flaws : I would have to delete all data on production first and it's problematic because of foreign keys (I could turn off keys first, but is there a way to avoid it?).
I found similar question, where one of the answers suggests using dblink
command. I think I could write update statement, but this still seems to be a bit an overkill.
Edit (additional explanation):
There is the production server (let's call it Production
) and there is development server (let's call it Beta
). So I need to have some data changed on Production (3 tables that are interconnected and they are also referenced from other tables in DB). To be precise - these tables hold learning programme - topics, topics' groups and subtopics. There are registers that refer to these elements. But I need to have these changes done in one moment (meaning: through SQL script). In order to accomplish that I going to use the Beta server - which holds a copy of production DB (done in certain moment, no real time synchronization). So I will have data updated in the 3 tables on Beta server and I need to move this data to Production.