<?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::table('accounts', function (Blueprint $table) {
            $table->string('department_name', 100)->nullable()->after('employee_type');
            $table->unsignedBigInteger('department_id')->nullable()->after('department_name');
            $table->string('team_name', 100)->nullable()->after('department_id');
            $table->unsignedBigInteger('team_id')->nullable()->after('team_name');
            $table->string('work_category', 50)->nullable()->after('team_id'); // For other, wire, pipes, switches
        });
    }

    /**
     * Reverse the migrations.
     */
    public function down(): void
    {
        Schema::table('accounts', function (Blueprint $table) {
            $table->dropColumn(['department_name', 'department_id', 'team_name', 'team_id', 'work_category']);
        });
    }
};
