Jaxel Well-known member Dec 2, 2017 #1 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`)
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`)
Mike XenForo developer Staff member Dec 2, 2017 #2 Code: $table->addUniqueKey(['column1, 'column2'], 'index_name');