
Mailing List Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [tlug] Non destructive update of MySQL database
> I also have some web sites that are using the same database structure.
> When I change the structure on my local database, I want that change to
> also be done on my web site databases. Only the structure needs to be
> altered. No data needs to be copied or synchronized.
The way I do this is:
1. Use phpmyadmin on development server to modify the structure.
2. When it executes it also shows the SQL it used, e.g.
ALTER TABLE .... ;
I copy and paste that to a text file.
3. Repeat for all structural changes. (also for inserts/updates)
4. When I'm ready, I then run that block of SQL on the live server.
It is a bit manual, but one advantage is that I can see all changes I am
making in that step (a set of SQL changes often go hand-in-hand with a
set of PHP/HTML changes).
> Is there a way to do this? Compare one database to another and then have
> new tables and columns added in?
If you find an open-source tool that can diff two table structures and
make the ALTER TABLE SQL to go from one to the other please let me know!
Darren
--
Darren Cook
http://dcook.org/mlsn/ (English-Japanese-German-Chinese free dictionary)
http://dcook.org/work/ (About me and my work)
http://dcook.org/work/charts/ (My flash charting demos)
Home |
Main Index |
Thread Index