gpt4 book ai didi

postgresql - 使用 liquibase 创建类型为 double precision[] 的列

转载 作者:行者123 更新时间:2023-11-29 11:32:49 26 4
gpt4 key购买 nike

如何在 postgresql 数据库中使用 liquibase 创建 double []( double 组)类型的列?

<changeSet id="add t_name table">
<createTable tableName="t_name">
...
<column name="doubleArray" type="???"/>
...
</createTable>
</changeSet>

谷歌没有帮助,请,如果有人知道解决方案,我将不胜感激。

最佳答案

在同事的帮助下,我终于找到了答案。liquibase好像不知道这些类型,所以我们需要手动修改sql查询:

<createTable tableName="t_name">
...
<column name="doubleArray" type="DOUBLE_ARRAY"/>
...
</createTable>

<modifySql dbms="postgresql">
<replace replace="DOUBLE_ARRAY" with="double precision[][]"/>
</modifySql>

关于postgresql - 使用 liquibase 创建类型为 double precision[] 的列,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28240068/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com