<?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('contact_messages', function (Blueprint $t) {
            $t->string('from_email')->nullable()->after('recipient_phone');
            $t->timestamp('read_at')->nullable()->after('failed_at');
        });
    }

    public function down(): void
    {
        Schema::table('contact_messages', function (Blueprint $t) {
            $t->dropColumn(['from_email', 'read_at']);
        });
    }
};
