<?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('recruitment_interviews', function (Blueprint $table) {
            $table->string('reference_code', 64)->change();
        });

        Schema::table('recruitment_interview_scorecards', function (Blueprint $table) {
            $table->string('reference_code', 64)->change();
        });

        Schema::table('recruitment_offer_letters', function (Blueprint $table) {
            $table->string('reference_code', 64)->change();
        });
    }

    public function down(): void
    {
        Schema::table('recruitment_interviews', function (Blueprint $table) {
            $table->string('reference_code', 32)->change();
        });

        Schema::table('recruitment_interview_scorecards', function (Blueprint $table) {
            $table->string('reference_code', 32)->change();
        });

        Schema::table('recruitment_offer_letters', function (Blueprint $table) {
            $table->string('reference_code', 32)->change();
        });
    }
};
