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

36 lines
1.2 KiB
PHP

<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
public function up(): void
{
Schema::create('directions', function (Blueprint $table) {
$table->id();
$table->string('name', 255);
$table->string('full_name', 255);
$table->text('description')->nullable();
$table->string('code', 255);
$table->smallInteger('position');
$table->string('slug', 255)->unique();
$table->foreignId('department_id')->constrained('departments');
$table->foreignId('education_level_id')->constrained('education_levels');
$table->foreignId('education_form_id')->constrained('education_forms');
$table->smallInteger('budget_places');
$table->smallInteger('quota');
$table->smallInteger('paid_places');
$table->smallInteger('cost_paid_place');
$table->float('period');
$table->timestamps();
});
}
public function down(): void
{
Schema::dropIfExists('directions');
}
};