<?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::table('staff', function (Blueprint $table) {
            $table->string('degree_level')->nullable()->after('qualification');   // diploma|bachelor|master|phd
            $table->string('field_of_study')->nullable()->after('degree_level');  // e.g. Mathematics, Physics
            $table->string('university')->nullable()->after('field_of_study');
            $table->string('expertise')->nullable()->after('university');         // specialization / skills
            $table->unsignedSmallInteger('experience_years')->nullable()->after('expertise');
            $table->string('marital_status')->nullable()->after('experience_years');
            $table->string('blood_group')->nullable()->after('marital_status');
            $table->text('bio')->nullable()->after('blood_group');
        });
    }

    public function down(): void
    {
        Schema::table('staff', function (Blueprint $table) {
            $table->dropColumn(['degree_level', 'field_of_study', 'university', 'expertise', 'experience_years', 'marital_status', 'blood_group', 'bio']);
        });
    }
};
