<?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('pension_cases', function (Blueprint $table) {
            $table->date('sar_sent_date')->nullable()->after('sar_sent');
            $table->date('atc_received_date')->nullable()->after('atc_received');
            $table->date('ifa_refer_opted_out_date')->nullable()->after('ifa_refer_opted_out');
        });
    }

    public function down(): void {
        Schema::table('pension_cases', function (Blueprint $table) {
            $table->dropColumn(['sar_sent_date', 'atc_received_date', 'ifa_refer_opted_out_date']);
        });
    }
};
