Skip to content

apimigrationaddindex

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

addIndex()

Usage

Add database index on a table column.

Function Syntax

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

Parameters

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

Examples

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