<?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('company_employees', function (Blueprint $table) {
            $table->dropColumn(['nin_iv', 'nin_tag']);
        });
    }

    public function down(): void
    {
        Schema::table('company_employees', function (Blueprint $table) {
            $table->string('nin_iv', 64)->nullable()->after('nin_encrypted');
            $table->string('nin_tag', 64)->nullable()->after('nin_iv');
        });
    }
};
