In schema builder we can use the below code to define our own name for the constraint. Below code is for Unique key
$table->unique('Column Name', 'Constraint Name');
Can I do something similar for the default key?
I tried below and did not work
$table->default('Column Name', 'Constraint Name');
I know we can write the below code to define the default constraint but that will not give custom constraint name
$table->boolean('IsPredefined')->default(false);
from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/28Zh8mo
via IFTTT
Aucun commentaire:
Enregistrer un commentaire