Skip to content

Migrator

addIndex()

addIndex() — returns void

Available in: migration Category: Migration Functions

Add database index on a table column Only available in a migration CFC

NameTypeRequiredDefaultDescription
tablestringyesThe table name to perform the index operation on
columnNamesstringnoOne or more column names to index, comma separated
uniquebooleannofalseIf true will create a unique index constraint
indexNamestringno[runtime expression]The name of the index to add: Defaults to table name + underscore + first column name