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();
|
$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,
|
|
||||||
]);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue