Added cascade to students
This commit is contained in:
parent
b63b97e54d
commit
f13fb375e7
@ -12,7 +12,7 @@ return new class extends Migration
|
||||
public function up(): void
|
||||
{
|
||||
Schema::table('students', function (Blueprint $table) {
|
||||
$table->foreignId('grade_id')->constrained('grades');
|
||||
$table->foreignId('grade_id')->constrained('grades')->onDelete('cascade');
|
||||
});
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user