<?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('testimonials', function (Blueprint $table) {
            $table->string('avatar_path', 2048)->nullable()->after('author_role');
        });

        Schema::table('testimonials', function (Blueprint $table) {
            $table->dropColumn('avatar_url');
        });
    }

    public function down(): void
    {
        Schema::table('testimonials', function (Blueprint $table) {
            $table->string('avatar_url', 2048)->nullable()->after('author_role');
        });

        Schema::table('testimonials', function (Blueprint $table) {
            $table->dropColumn('avatar_path');
        });
    }
};
