如何在liquibase-yaml中创建具有多重列的索引。
CREATE UNIQUE INDEX example_index ON table_test(LOWER(id), author, name)
我试着做这样的事情:
-createIndex:
-indexName: example_index
-tableName: table_test
-columns:
-column:
name: LOWER(id)
-column:
name: author
-column:
name: name
但是我得到了错误column 'name' is required for all columns in an index
。我看到了类似的问题,但答案/示例是用xml编写的,对我来说不起作用
changeSet:
id: createIndex-example
author: liquibase-docs
changes:
- createIndex:
columns:
- column:
name: zip_code
- column:
name: address
indexName: idx_address
tableName: person
以上对我有效,
https://docs.liquibase.com/change-types/community/create-index.html