applicant-site/database/migrations/2024_02_09_114155_create_di...

35 lines
901 B
PHP

<?php
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('directions', function (Blueprint $table) {
$table->id();
$table->string('name');
$table->text('description')->nullable();
$table->string('code');
$table->integer('position');
$table->string('slug');
$table->foreignId('department_id')->constrained('departments');
$table->foreignId('education_level_id')->constrained('education_levels');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('directions');
}
};