mysql数据库版本控制dbv使用_MySQL
版本控制软件有svn git等等,这些工具控制源码版本非常好用,但数据库的版本控制呢?传统方法是导出来整个数据库,这样的团队协作效率非常低。有没有一种工具,能方便同步数据库结构的呢?有的,也很多,本人使用dbv,能集成到PHP+MYSQL的项目中,很方便。
dbv1.1版本下载 https://github.com/victorstanciu/dbv/archive/1.1.zip
使用方法:
1. 下载后,解压到已经在git或SVN版本软件控制下的工程目录下,比如本人的工程目录是93zp_project, 解压后,dbv在93zp_project/dbv-master ,把dbv-master/data设置为可写权限。
2.把config.conf.sample 修改为config.conf 修改如下红色地方
define('DB_HOST', 'localhost');
define('DB_PORT', 3306);
define('DB_USERNAME', 'root');
define('DB_PASSWORD', '123456');
define('DB_NAME', '93zp');
其中 93zp就为要版本控制的数据库。
3.访问 http://localhost/93zp_project/dbv-master/index.php 输入用户名dbv 密码dbv, 可以再config.conf修改这个用户名密码。就可以看到93zp的数据库表了,每次修改的记录都可以看到如下页面:
列【In DB】表示 记录是否在数据库中,列【On disk】表示记录是否导出到硬盘了。上面看到On disk的值为NO表示都还没有导出修改记录。
4.按按钮【Export to disk】,把记录导出,这样修改记录就能保存在dbv-master/data/schema 下面了。
团队成员更新工程后,也通过访问http://localhost/93zp_project/dbv-master/index.php 能看出哪些记录需要导入到数据库中的,勾选相应的记录,按按钮[push to databse]就可以同步数据库了!同步后,In DB是 YES 状态,比如下图, 修改记录aaa 与 ssss 都已经同步了。

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics

The meaning and difference of PHP version NTS PHP is a popular server-side scripting language that is widely used in the field of web development. There are two main versions of PHP: ThreadSafe(TS) and Non-ThreadSafe(NTS). On the official website of PHP, we can see two different PHP download versions, namely PHPNTS and PHPTS. So, what does PHP version NTS mean? What is the difference between it and the TS version? Next,

Regarding Llama3, new test results have been released - the large model evaluation community LMSYS released a large model ranking list. Llama3 ranked fifth, and tied for first place with GPT-4 in the English category. The picture is different from other benchmarks. This list is based on one-on-one battles between models, and the evaluators from all over the network make their own propositions and scores. In the end, Llama3 ranked fifth on the list, followed by three different versions of GPT-4 and Claude3 Super Cup Opus. In the English single list, Llama3 overtook Claude and tied with GPT-4. Regarding this result, Meta’s chief scientist LeCun was very happy and forwarded the tweet and

Go language is an efficient, concise and easy-to-learn programming language. It is favored by developers because of its advantages in concurrent programming and network programming. In actual development, database operations are an indispensable part. This article will introduce how to use Go language to implement database addition, deletion, modification and query operations. In Go language, we usually use third-party libraries to operate databases, such as commonly used sql packages, gorm, etc. Here we take the sql package as an example to introduce how to implement the addition, deletion, modification and query operations of the database. Assume we are using a MySQL database.

1. Open the Douyin app and click [Me] in the lower right corner to enter the personal page. 2. Click the [Three Stripes] icon in the upper right corner and select the [Settings] option in the pop-up menu bar. 3. In the settings page, scroll to the bottom to view the current version number information of Douyin.

Hibernate polymorphic mapping can map inherited classes to the database and provides the following mapping types: joined-subclass: Create a separate table for the subclass, including all columns of the parent class. table-per-class: Create a separate table for subclasses, containing only subclass-specific columns. union-subclass: similar to joined-subclass, but the parent class table unions all subclass columns.

There are currently 4 versions of World of Warcraft. The national server has been closed for more than a year. It is estimated that many players do not know where each version has developed. Let's sort out the current status of each version. 1. At the end of the official server version 10.0, before the closure of the national server, version 10.0 has just started. It is currently in version 10.26. There will be version 10.27 later, and the Age of Dragon expansion pack will be over. Although version 10.0 has received good reviews in foreign servers and has restored some popularity for Blizzard, the core of the game in version 10.0 has not changed at all. It is still mainly about big secrets and raids, and the number of PVP players is very small. With the continuous updates of the official server version, players’ gaming tendencies have also changed from PVE and PVP to collecting.

Apple's latest releases of iOS18, iPadOS18 and macOS Sequoia systems have added an important feature to the Photos application, designed to help users easily recover photos and videos lost or damaged due to various reasons. The new feature introduces an album called "Recovered" in the Tools section of the Photos app that will automatically appear when a user has pictures or videos on their device that are not part of their photo library. The emergence of the "Recovered" album provides a solution for photos and videos lost due to database corruption, the camera application not saving to the photo library correctly, or a third-party application managing the photo library. Users only need a few simple steps

Many users are considering upgrading to the Windows 10 operating system. As Microsoft announced that it will no longer provide security updates and technical support for Windows 7. However, a considerable number of users still choose to stick to the Win7 system and look for office software suitable for this system. To help users improve office efficiency, this article will introduce several Office versions that are most suitable for Win7 systems. 1.Office2010: the perfect combination of stability and compatibility 2.Office2013: interface optimization and practical function upgrades 3.Office2016: new features of cross-platform collaboration and cloud storage 4.OfficeOnline: lightweight, free, online office anytime and anywhere 5 .WPSOffice:
