0%

This is My First Blog!

创建索引

liquibase preconditions

创建索引前先判断索引是否存在

1
2
3
4
5
6
7
8
9
10
<changeSet id="228-039" author="jlin">
<preConditions onFail="MARK_RAN">
<not>
<indexExists tableName="t_health_abnormal" indexName="idx_create_time" columnNames="create_time"/>
</not>
</preConditions>
<createIndex tableName="t_health_abnormal" indexName="idx_create_time">
<column name="create_time" />
</createIndex>
</changeSet>
阅读全文 »