<?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('home_sections', function (Blueprint $table) {
            $table->string('search_filter_heading')->nullable()->after('section_one_image');
            $table->string('second_section_heading')->nullable()->after('search_filter_heading');
            $table->string('second_section_button_text')->nullable()->after('second_section_heading');
            $table->string('third_section_heading')->nullable()->after('second_section_button_text');
            $table->text('third_section_description')->nullable()->after('third_section_heading');
            $table->string('third_section_image')->nullable()->after('third_section_description');
        });
    }

    /**
     * Reverse the migrations.
     */
    public function down(): void
    {
        Schema::table('home_sections', function (Blueprint $table) {
            $table->dropColumn([
                'search_filter_heading',
                'second_section_heading',
                'second_section_button_text',
                'third_section_heading',
                'third_section_description',
                'third_section_image',
            ]);
        });
    }
};
