<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

return new class extends Migration
{
    /**
     * Run the migrations.
     */
    public function up(): void
    {
        Schema::table('testimonials', function (Blueprint $table) {
            $table->string('customer_name')->after('id');
            $table->text('testimonial')->after('customer_name');
            $table->integer('rating')->default(5)->after('testimonial');
            $table->string('event_type')->nullable()->after('rating');
            $table->boolean('is_featured')->default(false)->after('event_type');
            $table->string('image_path')->nullable()->after('is_featured');
        });
    }

    /**
     * Reverse the migrations.
     */
    public function down(): void
    {
        Schema::table('testimonials', function (Blueprint $table) {
            $table->dropColumn([
                'customer_name', 'testimonial', 'rating', 'event_type', 'is_featured', 'image_path'
            ]);
        });
    }
};
