<?php

declare(strict_types=1);

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('categories', function (Blueprint $table): void {
            $table->string('description')->nullable()->after('name');
            $table->text('intro')->nullable()->after('description');
            $table->string('keywords')->nullable()->after('intro');
            $table->string('cover_path')->nullable()->after('keywords');
        });
    }

    public function down(): void
    {
        Schema::table('categories', function (Blueprint $table): void {
            $table->dropColumn(['description', 'intro', 'keywords', 'cover_path']);
        });
    }
};
