<?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::create('serp_url_researches', function (Blueprint $table) {
            $table->id();
            $table->foreignId('serp_url_id');
            $table->string('url');
            $table->string('query');
            $table->text('content')->nullable();
            $table->mediumText('main_image')->nullable();
            $table->timestamps();

            $table->foreign('serp_url_id')->references('id')->on('serp_urls');
        });
    }

    /**
     * Reverse the migrations.
     */
    public function down(): void
    {
        Schema::dropIfExists('serp_url_researches');
    }
};
