This commit is contained in:
Adrian Hopek
2022-02-14 14:56:30 +01:00
parent d3d6e3080c
commit 1fe6e72e9a
9 changed files with 69 additions and 34 deletions

View File

@@ -7,6 +7,7 @@ use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
use Toby\Eloquent\Models\User;
use Toby\Eloquent\Models\VacationRequest;
use Toby\Eloquent\Models\YearPeriod;
return new class() extends Migration {
public function up(): void
@@ -15,6 +16,7 @@ return new class() extends Migration {
$table->id();
$table->foreignIdFor(User::class)->constrained()->cascadeOnDelete();
$table->foreignIdFor(VacationRequest::class)->constrained()->cascadeOnDelete();
$table->foreignIdFor(YearPeriod::class)->constrained()->cascadeOnDelete();
$table->date("date");
});
}