[thelist] Database merging

Burhan Khalid thelist at meidomus.com
Wed Jun 1 02:16:33 CDT 2005

Evolt wrote:
> Hello:
> I have a question about database development.
> How do I go about merging databases? The problem is that the databases 
> on the production and staging servers are different, and now I need to 
> move stage to production. Production has some tables that no longer 
> exist in stage, and vice versa. In addition, some columns have been 
> removed and others added.

I say get a dump from both servers and run it through a diff-like 
program.  This should highlight any differences and let you know where 
you need to concentrate your efforts.

I hope you are not forgetting about the application side of this. 
Change a database schema can have very bad effects on poorly designed 
applications. For example, applications that don't specify the tables in 
an insert -- INSERT INTO `table` VALUES (....).  You change the order of 
the columns, the number of columns or anything else, and the application 
will error out.


More information about the thelist mailing list