Files
onboard/database/migrations/2026_01_09_154110_create_departments_table.php

31 lines
794 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('departments', function (Blueprint $table) {
$table->id('department_id');
$table->string('name_full');
$table->string('name_short')->nullable();
$table->unsignedBigInteger('rf_mis_department_id')->nullable();
$table->foreignIdFor(\App\Models\DepartmentType::class, 'rf_department_type')->nullable();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('departments');
}
};