生成JHipster产品版本时,液化日期\u trunc postgresql函数错误
我正试图在Liquibase中为我的JHipster应用程序构建ViewPostgreSQL表。因此,我尝试了很多方法。 我的查询具有如下date\u trunc()功能:生成JHipster产品版本时,液化日期\u trunc postgresql函数错误,postgresql,maven,jhipster,liquibase,Postgresql,Maven,Jhipster,Liquibase,我正试图在Liquibase中为我的JHipster应用程序构建ViewPostgreSQL表。因此,我尝试了很多方法。 我的查询具有如下date\u trunc()功能: CREATE OR REPLACE VIEW periodical_statistics AS SELECT tran.id, date_trunc('day', tran.pub_date) as, ... FROM transaction tran ...(LEFT JOINS - not relative).
CREATE OR REPLACE VIEW periodical_statistics AS
SELECT tran.id, date_trunc('day', tran.pub_date) as, ...
FROM transaction tran
...(LEFT JOINS - not relative)...
WHERE ...(condtions - not relative)...
<changeSet author="sanatbek" id="20180904094713" dbms="postgresql">
<createView replaceIfExists="true"
schemaName="public"
viewName="periodical_statistics">
SELECT
tran.id
date_trunc('day', tran.pub_date) as truncated_date,
....
...(LEFT JOINS - not relative)...
WHERE ...(condtions - not relative)...
</createView>
</changeSet>
当我在maven(/mvnw
)中以Dev模式运行JHipster应用程序时。它工作得很好
但是当我在maven(/mvnw-Pprod-package
)中以Prod模式运行它时。它给出了以下错误
20180817101122-1::liquibase-docs failed. Error: Function "DATE_TRUNC" not found;
SQL statement: CREATE OR REPLACE VIEW periodical_statistics AS ....
有什么方法可以解决这个错误问题吗?在将
dbms='postgresql'
添加到变更集中之后。Liquibase识别“date\u trunc”函数。详情如下:
CREATE OR REPLACE VIEW periodical_statistics AS
SELECT tran.id, date_trunc('day', tran.pub_date) as, ...
FROM transaction tran
...(LEFT JOINS - not relative)...
WHERE ...(condtions - not relative)...
<changeSet author="sanatbek" id="20180904094713" dbms="postgresql">
<createView replaceIfExists="true"
schemaName="public"
viewName="periodical_statistics">
SELECT
tran.id
date_trunc('day', tran.pub_date) as truncated_date,
....
...(LEFT JOINS - not relative)...
WHERE ...(condtions - not relative)...
</createView>
</changeSet>
挑选
传输id
日期(“日期”,交易发布日期)作为截断日期,
....
…(左连接-非相对连接)。。。
其中…(条件-非相对)。。。
我没有提到我的事务表结构。很明显,有一个pub_date(dateTimeWithTimeZone)列,我想把它拖到哪一天maven阶段失败?运行/mvnw-Pprod package-DskipTests
时是否也会失败?是否使用相同的用户进行开发/生产?