为什么Maven Liquibase:diff -DdiffExcludeObjects参数不起作用 [英] why maven liquibase:diff -DdiffExcludeObjects parameter does not work

查看:74
本文介绍了为什么Maven Liquibase:diff -DdiffExcludeObjects参数不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个使用liquibase进行数据库同步的项目.当我使用 maven liquibase 生成变更日志时,我想排除一些名称以 oauth_

I have a project that is using liquibase for database sync. When I use maven liquibase for generating a changelog, I want to exclude some database objects whose names start with oauth_

我的目标是这样

liquibase:diff -DdiffExcludeObjects="table:oauth_.*"

但是当我执行目标时,生成的变更日志包括以下变更集:

But when I execute the goal, the generated changelog includes these changesets:

<changeSet author="aliakbarazizkhani (generated)" id="1470077228335-4">
    <dropTable tableName="oauth_access_token"/>
</changeSet>
<changeSet author="aliakbarazizkhani (generated)" id="1470077228335-5">
    <dropTable tableName="oauth_approvals"/>
</changeSet>
<changeSet author="aliakbarazizkhani (generated)" id="1470077228335-6">
    <dropTable tableName="oauth_client_details"/>
</changeSet>
<changeSet author="aliakbarazizkhani (generated)" id="1470077228335-7">
    <dropTable tableName="oauth_client_token"/>
</changeSet>
<changeSet author="aliakbarazizkhani (generated)" id="1470077228335-8">
    <dropTable tableName="oauth_code"/>
</changeSet>
<changeSet author="aliakbarazizkhani (generated)" id="1470077228335-9">
    <dropTable tableName="oauth_refresh_token"/>
</changeSet>

推荐答案

我认为问题可能只是该属性的名称.文档指出该属性应为 exludeObjects 而不是 diffExcludeObjects .

I think the problem may be just the name of the property. Documentation indicates that the property should be exludeObjects not diffExcludeObjects.

这篇关于为什么Maven Liquibase:diff -DdiffExcludeObjects参数不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆