Fix issue where service providers prevented initial database migration

This commit is contained in:
Matt Young 2025-08-05 15:47:32 -05:00
parent df48386818
commit 3dc5ae1793
1 changed files with 2 additions and 5 deletions

View File

@ -16,14 +16,11 @@ return new class extends Migration
$table->foreignIdFor(ScoringGuide::class)->nullable()->constrained()->cascadeOnUpdate()->nullOnDelete(); $table->foreignIdFor(ScoringGuide::class)->nullable()->constrained()->cascadeOnUpdate()->nullOnDelete();
}); });
if (! ScoringGuide::find(0)) { if (! DB::table('scoring_guides')->where('id', 0)->exists()) {
$sg = ScoringGuide::create([ DB::table('scoring_guides')->insert([
'id' => 0, 'id' => 0,
'name' => 'No Guide Assigned', 'name' => 'No Guide Assigned',
]); ]);
$sg->update([
'id' => 0,
]);
} }
} }