Correct errors in migration

This commit is contained in:
Matt Young 2025-06-22 23:28:37 -05:00
parent d9a7e97047
commit f3591e9a08
1 changed files with 2 additions and 1 deletions

View File

@ -1,6 +1,7 @@
<?php <?php
use App\Models\Entry; use App\Models\Entry;
use App\Models\Event;
use App\Models\Student; use App\Models\Student;
use Illuminate\Database\Migrations\Migration; use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint; use Illuminate\Database\Schema\Blueprint;
@ -20,7 +21,7 @@ return new class extends Migration
// Doubler Specific Fields // Doubler Specific Fields
$table->integer('entry_count'); $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 // Set the composite primary key
$table->primary(['student_id', 'event_id']); $table->primary(['student_id', 'event_id']);