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

36 lines
1.1 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');
$table->string('full_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->foreignId('education_form_id')->constrained('education_forms');
$table->integer('budget_places');
$table->integer('quota');
$table->integer('paid_places');
$table->integer('cost_paid_place');
$table->float('period');
$table->timestamps();
});
}
public function down(): void
{
Schema::dropIfExists('directions');
}
};