Lia*_*Lia 4 postgresql liquibase
如何在PostgreSQL数据库中使用liquibase创建double precision []类型的列(双精度数组)?
<changeSet id="add t_name table">
<createTable tableName="t_name">
...
<column name="doubleArray" type="???"/>
...
</createTable>
</changeSet>
Run Code Online (Sandbox Code Playgroud)
Google并没有帮助,如果有人知道解决方案,我将不胜感激。
我终于在同事的帮助下找到了答案。看来liquibase不知道这类类型,因此我们需要手动修改sql查询:
<createTable tableName="t_name">
...
<column name="doubleArray" type="DOUBLE_ARRAY"/>
...
</createTable>
<modifySql dbms="postgresql">
<replace replace="DOUBLE_ARRAY" with="double precision[][]"/>
</modifySql>
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
1359 次 |
| 最近记录: |