I had a migration with the following constraint:
$table->uuid('id')->primary();
is it possible to remove this primary()
constraint in a following migration? I tried this:
$table->uuid('id')->change();
but it doesn't work. What's the recommended approach?
try dropPrimary method :
$table->dropPrimary('id');
this will drop only the key constraint not the column
$table->dropPrimary( 'id' );
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.