如何使用YAML格式设置Liquibase ObjectQuotingStrategy? [英] How do I set the Liquibase ObjectQuotingStrategy using the YAML format?

查看:54
本文介绍了如何使用YAML格式设置Liquibase ObjectQuotingStrategy?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

根据此问题,该方法是正确的使用Liquibase创建数据库对象时,要保留大小写,就是在根对象"上设置objectQuotingStrategy,这在使用XML格式时是有意义的,但是在使用YAML格式时却不太清楚.

According to this question, the correct method of preserving case when creating database objects using Liquibase is to set the objectQuotingStrategy on the "root object", which makes sense using the XML format, but is less clear when using the YAML format.

是否可以使用YAML格式为整个更改日志设置此属性?

Is there any way to set this property for the whole change log using the YAML format?

推荐答案

您应该可以将其设置为根databaseChangeLog节点的属性:

You should be able to just set it as a property of the root databaseChangeLog node:

databaseChangeLog:
    - objectQuotingStrategy: QUOTE_ALL_OBJECTS
    - changeSet:
        id: 1
        author: nvoxland
        changes:

但是,似乎3.2.x中存在一个错误,该错误阻止了它在databaseChangeLog级别上进行解析.我创建了 https://liquibase.jira.com/browse/CORE-1989 并进行了修复3.2.x分支中的错误.

However, it looks like there is a bug in 3.2.x that prevents it from being parsed at the databaseChangeLog level. I created https://liquibase.jira.com/browse/CORE-1989 and fixed the bug in the 3.2.x branch.

现在,您必须在changeSet级别上进行设置:

For now, you'll have to set it on the changeSet level:

databaseChangeLog:
    - changeSet:
        id: 1
        author: nvoxland
        objectQuotingStrategy: QUOTE_ALL_OBJECTS
        changes:
            - createTable:
              .....

这篇关于如何使用YAML格式设置Liquibase ObjectQuotingStrategy?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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