Re: Differences between two mySQL Databases
| From: | Pierre-Alain Joye | Date: | Tue, 25 Jun 2002 21:56:49 +0000 |
| Subject: | Re: Differences between two mySQL Databases | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-20106@lists.php.net to get a copy of this message | ||
On Tue, 25 Jun 2002 14:29:08 -0700
"Michael Robbins" <mdrobbins@cox.net> wrote:
> I'm looking for a utility that can compare two database structures and
> generate a SQL statement that will duplicate the differences.
>
> I'm using mySQL and I have both live and development databases. While
> working on the development database, I frequently make changes to table
> structures, adding/removing tables or columns, changing column types, or
> adding/removing indexes.
>
> When I'm ready to move my changes to the live site, I'd like to just
> compare the two databases, and have it generate a SQL statement that I
> can run on my live database, so that it's structure will match my
> development database. This would be much easier than trying to make all
> of the changes manually, or writing my own script to make the changes
> (how would you test this? Can't test it on the development database, the
> changes are already there. Can't test it on the live database, what if
> there's a mistake of some kind?)
>
> Anybody out there know of a (or a couple) of utilities to do this?
Here is 2 usefull tools, I use the 2nd without big problems.
http://adamspiers.org/computing/mysqldiff/
http://bisqwit.iki.fi/source/sqlupdate.html
hth
pa