What is the best way to rename index in liquibase? should I delete and recreate it?
thanks in advance.
What is the best way to rename index in liquibase? should I delete and recreate it?
thanks in advance.
At first, you must remove former index:
<changeSet id="20210905084713-2" author="ARMIN.NOROOZIAN">
<dropIndex tableName="tpl_order" indexName="tracking_code_idx"/>
</changeSet>
Then create a new index:
<changeSet id="20210905084713-3" author="ARMIN.NOROOZIAN">
<createIndex tableName="tpl_order" indexName="tpl_tracking_code_idx">
<column name="tpl_tracking_code"/>
</createIndex>
</changeSet>