Version control software has svngit and so on. these tools control the source code version very well, but what about database version control? The traditional method is to export the entire database, so the efficiency of team collaboration is very low. Is there a tool that can easily synchronize the database structure? Yes, there are also many versions. the version control software has svn git and so on. these tools control the source code version very well, but what about database version control? The traditional method is to export the entire database, so the efficiency of team collaboration is very low. Is there a tool that can easily synchronize the database structure? Yes, there are also many. I use dbv to integrate it into PHP + MYSQL projects, which is very convenient.
Dbv1.1 download https://github.com/victorstanciu/dbv/archive/1.1.zip
Usage:
1. after downloading the package, decompress it to the project directory under the software control of git or SVN version. for example, if my project directory is 93zp_project, after unzipping, dbv is in 93zp_project/dbv-master, set dbv-master/data to writable.
2. change config. conf. sample to config. conf and change it to the following Red place:
Define ('Db _ host', 'localhost ');
Define ('Db _ port', 3306 );
Define ('Db _ username', 'root ');
Define ('Db _ password', '123 ');
Define ('Db _ name', '93zp ');
93zp is the database for version control.
3. access http: // localhost/93zp_project/dbv-master/index. php and enter the user name dbv and password dbv. you can modify the user name and password in config. conf. The database table of 93zp is displayed. the following page is displayed for each modification record:
Column [In DB] indicates whether the record is In the database, and column [On disk] indicates whether the record is exported to the hard disk. The value of On disk is NO, indicating that NO modification records have been exported.
4. press the "Export to disk" button to Export the record, so that the modification record can be saved under dbv-master/data/schema.
After the team members update the project, they also access http: // localhost/93zp_project/dbv-master/index. php can see which records need to be imported to the database. check the corresponding records and click [push to databse] to synchronize the database! After synchronization, the In DB is In the YES state. for example, both the aaa and ssss modification records have been synchronized.