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

36 lines
1.2 KiB
PHP
Raw Permalink 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
{
public function up(): void
{
Schema::create('directions', function (Blueprint $table) {
$table->id();
2024-03-13 14:06:50 +03:00
$table->string('name', 255);
2024-03-12 09:32:57 +03:00
$table->string('full_name', 255);
2024-02-14 16:19:31 +03:00
$table->text('description')->nullable();
2024-03-12 09:32:57 +03:00
$table->string('code', 255);
$table->smallInteger('position');
$table->string('slug', 255)->unique();
2024-02-10 11:23:38 +03:00
$table->foreignId('department_id')->constrained('departments');
2024-02-14 16:16:44 +03:00
$table->foreignId('education_level_id')->constrained('education_levels');
2024-02-15 09:58:01 +03:00
$table->foreignId('education_form_id')->constrained('education_forms');
2024-03-12 09:32:57 +03:00
$table->smallInteger('budget_places');
$table->smallInteger('quota');
$table->smallInteger('paid_places');
$table->integer('cost_paid_place');
2024-02-29 18:00:50 +03:00
$table->float('period');
2024-02-10 11:23:38 +03:00
$table->timestamps();
});
}
public function down(): void
{
Schema::dropIfExists('directions');
}
};