Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

laravel migration remove unique constraint

/** To drop an index you must specify the index's name. 
Laravel assigns a reasonable name to the indexes by default. 
Simply concatenate the table name, the names of the column in the index, 
and the index type **/

// Format of unique key tableName_column_unique
$table->dropUnique('users_email_unique');
 
PREVIOUS NEXT
Tagged: #laravel #migration #remove #unique #constraint
ADD COMMENT
Topic
Name
2+4 =