The right tool for tracking database structure changes

Now I have a PHP project and I am tracking all changes in the SVN code. I would also like to track the changes made to the database structure.

What is the right tool to use?

+5
source share
5 answers

There are various ways to track database structure changes.

very good is mysql Workbench: http://www.mysql.com/products/workbench/

you can simulate your db with this tool to update it with synchronization.

Another type of tool that would be ideal for svn: PHP Migrations

http://code.google.com/p/mysql-php-migrations/

: 001_initial.php 002_changes.php, .

, , .

, .

+1

, , . , .

Liquibase. , , , DB.

+2

php script, .

svn, ( , ).

+1

( ) VCS:

+ dbchanges
|_ 01_database
|_ 02_table
|_ 03_data
|_ 04_constraints
|_ 05_functions
|_ 06_triggers
|_ 07_indexes

.sql . , script, db.

, , . ( , script, , script, )

sql , , script , , . sql , script .

The disadvantages are that it does not support rollbacks, since you will need to store reverse operations, and for some operations this is not possible, for example DELETE. Another disadvantage is that if you somehow lose a file that tracks already made changes, you need to restore your database from scratch.

0
source

Take a look at Liquibase.

This is a very good database management software. This is a little difficult to implement.

- Irshad.

0
source

All Articles