Hi Vlad,
=> Create a nullable field on this Schema:
$table->unsignedInteger('LessonEventRateCriterion_Id')->nullable();
=> Then create another migration for the foreign key with
$table->foreign('LessonEventRateCriterion_Id')
->references('Id')
->on('LessonEventRateCriterion')
->onDelete('set null');
=> and on the down method, the name must be inside a array:
$table->dropForeign(['LessonEventRateCriterion_Id']);
=> I believe this should work.
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community