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

35 lines
901 B
PHP
Raw Normal View History

2024-02-10 11:23:38 +03:00
<?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');
2024-02-14 16:19:31 +03:00
$table->text('description')->nullable();
2024-02-14 16:16:44 +03:00
$table->string('code');
2024-02-10 11:23:38 +03:00
$table->integer('position');
$table->string('slug');
$table->foreignId('department_id')->constrained('departments');
2024-02-14 16:16:44 +03:00
$table->foreignId('education_level_id')->constrained('education_levels');
2024-02-10 11:23:38 +03:00
$table->timestamps();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('directions');
}
};