Fix issue where service providers prevented initial database migration
This commit is contained in:
parent
df48386818
commit
3dc5ae1793
|
|
@ -16,14 +16,11 @@ return new class extends Migration
|
|||
$table->foreignIdFor(ScoringGuide::class)->nullable()->constrained()->cascadeOnUpdate()->nullOnDelete();
|
||||
});
|
||||
|
||||
if (! ScoringGuide::find(0)) {
|
||||
$sg = ScoringGuide::create([
|
||||
if (! DB::table('scoring_guides')->where('id', 0)->exists()) {
|
||||
DB::table('scoring_guides')->insert([
|
||||
'id' => 0,
|
||||
'name' => 'No Guide Assigned',
|
||||
]);
|
||||
$sg->update([
|
||||
'id' => 0,
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue