Skip to content

apimigrationaddindex

Troy Murray edited this page Sep 15, 2011 · 3 revisions

Migration :: addIndex function

Usage

Add database index on a table column.

addIndex(table,columnNames[,unique,indexName]);

Parameters

Parameter Required Default Description table Yes table name columnNames Yes one or more column names to index, comma separated unique No False boolean, if true will create a unique index constraint indexName No string to use for index name. Defaults to table name + underscore + first column name

Examples

addIndex(table='members',columnNames='username',unique=true);
Clone this wiki locally