Correct errors in migration
This commit is contained in:
parent
d9a7e97047
commit
f3591e9a08
|
|
@ -1,6 +1,7 @@
|
|||
<?php
|
||||
|
||||
use App\Models\Entry;
|
||||
use App\Models\Event;
|
||||
use App\Models\Student;
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
|
|
@ -20,7 +21,7 @@ return new class extends Migration
|
|||
|
||||
// Doubler Specific Fields
|
||||
$table->integer('entry_count');
|
||||
$table->foreignIdFor(Entry::class, 'accepted_entry')->nullable()->constrained()->cascadeOnDelete()->cascadeOnUpdate();
|
||||
$table->foreignIdFor(Entry::class, 'accepted_entry')->nullable()->constrained('entries')->cascadeOnDelete()->cascadeOnUpdate();
|
||||
|
||||
// Set the composite primary key
|
||||
$table->primary(['student_id', 'event_id']);
|
||||
|
|
|
|||
Loading…
Reference in New Issue