加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

【备忘】liquibase,.xml中的各种标签,支持的sql语句

发布时间:2020-12-16 08:58:44 所属栏目:百科 来源:网络整理
导读:liquibase官网http://www.liquibase.org/ 一. 总体格式 span style="font-size:14px;"?xml version="1.0" encoding="UTF-8"?databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog/1.9"xmlns:xsi="http://www.w3.org/2001/XMLSchema-instan

liquibase官网http://www.liquibase.org/


一. 总体格式

<span style="font-size:14px;"><?xml version="1.0" encoding="UTF-8"?>

<databaseChangeLog
                xmlns="http://www.liquibase.org/xml/ns/dbchangelog/1.9"
		xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
		xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog/1.9 http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-1.9.xsd"
		logicalFilePath="/ColorSetup.changelog.xml">
		
  <changeSet author="dbisalputra" id="1">
    ...
  </changeSet>
  <changeSet author="dbisalputra" id="2">
    ...
  </changeSet>
  ...
  ...
  <changeSet author="dbisalputra" id="998">
    ...
  </changeSet>
</databaseChangeLog></span>

说明:

1. <databaseChangeLog ...></databaseChangeLog>负责指定liquibase标签遵循的规则,标签的定义是在xsd文件中(在IDEA 13中ctrl+鼠标左键点击该文件可以查看)

<span style="font-size:14px;">http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-1.9.xsd</span>

2. <changeSet></changeSet>是数据库记录更改的最小单元,该标签有两个属性:author和id。其中,id必须不同

除此之外,该标签还有dbms属性,从{mysql,postgresql,oracle,mssql,sybase,asany,db2,derby,hsqldb,h2,informix,firebird,sqlite}中指定一个作为数据库类型。

该标签的子标签有:comment,preConditions,validCheckSum,rollback等,详见官方在线文档。

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读