XF 2.0 Multiple Column Unique Keys?

Jaxel

Well-known member
I know I can make unique keys with:
Code:
$table->addUniqueKey('category_id');


But how would I create a multiple column unique key such as:
Code:
UNIQUE KEY `stream_id` (`service_id`,`channel_value1`,`channel_value2`)
 
Code:
$table->addUniqueKey(['column1, 'column2'], 'index_name');
 
Back
Top Bottom