如何在 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 [] 类型的列,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/28240068/