36 lines
828 B
PHP
36 lines
828 B
PHP
<?php
|
|
|
|
use App\Models\Resume;
|
|
use App\Models\ResumeComponent;
|
|
use Illuminate\Database\Migrations\Migration;
|
|
use Illuminate\Database\Schema\Blueprint;
|
|
use Illuminate\Support\Facades\Schema;
|
|
|
|
return new class extends Migration
|
|
{
|
|
/**
|
|
* Run the migrations.
|
|
*/
|
|
public function up(): void
|
|
{
|
|
Schema::create('resume_slots', function (Blueprint $table) {
|
|
$table->id();
|
|
|
|
$table->foreignIdFor(Resume::class)->constrained()->onDelete('cascade');
|
|
$table->foreignIdFor(ResumeComponent::class)->constrained()->onDelete('cascade');
|
|
|
|
$table->integer('order')->default(0);
|
|
|
|
$table->timestamps();
|
|
});
|
|
}
|
|
|
|
/**
|
|
* Reverse the migrations.
|
|
*/
|
|
public function down(): void
|
|
{
|
|
Schema::dropIfExists('resume_slots');
|
|
}
|
|
};
|