版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/hongchangfirst/article/details/89742176
liquibase是开源的数据库跟踪,管理工具,比如数据库表的更改变化,回滚等。
所有的数据库变化比如表增加列都会存储到XML,JSON或者SQL中。比较适合多团队写作开发,用来共享资源。LIquibase会自动的创建DatabaseChangeLog数据库表和DatabaseChangeLogLock表和里边的每次更改记录。
liquibase现在支持10种常用的数据库类型,比如说MySQL。
给大家感受一下它的XML文件:
<?xml version="1.0" encoding="UTF-8"?> <databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog/1.3" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog/1.3 http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-1.3.xsd"> <preConditions> <dbms type="oracle"/> </preConditions> <changeSet id="1" author="author1"> <createTable tableName="persons"> <column name="id" type="int" autoIncrement="true"> <constraints primaryKey="true" nullable="false"/> </column> <column name="name" type="varchar(50)"/> </createTable> </changeSet> </databaseChangeLog>
使用liquibase的好处:数据库独立性,自动化的文档,每次数据库变化的diff等。
官网地址:https://www.liquibase.org/
原文:http://blog.csdn.net/hongchangfirst/article/details/89742176
作者:hongchangfirst
hongchangfirst的主页:http://blog.csdn.net/hongchangfirst