<?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::create('category_seo', function (Blueprint $table) {
            $table->foreignId('category_id')
                ->primary()
                ->constrained('categories')
                ->cascadeOnDelete();

            $table->string('meta_title')->nullable();
            $table->string('meta_description')->nullable();
            $table->string('meta_keywords')->nullable();
            $table->string('canonical_url')->nullable();
        });
    }

    public function down(): void
    {
        Schema::dropIfExists('category_seo');
    }
};
